1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 #[doc = " Android Packet Filter (APF) support.\n"]
8 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9 pub struct ApfPacketFilterSupport {
10 pub supported: ::core::option::Option<bool>,
11
12 pub version: ::core::option::Option<i32>,
13
14 pub max_filter_length: ::core::option::Option<i32>,
15 }
16
17 impl ApfPacketFilterSupport {
18 fn __max_ordinal(&self) -> usize {
19 if self.max_filter_length.is_some() {
20 return 3;
21 }
22
23 if self.version.is_some() {
24 return 2;
25 }
26
27 if self.supported.is_some() {
28 return 1;
29 }
30
31 0
32 }
33 }
34
35 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ApfPacketFilterSupport<'static>, ___E>
36 for ApfPacketFilterSupport
37 where
38 ___E: ::fidl_next::Encoder + ?Sized,
39 {
40 #[inline]
41 fn encode(
42 mut self,
43 encoder: &mut ___E,
44 out: &mut ::core::mem::MaybeUninit<crate::wire::ApfPacketFilterSupport<'static>>,
45 _: (),
46 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
47 ::fidl_next::munge!(let crate::wire::ApfPacketFilterSupport { table } = out);
48
49 let max_ord = self.__max_ordinal();
50
51 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
52 ::fidl_next::Wire::zero_padding(&mut out);
53
54 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
55 ::fidl_next::wire::Envelope,
56 >(encoder, max_ord);
57
58 for i in 1..=max_ord {
59 match i {
60 3 => {
61 if let Some(value) = self.max_filter_length.take() {
62 ::fidl_next::wire::Envelope::encode_value::<
63 ::fidl_next::wire::Int32,
64 ___E,
65 >(
66 value, preallocated.encoder, &mut out, ()
67 )?;
68 } else {
69 ::fidl_next::wire::Envelope::encode_zero(&mut out)
70 }
71 }
72
73 2 => {
74 if let Some(value) = self.version.take() {
75 ::fidl_next::wire::Envelope::encode_value::<
76 ::fidl_next::wire::Int32,
77 ___E,
78 >(
79 value, preallocated.encoder, &mut out, ()
80 )?;
81 } else {
82 ::fidl_next::wire::Envelope::encode_zero(&mut out)
83 }
84 }
85
86 1 => {
87 if let Some(value) = self.supported.take() {
88 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
89 value,
90 preallocated.encoder,
91 &mut out,
92 (),
93 )?;
94 } else {
95 ::fidl_next::wire::Envelope::encode_zero(&mut out)
96 }
97 }
98
99 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
100 }
101 unsafe {
102 preallocated.write_next(out.assume_init_ref());
103 }
104 }
105
106 ::fidl_next::wire::Table::encode_len(table, max_ord);
107
108 Ok(())
109 }
110 }
111
112 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ApfPacketFilterSupport<'static>, ___E>
113 for &'a ApfPacketFilterSupport
114 where
115 ___E: ::fidl_next::Encoder + ?Sized,
116 {
117 #[inline]
118 fn encode(
119 self,
120 encoder: &mut ___E,
121 out: &mut ::core::mem::MaybeUninit<crate::wire::ApfPacketFilterSupport<'static>>,
122 _: (),
123 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
124 ::fidl_next::munge!(let crate::wire::ApfPacketFilterSupport { table } = out);
125
126 let max_ord = self.__max_ordinal();
127
128 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
129 ::fidl_next::Wire::zero_padding(&mut out);
130
131 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
132 ::fidl_next::wire::Envelope,
133 >(encoder, max_ord);
134
135 for i in 1..=max_ord {
136 match i {
137 3 => {
138 if let Some(value) = &self.max_filter_length {
139 ::fidl_next::wire::Envelope::encode_value::<
140 ::fidl_next::wire::Int32,
141 ___E,
142 >(
143 value, preallocated.encoder, &mut out, ()
144 )?;
145 } else {
146 ::fidl_next::wire::Envelope::encode_zero(&mut out)
147 }
148 }
149
150 2 => {
151 if let Some(value) = &self.version {
152 ::fidl_next::wire::Envelope::encode_value::<
153 ::fidl_next::wire::Int32,
154 ___E,
155 >(
156 value, preallocated.encoder, &mut out, ()
157 )?;
158 } else {
159 ::fidl_next::wire::Envelope::encode_zero(&mut out)
160 }
161 }
162
163 1 => {
164 if let Some(value) = &self.supported {
165 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
166 value,
167 preallocated.encoder,
168 &mut out,
169 (),
170 )?;
171 } else {
172 ::fidl_next::wire::Envelope::encode_zero(&mut out)
173 }
174 }
175
176 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
177 }
178 unsafe {
179 preallocated.write_next(out.assume_init_ref());
180 }
181 }
182
183 ::fidl_next::wire::Table::encode_len(table, max_ord);
184
185 Ok(())
186 }
187 }
188
189 impl<'de> ::fidl_next::FromWire<crate::wire::ApfPacketFilterSupport<'de>>
190 for ApfPacketFilterSupport
191 {
192 #[inline]
193 fn from_wire(wire_: crate::wire::ApfPacketFilterSupport<'de>) -> Self {
194 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
195
196 let supported = wire_.table.get(1);
197
198 let version = wire_.table.get(2);
199
200 let max_filter_length = wire_.table.get(3);
201
202 Self {
203 supported: supported.map(|envelope| {
204 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
205 }),
206
207 version: version.map(|envelope| {
208 ::fidl_next::FromWire::from_wire(unsafe {
209 envelope.read_unchecked::<::fidl_next::wire::Int32>()
210 })
211 }),
212
213 max_filter_length: max_filter_length.map(|envelope| {
214 ::fidl_next::FromWire::from_wire(unsafe {
215 envelope.read_unchecked::<::fidl_next::wire::Int32>()
216 })
217 }),
218 }
219 }
220 }
221
222 impl<'de> ::fidl_next::FromWireRef<crate::wire::ApfPacketFilterSupport<'de>>
223 for ApfPacketFilterSupport
224 {
225 #[inline]
226 fn from_wire_ref(wire: &crate::wire::ApfPacketFilterSupport<'de>) -> Self {
227 Self {
228 supported: wire.table.get(1).map(|envelope| {
229 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
230 envelope.deref_unchecked::<bool>()
231 })
232 }),
233
234 version: wire.table.get(2).map(|envelope| {
235 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
236 envelope.deref_unchecked::<::fidl_next::wire::Int32>()
237 })
238 }),
239
240 max_filter_length: wire.table.get(3).map(|envelope| {
241 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
242 envelope.deref_unchecked::<::fidl_next::wire::Int32>()
243 })
244 }),
245 }
246 }
247 }
248
249 #[doc = " An adjustment to be made to the observed RSSI values for BSSs in the specified band.\n"]
250 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
251 #[repr(C)]
252 pub struct BandRssiAdjustment {
253 pub band: ::fidl_next_common_fuchsia_wlan_ieee80211::natural::WlanBand,
254
255 pub rssi_adjustment: i8,
256 }
257
258 unsafe impl<___E> ::fidl_next::Encode<crate::wire::BandRssiAdjustment, ___E> for BandRssiAdjustment
259 where
260 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
261 {
262 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
263 Self,
264 crate::wire::BandRssiAdjustment,
265 > = unsafe {
266 ::fidl_next::CopyOptimization::enable_if(
267 true
268
269 && <
270 ::fidl_next_common_fuchsia_wlan_ieee80211::natural::WlanBand as ::fidl_next::Encode<::fidl_next_common_fuchsia_wlan_ieee80211::wire::WlanBand, ___E>
271 >::COPY_OPTIMIZATION.is_enabled()
272
273 && <
274 i8 as ::fidl_next::Encode<i8, ___E>
275 >::COPY_OPTIMIZATION.is_enabled()
276
277 )
278 };
279
280 #[inline]
281 fn encode(
282 self,
283 encoder_: &mut ___E,
284 out_: &mut ::core::mem::MaybeUninit<crate::wire::BandRssiAdjustment>,
285 _: (),
286 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
287 ::fidl_next::munge! {
288 let crate::wire::BandRssiAdjustment {
289 band,
290 rssi_adjustment,
291
292 } = out_;
293 }
294
295 ::fidl_next::Encode::encode(self.band, encoder_, band, ())?;
296
297 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(band.as_mut_ptr()) };
298
299 ::fidl_next::Encode::encode(self.rssi_adjustment, encoder_, rssi_adjustment, ())?;
300
301 let mut _field =
302 unsafe { ::fidl_next::Slot::new_unchecked(rssi_adjustment.as_mut_ptr()) };
303
304 Ok(())
305 }
306 }
307
308 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::BandRssiAdjustment, ___E>
309 for &'a BandRssiAdjustment
310 where
311 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
312 {
313 #[inline]
314 fn encode(
315 self,
316 encoder_: &mut ___E,
317 out_: &mut ::core::mem::MaybeUninit<crate::wire::BandRssiAdjustment>,
318 _: (),
319 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
320 ::fidl_next::munge! {
321 let crate::wire::BandRssiAdjustment {
322 band,
323 rssi_adjustment,
324
325 } = out_;
326 }
327
328 ::fidl_next::Encode::encode(&self.band, encoder_, band, ())?;
329
330 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(band.as_mut_ptr()) };
331
332 ::fidl_next::Encode::encode(&self.rssi_adjustment, encoder_, rssi_adjustment, ())?;
333
334 let mut _field =
335 unsafe { ::fidl_next::Slot::new_unchecked(rssi_adjustment.as_mut_ptr()) };
336
337 Ok(())
338 }
339 }
340
341 unsafe impl<___E>
342 ::fidl_next::EncodeOption<
343 ::fidl_next::wire::Box<'static, crate::wire::BandRssiAdjustment>,
344 ___E,
345 > for BandRssiAdjustment
346 where
347 ___E: ::fidl_next::Encoder + ?Sized,
348 BandRssiAdjustment: ::fidl_next::Encode<crate::wire::BandRssiAdjustment, ___E>,
349 {
350 #[inline]
351 fn encode_option(
352 this: ::core::option::Option<Self>,
353 encoder: &mut ___E,
354 out: &mut ::core::mem::MaybeUninit<
355 ::fidl_next::wire::Box<'static, crate::wire::BandRssiAdjustment>,
356 >,
357 _: (),
358 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
359 if let Some(inner) = this {
360 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
361 ::fidl_next::wire::Box::encode_present(out);
362 } else {
363 ::fidl_next::wire::Box::encode_absent(out);
364 }
365
366 Ok(())
367 }
368 }
369
370 unsafe impl<'a, ___E>
371 ::fidl_next::EncodeOption<
372 ::fidl_next::wire::Box<'static, crate::wire::BandRssiAdjustment>,
373 ___E,
374 > for &'a BandRssiAdjustment
375 where
376 ___E: ::fidl_next::Encoder + ?Sized,
377 &'a BandRssiAdjustment: ::fidl_next::Encode<crate::wire::BandRssiAdjustment, ___E>,
378 {
379 #[inline]
380 fn encode_option(
381 this: ::core::option::Option<Self>,
382 encoder: &mut ___E,
383 out: &mut ::core::mem::MaybeUninit<
384 ::fidl_next::wire::Box<'static, crate::wire::BandRssiAdjustment>,
385 >,
386 _: (),
387 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
388 if let Some(inner) = this {
389 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
390 ::fidl_next::wire::Box::encode_present(out);
391 } else {
392 ::fidl_next::wire::Box::encode_absent(out);
393 }
394
395 Ok(())
396 }
397 }
398
399 impl ::fidl_next::FromWire<crate::wire::BandRssiAdjustment> for BandRssiAdjustment {
400 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
401 crate::wire::BandRssiAdjustment,
402 Self,
403 > = unsafe {
404 ::fidl_next::CopyOptimization::enable_if(
405 true
406
407 && <
408 ::fidl_next_common_fuchsia_wlan_ieee80211::natural::WlanBand as ::fidl_next::FromWire<::fidl_next_common_fuchsia_wlan_ieee80211::wire::WlanBand>
409 >::COPY_OPTIMIZATION.is_enabled()
410
411 && <
412 i8 as ::fidl_next::FromWire<i8>
413 >::COPY_OPTIMIZATION.is_enabled()
414
415 )
416 };
417
418 #[inline]
419 fn from_wire(wire: crate::wire::BandRssiAdjustment) -> Self {
420 Self {
421 band: ::fidl_next::FromWire::from_wire(wire.band),
422
423 rssi_adjustment: ::fidl_next::FromWire::from_wire(wire.rssi_adjustment),
424 }
425 }
426 }
427
428 impl ::fidl_next::FromWireRef<crate::wire::BandRssiAdjustment> for BandRssiAdjustment {
429 #[inline]
430 fn from_wire_ref(wire: &crate::wire::BandRssiAdjustment) -> Self {
431 Self {
432 band: ::fidl_next::FromWireRef::from_wire_ref(&wire.band),
433
434 rssi_adjustment: ::fidl_next::FromWireRef::from_wire_ref(&wire.rssi_adjustment),
435 }
436 }
437 }
438
439 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
440 #[repr(u32)]
441 pub enum BssType {
442 Unknown = 0,
443 Infrastructure = 1,
444 Independent = 2,
445 Mesh = 3,
446 Personal = 4,
447 UnknownOrdinal_(u32) = 5,
448 }
449 impl ::std::convert::From<u32> for BssType {
450 fn from(value: u32) -> Self {
451 match value {
452 0 => Self::Unknown,
453 1 => Self::Infrastructure,
454 2 => Self::Independent,
455 3 => Self::Mesh,
456 4 => Self::Personal,
457
458 _ => Self::UnknownOrdinal_(value),
459 }
460 }
461 }
462
463 impl ::std::convert::From<BssType> for u32 {
464 fn from(value: BssType) -> Self {
465 match value {
466 BssType::Unknown => 0,
467 BssType::Infrastructure => 1,
468 BssType::Independent => 2,
469 BssType::Mesh => 3,
470 BssType::Personal => 4,
471
472 BssType::UnknownOrdinal_(value) => value,
473 }
474 }
475 }
476
477 unsafe impl<___E> ::fidl_next::Encode<crate::wire::BssType, ___E> for BssType
478 where
479 ___E: ?Sized,
480 {
481 #[inline]
482 fn encode(
483 self,
484 encoder: &mut ___E,
485 out: &mut ::core::mem::MaybeUninit<crate::wire::BssType>,
486 _: (),
487 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
488 ::fidl_next::Encode::encode(&self, encoder, out, ())
489 }
490 }
491
492 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::BssType, ___E> for &'a BssType
493 where
494 ___E: ?Sized,
495 {
496 #[inline]
497 fn encode(
498 self,
499 encoder: &mut ___E,
500 out: &mut ::core::mem::MaybeUninit<crate::wire::BssType>,
501 _: (),
502 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
503 ::fidl_next::munge!(let crate::wire::BssType { value } = out);
504 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
505 BssType::Unknown => 0,
506
507 BssType::Infrastructure => 1,
508
509 BssType::Independent => 2,
510
511 BssType::Mesh => 3,
512
513 BssType::Personal => 4,
514
515 BssType::UnknownOrdinal_(value) => value,
516 }));
517
518 Ok(())
519 }
520 }
521
522 impl ::core::convert::From<crate::wire::BssType> for BssType {
523 fn from(wire: crate::wire::BssType) -> Self {
524 match u32::from(wire.value) {
525 0 => Self::Unknown,
526
527 1 => Self::Infrastructure,
528
529 2 => Self::Independent,
530
531 3 => Self::Mesh,
532
533 4 => Self::Personal,
534
535 value => Self::UnknownOrdinal_(value),
536 }
537 }
538 }
539
540 impl ::fidl_next::FromWire<crate::wire::BssType> for BssType {
541 #[inline]
542 fn from_wire(wire: crate::wire::BssType) -> Self {
543 Self::from(wire)
544 }
545 }
546
547 impl ::fidl_next::FromWireRef<crate::wire::BssType> for BssType {
548 #[inline]
549 fn from_wire_ref(wire: &crate::wire::BssType) -> Self {
550 Self::from(*wire)
551 }
552 }
553
554 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
555 #[repr(u32)]
556 pub enum ChannelBandwidth {
557 Cbw20 = 1,
558 Cbw40 = 2,
559 Cbw40Below = 3,
560 Cbw80 = 4,
561 Cbw160 = 5,
562 Cbw80P80 = 6,
563 UnknownOrdinal_(u32) = 7,
564 }
565 impl ::std::convert::From<u32> for ChannelBandwidth {
566 fn from(value: u32) -> Self {
567 match value {
568 1 => Self::Cbw20,
569 2 => Self::Cbw40,
570 3 => Self::Cbw40Below,
571 4 => Self::Cbw80,
572 5 => Self::Cbw160,
573 6 => Self::Cbw80P80,
574
575 _ => Self::UnknownOrdinal_(value),
576 }
577 }
578 }
579
580 impl ::std::convert::From<ChannelBandwidth> for u32 {
581 fn from(value: ChannelBandwidth) -> Self {
582 match value {
583 ChannelBandwidth::Cbw20 => 1,
584 ChannelBandwidth::Cbw40 => 2,
585 ChannelBandwidth::Cbw40Below => 3,
586 ChannelBandwidth::Cbw80 => 4,
587 ChannelBandwidth::Cbw160 => 5,
588 ChannelBandwidth::Cbw80P80 => 6,
589
590 ChannelBandwidth::UnknownOrdinal_(value) => value,
591 }
592 }
593 }
594
595 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ChannelBandwidth, ___E> for ChannelBandwidth
596 where
597 ___E: ?Sized,
598 {
599 #[inline]
600 fn encode(
601 self,
602 encoder: &mut ___E,
603 out: &mut ::core::mem::MaybeUninit<crate::wire::ChannelBandwidth>,
604 _: (),
605 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
606 ::fidl_next::Encode::encode(&self, encoder, out, ())
607 }
608 }
609
610 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ChannelBandwidth, ___E>
611 for &'a ChannelBandwidth
612 where
613 ___E: ?Sized,
614 {
615 #[inline]
616 fn encode(
617 self,
618 encoder: &mut ___E,
619 out: &mut ::core::mem::MaybeUninit<crate::wire::ChannelBandwidth>,
620 _: (),
621 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
622 ::fidl_next::munge!(let crate::wire::ChannelBandwidth { value } = out);
623 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
624 ChannelBandwidth::Cbw20 => 1,
625
626 ChannelBandwidth::Cbw40 => 2,
627
628 ChannelBandwidth::Cbw40Below => 3,
629
630 ChannelBandwidth::Cbw80 => 4,
631
632 ChannelBandwidth::Cbw160 => 5,
633
634 ChannelBandwidth::Cbw80P80 => 6,
635
636 ChannelBandwidth::UnknownOrdinal_(value) => value,
637 }));
638
639 Ok(())
640 }
641 }
642
643 impl ::core::convert::From<crate::wire::ChannelBandwidth> for ChannelBandwidth {
644 fn from(wire: crate::wire::ChannelBandwidth) -> Self {
645 match u32::from(wire.value) {
646 1 => Self::Cbw20,
647
648 2 => Self::Cbw40,
649
650 3 => Self::Cbw40Below,
651
652 4 => Self::Cbw80,
653
654 5 => Self::Cbw160,
655
656 6 => Self::Cbw80P80,
657
658 value => Self::UnknownOrdinal_(value),
659 }
660 }
661 }
662
663 impl ::fidl_next::FromWire<crate::wire::ChannelBandwidth> for ChannelBandwidth {
664 #[inline]
665 fn from_wire(wire: crate::wire::ChannelBandwidth) -> Self {
666 Self::from(wire)
667 }
668 }
669
670 impl ::fidl_next::FromWireRef<crate::wire::ChannelBandwidth> for ChannelBandwidth {
671 #[inline]
672 fn from_wire_ref(wire: &crate::wire::ChannelBandwidth) -> Self {
673 Self::from(*wire)
674 }
675 }
676
677 #[doc = " Indicates where data plane is implemented.\n"]
678 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
679 #[repr(u8)]
680 pub enum DataPlaneType {
681 EthernetDevice = 1,
682 GenericNetworkDevice = 2,
683 UnknownOrdinal_(u8) = 3,
684 }
685 impl ::std::convert::From<u8> for DataPlaneType {
686 fn from(value: u8) -> Self {
687 match value {
688 1 => Self::EthernetDevice,
689 2 => Self::GenericNetworkDevice,
690
691 _ => Self::UnknownOrdinal_(value),
692 }
693 }
694 }
695
696 impl ::std::convert::From<DataPlaneType> for u8 {
697 fn from(value: DataPlaneType) -> Self {
698 match value {
699 DataPlaneType::EthernetDevice => 1,
700 DataPlaneType::GenericNetworkDevice => 2,
701
702 DataPlaneType::UnknownOrdinal_(value) => value,
703 }
704 }
705 }
706
707 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DataPlaneType, ___E> for DataPlaneType
708 where
709 ___E: ?Sized,
710 {
711 #[inline]
712 fn encode(
713 self,
714 encoder: &mut ___E,
715 out: &mut ::core::mem::MaybeUninit<crate::wire::DataPlaneType>,
716 _: (),
717 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
718 ::fidl_next::Encode::encode(&self, encoder, out, ())
719 }
720 }
721
722 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DataPlaneType, ___E> for &'a DataPlaneType
723 where
724 ___E: ?Sized,
725 {
726 #[inline]
727 fn encode(
728 self,
729 encoder: &mut ___E,
730 out: &mut ::core::mem::MaybeUninit<crate::wire::DataPlaneType>,
731 _: (),
732 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
733 ::fidl_next::munge!(let crate::wire::DataPlaneType { value } = out);
734 let _ = value.write(u8::from(match *self {
735 DataPlaneType::EthernetDevice => 1,
736
737 DataPlaneType::GenericNetworkDevice => 2,
738
739 DataPlaneType::UnknownOrdinal_(value) => value,
740 }));
741
742 Ok(())
743 }
744 }
745
746 impl ::core::convert::From<crate::wire::DataPlaneType> for DataPlaneType {
747 fn from(wire: crate::wire::DataPlaneType) -> Self {
748 match u8::from(wire.value) {
749 1 => Self::EthernetDevice,
750
751 2 => Self::GenericNetworkDevice,
752
753 value => Self::UnknownOrdinal_(value),
754 }
755 }
756 }
757
758 impl ::fidl_next::FromWire<crate::wire::DataPlaneType> for DataPlaneType {
759 #[inline]
760 fn from_wire(wire: crate::wire::DataPlaneType) -> Self {
761 Self::from(wire)
762 }
763 }
764
765 impl ::fidl_next::FromWireRef<crate::wire::DataPlaneType> for DataPlaneType {
766 #[inline]
767 fn from_wire_ref(wire: &crate::wire::DataPlaneType) -> Self {
768 Self::from(*wire)
769 }
770 }
771
772 #[doc = " Indicates where the data plane is implemented.\n This is a MAC sublayer extension, usable for fullmac or softmac. This\n extension is not part of the 802.11-2016 spec.\n"]
773 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
774 pub struct DataPlaneExtension {
775 pub data_plane_type: ::core::option::Option<crate::natural::DataPlaneType>,
776 }
777
778 impl DataPlaneExtension {
779 fn __max_ordinal(&self) -> usize {
780 if self.data_plane_type.is_some() {
781 return 1;
782 }
783
784 0
785 }
786 }
787
788 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DataPlaneExtension<'static>, ___E>
789 for DataPlaneExtension
790 where
791 ___E: ::fidl_next::Encoder + ?Sized,
792 {
793 #[inline]
794 fn encode(
795 mut self,
796 encoder: &mut ___E,
797 out: &mut ::core::mem::MaybeUninit<crate::wire::DataPlaneExtension<'static>>,
798 _: (),
799 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
800 ::fidl_next::munge!(let crate::wire::DataPlaneExtension { table } = out);
801
802 let max_ord = self.__max_ordinal();
803
804 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
805 ::fidl_next::Wire::zero_padding(&mut out);
806
807 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
808 ::fidl_next::wire::Envelope,
809 >(encoder, max_ord);
810
811 for i in 1..=max_ord {
812 match i {
813 1 => {
814 if let Some(value) = self.data_plane_type.take() {
815 ::fidl_next::wire::Envelope::encode_value::<
816 crate::wire::DataPlaneType,
817 ___E,
818 >(
819 value, preallocated.encoder, &mut out, ()
820 )?;
821 } else {
822 ::fidl_next::wire::Envelope::encode_zero(&mut out)
823 }
824 }
825
826 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
827 }
828 unsafe {
829 preallocated.write_next(out.assume_init_ref());
830 }
831 }
832
833 ::fidl_next::wire::Table::encode_len(table, max_ord);
834
835 Ok(())
836 }
837 }
838
839 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DataPlaneExtension<'static>, ___E>
840 for &'a DataPlaneExtension
841 where
842 ___E: ::fidl_next::Encoder + ?Sized,
843 {
844 #[inline]
845 fn encode(
846 self,
847 encoder: &mut ___E,
848 out: &mut ::core::mem::MaybeUninit<crate::wire::DataPlaneExtension<'static>>,
849 _: (),
850 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
851 ::fidl_next::munge!(let crate::wire::DataPlaneExtension { table } = out);
852
853 let max_ord = self.__max_ordinal();
854
855 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
856 ::fidl_next::Wire::zero_padding(&mut out);
857
858 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
859 ::fidl_next::wire::Envelope,
860 >(encoder, max_ord);
861
862 for i in 1..=max_ord {
863 match i {
864 1 => {
865 if let Some(value) = &self.data_plane_type {
866 ::fidl_next::wire::Envelope::encode_value::<
867 crate::wire::DataPlaneType,
868 ___E,
869 >(
870 value, preallocated.encoder, &mut out, ()
871 )?;
872 } else {
873 ::fidl_next::wire::Envelope::encode_zero(&mut out)
874 }
875 }
876
877 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
878 }
879 unsafe {
880 preallocated.write_next(out.assume_init_ref());
881 }
882 }
883
884 ::fidl_next::wire::Table::encode_len(table, max_ord);
885
886 Ok(())
887 }
888 }
889
890 impl<'de> ::fidl_next::FromWire<crate::wire::DataPlaneExtension<'de>> for DataPlaneExtension {
891 #[inline]
892 fn from_wire(wire_: crate::wire::DataPlaneExtension<'de>) -> Self {
893 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
894
895 let data_plane_type = wire_.table.get(1);
896
897 Self {
898 data_plane_type: data_plane_type.map(|envelope| {
899 ::fidl_next::FromWire::from_wire(unsafe {
900 envelope.read_unchecked::<crate::wire::DataPlaneType>()
901 })
902 }),
903 }
904 }
905 }
906
907 impl<'de> ::fidl_next::FromWireRef<crate::wire::DataPlaneExtension<'de>> for DataPlaneExtension {
908 #[inline]
909 fn from_wire_ref(wire: &crate::wire::DataPlaneExtension<'de>) -> Self {
910 Self {
911 data_plane_type: wire.table.get(1).map(|envelope| {
912 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
913 envelope.deref_unchecked::<crate::wire::DataPlaneType>()
914 })
915 }),
916 }
917 }
918 }
919
920 #[doc = " Indicates where MAC layer is implemented.\n"]
921 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
922 #[repr(u8)]
923 pub enum MacImplementationType {
924 Softmac = 1,
925 Fullmac = 2,
926 UnknownOrdinal_(u8) = 3,
927 }
928 impl ::std::convert::From<u8> for MacImplementationType {
929 fn from(value: u8) -> Self {
930 match value {
931 1 => Self::Softmac,
932 2 => Self::Fullmac,
933
934 _ => Self::UnknownOrdinal_(value),
935 }
936 }
937 }
938
939 impl ::std::convert::From<MacImplementationType> for u8 {
940 fn from(value: MacImplementationType) -> Self {
941 match value {
942 MacImplementationType::Softmac => 1,
943 MacImplementationType::Fullmac => 2,
944
945 MacImplementationType::UnknownOrdinal_(value) => value,
946 }
947 }
948 }
949
950 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MacImplementationType, ___E>
951 for MacImplementationType
952 where
953 ___E: ?Sized,
954 {
955 #[inline]
956 fn encode(
957 self,
958 encoder: &mut ___E,
959 out: &mut ::core::mem::MaybeUninit<crate::wire::MacImplementationType>,
960 _: (),
961 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
962 ::fidl_next::Encode::encode(&self, encoder, out, ())
963 }
964 }
965
966 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::MacImplementationType, ___E>
967 for &'a MacImplementationType
968 where
969 ___E: ?Sized,
970 {
971 #[inline]
972 fn encode(
973 self,
974 encoder: &mut ___E,
975 out: &mut ::core::mem::MaybeUninit<crate::wire::MacImplementationType>,
976 _: (),
977 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
978 ::fidl_next::munge!(let crate::wire::MacImplementationType { value } = out);
979 let _ = value.write(u8::from(match *self {
980 MacImplementationType::Softmac => 1,
981
982 MacImplementationType::Fullmac => 2,
983
984 MacImplementationType::UnknownOrdinal_(value) => value,
985 }));
986
987 Ok(())
988 }
989 }
990
991 impl ::core::convert::From<crate::wire::MacImplementationType> for MacImplementationType {
992 fn from(wire: crate::wire::MacImplementationType) -> Self {
993 match u8::from(wire.value) {
994 1 => Self::Softmac,
995
996 2 => Self::Fullmac,
997
998 value => Self::UnknownOrdinal_(value),
999 }
1000 }
1001 }
1002
1003 impl ::fidl_next::FromWire<crate::wire::MacImplementationType> for MacImplementationType {
1004 #[inline]
1005 fn from_wire(wire: crate::wire::MacImplementationType) -> Self {
1006 Self::from(wire)
1007 }
1008 }
1009
1010 impl ::fidl_next::FromWireRef<crate::wire::MacImplementationType> for MacImplementationType {
1011 #[inline]
1012 fn from_wire_ref(wire: &crate::wire::MacImplementationType) -> Self {
1013 Self::from(*wire)
1014 }
1015 }
1016
1017 #[doc = " Feature-like information specific to the device.\n This is a MAC sublayer extension. This extension is not part of the\n 802.11-2016 spec.\n"]
1018 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1019 pub struct DeviceExtension {
1020 pub is_synthetic: ::core::option::Option<bool>,
1021
1022 pub mac_implementation_type: ::core::option::Option<crate::natural::MacImplementationType>,
1023
1024 pub tx_status_report_supported: ::core::option::Option<bool>,
1025 }
1026
1027 impl DeviceExtension {
1028 fn __max_ordinal(&self) -> usize {
1029 if self.tx_status_report_supported.is_some() {
1030 return 3;
1031 }
1032
1033 if self.mac_implementation_type.is_some() {
1034 return 2;
1035 }
1036
1037 if self.is_synthetic.is_some() {
1038 return 1;
1039 }
1040
1041 0
1042 }
1043 }
1044
1045 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DeviceExtension<'static>, ___E>
1046 for DeviceExtension
1047 where
1048 ___E: ::fidl_next::Encoder + ?Sized,
1049 {
1050 #[inline]
1051 fn encode(
1052 mut self,
1053 encoder: &mut ___E,
1054 out: &mut ::core::mem::MaybeUninit<crate::wire::DeviceExtension<'static>>,
1055 _: (),
1056 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1057 ::fidl_next::munge!(let crate::wire::DeviceExtension { table } = out);
1058
1059 let max_ord = self.__max_ordinal();
1060
1061 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1062 ::fidl_next::Wire::zero_padding(&mut out);
1063
1064 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1065 ::fidl_next::wire::Envelope,
1066 >(encoder, max_ord);
1067
1068 for i in 1..=max_ord {
1069 match i {
1070 3 => {
1071 if let Some(value) = self.tx_status_report_supported.take() {
1072 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1073 value,
1074 preallocated.encoder,
1075 &mut out,
1076 (),
1077 )?;
1078 } else {
1079 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1080 }
1081 }
1082
1083 2 => {
1084 if let Some(value) = self.mac_implementation_type.take() {
1085 ::fidl_next::wire::Envelope::encode_value::<
1086 crate::wire::MacImplementationType,
1087 ___E,
1088 >(
1089 value, preallocated.encoder, &mut out, ()
1090 )?;
1091 } else {
1092 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1093 }
1094 }
1095
1096 1 => {
1097 if let Some(value) = self.is_synthetic.take() {
1098 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1099 value,
1100 preallocated.encoder,
1101 &mut out,
1102 (),
1103 )?;
1104 } else {
1105 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1106 }
1107 }
1108
1109 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1110 }
1111 unsafe {
1112 preallocated.write_next(out.assume_init_ref());
1113 }
1114 }
1115
1116 ::fidl_next::wire::Table::encode_len(table, max_ord);
1117
1118 Ok(())
1119 }
1120 }
1121
1122 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DeviceExtension<'static>, ___E>
1123 for &'a DeviceExtension
1124 where
1125 ___E: ::fidl_next::Encoder + ?Sized,
1126 {
1127 #[inline]
1128 fn encode(
1129 self,
1130 encoder: &mut ___E,
1131 out: &mut ::core::mem::MaybeUninit<crate::wire::DeviceExtension<'static>>,
1132 _: (),
1133 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1134 ::fidl_next::munge!(let crate::wire::DeviceExtension { table } = out);
1135
1136 let max_ord = self.__max_ordinal();
1137
1138 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1139 ::fidl_next::Wire::zero_padding(&mut out);
1140
1141 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1142 ::fidl_next::wire::Envelope,
1143 >(encoder, max_ord);
1144
1145 for i in 1..=max_ord {
1146 match i {
1147 3 => {
1148 if let Some(value) = &self.tx_status_report_supported {
1149 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1150 value,
1151 preallocated.encoder,
1152 &mut out,
1153 (),
1154 )?;
1155 } else {
1156 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1157 }
1158 }
1159
1160 2 => {
1161 if let Some(value) = &self.mac_implementation_type {
1162 ::fidl_next::wire::Envelope::encode_value::<
1163 crate::wire::MacImplementationType,
1164 ___E,
1165 >(
1166 value, preallocated.encoder, &mut out, ()
1167 )?;
1168 } else {
1169 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1170 }
1171 }
1172
1173 1 => {
1174 if let Some(value) = &self.is_synthetic {
1175 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1176 value,
1177 preallocated.encoder,
1178 &mut out,
1179 (),
1180 )?;
1181 } else {
1182 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1183 }
1184 }
1185
1186 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1187 }
1188 unsafe {
1189 preallocated.write_next(out.assume_init_ref());
1190 }
1191 }
1192
1193 ::fidl_next::wire::Table::encode_len(table, max_ord);
1194
1195 Ok(())
1196 }
1197 }
1198
1199 impl<'de> ::fidl_next::FromWire<crate::wire::DeviceExtension<'de>> for DeviceExtension {
1200 #[inline]
1201 fn from_wire(wire_: crate::wire::DeviceExtension<'de>) -> Self {
1202 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1203
1204 let is_synthetic = wire_.table.get(1);
1205
1206 let mac_implementation_type = wire_.table.get(2);
1207
1208 let tx_status_report_supported = wire_.table.get(3);
1209
1210 Self {
1211 is_synthetic: is_synthetic.map(|envelope| {
1212 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
1213 }),
1214
1215 mac_implementation_type: mac_implementation_type.map(|envelope| {
1216 ::fidl_next::FromWire::from_wire(unsafe {
1217 envelope.read_unchecked::<crate::wire::MacImplementationType>()
1218 })
1219 }),
1220
1221 tx_status_report_supported: tx_status_report_supported.map(|envelope| {
1222 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
1223 }),
1224 }
1225 }
1226 }
1227
1228 impl<'de> ::fidl_next::FromWireRef<crate::wire::DeviceExtension<'de>> for DeviceExtension {
1229 #[inline]
1230 fn from_wire_ref(wire: &crate::wire::DeviceExtension<'de>) -> Self {
1231 Self {
1232 is_synthetic: wire.table.get(1).map(|envelope| {
1233 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1234 envelope.deref_unchecked::<bool>()
1235 })
1236 }),
1237
1238 mac_implementation_type: wire.table.get(2).map(|envelope| {
1239 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1240 envelope.deref_unchecked::<crate::wire::MacImplementationType>()
1241 })
1242 }),
1243
1244 tx_status_report_supported: wire.table.get(3).map(|envelope| {
1245 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1246 envelope.deref_unchecked::<bool>()
1247 })
1248 }),
1249 }
1250 }
1251 }
1252
1253 #[doc = " Dynamic Frequency Selection.\n See IEEE 802.11-2016 11.9.\n This is a spectrum management feature, usable for fullmac or softmac.\n"]
1254 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1255 pub struct DfsFeature {
1256 pub supported: ::core::option::Option<bool>,
1257 }
1258
1259 impl DfsFeature {
1260 fn __max_ordinal(&self) -> usize {
1261 if self.supported.is_some() {
1262 return 1;
1263 }
1264
1265 0
1266 }
1267 }
1268
1269 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DfsFeature<'static>, ___E> for DfsFeature
1270 where
1271 ___E: ::fidl_next::Encoder + ?Sized,
1272 {
1273 #[inline]
1274 fn encode(
1275 mut self,
1276 encoder: &mut ___E,
1277 out: &mut ::core::mem::MaybeUninit<crate::wire::DfsFeature<'static>>,
1278 _: (),
1279 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1280 ::fidl_next::munge!(let crate::wire::DfsFeature { table } = out);
1281
1282 let max_ord = self.__max_ordinal();
1283
1284 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1285 ::fidl_next::Wire::zero_padding(&mut out);
1286
1287 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1288 ::fidl_next::wire::Envelope,
1289 >(encoder, max_ord);
1290
1291 for i in 1..=max_ord {
1292 match i {
1293 1 => {
1294 if let Some(value) = self.supported.take() {
1295 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1296 value,
1297 preallocated.encoder,
1298 &mut out,
1299 (),
1300 )?;
1301 } else {
1302 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1303 }
1304 }
1305
1306 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1307 }
1308 unsafe {
1309 preallocated.write_next(out.assume_init_ref());
1310 }
1311 }
1312
1313 ::fidl_next::wire::Table::encode_len(table, max_ord);
1314
1315 Ok(())
1316 }
1317 }
1318
1319 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DfsFeature<'static>, ___E> for &'a DfsFeature
1320 where
1321 ___E: ::fidl_next::Encoder + ?Sized,
1322 {
1323 #[inline]
1324 fn encode(
1325 self,
1326 encoder: &mut ___E,
1327 out: &mut ::core::mem::MaybeUninit<crate::wire::DfsFeature<'static>>,
1328 _: (),
1329 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1330 ::fidl_next::munge!(let crate::wire::DfsFeature { table } = out);
1331
1332 let max_ord = self.__max_ordinal();
1333
1334 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1335 ::fidl_next::Wire::zero_padding(&mut out);
1336
1337 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1338 ::fidl_next::wire::Envelope,
1339 >(encoder, max_ord);
1340
1341 for i in 1..=max_ord {
1342 match i {
1343 1 => {
1344 if let Some(value) = &self.supported {
1345 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1346 value,
1347 preallocated.encoder,
1348 &mut out,
1349 (),
1350 )?;
1351 } else {
1352 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1353 }
1354 }
1355
1356 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1357 }
1358 unsafe {
1359 preallocated.write_next(out.assume_init_ref());
1360 }
1361 }
1362
1363 ::fidl_next::wire::Table::encode_len(table, max_ord);
1364
1365 Ok(())
1366 }
1367 }
1368
1369 impl<'de> ::fidl_next::FromWire<crate::wire::DfsFeature<'de>> for DfsFeature {
1370 #[inline]
1371 fn from_wire(wire_: crate::wire::DfsFeature<'de>) -> Self {
1372 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1373
1374 let supported = wire_.table.get(1);
1375
1376 Self {
1377 supported: supported.map(|envelope| {
1378 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
1379 }),
1380 }
1381 }
1382 }
1383
1384 impl<'de> ::fidl_next::FromWireRef<crate::wire::DfsFeature<'de>> for DfsFeature {
1385 #[inline]
1386 fn from_wire_ref(wire: &crate::wire::DfsFeature<'de>) -> Self {
1387 Self {
1388 supported: wire.table.get(1).map(|envelope| {
1389 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1390 envelope.deref_unchecked::<bool>()
1391 })
1392 }),
1393 }
1394 }
1395 }
1396
1397 #[doc = " Indicates where and how scan logic is orchestrated.\n See IEEE 802.11-2016 11.1.4.2 and 11.1.4.3.\n This is a discovery extension, expected to be used for softmac only.\n"]
1398 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1399 pub struct ScanOffloadExtension {
1400 pub supported: ::core::option::Option<bool>,
1401
1402 pub scan_cancel_supported: ::core::option::Option<bool>,
1403 }
1404
1405 impl ScanOffloadExtension {
1406 fn __max_ordinal(&self) -> usize {
1407 if self.scan_cancel_supported.is_some() {
1408 return 2;
1409 }
1410
1411 if self.supported.is_some() {
1412 return 1;
1413 }
1414
1415 0
1416 }
1417 }
1418
1419 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ScanOffloadExtension<'static>, ___E>
1420 for ScanOffloadExtension
1421 where
1422 ___E: ::fidl_next::Encoder + ?Sized,
1423 {
1424 #[inline]
1425 fn encode(
1426 mut self,
1427 encoder: &mut ___E,
1428 out: &mut ::core::mem::MaybeUninit<crate::wire::ScanOffloadExtension<'static>>,
1429 _: (),
1430 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1431 ::fidl_next::munge!(let crate::wire::ScanOffloadExtension { table } = out);
1432
1433 let max_ord = self.__max_ordinal();
1434
1435 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1436 ::fidl_next::Wire::zero_padding(&mut out);
1437
1438 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1439 ::fidl_next::wire::Envelope,
1440 >(encoder, max_ord);
1441
1442 for i in 1..=max_ord {
1443 match i {
1444 2 => {
1445 if let Some(value) = self.scan_cancel_supported.take() {
1446 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1447 value,
1448 preallocated.encoder,
1449 &mut out,
1450 (),
1451 )?;
1452 } else {
1453 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1454 }
1455 }
1456
1457 1 => {
1458 if let Some(value) = self.supported.take() {
1459 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1460 value,
1461 preallocated.encoder,
1462 &mut out,
1463 (),
1464 )?;
1465 } else {
1466 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1467 }
1468 }
1469
1470 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1471 }
1472 unsafe {
1473 preallocated.write_next(out.assume_init_ref());
1474 }
1475 }
1476
1477 ::fidl_next::wire::Table::encode_len(table, max_ord);
1478
1479 Ok(())
1480 }
1481 }
1482
1483 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ScanOffloadExtension<'static>, ___E>
1484 for &'a ScanOffloadExtension
1485 where
1486 ___E: ::fidl_next::Encoder + ?Sized,
1487 {
1488 #[inline]
1489 fn encode(
1490 self,
1491 encoder: &mut ___E,
1492 out: &mut ::core::mem::MaybeUninit<crate::wire::ScanOffloadExtension<'static>>,
1493 _: (),
1494 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1495 ::fidl_next::munge!(let crate::wire::ScanOffloadExtension { table } = out);
1496
1497 let max_ord = self.__max_ordinal();
1498
1499 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1500 ::fidl_next::Wire::zero_padding(&mut out);
1501
1502 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1503 ::fidl_next::wire::Envelope,
1504 >(encoder, max_ord);
1505
1506 for i in 1..=max_ord {
1507 match i {
1508 2 => {
1509 if let Some(value) = &self.scan_cancel_supported {
1510 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1511 value,
1512 preallocated.encoder,
1513 &mut out,
1514 (),
1515 )?;
1516 } else {
1517 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1518 }
1519 }
1520
1521 1 => {
1522 if let Some(value) = &self.supported {
1523 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1524 value,
1525 preallocated.encoder,
1526 &mut out,
1527 (),
1528 )?;
1529 } else {
1530 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1531 }
1532 }
1533
1534 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1535 }
1536 unsafe {
1537 preallocated.write_next(out.assume_init_ref());
1538 }
1539 }
1540
1541 ::fidl_next::wire::Table::encode_len(table, max_ord);
1542
1543 Ok(())
1544 }
1545 }
1546
1547 impl<'de> ::fidl_next::FromWire<crate::wire::ScanOffloadExtension<'de>> for ScanOffloadExtension {
1548 #[inline]
1549 fn from_wire(wire_: crate::wire::ScanOffloadExtension<'de>) -> Self {
1550 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1551
1552 let supported = wire_.table.get(1);
1553
1554 let scan_cancel_supported = wire_.table.get(2);
1555
1556 Self {
1557 supported: supported.map(|envelope| {
1558 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
1559 }),
1560
1561 scan_cancel_supported: scan_cancel_supported.map(|envelope| {
1562 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
1563 }),
1564 }
1565 }
1566 }
1567
1568 impl<'de> ::fidl_next::FromWireRef<crate::wire::ScanOffloadExtension<'de>>
1569 for ScanOffloadExtension
1570 {
1571 #[inline]
1572 fn from_wire_ref(wire: &crate::wire::ScanOffloadExtension<'de>) -> Self {
1573 Self {
1574 supported: wire.table.get(1).map(|envelope| {
1575 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1576 envelope.deref_unchecked::<bool>()
1577 })
1578 }),
1579
1580 scan_cancel_supported: wire.table.get(2).map(|envelope| {
1581 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1582 envelope.deref_unchecked::<bool>()
1583 })
1584 }),
1585 }
1586 }
1587 }
1588
1589 #[doc = " Indicates where and how probe responses are to be handled.\n See IEEE 802.11-2016 11.1.4.3.\n This is a discovery extension, expected to be used for softmac only.\n"]
1590 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1591 pub struct ProbeResponseOffloadExtension {
1592 pub supported: ::core::option::Option<bool>,
1593 }
1594
1595 impl ProbeResponseOffloadExtension {
1596 fn __max_ordinal(&self) -> usize {
1597 if self.supported.is_some() {
1598 return 1;
1599 }
1600
1601 0
1602 }
1603 }
1604
1605 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ProbeResponseOffloadExtension<'static>, ___E>
1606 for ProbeResponseOffloadExtension
1607 where
1608 ___E: ::fidl_next::Encoder + ?Sized,
1609 {
1610 #[inline]
1611 fn encode(
1612 mut self,
1613 encoder: &mut ___E,
1614 out: &mut ::core::mem::MaybeUninit<crate::wire::ProbeResponseOffloadExtension<'static>>,
1615 _: (),
1616 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1617 ::fidl_next::munge!(let crate::wire::ProbeResponseOffloadExtension { table } = out);
1618
1619 let max_ord = self.__max_ordinal();
1620
1621 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1622 ::fidl_next::Wire::zero_padding(&mut out);
1623
1624 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1625 ::fidl_next::wire::Envelope,
1626 >(encoder, max_ord);
1627
1628 for i in 1..=max_ord {
1629 match i {
1630 1 => {
1631 if let Some(value) = self.supported.take() {
1632 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1633 value,
1634 preallocated.encoder,
1635 &mut out,
1636 (),
1637 )?;
1638 } else {
1639 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1640 }
1641 }
1642
1643 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1644 }
1645 unsafe {
1646 preallocated.write_next(out.assume_init_ref());
1647 }
1648 }
1649
1650 ::fidl_next::wire::Table::encode_len(table, max_ord);
1651
1652 Ok(())
1653 }
1654 }
1655
1656 unsafe impl<'a, ___E>
1657 ::fidl_next::Encode<crate::wire::ProbeResponseOffloadExtension<'static>, ___E>
1658 for &'a ProbeResponseOffloadExtension
1659 where
1660 ___E: ::fidl_next::Encoder + ?Sized,
1661 {
1662 #[inline]
1663 fn encode(
1664 self,
1665 encoder: &mut ___E,
1666 out: &mut ::core::mem::MaybeUninit<crate::wire::ProbeResponseOffloadExtension<'static>>,
1667 _: (),
1668 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1669 ::fidl_next::munge!(let crate::wire::ProbeResponseOffloadExtension { table } = out);
1670
1671 let max_ord = self.__max_ordinal();
1672
1673 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1674 ::fidl_next::Wire::zero_padding(&mut out);
1675
1676 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1677 ::fidl_next::wire::Envelope,
1678 >(encoder, max_ord);
1679
1680 for i in 1..=max_ord {
1681 match i {
1682 1 => {
1683 if let Some(value) = &self.supported {
1684 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1685 value,
1686 preallocated.encoder,
1687 &mut out,
1688 (),
1689 )?;
1690 } else {
1691 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1692 }
1693 }
1694
1695 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1696 }
1697 unsafe {
1698 preallocated.write_next(out.assume_init_ref());
1699 }
1700 }
1701
1702 ::fidl_next::wire::Table::encode_len(table, max_ord);
1703
1704 Ok(())
1705 }
1706 }
1707
1708 impl<'de> ::fidl_next::FromWire<crate::wire::ProbeResponseOffloadExtension<'de>>
1709 for ProbeResponseOffloadExtension
1710 {
1711 #[inline]
1712 fn from_wire(wire_: crate::wire::ProbeResponseOffloadExtension<'de>) -> Self {
1713 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1714
1715 let supported = wire_.table.get(1);
1716
1717 Self {
1718 supported: supported.map(|envelope| {
1719 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
1720 }),
1721 }
1722 }
1723 }
1724
1725 impl<'de> ::fidl_next::FromWireRef<crate::wire::ProbeResponseOffloadExtension<'de>>
1726 for ProbeResponseOffloadExtension
1727 {
1728 #[inline]
1729 fn from_wire_ref(wire: &crate::wire::ProbeResponseOffloadExtension<'de>) -> Self {
1730 Self {
1731 supported: wire.table.get(1).map(|envelope| {
1732 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1733 envelope.deref_unchecked::<bool>()
1734 })
1735 }),
1736 }
1737 }
1738 }
1739
1740 #[doc = " Features related to discovery of potential BSSs.\n See IEEE 802.11-2016 11.1.4.2 and 11.1.4.3.\n"]
1741 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1742 pub struct DiscoverySupport {
1743 pub scan_offload: ::core::option::Option<crate::natural::ScanOffloadExtension>,
1744
1745 pub probe_response_offload:
1746 ::core::option::Option<crate::natural::ProbeResponseOffloadExtension>,
1747 }
1748
1749 impl DiscoverySupport {
1750 fn __max_ordinal(&self) -> usize {
1751 if self.probe_response_offload.is_some() {
1752 return 2;
1753 }
1754
1755 if self.scan_offload.is_some() {
1756 return 1;
1757 }
1758
1759 0
1760 }
1761 }
1762
1763 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DiscoverySupport<'static>, ___E>
1764 for DiscoverySupport
1765 where
1766 ___E: ::fidl_next::Encoder + ?Sized,
1767 {
1768 #[inline]
1769 fn encode(
1770 mut self,
1771 encoder: &mut ___E,
1772 out: &mut ::core::mem::MaybeUninit<crate::wire::DiscoverySupport<'static>>,
1773 _: (),
1774 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1775 ::fidl_next::munge!(let crate::wire::DiscoverySupport { table } = out);
1776
1777 let max_ord = self.__max_ordinal();
1778
1779 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1780 ::fidl_next::Wire::zero_padding(&mut out);
1781
1782 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1783 ::fidl_next::wire::Envelope,
1784 >(encoder, max_ord);
1785
1786 for i in 1..=max_ord {
1787 match i {
1788 2 => {
1789 if let Some(value) = self.probe_response_offload.take() {
1790 ::fidl_next::wire::Envelope::encode_value::<
1791 crate::wire::ProbeResponseOffloadExtension<'static>,
1792 ___E,
1793 >(
1794 value, preallocated.encoder, &mut out, ()
1795 )?;
1796 } else {
1797 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1798 }
1799 }
1800
1801 1 => {
1802 if let Some(value) = self.scan_offload.take() {
1803 ::fidl_next::wire::Envelope::encode_value::<
1804 crate::wire::ScanOffloadExtension<'static>,
1805 ___E,
1806 >(
1807 value, preallocated.encoder, &mut out, ()
1808 )?;
1809 } else {
1810 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1811 }
1812 }
1813
1814 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1815 }
1816 unsafe {
1817 preallocated.write_next(out.assume_init_ref());
1818 }
1819 }
1820
1821 ::fidl_next::wire::Table::encode_len(table, max_ord);
1822
1823 Ok(())
1824 }
1825 }
1826
1827 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DiscoverySupport<'static>, ___E>
1828 for &'a DiscoverySupport
1829 where
1830 ___E: ::fidl_next::Encoder + ?Sized,
1831 {
1832 #[inline]
1833 fn encode(
1834 self,
1835 encoder: &mut ___E,
1836 out: &mut ::core::mem::MaybeUninit<crate::wire::DiscoverySupport<'static>>,
1837 _: (),
1838 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1839 ::fidl_next::munge!(let crate::wire::DiscoverySupport { table } = out);
1840
1841 let max_ord = self.__max_ordinal();
1842
1843 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1844 ::fidl_next::Wire::zero_padding(&mut out);
1845
1846 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1847 ::fidl_next::wire::Envelope,
1848 >(encoder, max_ord);
1849
1850 for i in 1..=max_ord {
1851 match i {
1852 2 => {
1853 if let Some(value) = &self.probe_response_offload {
1854 ::fidl_next::wire::Envelope::encode_value::<
1855 crate::wire::ProbeResponseOffloadExtension<'static>,
1856 ___E,
1857 >(
1858 value, preallocated.encoder, &mut out, ()
1859 )?;
1860 } else {
1861 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1862 }
1863 }
1864
1865 1 => {
1866 if let Some(value) = &self.scan_offload {
1867 ::fidl_next::wire::Envelope::encode_value::<
1868 crate::wire::ScanOffloadExtension<'static>,
1869 ___E,
1870 >(
1871 value, preallocated.encoder, &mut out, ()
1872 )?;
1873 } else {
1874 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1875 }
1876 }
1877
1878 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1879 }
1880 unsafe {
1881 preallocated.write_next(out.assume_init_ref());
1882 }
1883 }
1884
1885 ::fidl_next::wire::Table::encode_len(table, max_ord);
1886
1887 Ok(())
1888 }
1889 }
1890
1891 impl<'de> ::fidl_next::FromWire<crate::wire::DiscoverySupport<'de>> for DiscoverySupport {
1892 #[inline]
1893 fn from_wire(wire_: crate::wire::DiscoverySupport<'de>) -> Self {
1894 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1895
1896 let scan_offload = wire_.table.get(1);
1897
1898 let probe_response_offload = wire_.table.get(2);
1899
1900 Self {
1901 scan_offload: scan_offload.map(|envelope| {
1902 ::fidl_next::FromWire::from_wire(unsafe {
1903 envelope.read_unchecked::<crate::wire::ScanOffloadExtension<'de>>()
1904 })
1905 }),
1906
1907 probe_response_offload: probe_response_offload.map(|envelope| {
1908 ::fidl_next::FromWire::from_wire(unsafe {
1909 envelope.read_unchecked::<crate::wire::ProbeResponseOffloadExtension<'de>>()
1910 })
1911 }),
1912 }
1913 }
1914 }
1915
1916 impl<'de> ::fidl_next::FromWireRef<crate::wire::DiscoverySupport<'de>> for DiscoverySupport {
1917 #[inline]
1918 fn from_wire_ref(wire: &crate::wire::DiscoverySupport<'de>) -> Self {
1919 Self {
1920 scan_offload: wire.table.get(1).map(|envelope| {
1921 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1922 envelope.deref_unchecked::<crate::wire::ScanOffloadExtension<'de>>()
1923 })
1924 }),
1925
1926 probe_response_offload: wire.table.get(2).map(|envelope| {
1927 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1928 envelope
1929 .deref_unchecked::<crate::wire::ProbeResponseOffloadExtension<'de>>()
1930 })
1931 }),
1932 }
1933 }
1934 }
1935
1936 #[doc = " HT and VHT guard interval.\n See IEEE 802.11-2016 Table 19-1 and Table 21-1.\n"]
1937 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1938 #[repr(u8)]
1939 pub enum GuardInterval {
1940 LongGi = 1,
1941 ShortGi = 2,
1942 }
1943 impl ::core::convert::TryFrom<u8> for GuardInterval {
1944 type Error = ::fidl_next::UnknownStrictEnumMemberError;
1945 fn try_from(
1946 value: u8,
1947 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
1948 match value {
1949 1 => Ok(Self::LongGi),
1950 2 => Ok(Self::ShortGi),
1951
1952 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
1953 }
1954 }
1955 }
1956
1957 impl ::std::convert::From<GuardInterval> for u8 {
1958 fn from(value: GuardInterval) -> Self {
1959 match value {
1960 GuardInterval::LongGi => 1,
1961 GuardInterval::ShortGi => 2,
1962 }
1963 }
1964 }
1965
1966 unsafe impl<___E> ::fidl_next::Encode<crate::wire::GuardInterval, ___E> for GuardInterval
1967 where
1968 ___E: ?Sized,
1969 {
1970 #[inline]
1971 fn encode(
1972 self,
1973 encoder: &mut ___E,
1974 out: &mut ::core::mem::MaybeUninit<crate::wire::GuardInterval>,
1975 _: (),
1976 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1977 ::fidl_next::Encode::encode(&self, encoder, out, ())
1978 }
1979 }
1980
1981 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::GuardInterval, ___E> for &'a GuardInterval
1982 where
1983 ___E: ?Sized,
1984 {
1985 #[inline]
1986 fn encode(
1987 self,
1988 encoder: &mut ___E,
1989 out: &mut ::core::mem::MaybeUninit<crate::wire::GuardInterval>,
1990 _: (),
1991 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1992 ::fidl_next::munge!(let crate::wire::GuardInterval { value } = out);
1993 let _ = value.write(u8::from(match *self {
1994 GuardInterval::LongGi => 1,
1995
1996 GuardInterval::ShortGi => 2,
1997 }));
1998
1999 Ok(())
2000 }
2001 }
2002
2003 impl ::core::convert::From<crate::wire::GuardInterval> for GuardInterval {
2004 fn from(wire: crate::wire::GuardInterval) -> Self {
2005 match u8::from(wire.value) {
2006 1 => Self::LongGi,
2007
2008 2 => Self::ShortGi,
2009
2010 _ => unsafe { ::core::hint::unreachable_unchecked() },
2011 }
2012 }
2013 }
2014
2015 impl ::fidl_next::FromWire<crate::wire::GuardInterval> for GuardInterval {
2016 #[inline]
2017 fn from_wire(wire: crate::wire::GuardInterval) -> Self {
2018 Self::from(wire)
2019 }
2020 }
2021
2022 impl ::fidl_next::FromWireRef<crate::wire::GuardInterval> for GuardInterval {
2023 #[inline]
2024 fn from_wire_ref(wire: &crate::wire::GuardInterval) -> Self {
2025 Self::from(*wire)
2026 }
2027 }
2028
2029 #[doc = " Input parameters for a join request. This definition is shared between softmac.fidl\n and wlantap.fidl.\n"]
2030 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2031 pub struct JoinBssRequest {
2032 pub bssid: ::core::option::Option<[u8; 6]>,
2033
2034 pub bss_type: ::core::option::Option<crate::natural::BssType>,
2035
2036 pub remote: ::core::option::Option<bool>,
2037
2038 pub beacon_period: ::core::option::Option<u16>,
2039 }
2040
2041 impl JoinBssRequest {
2042 fn __max_ordinal(&self) -> usize {
2043 if self.beacon_period.is_some() {
2044 return 4;
2045 }
2046
2047 if self.remote.is_some() {
2048 return 3;
2049 }
2050
2051 if self.bss_type.is_some() {
2052 return 2;
2053 }
2054
2055 if self.bssid.is_some() {
2056 return 1;
2057 }
2058
2059 0
2060 }
2061 }
2062
2063 unsafe impl<___E> ::fidl_next::Encode<crate::wire::JoinBssRequest<'static>, ___E> for JoinBssRequest
2064 where
2065 ___E: ::fidl_next::Encoder + ?Sized,
2066 {
2067 #[inline]
2068 fn encode(
2069 mut self,
2070 encoder: &mut ___E,
2071 out: &mut ::core::mem::MaybeUninit<crate::wire::JoinBssRequest<'static>>,
2072 _: (),
2073 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2074 ::fidl_next::munge!(let crate::wire::JoinBssRequest { table } = out);
2075
2076 let max_ord = self.__max_ordinal();
2077
2078 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2079 ::fidl_next::Wire::zero_padding(&mut out);
2080
2081 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2082 ::fidl_next::wire::Envelope,
2083 >(encoder, max_ord);
2084
2085 for i in 1..=max_ord {
2086 match i {
2087 4 => {
2088 if let Some(value) = self.beacon_period.take() {
2089 ::fidl_next::wire::Envelope::encode_value::<
2090 ::fidl_next::wire::Uint16,
2091 ___E,
2092 >(
2093 value, preallocated.encoder, &mut out, ()
2094 )?;
2095 } else {
2096 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2097 }
2098 }
2099
2100 3 => {
2101 if let Some(value) = self.remote.take() {
2102 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2103 value,
2104 preallocated.encoder,
2105 &mut out,
2106 (),
2107 )?;
2108 } else {
2109 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2110 }
2111 }
2112
2113 2 => {
2114 if let Some(value) = self.bss_type.take() {
2115 ::fidl_next::wire::Envelope::encode_value::<crate::wire::BssType, ___E>(
2116 value,
2117 preallocated.encoder,
2118 &mut out,
2119 (),
2120 )?;
2121 } else {
2122 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2123 }
2124 }
2125
2126 1 => {
2127 if let Some(value) = self.bssid.take() {
2128 ::fidl_next::wire::Envelope::encode_value::<[u8; 6], ___E>(
2129 value,
2130 preallocated.encoder,
2131 &mut out,
2132 (),
2133 )?;
2134 } else {
2135 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2136 }
2137 }
2138
2139 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2140 }
2141 unsafe {
2142 preallocated.write_next(out.assume_init_ref());
2143 }
2144 }
2145
2146 ::fidl_next::wire::Table::encode_len(table, max_ord);
2147
2148 Ok(())
2149 }
2150 }
2151
2152 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::JoinBssRequest<'static>, ___E>
2153 for &'a JoinBssRequest
2154 where
2155 ___E: ::fidl_next::Encoder + ?Sized,
2156 {
2157 #[inline]
2158 fn encode(
2159 self,
2160 encoder: &mut ___E,
2161 out: &mut ::core::mem::MaybeUninit<crate::wire::JoinBssRequest<'static>>,
2162 _: (),
2163 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2164 ::fidl_next::munge!(let crate::wire::JoinBssRequest { table } = out);
2165
2166 let max_ord = self.__max_ordinal();
2167
2168 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2169 ::fidl_next::Wire::zero_padding(&mut out);
2170
2171 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2172 ::fidl_next::wire::Envelope,
2173 >(encoder, max_ord);
2174
2175 for i in 1..=max_ord {
2176 match i {
2177 4 => {
2178 if let Some(value) = &self.beacon_period {
2179 ::fidl_next::wire::Envelope::encode_value::<
2180 ::fidl_next::wire::Uint16,
2181 ___E,
2182 >(
2183 value, preallocated.encoder, &mut out, ()
2184 )?;
2185 } else {
2186 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2187 }
2188 }
2189
2190 3 => {
2191 if let Some(value) = &self.remote {
2192 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2193 value,
2194 preallocated.encoder,
2195 &mut out,
2196 (),
2197 )?;
2198 } else {
2199 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2200 }
2201 }
2202
2203 2 => {
2204 if let Some(value) = &self.bss_type {
2205 ::fidl_next::wire::Envelope::encode_value::<crate::wire::BssType, ___E>(
2206 value,
2207 preallocated.encoder,
2208 &mut out,
2209 (),
2210 )?;
2211 } else {
2212 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2213 }
2214 }
2215
2216 1 => {
2217 if let Some(value) = &self.bssid {
2218 ::fidl_next::wire::Envelope::encode_value::<[u8; 6], ___E>(
2219 value,
2220 preallocated.encoder,
2221 &mut out,
2222 (),
2223 )?;
2224 } else {
2225 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2226 }
2227 }
2228
2229 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2230 }
2231 unsafe {
2232 preallocated.write_next(out.assume_init_ref());
2233 }
2234 }
2235
2236 ::fidl_next::wire::Table::encode_len(table, max_ord);
2237
2238 Ok(())
2239 }
2240 }
2241
2242 impl<'de> ::fidl_next::FromWire<crate::wire::JoinBssRequest<'de>> for JoinBssRequest {
2243 #[inline]
2244 fn from_wire(wire_: crate::wire::JoinBssRequest<'de>) -> Self {
2245 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2246
2247 let bssid = wire_.table.get(1);
2248
2249 let bss_type = wire_.table.get(2);
2250
2251 let remote = wire_.table.get(3);
2252
2253 let beacon_period = wire_.table.get(4);
2254
2255 Self {
2256 bssid: bssid.map(|envelope| {
2257 ::fidl_next::FromWire::from_wire(unsafe {
2258 envelope.read_unchecked::<[u8; 6]>()
2259 })
2260 }),
2261
2262 bss_type: bss_type.map(|envelope| {
2263 ::fidl_next::FromWire::from_wire(unsafe {
2264 envelope.read_unchecked::<crate::wire::BssType>()
2265 })
2266 }),
2267
2268 remote: remote.map(|envelope| {
2269 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
2270 }),
2271
2272 beacon_period: beacon_period.map(|envelope| {
2273 ::fidl_next::FromWire::from_wire(unsafe {
2274 envelope.read_unchecked::<::fidl_next::wire::Uint16>()
2275 })
2276 }),
2277 }
2278 }
2279 }
2280
2281 impl<'de> ::fidl_next::FromWireRef<crate::wire::JoinBssRequest<'de>> for JoinBssRequest {
2282 #[inline]
2283 fn from_wire_ref(wire: &crate::wire::JoinBssRequest<'de>) -> Self {
2284 Self {
2285 bssid: wire.table.get(1).map(|envelope| {
2286 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2287 envelope.deref_unchecked::<[u8; 6]>()
2288 })
2289 }),
2290
2291 bss_type: wire.table.get(2).map(|envelope| {
2292 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2293 envelope.deref_unchecked::<crate::wire::BssType>()
2294 })
2295 }),
2296
2297 remote: wire.table.get(3).map(|envelope| {
2298 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2299 envelope.deref_unchecked::<bool>()
2300 })
2301 }),
2302
2303 beacon_period: wire.table.get(4).map(|envelope| {
2304 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2305 envelope.deref_unchecked::<::fidl_next::wire::Uint16>()
2306 })
2307 }),
2308 }
2309 }
2310 }
2311
2312 #[doc = " Indicates where and how rate selection logic is orchestrated.\n See IEEE 802.11-2016 10.7.\n This is a MAC sublayer extension, expected to be used for softmac only.\n"]
2313 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2314 pub struct RateSelectionOffloadExtension {
2315 pub supported: ::core::option::Option<bool>,
2316 }
2317
2318 impl RateSelectionOffloadExtension {
2319 fn __max_ordinal(&self) -> usize {
2320 if self.supported.is_some() {
2321 return 1;
2322 }
2323
2324 0
2325 }
2326 }
2327
2328 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RateSelectionOffloadExtension<'static>, ___E>
2329 for RateSelectionOffloadExtension
2330 where
2331 ___E: ::fidl_next::Encoder + ?Sized,
2332 {
2333 #[inline]
2334 fn encode(
2335 mut self,
2336 encoder: &mut ___E,
2337 out: &mut ::core::mem::MaybeUninit<crate::wire::RateSelectionOffloadExtension<'static>>,
2338 _: (),
2339 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2340 ::fidl_next::munge!(let crate::wire::RateSelectionOffloadExtension { table } = out);
2341
2342 let max_ord = self.__max_ordinal();
2343
2344 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2345 ::fidl_next::Wire::zero_padding(&mut out);
2346
2347 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2348 ::fidl_next::wire::Envelope,
2349 >(encoder, max_ord);
2350
2351 for i in 1..=max_ord {
2352 match i {
2353 1 => {
2354 if let Some(value) = self.supported.take() {
2355 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2356 value,
2357 preallocated.encoder,
2358 &mut out,
2359 (),
2360 )?;
2361 } else {
2362 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2363 }
2364 }
2365
2366 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2367 }
2368 unsafe {
2369 preallocated.write_next(out.assume_init_ref());
2370 }
2371 }
2372
2373 ::fidl_next::wire::Table::encode_len(table, max_ord);
2374
2375 Ok(())
2376 }
2377 }
2378
2379 unsafe impl<'a, ___E>
2380 ::fidl_next::Encode<crate::wire::RateSelectionOffloadExtension<'static>, ___E>
2381 for &'a RateSelectionOffloadExtension
2382 where
2383 ___E: ::fidl_next::Encoder + ?Sized,
2384 {
2385 #[inline]
2386 fn encode(
2387 self,
2388 encoder: &mut ___E,
2389 out: &mut ::core::mem::MaybeUninit<crate::wire::RateSelectionOffloadExtension<'static>>,
2390 _: (),
2391 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2392 ::fidl_next::munge!(let crate::wire::RateSelectionOffloadExtension { table } = out);
2393
2394 let max_ord = self.__max_ordinal();
2395
2396 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2397 ::fidl_next::Wire::zero_padding(&mut out);
2398
2399 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2400 ::fidl_next::wire::Envelope,
2401 >(encoder, max_ord);
2402
2403 for i in 1..=max_ord {
2404 match i {
2405 1 => {
2406 if let Some(value) = &self.supported {
2407 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2408 value,
2409 preallocated.encoder,
2410 &mut out,
2411 (),
2412 )?;
2413 } else {
2414 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2415 }
2416 }
2417
2418 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2419 }
2420 unsafe {
2421 preallocated.write_next(out.assume_init_ref());
2422 }
2423 }
2424
2425 ::fidl_next::wire::Table::encode_len(table, max_ord);
2426
2427 Ok(())
2428 }
2429 }
2430
2431 impl<'de> ::fidl_next::FromWire<crate::wire::RateSelectionOffloadExtension<'de>>
2432 for RateSelectionOffloadExtension
2433 {
2434 #[inline]
2435 fn from_wire(wire_: crate::wire::RateSelectionOffloadExtension<'de>) -> Self {
2436 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2437
2438 let supported = wire_.table.get(1);
2439
2440 Self {
2441 supported: supported.map(|envelope| {
2442 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
2443 }),
2444 }
2445 }
2446 }
2447
2448 impl<'de> ::fidl_next::FromWireRef<crate::wire::RateSelectionOffloadExtension<'de>>
2449 for RateSelectionOffloadExtension
2450 {
2451 #[inline]
2452 fn from_wire_ref(wire: &crate::wire::RateSelectionOffloadExtension<'de>) -> Self {
2453 Self {
2454 supported: wire.table.get(1).map(|envelope| {
2455 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2456 envelope.deref_unchecked::<bool>()
2457 })
2458 }),
2459 }
2460 }
2461 }
2462
2463 #[doc = " Features related to the MAC sublayer (below MLME).\n See IEEE 802.11-2016 10.\n"]
2464 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2465 pub struct MacSublayerSupport {
2466 pub rate_selection_offload:
2467 ::core::option::Option<crate::natural::RateSelectionOffloadExtension>,
2468
2469 pub data_plane: ::core::option::Option<crate::natural::DataPlaneExtension>,
2470
2471 pub device: ::core::option::Option<crate::natural::DeviceExtension>,
2472 }
2473
2474 impl MacSublayerSupport {
2475 fn __max_ordinal(&self) -> usize {
2476 if self.device.is_some() {
2477 return 3;
2478 }
2479
2480 if self.data_plane.is_some() {
2481 return 2;
2482 }
2483
2484 if self.rate_selection_offload.is_some() {
2485 return 1;
2486 }
2487
2488 0
2489 }
2490 }
2491
2492 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MacSublayerSupport<'static>, ___E>
2493 for MacSublayerSupport
2494 where
2495 ___E: ::fidl_next::Encoder + ?Sized,
2496 {
2497 #[inline]
2498 fn encode(
2499 mut self,
2500 encoder: &mut ___E,
2501 out: &mut ::core::mem::MaybeUninit<crate::wire::MacSublayerSupport<'static>>,
2502 _: (),
2503 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2504 ::fidl_next::munge!(let crate::wire::MacSublayerSupport { table } = out);
2505
2506 let max_ord = self.__max_ordinal();
2507
2508 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2509 ::fidl_next::Wire::zero_padding(&mut out);
2510
2511 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2512 ::fidl_next::wire::Envelope,
2513 >(encoder, max_ord);
2514
2515 for i in 1..=max_ord {
2516 match i {
2517 3 => {
2518 if let Some(value) = self.device.take() {
2519 ::fidl_next::wire::Envelope::encode_value::<
2520 crate::wire::DeviceExtension<'static>,
2521 ___E,
2522 >(
2523 value, preallocated.encoder, &mut out, ()
2524 )?;
2525 } else {
2526 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2527 }
2528 }
2529
2530 2 => {
2531 if let Some(value) = self.data_plane.take() {
2532 ::fidl_next::wire::Envelope::encode_value::<
2533 crate::wire::DataPlaneExtension<'static>,
2534 ___E,
2535 >(
2536 value, preallocated.encoder, &mut out, ()
2537 )?;
2538 } else {
2539 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2540 }
2541 }
2542
2543 1 => {
2544 if let Some(value) = self.rate_selection_offload.take() {
2545 ::fidl_next::wire::Envelope::encode_value::<
2546 crate::wire::RateSelectionOffloadExtension<'static>,
2547 ___E,
2548 >(
2549 value, preallocated.encoder, &mut out, ()
2550 )?;
2551 } else {
2552 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2553 }
2554 }
2555
2556 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2557 }
2558 unsafe {
2559 preallocated.write_next(out.assume_init_ref());
2560 }
2561 }
2562
2563 ::fidl_next::wire::Table::encode_len(table, max_ord);
2564
2565 Ok(())
2566 }
2567 }
2568
2569 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::MacSublayerSupport<'static>, ___E>
2570 for &'a MacSublayerSupport
2571 where
2572 ___E: ::fidl_next::Encoder + ?Sized,
2573 {
2574 #[inline]
2575 fn encode(
2576 self,
2577 encoder: &mut ___E,
2578 out: &mut ::core::mem::MaybeUninit<crate::wire::MacSublayerSupport<'static>>,
2579 _: (),
2580 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2581 ::fidl_next::munge!(let crate::wire::MacSublayerSupport { table } = out);
2582
2583 let max_ord = self.__max_ordinal();
2584
2585 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2586 ::fidl_next::Wire::zero_padding(&mut out);
2587
2588 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2589 ::fidl_next::wire::Envelope,
2590 >(encoder, max_ord);
2591
2592 for i in 1..=max_ord {
2593 match i {
2594 3 => {
2595 if let Some(value) = &self.device {
2596 ::fidl_next::wire::Envelope::encode_value::<
2597 crate::wire::DeviceExtension<'static>,
2598 ___E,
2599 >(
2600 value, preallocated.encoder, &mut out, ()
2601 )?;
2602 } else {
2603 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2604 }
2605 }
2606
2607 2 => {
2608 if let Some(value) = &self.data_plane {
2609 ::fidl_next::wire::Envelope::encode_value::<
2610 crate::wire::DataPlaneExtension<'static>,
2611 ___E,
2612 >(
2613 value, preallocated.encoder, &mut out, ()
2614 )?;
2615 } else {
2616 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2617 }
2618 }
2619
2620 1 => {
2621 if let Some(value) = &self.rate_selection_offload {
2622 ::fidl_next::wire::Envelope::encode_value::<
2623 crate::wire::RateSelectionOffloadExtension<'static>,
2624 ___E,
2625 >(
2626 value, preallocated.encoder, &mut out, ()
2627 )?;
2628 } else {
2629 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2630 }
2631 }
2632
2633 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2634 }
2635 unsafe {
2636 preallocated.write_next(out.assume_init_ref());
2637 }
2638 }
2639
2640 ::fidl_next::wire::Table::encode_len(table, max_ord);
2641
2642 Ok(())
2643 }
2644 }
2645
2646 impl<'de> ::fidl_next::FromWire<crate::wire::MacSublayerSupport<'de>> for MacSublayerSupport {
2647 #[inline]
2648 fn from_wire(wire_: crate::wire::MacSublayerSupport<'de>) -> Self {
2649 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2650
2651 let rate_selection_offload = wire_.table.get(1);
2652
2653 let data_plane = wire_.table.get(2);
2654
2655 let device = wire_.table.get(3);
2656
2657 Self {
2658 rate_selection_offload: rate_selection_offload.map(|envelope| {
2659 ::fidl_next::FromWire::from_wire(unsafe {
2660 envelope.read_unchecked::<crate::wire::RateSelectionOffloadExtension<'de>>()
2661 })
2662 }),
2663
2664 data_plane: data_plane.map(|envelope| {
2665 ::fidl_next::FromWire::from_wire(unsafe {
2666 envelope.read_unchecked::<crate::wire::DataPlaneExtension<'de>>()
2667 })
2668 }),
2669
2670 device: device.map(|envelope| {
2671 ::fidl_next::FromWire::from_wire(unsafe {
2672 envelope.read_unchecked::<crate::wire::DeviceExtension<'de>>()
2673 })
2674 }),
2675 }
2676 }
2677 }
2678
2679 impl<'de> ::fidl_next::FromWireRef<crate::wire::MacSublayerSupport<'de>> for MacSublayerSupport {
2680 #[inline]
2681 fn from_wire_ref(wire: &crate::wire::MacSublayerSupport<'de>) -> Self {
2682 Self {
2683 rate_selection_offload: wire.table.get(1).map(|envelope| {
2684 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2685 envelope
2686 .deref_unchecked::<crate::wire::RateSelectionOffloadExtension<'de>>()
2687 })
2688 }),
2689
2690 data_plane: wire.table.get(2).map(|envelope| {
2691 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2692 envelope.deref_unchecked::<crate::wire::DataPlaneExtension<'de>>()
2693 })
2694 }),
2695
2696 device: wire.table.get(3).map(|envelope| {
2697 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2698 envelope.deref_unchecked::<crate::wire::DeviceExtension<'de>>()
2699 })
2700 }),
2701 }
2702 }
2703 }
2704
2705 #[doc = " Management Frame Protection.\n See IEEE 802.11-2016 4.5.4.9.\n This is a security feature, usable for fullmac or softmac.\n"]
2706 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2707 pub struct MfpFeature {
2708 pub supported: ::core::option::Option<bool>,
2709 }
2710
2711 impl MfpFeature {
2712 fn __max_ordinal(&self) -> usize {
2713 if self.supported.is_some() {
2714 return 1;
2715 }
2716
2717 0
2718 }
2719 }
2720
2721 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MfpFeature<'static>, ___E> for MfpFeature
2722 where
2723 ___E: ::fidl_next::Encoder + ?Sized,
2724 {
2725 #[inline]
2726 fn encode(
2727 mut self,
2728 encoder: &mut ___E,
2729 out: &mut ::core::mem::MaybeUninit<crate::wire::MfpFeature<'static>>,
2730 _: (),
2731 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2732 ::fidl_next::munge!(let crate::wire::MfpFeature { table } = out);
2733
2734 let max_ord = self.__max_ordinal();
2735
2736 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2737 ::fidl_next::Wire::zero_padding(&mut out);
2738
2739 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2740 ::fidl_next::wire::Envelope,
2741 >(encoder, max_ord);
2742
2743 for i in 1..=max_ord {
2744 match i {
2745 1 => {
2746 if let Some(value) = self.supported.take() {
2747 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2748 value,
2749 preallocated.encoder,
2750 &mut out,
2751 (),
2752 )?;
2753 } else {
2754 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2755 }
2756 }
2757
2758 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2759 }
2760 unsafe {
2761 preallocated.write_next(out.assume_init_ref());
2762 }
2763 }
2764
2765 ::fidl_next::wire::Table::encode_len(table, max_ord);
2766
2767 Ok(())
2768 }
2769 }
2770
2771 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::MfpFeature<'static>, ___E> for &'a MfpFeature
2772 where
2773 ___E: ::fidl_next::Encoder + ?Sized,
2774 {
2775 #[inline]
2776 fn encode(
2777 self,
2778 encoder: &mut ___E,
2779 out: &mut ::core::mem::MaybeUninit<crate::wire::MfpFeature<'static>>,
2780 _: (),
2781 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2782 ::fidl_next::munge!(let crate::wire::MfpFeature { table } = out);
2783
2784 let max_ord = self.__max_ordinal();
2785
2786 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2787 ::fidl_next::Wire::zero_padding(&mut out);
2788
2789 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2790 ::fidl_next::wire::Envelope,
2791 >(encoder, max_ord);
2792
2793 for i in 1..=max_ord {
2794 match i {
2795 1 => {
2796 if let Some(value) = &self.supported {
2797 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2798 value,
2799 preallocated.encoder,
2800 &mut out,
2801 (),
2802 )?;
2803 } else {
2804 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2805 }
2806 }
2807
2808 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2809 }
2810 unsafe {
2811 preallocated.write_next(out.assume_init_ref());
2812 }
2813 }
2814
2815 ::fidl_next::wire::Table::encode_len(table, max_ord);
2816
2817 Ok(())
2818 }
2819 }
2820
2821 impl<'de> ::fidl_next::FromWire<crate::wire::MfpFeature<'de>> for MfpFeature {
2822 #[inline]
2823 fn from_wire(wire_: crate::wire::MfpFeature<'de>) -> Self {
2824 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2825
2826 let supported = wire_.table.get(1);
2827
2828 Self {
2829 supported: supported.map(|envelope| {
2830 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
2831 }),
2832 }
2833 }
2834 }
2835
2836 impl<'de> ::fidl_next::FromWireRef<crate::wire::MfpFeature<'de>> for MfpFeature {
2837 #[inline]
2838 fn from_wire_ref(wire: &crate::wire::MfpFeature<'de>) -> Self {
2839 Self {
2840 supported: wire.table.get(1).map(|envelope| {
2841 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2842 envelope.deref_unchecked::<bool>()
2843 })
2844 }),
2845 }
2846 }
2847 }
2848
2849 #[doc = " Opportunistic Wireless Encryption.\n See RFC 8110.\n This is a security feature, usable for fullmac or softmac.\n"]
2850 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2851 pub struct OweFeature {
2852 pub supported: ::core::option::Option<bool>,
2853 }
2854
2855 impl OweFeature {
2856 fn __max_ordinal(&self) -> usize {
2857 if self.supported.is_some() {
2858 return 1;
2859 }
2860
2861 0
2862 }
2863 }
2864
2865 unsafe impl<___E> ::fidl_next::Encode<crate::wire::OweFeature<'static>, ___E> for OweFeature
2866 where
2867 ___E: ::fidl_next::Encoder + ?Sized,
2868 {
2869 #[inline]
2870 fn encode(
2871 mut self,
2872 encoder: &mut ___E,
2873 out: &mut ::core::mem::MaybeUninit<crate::wire::OweFeature<'static>>,
2874 _: (),
2875 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2876 ::fidl_next::munge!(let crate::wire::OweFeature { table } = out);
2877
2878 let max_ord = self.__max_ordinal();
2879
2880 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2881 ::fidl_next::Wire::zero_padding(&mut out);
2882
2883 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2884 ::fidl_next::wire::Envelope,
2885 >(encoder, max_ord);
2886
2887 for i in 1..=max_ord {
2888 match i {
2889 1 => {
2890 if let Some(value) = self.supported.take() {
2891 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2892 value,
2893 preallocated.encoder,
2894 &mut out,
2895 (),
2896 )?;
2897 } else {
2898 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2899 }
2900 }
2901
2902 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2903 }
2904 unsafe {
2905 preallocated.write_next(out.assume_init_ref());
2906 }
2907 }
2908
2909 ::fidl_next::wire::Table::encode_len(table, max_ord);
2910
2911 Ok(())
2912 }
2913 }
2914
2915 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::OweFeature<'static>, ___E> for &'a OweFeature
2916 where
2917 ___E: ::fidl_next::Encoder + ?Sized,
2918 {
2919 #[inline]
2920 fn encode(
2921 self,
2922 encoder: &mut ___E,
2923 out: &mut ::core::mem::MaybeUninit<crate::wire::OweFeature<'static>>,
2924 _: (),
2925 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2926 ::fidl_next::munge!(let crate::wire::OweFeature { table } = out);
2927
2928 let max_ord = self.__max_ordinal();
2929
2930 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2931 ::fidl_next::Wire::zero_padding(&mut out);
2932
2933 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2934 ::fidl_next::wire::Envelope,
2935 >(encoder, max_ord);
2936
2937 for i in 1..=max_ord {
2938 match i {
2939 1 => {
2940 if let Some(value) = &self.supported {
2941 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2942 value,
2943 preallocated.encoder,
2944 &mut out,
2945 (),
2946 )?;
2947 } else {
2948 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2949 }
2950 }
2951
2952 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2953 }
2954 unsafe {
2955 preallocated.write_next(out.assume_init_ref());
2956 }
2957 }
2958
2959 ::fidl_next::wire::Table::encode_len(table, max_ord);
2960
2961 Ok(())
2962 }
2963 }
2964
2965 impl<'de> ::fidl_next::FromWire<crate::wire::OweFeature<'de>> for OweFeature {
2966 #[inline]
2967 fn from_wire(wire_: crate::wire::OweFeature<'de>) -> Self {
2968 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2969
2970 let supported = wire_.table.get(1);
2971
2972 Self {
2973 supported: supported.map(|envelope| {
2974 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
2975 }),
2976 }
2977 }
2978 }
2979
2980 impl<'de> ::fidl_next::FromWireRef<crate::wire::OweFeature<'de>> for OweFeature {
2981 #[inline]
2982 fn from_wire_ref(wire: &crate::wire::OweFeature<'de>) -> Self {
2983 Self {
2984 supported: wire.table.get(1).map(|envelope| {
2985 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2986 envelope.deref_unchecked::<bool>()
2987 })
2988 }),
2989 }
2990 }
2991 }
2992
2993 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2994 #[repr(u32)]
2995 pub enum PowerSaveType {
2996 PsModeUltraLowPower = 0,
2997 PsModeLowPower = 1,
2998 PsModeBalanced = 2,
2999 PsModePerformance = 3,
3000 }
3001 impl ::core::convert::TryFrom<u32> for PowerSaveType {
3002 type Error = ::fidl_next::UnknownStrictEnumMemberError;
3003 fn try_from(
3004 value: u32,
3005 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
3006 match value {
3007 0 => Ok(Self::PsModeUltraLowPower),
3008 1 => Ok(Self::PsModeLowPower),
3009 2 => Ok(Self::PsModeBalanced),
3010 3 => Ok(Self::PsModePerformance),
3011
3012 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
3013 }
3014 }
3015 }
3016
3017 impl ::std::convert::From<PowerSaveType> for u32 {
3018 fn from(value: PowerSaveType) -> Self {
3019 match value {
3020 PowerSaveType::PsModeUltraLowPower => 0,
3021 PowerSaveType::PsModeLowPower => 1,
3022 PowerSaveType::PsModeBalanced => 2,
3023 PowerSaveType::PsModePerformance => 3,
3024 }
3025 }
3026 }
3027
3028 unsafe impl<___E> ::fidl_next::Encode<crate::wire::PowerSaveType, ___E> for PowerSaveType
3029 where
3030 ___E: ?Sized,
3031 {
3032 #[inline]
3033 fn encode(
3034 self,
3035 encoder: &mut ___E,
3036 out: &mut ::core::mem::MaybeUninit<crate::wire::PowerSaveType>,
3037 _: (),
3038 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3039 ::fidl_next::Encode::encode(&self, encoder, out, ())
3040 }
3041 }
3042
3043 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::PowerSaveType, ___E> for &'a PowerSaveType
3044 where
3045 ___E: ?Sized,
3046 {
3047 #[inline]
3048 fn encode(
3049 self,
3050 encoder: &mut ___E,
3051 out: &mut ::core::mem::MaybeUninit<crate::wire::PowerSaveType>,
3052 _: (),
3053 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3054 ::fidl_next::munge!(let crate::wire::PowerSaveType { value } = out);
3055 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
3056 PowerSaveType::PsModeUltraLowPower => 0,
3057
3058 PowerSaveType::PsModeLowPower => 1,
3059
3060 PowerSaveType::PsModeBalanced => 2,
3061
3062 PowerSaveType::PsModePerformance => 3,
3063 }));
3064
3065 Ok(())
3066 }
3067 }
3068
3069 impl ::core::convert::From<crate::wire::PowerSaveType> for PowerSaveType {
3070 fn from(wire: crate::wire::PowerSaveType) -> Self {
3071 match u32::from(wire.value) {
3072 0 => Self::PsModeUltraLowPower,
3073
3074 1 => Self::PsModeLowPower,
3075
3076 2 => Self::PsModeBalanced,
3077
3078 3 => Self::PsModePerformance,
3079
3080 _ => unsafe { ::core::hint::unreachable_unchecked() },
3081 }
3082 }
3083 }
3084
3085 impl ::fidl_next::FromWire<crate::wire::PowerSaveType> for PowerSaveType {
3086 #[inline]
3087 fn from_wire(wire: crate::wire::PowerSaveType) -> Self {
3088 Self::from(wire)
3089 }
3090 }
3091
3092 impl ::fidl_next::FromWireRef<crate::wire::PowerSaveType> for PowerSaveType {
3093 #[inline]
3094 fn from_wire_ref(wire: &crate::wire::PowerSaveType) -> Self {
3095 Self::from(*wire)
3096 }
3097 }
3098
3099 #[doc = " Simultaneous Authentication of Equals.\n See IEEE 802.11-2016 12.4.\n This is a security feature, usable for fullmac or softmac.\n"]
3100 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3101 pub struct SaeFeature {
3102 pub driver_handler_supported: ::core::option::Option<bool>,
3103
3104 pub sme_handler_supported: ::core::option::Option<bool>,
3105
3106 pub hash_to_element_supported: ::core::option::Option<bool>,
3107 }
3108
3109 impl SaeFeature {
3110 fn __max_ordinal(&self) -> usize {
3111 if self.hash_to_element_supported.is_some() {
3112 return 3;
3113 }
3114
3115 if self.sme_handler_supported.is_some() {
3116 return 2;
3117 }
3118
3119 if self.driver_handler_supported.is_some() {
3120 return 1;
3121 }
3122
3123 0
3124 }
3125 }
3126
3127 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SaeFeature<'static>, ___E> for SaeFeature
3128 where
3129 ___E: ::fidl_next::Encoder + ?Sized,
3130 {
3131 #[inline]
3132 fn encode(
3133 mut self,
3134 encoder: &mut ___E,
3135 out: &mut ::core::mem::MaybeUninit<crate::wire::SaeFeature<'static>>,
3136 _: (),
3137 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3138 ::fidl_next::munge!(let crate::wire::SaeFeature { table } = out);
3139
3140 let max_ord = self.__max_ordinal();
3141
3142 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3143 ::fidl_next::Wire::zero_padding(&mut out);
3144
3145 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3146 ::fidl_next::wire::Envelope,
3147 >(encoder, max_ord);
3148
3149 for i in 1..=max_ord {
3150 match i {
3151 3 => {
3152 if let Some(value) = self.hash_to_element_supported.take() {
3153 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3154 value,
3155 preallocated.encoder,
3156 &mut out,
3157 (),
3158 )?;
3159 } else {
3160 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3161 }
3162 }
3163
3164 2 => {
3165 if let Some(value) = self.sme_handler_supported.take() {
3166 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3167 value,
3168 preallocated.encoder,
3169 &mut out,
3170 (),
3171 )?;
3172 } else {
3173 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3174 }
3175 }
3176
3177 1 => {
3178 if let Some(value) = self.driver_handler_supported.take() {
3179 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3180 value,
3181 preallocated.encoder,
3182 &mut out,
3183 (),
3184 )?;
3185 } else {
3186 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3187 }
3188 }
3189
3190 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3191 }
3192 unsafe {
3193 preallocated.write_next(out.assume_init_ref());
3194 }
3195 }
3196
3197 ::fidl_next::wire::Table::encode_len(table, max_ord);
3198
3199 Ok(())
3200 }
3201 }
3202
3203 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SaeFeature<'static>, ___E> for &'a SaeFeature
3204 where
3205 ___E: ::fidl_next::Encoder + ?Sized,
3206 {
3207 #[inline]
3208 fn encode(
3209 self,
3210 encoder: &mut ___E,
3211 out: &mut ::core::mem::MaybeUninit<crate::wire::SaeFeature<'static>>,
3212 _: (),
3213 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3214 ::fidl_next::munge!(let crate::wire::SaeFeature { table } = out);
3215
3216 let max_ord = self.__max_ordinal();
3217
3218 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3219 ::fidl_next::Wire::zero_padding(&mut out);
3220
3221 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3222 ::fidl_next::wire::Envelope,
3223 >(encoder, max_ord);
3224
3225 for i in 1..=max_ord {
3226 match i {
3227 3 => {
3228 if let Some(value) = &self.hash_to_element_supported {
3229 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3230 value,
3231 preallocated.encoder,
3232 &mut out,
3233 (),
3234 )?;
3235 } else {
3236 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3237 }
3238 }
3239
3240 2 => {
3241 if let Some(value) = &self.sme_handler_supported {
3242 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3243 value,
3244 preallocated.encoder,
3245 &mut out,
3246 (),
3247 )?;
3248 } else {
3249 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3250 }
3251 }
3252
3253 1 => {
3254 if let Some(value) = &self.driver_handler_supported {
3255 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3256 value,
3257 preallocated.encoder,
3258 &mut out,
3259 (),
3260 )?;
3261 } else {
3262 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3263 }
3264 }
3265
3266 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3267 }
3268 unsafe {
3269 preallocated.write_next(out.assume_init_ref());
3270 }
3271 }
3272
3273 ::fidl_next::wire::Table::encode_len(table, max_ord);
3274
3275 Ok(())
3276 }
3277 }
3278
3279 impl<'de> ::fidl_next::FromWire<crate::wire::SaeFeature<'de>> for SaeFeature {
3280 #[inline]
3281 fn from_wire(wire_: crate::wire::SaeFeature<'de>) -> Self {
3282 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3283
3284 let driver_handler_supported = wire_.table.get(1);
3285
3286 let sme_handler_supported = wire_.table.get(2);
3287
3288 let hash_to_element_supported = wire_.table.get(3);
3289
3290 Self {
3291 driver_handler_supported: driver_handler_supported.map(|envelope| {
3292 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
3293 }),
3294
3295 sme_handler_supported: sme_handler_supported.map(|envelope| {
3296 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
3297 }),
3298
3299 hash_to_element_supported: hash_to_element_supported.map(|envelope| {
3300 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
3301 }),
3302 }
3303 }
3304 }
3305
3306 impl<'de> ::fidl_next::FromWireRef<crate::wire::SaeFeature<'de>> for SaeFeature {
3307 #[inline]
3308 fn from_wire_ref(wire: &crate::wire::SaeFeature<'de>) -> Self {
3309 Self {
3310 driver_handler_supported: wire.table.get(1).map(|envelope| {
3311 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3312 envelope.deref_unchecked::<bool>()
3313 })
3314 }),
3315
3316 sme_handler_supported: wire.table.get(2).map(|envelope| {
3317 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3318 envelope.deref_unchecked::<bool>()
3319 })
3320 }),
3321
3322 hash_to_element_supported: wire.table.get(3).map(|envelope| {
3323 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3324 envelope.deref_unchecked::<bool>()
3325 })
3326 }),
3327 }
3328 }
3329 }
3330
3331 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3332 #[repr(u32)]
3333 pub enum ScanType {
3334 Active = 1,
3335 Passive = 2,
3336 }
3337 impl ::core::convert::TryFrom<u32> for ScanType {
3338 type Error = ::fidl_next::UnknownStrictEnumMemberError;
3339 fn try_from(
3340 value: u32,
3341 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
3342 match value {
3343 1 => Ok(Self::Active),
3344 2 => Ok(Self::Passive),
3345
3346 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
3347 }
3348 }
3349 }
3350
3351 impl ::std::convert::From<ScanType> for u32 {
3352 fn from(value: ScanType) -> Self {
3353 match value {
3354 ScanType::Active => 1,
3355 ScanType::Passive => 2,
3356 }
3357 }
3358 }
3359
3360 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ScanType, ___E> for ScanType
3361 where
3362 ___E: ?Sized,
3363 {
3364 #[inline]
3365 fn encode(
3366 self,
3367 encoder: &mut ___E,
3368 out: &mut ::core::mem::MaybeUninit<crate::wire::ScanType>,
3369 _: (),
3370 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3371 ::fidl_next::Encode::encode(&self, encoder, out, ())
3372 }
3373 }
3374
3375 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ScanType, ___E> for &'a ScanType
3376 where
3377 ___E: ?Sized,
3378 {
3379 #[inline]
3380 fn encode(
3381 self,
3382 encoder: &mut ___E,
3383 out: &mut ::core::mem::MaybeUninit<crate::wire::ScanType>,
3384 _: (),
3385 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3386 ::fidl_next::munge!(let crate::wire::ScanType { value } = out);
3387 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
3388 ScanType::Active => 1,
3389
3390 ScanType::Passive => 2,
3391 }));
3392
3393 Ok(())
3394 }
3395 }
3396
3397 impl ::core::convert::From<crate::wire::ScanType> for ScanType {
3398 fn from(wire: crate::wire::ScanType) -> Self {
3399 match u32::from(wire.value) {
3400 1 => Self::Active,
3401
3402 2 => Self::Passive,
3403
3404 _ => unsafe { ::core::hint::unreachable_unchecked() },
3405 }
3406 }
3407 }
3408
3409 impl ::fidl_next::FromWire<crate::wire::ScanType> for ScanType {
3410 #[inline]
3411 fn from_wire(wire: crate::wire::ScanType) -> Self {
3412 Self::from(wire)
3413 }
3414 }
3415
3416 impl ::fidl_next::FromWireRef<crate::wire::ScanType> for ScanType {
3417 #[inline]
3418 fn from_wire_ref(wire: &crate::wire::ScanType) -> Self {
3419 Self::from(*wire)
3420 }
3421 }
3422
3423 #[doc = " A nested set of attributes to match during scheduled scans. A BSS must meet ALL of the present\n criteria in the match set to be considered a match.\n\n Since not all hardware supports matching all types of attributes, there is no guarantee that the\n reported BSSs are fully compliant with the match sets. A driver may return EINVAL if it cannot\n support a match set, or may ignore the match criteria.\n"]
3424 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3425 pub struct ScheduledScanMatchSet {
3426 pub ssid: ::core::option::Option<::std::vec::Vec<u8>>,
3427
3428 pub bssid: ::core::option::Option<[u8; 6]>,
3429
3430 pub min_rssi_threshold: ::core::option::Option<i8>,
3431
3432 pub relative_rssi_threshold: ::core::option::Option<i8>,
3433
3434 pub band_rssi_adjustments:
3435 ::core::option::Option<::std::vec::Vec<crate::natural::BandRssiAdjustment>>,
3436 }
3437
3438 impl ScheduledScanMatchSet {
3439 fn __max_ordinal(&self) -> usize {
3440 if self.band_rssi_adjustments.is_some() {
3441 return 5;
3442 }
3443
3444 if self.relative_rssi_threshold.is_some() {
3445 return 4;
3446 }
3447
3448 if self.min_rssi_threshold.is_some() {
3449 return 3;
3450 }
3451
3452 if self.bssid.is_some() {
3453 return 2;
3454 }
3455
3456 if self.ssid.is_some() {
3457 return 1;
3458 }
3459
3460 0
3461 }
3462 }
3463
3464 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ScheduledScanMatchSet<'static>, ___E>
3465 for ScheduledScanMatchSet
3466 where
3467 ___E: ::fidl_next::Encoder + ?Sized,
3468 {
3469 #[inline]
3470 fn encode(
3471 mut self,
3472 encoder: &mut ___E,
3473 out: &mut ::core::mem::MaybeUninit<crate::wire::ScheduledScanMatchSet<'static>>,
3474 _: (),
3475 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3476 ::fidl_next::munge!(let crate::wire::ScheduledScanMatchSet { table } = out);
3477
3478 let max_ord = self.__max_ordinal();
3479
3480 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3481 ::fidl_next::Wire::zero_padding(&mut out);
3482
3483 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3484 ::fidl_next::wire::Envelope,
3485 >(encoder, max_ord);
3486
3487 for i in 1..=max_ord {
3488 match i {
3489 5 => {
3490 if let Some(value) = self.band_rssi_adjustments.take() {
3491 ::fidl_next::wire::Envelope::encode_value::<
3492 ::fidl_next::wire::Vector<'static, crate::wire::BandRssiAdjustment>,
3493 ___E,
3494 >(
3495 value, preallocated.encoder, &mut out, (4294967295, ())
3496 )?;
3497 } else {
3498 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3499 }
3500 }
3501
3502 4 => {
3503 if let Some(value) = self.relative_rssi_threshold.take() {
3504 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
3505 value,
3506 preallocated.encoder,
3507 &mut out,
3508 (),
3509 )?;
3510 } else {
3511 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3512 }
3513 }
3514
3515 3 => {
3516 if let Some(value) = self.min_rssi_threshold.take() {
3517 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
3518 value,
3519 preallocated.encoder,
3520 &mut out,
3521 (),
3522 )?;
3523 } else {
3524 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3525 }
3526 }
3527
3528 2 => {
3529 if let Some(value) = self.bssid.take() {
3530 ::fidl_next::wire::Envelope::encode_value::<[u8; 6], ___E>(
3531 value,
3532 preallocated.encoder,
3533 &mut out,
3534 (),
3535 )?;
3536 } else {
3537 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3538 }
3539 }
3540
3541 1 => {
3542 if let Some(value) = self.ssid.take() {
3543 ::fidl_next::wire::Envelope::encode_value::<
3544 ::fidl_next::wire::Vector<'static, u8>,
3545 ___E,
3546 >(
3547 value, preallocated.encoder, &mut out, (32, ())
3548 )?;
3549 } else {
3550 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3551 }
3552 }
3553
3554 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3555 }
3556 unsafe {
3557 preallocated.write_next(out.assume_init_ref());
3558 }
3559 }
3560
3561 ::fidl_next::wire::Table::encode_len(table, max_ord);
3562
3563 Ok(())
3564 }
3565 }
3566
3567 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ScheduledScanMatchSet<'static>, ___E>
3568 for &'a ScheduledScanMatchSet
3569 where
3570 ___E: ::fidl_next::Encoder + ?Sized,
3571 {
3572 #[inline]
3573 fn encode(
3574 self,
3575 encoder: &mut ___E,
3576 out: &mut ::core::mem::MaybeUninit<crate::wire::ScheduledScanMatchSet<'static>>,
3577 _: (),
3578 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3579 ::fidl_next::munge!(let crate::wire::ScheduledScanMatchSet { table } = out);
3580
3581 let max_ord = self.__max_ordinal();
3582
3583 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3584 ::fidl_next::Wire::zero_padding(&mut out);
3585
3586 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3587 ::fidl_next::wire::Envelope,
3588 >(encoder, max_ord);
3589
3590 for i in 1..=max_ord {
3591 match i {
3592 5 => {
3593 if let Some(value) = &self.band_rssi_adjustments {
3594 ::fidl_next::wire::Envelope::encode_value::<
3595 ::fidl_next::wire::Vector<'static, crate::wire::BandRssiAdjustment>,
3596 ___E,
3597 >(
3598 value, preallocated.encoder, &mut out, (4294967295, ())
3599 )?;
3600 } else {
3601 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3602 }
3603 }
3604
3605 4 => {
3606 if let Some(value) = &self.relative_rssi_threshold {
3607 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
3608 value,
3609 preallocated.encoder,
3610 &mut out,
3611 (),
3612 )?;
3613 } else {
3614 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3615 }
3616 }
3617
3618 3 => {
3619 if let Some(value) = &self.min_rssi_threshold {
3620 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
3621 value,
3622 preallocated.encoder,
3623 &mut out,
3624 (),
3625 )?;
3626 } else {
3627 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3628 }
3629 }
3630
3631 2 => {
3632 if let Some(value) = &self.bssid {
3633 ::fidl_next::wire::Envelope::encode_value::<[u8; 6], ___E>(
3634 value,
3635 preallocated.encoder,
3636 &mut out,
3637 (),
3638 )?;
3639 } else {
3640 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3641 }
3642 }
3643
3644 1 => {
3645 if let Some(value) = &self.ssid {
3646 ::fidl_next::wire::Envelope::encode_value::<
3647 ::fidl_next::wire::Vector<'static, u8>,
3648 ___E,
3649 >(
3650 value, preallocated.encoder, &mut out, (32, ())
3651 )?;
3652 } else {
3653 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3654 }
3655 }
3656
3657 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3658 }
3659 unsafe {
3660 preallocated.write_next(out.assume_init_ref());
3661 }
3662 }
3663
3664 ::fidl_next::wire::Table::encode_len(table, max_ord);
3665
3666 Ok(())
3667 }
3668 }
3669
3670 impl<'de> ::fidl_next::FromWire<crate::wire::ScheduledScanMatchSet<'de>> for ScheduledScanMatchSet {
3671 #[inline]
3672 fn from_wire(wire_: crate::wire::ScheduledScanMatchSet<'de>) -> Self {
3673 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3674
3675 let ssid = wire_.table.get(1);
3676
3677 let bssid = wire_.table.get(2);
3678
3679 let min_rssi_threshold = wire_.table.get(3);
3680
3681 let relative_rssi_threshold = wire_.table.get(4);
3682
3683 let band_rssi_adjustments = wire_.table.get(5);
3684
3685 Self {
3686
3687
3688 ssid: ssid.map(|envelope| ::fidl_next::FromWire::from_wire(
3689 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>() }
3690 )),
3691
3692
3693 bssid: bssid.map(|envelope| ::fidl_next::FromWire::from_wire(
3694 unsafe { envelope.read_unchecked::<[u8; 6]>() }
3695 )),
3696
3697
3698 min_rssi_threshold: min_rssi_threshold.map(|envelope| ::fidl_next::FromWire::from_wire(
3699 unsafe { envelope.read_unchecked::<i8>() }
3700 )),
3701
3702
3703 relative_rssi_threshold: relative_rssi_threshold.map(|envelope| ::fidl_next::FromWire::from_wire(
3704 unsafe { envelope.read_unchecked::<i8>() }
3705 )),
3706
3707
3708 band_rssi_adjustments: band_rssi_adjustments.map(|envelope| ::fidl_next::FromWire::from_wire(
3709 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>() }
3710 )),
3711
3712 }
3713 }
3714 }
3715
3716 impl<'de> ::fidl_next::FromWireRef<crate::wire::ScheduledScanMatchSet<'de>>
3717 for ScheduledScanMatchSet
3718 {
3719 #[inline]
3720 fn from_wire_ref(wire: &crate::wire::ScheduledScanMatchSet<'de>) -> Self {
3721 Self {
3722
3723
3724 ssid: wire.table.get(1)
3725 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3726 unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>() }
3727 )),
3728
3729
3730 bssid: wire.table.get(2)
3731 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3732 unsafe { envelope.deref_unchecked::<[u8; 6]>() }
3733 )),
3734
3735
3736 min_rssi_threshold: wire.table.get(3)
3737 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3738 unsafe { envelope.deref_unchecked::<i8>() }
3739 )),
3740
3741
3742 relative_rssi_threshold: wire.table.get(4)
3743 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3744 unsafe { envelope.deref_unchecked::<i8>() }
3745 )),
3746
3747
3748 band_rssi_adjustments: wire.table.get(5)
3749 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3750 unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>() }
3751 )),
3752
3753 }
3754 }
3755 }
3756
3757 #[doc = " A scan plan defines the number of scan iterations and the interval between scans. Time of first\n scan (e.g. t=0, t=interval, etc.) is determined by the firmware.\n"]
3758 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3759 #[repr(C)]
3760 pub struct ScheduledScanPlan {
3761 pub interval: u32,
3762
3763 pub iterations: u32,
3764 }
3765
3766 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ScheduledScanPlan, ___E> for ScheduledScanPlan
3767 where
3768 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3769 {
3770 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3771 Self,
3772 crate::wire::ScheduledScanPlan,
3773 > = unsafe {
3774 ::fidl_next::CopyOptimization::enable_if(
3775 true
3776
3777 && <
3778 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
3779 >::COPY_OPTIMIZATION.is_enabled()
3780
3781 && <
3782 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
3783 >::COPY_OPTIMIZATION.is_enabled()
3784
3785 )
3786 };
3787
3788 #[inline]
3789 fn encode(
3790 self,
3791 encoder_: &mut ___E,
3792 out_: &mut ::core::mem::MaybeUninit<crate::wire::ScheduledScanPlan>,
3793 _: (),
3794 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3795 ::fidl_next::munge! {
3796 let crate::wire::ScheduledScanPlan {
3797 interval,
3798 iterations,
3799
3800 } = out_;
3801 }
3802
3803 ::fidl_next::Encode::encode(self.interval, encoder_, interval, ())?;
3804
3805 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(interval.as_mut_ptr()) };
3806
3807 ::fidl_next::Encode::encode(self.iterations, encoder_, iterations, ())?;
3808
3809 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterations.as_mut_ptr()) };
3810
3811 Ok(())
3812 }
3813 }
3814
3815 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ScheduledScanPlan, ___E>
3816 for &'a ScheduledScanPlan
3817 where
3818 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3819 {
3820 #[inline]
3821 fn encode(
3822 self,
3823 encoder_: &mut ___E,
3824 out_: &mut ::core::mem::MaybeUninit<crate::wire::ScheduledScanPlan>,
3825 _: (),
3826 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3827 ::fidl_next::munge! {
3828 let crate::wire::ScheduledScanPlan {
3829 interval,
3830 iterations,
3831
3832 } = out_;
3833 }
3834
3835 ::fidl_next::Encode::encode(&self.interval, encoder_, interval, ())?;
3836
3837 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(interval.as_mut_ptr()) };
3838
3839 ::fidl_next::Encode::encode(&self.iterations, encoder_, iterations, ())?;
3840
3841 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterations.as_mut_ptr()) };
3842
3843 Ok(())
3844 }
3845 }
3846
3847 unsafe impl<___E>
3848 ::fidl_next::EncodeOption<
3849 ::fidl_next::wire::Box<'static, crate::wire::ScheduledScanPlan>,
3850 ___E,
3851 > for ScheduledScanPlan
3852 where
3853 ___E: ::fidl_next::Encoder + ?Sized,
3854 ScheduledScanPlan: ::fidl_next::Encode<crate::wire::ScheduledScanPlan, ___E>,
3855 {
3856 #[inline]
3857 fn encode_option(
3858 this: ::core::option::Option<Self>,
3859 encoder: &mut ___E,
3860 out: &mut ::core::mem::MaybeUninit<
3861 ::fidl_next::wire::Box<'static, crate::wire::ScheduledScanPlan>,
3862 >,
3863 _: (),
3864 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3865 if let Some(inner) = this {
3866 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3867 ::fidl_next::wire::Box::encode_present(out);
3868 } else {
3869 ::fidl_next::wire::Box::encode_absent(out);
3870 }
3871
3872 Ok(())
3873 }
3874 }
3875
3876 unsafe impl<'a, ___E>
3877 ::fidl_next::EncodeOption<
3878 ::fidl_next::wire::Box<'static, crate::wire::ScheduledScanPlan>,
3879 ___E,
3880 > for &'a ScheduledScanPlan
3881 where
3882 ___E: ::fidl_next::Encoder + ?Sized,
3883 &'a ScheduledScanPlan: ::fidl_next::Encode<crate::wire::ScheduledScanPlan, ___E>,
3884 {
3885 #[inline]
3886 fn encode_option(
3887 this: ::core::option::Option<Self>,
3888 encoder: &mut ___E,
3889 out: &mut ::core::mem::MaybeUninit<
3890 ::fidl_next::wire::Box<'static, crate::wire::ScheduledScanPlan>,
3891 >,
3892 _: (),
3893 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3894 if let Some(inner) = this {
3895 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3896 ::fidl_next::wire::Box::encode_present(out);
3897 } else {
3898 ::fidl_next::wire::Box::encode_absent(out);
3899 }
3900
3901 Ok(())
3902 }
3903 }
3904
3905 impl ::fidl_next::FromWire<crate::wire::ScheduledScanPlan> for ScheduledScanPlan {
3906 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3907 crate::wire::ScheduledScanPlan,
3908 Self,
3909 > = unsafe {
3910 ::fidl_next::CopyOptimization::enable_if(
3911 true
3912 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
3913 .is_enabled()
3914 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
3915 .is_enabled(),
3916 )
3917 };
3918
3919 #[inline]
3920 fn from_wire(wire: crate::wire::ScheduledScanPlan) -> Self {
3921 Self {
3922 interval: ::fidl_next::FromWire::from_wire(wire.interval),
3923
3924 iterations: ::fidl_next::FromWire::from_wire(wire.iterations),
3925 }
3926 }
3927 }
3928
3929 impl ::fidl_next::FromWireRef<crate::wire::ScheduledScanPlan> for ScheduledScanPlan {
3930 #[inline]
3931 fn from_wire_ref(wire: &crate::wire::ScheduledScanPlan) -> Self {
3932 Self {
3933 interval: ::fidl_next::FromWireRef::from_wire_ref(&wire.interval),
3934
3935 iterations: ::fidl_next::FromWireRef::from_wire_ref(&wire.iterations),
3936 }
3937 }
3938 }
3939
3940 #[doc = " Request for scheduled scanning.\n"]
3941 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3942 pub struct ScheduledScanRequest {
3943 pub scan_plans: ::core::option::Option<::std::vec::Vec<crate::natural::ScheduledScanPlan>>,
3944
3945 pub ssids: ::core::option::Option<::std::vec::Vec<::std::vec::Vec<u8>>>,
3946
3947 pub frequencies: ::core::option::Option<::std::vec::Vec<u32>>,
3948
3949 pub min_rssi_threshold: ::core::option::Option<i8>,
3950
3951 pub relative_rssi_threshold: ::core::option::Option<i8>,
3952
3953 pub band_rssi_adjustments:
3954 ::core::option::Option<::std::vec::Vec<crate::natural::BandRssiAdjustment>>,
3955
3956 pub match_sets:
3957 ::core::option::Option<::std::vec::Vec<crate::natural::ScheduledScanMatchSet>>,
3958 }
3959
3960 impl ScheduledScanRequest {
3961 fn __max_ordinal(&self) -> usize {
3962 if self.match_sets.is_some() {
3963 return 7;
3964 }
3965
3966 if self.band_rssi_adjustments.is_some() {
3967 return 6;
3968 }
3969
3970 if self.relative_rssi_threshold.is_some() {
3971 return 5;
3972 }
3973
3974 if self.min_rssi_threshold.is_some() {
3975 return 4;
3976 }
3977
3978 if self.frequencies.is_some() {
3979 return 3;
3980 }
3981
3982 if self.ssids.is_some() {
3983 return 2;
3984 }
3985
3986 if self.scan_plans.is_some() {
3987 return 1;
3988 }
3989
3990 0
3991 }
3992 }
3993
3994 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ScheduledScanRequest<'static>, ___E>
3995 for ScheduledScanRequest
3996 where
3997 ___E: ::fidl_next::Encoder + ?Sized,
3998 {
3999 #[inline]
4000 fn encode(
4001 mut self,
4002 encoder: &mut ___E,
4003 out: &mut ::core::mem::MaybeUninit<crate::wire::ScheduledScanRequest<'static>>,
4004 _: (),
4005 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4006 ::fidl_next::munge!(let crate::wire::ScheduledScanRequest { table } = out);
4007
4008 let max_ord = self.__max_ordinal();
4009
4010 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4011 ::fidl_next::Wire::zero_padding(&mut out);
4012
4013 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4014 ::fidl_next::wire::Envelope,
4015 >(encoder, max_ord);
4016
4017 for i in 1..=max_ord {
4018 match i {
4019 7 => {
4020 if let Some(value) = self.match_sets.take() {
4021 ::fidl_next::wire::Envelope::encode_value::<
4022 ::fidl_next::wire::Vector<
4023 'static,
4024 crate::wire::ScheduledScanMatchSet<'static>,
4025 >,
4026 ___E,
4027 >(
4028 value, preallocated.encoder, &mut out, (4294967295, ())
4029 )?;
4030 } else {
4031 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4032 }
4033 }
4034
4035 6 => {
4036 if let Some(value) = self.band_rssi_adjustments.take() {
4037 ::fidl_next::wire::Envelope::encode_value::<
4038 ::fidl_next::wire::Vector<'static, crate::wire::BandRssiAdjustment>,
4039 ___E,
4040 >(
4041 value, preallocated.encoder, &mut out, (4294967295, ())
4042 )?;
4043 } else {
4044 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4045 }
4046 }
4047
4048 5 => {
4049 if let Some(value) = self.relative_rssi_threshold.take() {
4050 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
4051 value,
4052 preallocated.encoder,
4053 &mut out,
4054 (),
4055 )?;
4056 } else {
4057 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4058 }
4059 }
4060
4061 4 => {
4062 if let Some(value) = self.min_rssi_threshold.take() {
4063 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
4064 value,
4065 preallocated.encoder,
4066 &mut out,
4067 (),
4068 )?;
4069 } else {
4070 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4071 }
4072 }
4073
4074 3 => {
4075 if let Some(value) = self.frequencies.take() {
4076 ::fidl_next::wire::Envelope::encode_value::<
4077 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::Uint32>,
4078 ___E,
4079 >(
4080 value, preallocated.encoder, &mut out, (4294967295, ())
4081 )?;
4082 } else {
4083 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4084 }
4085 }
4086
4087 2 => {
4088 if let Some(value) = self.ssids.take() {
4089 ::fidl_next::wire::Envelope::encode_value::<
4090 ::fidl_next::wire::Vector<
4091 'static,
4092 ::fidl_next::wire::Vector<'static, u8>,
4093 >,
4094 ___E,
4095 >(
4096 value, preallocated.encoder, &mut out, (4294967295, (32, ()))
4097 )?;
4098 } else {
4099 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4100 }
4101 }
4102
4103 1 => {
4104 if let Some(value) = self.scan_plans.take() {
4105 ::fidl_next::wire::Envelope::encode_value::<
4106 ::fidl_next::wire::Vector<'static, crate::wire::ScheduledScanPlan>,
4107 ___E,
4108 >(
4109 value, preallocated.encoder, &mut out, (4294967295, ())
4110 )?;
4111 } else {
4112 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4113 }
4114 }
4115
4116 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4117 }
4118 unsafe {
4119 preallocated.write_next(out.assume_init_ref());
4120 }
4121 }
4122
4123 ::fidl_next::wire::Table::encode_len(table, max_ord);
4124
4125 Ok(())
4126 }
4127 }
4128
4129 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ScheduledScanRequest<'static>, ___E>
4130 for &'a ScheduledScanRequest
4131 where
4132 ___E: ::fidl_next::Encoder + ?Sized,
4133 {
4134 #[inline]
4135 fn encode(
4136 self,
4137 encoder: &mut ___E,
4138 out: &mut ::core::mem::MaybeUninit<crate::wire::ScheduledScanRequest<'static>>,
4139 _: (),
4140 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4141 ::fidl_next::munge!(let crate::wire::ScheduledScanRequest { table } = out);
4142
4143 let max_ord = self.__max_ordinal();
4144
4145 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4146 ::fidl_next::Wire::zero_padding(&mut out);
4147
4148 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4149 ::fidl_next::wire::Envelope,
4150 >(encoder, max_ord);
4151
4152 for i in 1..=max_ord {
4153 match i {
4154 7 => {
4155 if let Some(value) = &self.match_sets {
4156 ::fidl_next::wire::Envelope::encode_value::<
4157 ::fidl_next::wire::Vector<
4158 'static,
4159 crate::wire::ScheduledScanMatchSet<'static>,
4160 >,
4161 ___E,
4162 >(
4163 value, preallocated.encoder, &mut out, (4294967295, ())
4164 )?;
4165 } else {
4166 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4167 }
4168 }
4169
4170 6 => {
4171 if let Some(value) = &self.band_rssi_adjustments {
4172 ::fidl_next::wire::Envelope::encode_value::<
4173 ::fidl_next::wire::Vector<'static, crate::wire::BandRssiAdjustment>,
4174 ___E,
4175 >(
4176 value, preallocated.encoder, &mut out, (4294967295, ())
4177 )?;
4178 } else {
4179 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4180 }
4181 }
4182
4183 5 => {
4184 if let Some(value) = &self.relative_rssi_threshold {
4185 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
4186 value,
4187 preallocated.encoder,
4188 &mut out,
4189 (),
4190 )?;
4191 } else {
4192 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4193 }
4194 }
4195
4196 4 => {
4197 if let Some(value) = &self.min_rssi_threshold {
4198 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
4199 value,
4200 preallocated.encoder,
4201 &mut out,
4202 (),
4203 )?;
4204 } else {
4205 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4206 }
4207 }
4208
4209 3 => {
4210 if let Some(value) = &self.frequencies {
4211 ::fidl_next::wire::Envelope::encode_value::<
4212 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::Uint32>,
4213 ___E,
4214 >(
4215 value, preallocated.encoder, &mut out, (4294967295, ())
4216 )?;
4217 } else {
4218 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4219 }
4220 }
4221
4222 2 => {
4223 if let Some(value) = &self.ssids {
4224 ::fidl_next::wire::Envelope::encode_value::<
4225 ::fidl_next::wire::Vector<
4226 'static,
4227 ::fidl_next::wire::Vector<'static, u8>,
4228 >,
4229 ___E,
4230 >(
4231 value, preallocated.encoder, &mut out, (4294967295, (32, ()))
4232 )?;
4233 } else {
4234 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4235 }
4236 }
4237
4238 1 => {
4239 if let Some(value) = &self.scan_plans {
4240 ::fidl_next::wire::Envelope::encode_value::<
4241 ::fidl_next::wire::Vector<'static, crate::wire::ScheduledScanPlan>,
4242 ___E,
4243 >(
4244 value, preallocated.encoder, &mut out, (4294967295, ())
4245 )?;
4246 } else {
4247 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4248 }
4249 }
4250
4251 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4252 }
4253 unsafe {
4254 preallocated.write_next(out.assume_init_ref());
4255 }
4256 }
4257
4258 ::fidl_next::wire::Table::encode_len(table, max_ord);
4259
4260 Ok(())
4261 }
4262 }
4263
4264 impl<'de> ::fidl_next::FromWire<crate::wire::ScheduledScanRequest<'de>> for ScheduledScanRequest {
4265 #[inline]
4266 fn from_wire(wire_: crate::wire::ScheduledScanRequest<'de>) -> Self {
4267 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4268
4269 let scan_plans = wire_.table.get(1);
4270
4271 let ssids = wire_.table.get(2);
4272
4273 let frequencies = wire_.table.get(3);
4274
4275 let min_rssi_threshold = wire_.table.get(4);
4276
4277 let relative_rssi_threshold = wire_.table.get(5);
4278
4279 let band_rssi_adjustments = wire_.table.get(6);
4280
4281 let match_sets = wire_.table.get(7);
4282
4283 Self {
4284
4285
4286 scan_plans: scan_plans.map(|envelope| ::fidl_next::FromWire::from_wire(
4287 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanPlan>>() }
4288 )),
4289
4290
4291 ssids: ssids.map(|envelope| ::fidl_next::FromWire::from_wire(
4292 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::Vector<'de, u8>>>() }
4293 )),
4294
4295
4296 frequencies: frequencies.map(|envelope| ::fidl_next::FromWire::from_wire(
4297 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::Uint32>>() }
4298 )),
4299
4300
4301 min_rssi_threshold: min_rssi_threshold.map(|envelope| ::fidl_next::FromWire::from_wire(
4302 unsafe { envelope.read_unchecked::<i8>() }
4303 )),
4304
4305
4306 relative_rssi_threshold: relative_rssi_threshold.map(|envelope| ::fidl_next::FromWire::from_wire(
4307 unsafe { envelope.read_unchecked::<i8>() }
4308 )),
4309
4310
4311 band_rssi_adjustments: band_rssi_adjustments.map(|envelope| ::fidl_next::FromWire::from_wire(
4312 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>() }
4313 )),
4314
4315
4316 match_sets: match_sets.map(|envelope| ::fidl_next::FromWire::from_wire(
4317 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanMatchSet<'de>>>() }
4318 )),
4319
4320 }
4321 }
4322 }
4323
4324 impl<'de> ::fidl_next::FromWireRef<crate::wire::ScheduledScanRequest<'de>>
4325 for ScheduledScanRequest
4326 {
4327 #[inline]
4328 fn from_wire_ref(wire: &crate::wire::ScheduledScanRequest<'de>) -> Self {
4329 Self {
4330
4331
4332 scan_plans: wire.table.get(1)
4333 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4334 unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanPlan>>() }
4335 )),
4336
4337
4338 ssids: wire.table.get(2)
4339 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4340 unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::Vector<'de, u8>>>() }
4341 )),
4342
4343
4344 frequencies: wire.table.get(3)
4345 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4346 unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::Uint32>>() }
4347 )),
4348
4349
4350 min_rssi_threshold: wire.table.get(4)
4351 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4352 unsafe { envelope.deref_unchecked::<i8>() }
4353 )),
4354
4355
4356 relative_rssi_threshold: wire.table.get(5)
4357 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4358 unsafe { envelope.deref_unchecked::<i8>() }
4359 )),
4360
4361
4362 band_rssi_adjustments: wire.table.get(6)
4363 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4364 unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>() }
4365 )),
4366
4367
4368 match_sets: wire.table.get(7)
4369 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4370 unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanMatchSet<'de>>>() }
4371 )),
4372
4373 }
4374 }
4375 }
4376
4377 #[doc = " Features related to security / access control and data confidentiality.\n See IEEE 802.11-2016 4.5.4 and 802.11-2016 12.\n"]
4378 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4379 pub struct SecuritySupport {
4380 pub sae: ::core::option::Option<crate::natural::SaeFeature>,
4381
4382 pub mfp: ::core::option::Option<crate::natural::MfpFeature>,
4383
4384 pub owe: ::core::option::Option<crate::natural::OweFeature>,
4385 }
4386
4387 impl SecuritySupport {
4388 fn __max_ordinal(&self) -> usize {
4389 if self.owe.is_some() {
4390 return 3;
4391 }
4392
4393 if self.mfp.is_some() {
4394 return 2;
4395 }
4396
4397 if self.sae.is_some() {
4398 return 1;
4399 }
4400
4401 0
4402 }
4403 }
4404
4405 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SecuritySupport<'static>, ___E>
4406 for SecuritySupport
4407 where
4408 ___E: ::fidl_next::Encoder + ?Sized,
4409 {
4410 #[inline]
4411 fn encode(
4412 mut self,
4413 encoder: &mut ___E,
4414 out: &mut ::core::mem::MaybeUninit<crate::wire::SecuritySupport<'static>>,
4415 _: (),
4416 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4417 ::fidl_next::munge!(let crate::wire::SecuritySupport { table } = out);
4418
4419 let max_ord = self.__max_ordinal();
4420
4421 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4422 ::fidl_next::Wire::zero_padding(&mut out);
4423
4424 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4425 ::fidl_next::wire::Envelope,
4426 >(encoder, max_ord);
4427
4428 for i in 1..=max_ord {
4429 match i {
4430 3 => {
4431 if let Some(value) = self.owe.take() {
4432 ::fidl_next::wire::Envelope::encode_value::<
4433 crate::wire::OweFeature<'static>,
4434 ___E,
4435 >(
4436 value, preallocated.encoder, &mut out, ()
4437 )?;
4438 } else {
4439 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4440 }
4441 }
4442
4443 2 => {
4444 if let Some(value) = self.mfp.take() {
4445 ::fidl_next::wire::Envelope::encode_value::<
4446 crate::wire::MfpFeature<'static>,
4447 ___E,
4448 >(
4449 value, preallocated.encoder, &mut out, ()
4450 )?;
4451 } else {
4452 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4453 }
4454 }
4455
4456 1 => {
4457 if let Some(value) = self.sae.take() {
4458 ::fidl_next::wire::Envelope::encode_value::<
4459 crate::wire::SaeFeature<'static>,
4460 ___E,
4461 >(
4462 value, preallocated.encoder, &mut out, ()
4463 )?;
4464 } else {
4465 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4466 }
4467 }
4468
4469 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4470 }
4471 unsafe {
4472 preallocated.write_next(out.assume_init_ref());
4473 }
4474 }
4475
4476 ::fidl_next::wire::Table::encode_len(table, max_ord);
4477
4478 Ok(())
4479 }
4480 }
4481
4482 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SecuritySupport<'static>, ___E>
4483 for &'a SecuritySupport
4484 where
4485 ___E: ::fidl_next::Encoder + ?Sized,
4486 {
4487 #[inline]
4488 fn encode(
4489 self,
4490 encoder: &mut ___E,
4491 out: &mut ::core::mem::MaybeUninit<crate::wire::SecuritySupport<'static>>,
4492 _: (),
4493 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4494 ::fidl_next::munge!(let crate::wire::SecuritySupport { table } = out);
4495
4496 let max_ord = self.__max_ordinal();
4497
4498 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4499 ::fidl_next::Wire::zero_padding(&mut out);
4500
4501 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4502 ::fidl_next::wire::Envelope,
4503 >(encoder, max_ord);
4504
4505 for i in 1..=max_ord {
4506 match i {
4507 3 => {
4508 if let Some(value) = &self.owe {
4509 ::fidl_next::wire::Envelope::encode_value::<
4510 crate::wire::OweFeature<'static>,
4511 ___E,
4512 >(
4513 value, preallocated.encoder, &mut out, ()
4514 )?;
4515 } else {
4516 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4517 }
4518 }
4519
4520 2 => {
4521 if let Some(value) = &self.mfp {
4522 ::fidl_next::wire::Envelope::encode_value::<
4523 crate::wire::MfpFeature<'static>,
4524 ___E,
4525 >(
4526 value, preallocated.encoder, &mut out, ()
4527 )?;
4528 } else {
4529 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4530 }
4531 }
4532
4533 1 => {
4534 if let Some(value) = &self.sae {
4535 ::fidl_next::wire::Envelope::encode_value::<
4536 crate::wire::SaeFeature<'static>,
4537 ___E,
4538 >(
4539 value, preallocated.encoder, &mut out, ()
4540 )?;
4541 } else {
4542 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4543 }
4544 }
4545
4546 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4547 }
4548 unsafe {
4549 preallocated.write_next(out.assume_init_ref());
4550 }
4551 }
4552
4553 ::fidl_next::wire::Table::encode_len(table, max_ord);
4554
4555 Ok(())
4556 }
4557 }
4558
4559 impl<'de> ::fidl_next::FromWire<crate::wire::SecuritySupport<'de>> for SecuritySupport {
4560 #[inline]
4561 fn from_wire(wire_: crate::wire::SecuritySupport<'de>) -> Self {
4562 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4563
4564 let sae = wire_.table.get(1);
4565
4566 let mfp = wire_.table.get(2);
4567
4568 let owe = wire_.table.get(3);
4569
4570 Self {
4571 sae: sae.map(|envelope| {
4572 ::fidl_next::FromWire::from_wire(unsafe {
4573 envelope.read_unchecked::<crate::wire::SaeFeature<'de>>()
4574 })
4575 }),
4576
4577 mfp: mfp.map(|envelope| {
4578 ::fidl_next::FromWire::from_wire(unsafe {
4579 envelope.read_unchecked::<crate::wire::MfpFeature<'de>>()
4580 })
4581 }),
4582
4583 owe: owe.map(|envelope| {
4584 ::fidl_next::FromWire::from_wire(unsafe {
4585 envelope.read_unchecked::<crate::wire::OweFeature<'de>>()
4586 })
4587 }),
4588 }
4589 }
4590 }
4591
4592 impl<'de> ::fidl_next::FromWireRef<crate::wire::SecuritySupport<'de>> for SecuritySupport {
4593 #[inline]
4594 fn from_wire_ref(wire: &crate::wire::SecuritySupport<'de>) -> Self {
4595 Self {
4596 sae: wire.table.get(1).map(|envelope| {
4597 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4598 envelope.deref_unchecked::<crate::wire::SaeFeature<'de>>()
4599 })
4600 }),
4601
4602 mfp: wire.table.get(2).map(|envelope| {
4603 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4604 envelope.deref_unchecked::<crate::wire::MfpFeature<'de>>()
4605 })
4606 }),
4607
4608 owe: wire.table.get(3).map(|envelope| {
4609 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4610 envelope.deref_unchecked::<crate::wire::OweFeature<'de>>()
4611 })
4612 }),
4613 }
4614 }
4615 }
4616
4617 #[doc = " Features related to spectrum management.\n See IEEE 802.11-2016 4.5.5, 11.8, and 11.9.\n"]
4618 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4619 pub struct SpectrumManagementSupport {
4620 pub dfs: ::core::option::Option<crate::natural::DfsFeature>,
4621 }
4622
4623 impl SpectrumManagementSupport {
4624 fn __max_ordinal(&self) -> usize {
4625 if self.dfs.is_some() {
4626 return 1;
4627 }
4628
4629 0
4630 }
4631 }
4632
4633 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SpectrumManagementSupport<'static>, ___E>
4634 for SpectrumManagementSupport
4635 where
4636 ___E: ::fidl_next::Encoder + ?Sized,
4637 {
4638 #[inline]
4639 fn encode(
4640 mut self,
4641 encoder: &mut ___E,
4642 out: &mut ::core::mem::MaybeUninit<crate::wire::SpectrumManagementSupport<'static>>,
4643 _: (),
4644 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4645 ::fidl_next::munge!(let crate::wire::SpectrumManagementSupport { table } = out);
4646
4647 let max_ord = self.__max_ordinal();
4648
4649 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4650 ::fidl_next::Wire::zero_padding(&mut out);
4651
4652 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4653 ::fidl_next::wire::Envelope,
4654 >(encoder, max_ord);
4655
4656 for i in 1..=max_ord {
4657 match i {
4658 1 => {
4659 if let Some(value) = self.dfs.take() {
4660 ::fidl_next::wire::Envelope::encode_value::<
4661 crate::wire::DfsFeature<'static>,
4662 ___E,
4663 >(
4664 value, preallocated.encoder, &mut out, ()
4665 )?;
4666 } else {
4667 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4668 }
4669 }
4670
4671 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4672 }
4673 unsafe {
4674 preallocated.write_next(out.assume_init_ref());
4675 }
4676 }
4677
4678 ::fidl_next::wire::Table::encode_len(table, max_ord);
4679
4680 Ok(())
4681 }
4682 }
4683
4684 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SpectrumManagementSupport<'static>, ___E>
4685 for &'a SpectrumManagementSupport
4686 where
4687 ___E: ::fidl_next::Encoder + ?Sized,
4688 {
4689 #[inline]
4690 fn encode(
4691 self,
4692 encoder: &mut ___E,
4693 out: &mut ::core::mem::MaybeUninit<crate::wire::SpectrumManagementSupport<'static>>,
4694 _: (),
4695 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4696 ::fidl_next::munge!(let crate::wire::SpectrumManagementSupport { table } = out);
4697
4698 let max_ord = self.__max_ordinal();
4699
4700 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4701 ::fidl_next::Wire::zero_padding(&mut out);
4702
4703 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4704 ::fidl_next::wire::Envelope,
4705 >(encoder, max_ord);
4706
4707 for i in 1..=max_ord {
4708 match i {
4709 1 => {
4710 if let Some(value) = &self.dfs {
4711 ::fidl_next::wire::Envelope::encode_value::<
4712 crate::wire::DfsFeature<'static>,
4713 ___E,
4714 >(
4715 value, preallocated.encoder, &mut out, ()
4716 )?;
4717 } else {
4718 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4719 }
4720 }
4721
4722 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4723 }
4724 unsafe {
4725 preallocated.write_next(out.assume_init_ref());
4726 }
4727 }
4728
4729 ::fidl_next::wire::Table::encode_len(table, max_ord);
4730
4731 Ok(())
4732 }
4733 }
4734
4735 impl<'de> ::fidl_next::FromWire<crate::wire::SpectrumManagementSupport<'de>>
4736 for SpectrumManagementSupport
4737 {
4738 #[inline]
4739 fn from_wire(wire_: crate::wire::SpectrumManagementSupport<'de>) -> Self {
4740 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4741
4742 let dfs = wire_.table.get(1);
4743
4744 Self {
4745 dfs: dfs.map(|envelope| {
4746 ::fidl_next::FromWire::from_wire(unsafe {
4747 envelope.read_unchecked::<crate::wire::DfsFeature<'de>>()
4748 })
4749 }),
4750 }
4751 }
4752 }
4753
4754 impl<'de> ::fidl_next::FromWireRef<crate::wire::SpectrumManagementSupport<'de>>
4755 for SpectrumManagementSupport
4756 {
4757 #[inline]
4758 fn from_wire_ref(wire: &crate::wire::SpectrumManagementSupport<'de>) -> Self {
4759 Self {
4760 dfs: wire.table.get(1).map(|envelope| {
4761 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4762 envelope.deref_unchecked::<crate::wire::DfsFeature<'de>>()
4763 })
4764 }),
4765 }
4766 }
4767 }
4768
4769 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4770 pub struct WlanChannel {
4771 pub primary: u8,
4772
4773 pub cbw: crate::natural::ChannelBandwidth,
4774
4775 pub secondary80: u8,
4776 }
4777
4778 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanChannel, ___E> for WlanChannel
4779 where
4780 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4781 {
4782 #[inline]
4783 fn encode(
4784 self,
4785 encoder_: &mut ___E,
4786 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanChannel>,
4787 _: (),
4788 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4789 ::fidl_next::munge! {
4790 let crate::wire::WlanChannel {
4791 primary,
4792 cbw,
4793 secondary80,
4794
4795 } = out_;
4796 }
4797
4798 ::fidl_next::Encode::encode(self.primary, encoder_, primary, ())?;
4799
4800 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(primary.as_mut_ptr()) };
4801
4802 ::fidl_next::Encode::encode(self.cbw, encoder_, cbw, ())?;
4803
4804 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(cbw.as_mut_ptr()) };
4805
4806 ::fidl_next::Encode::encode(self.secondary80, encoder_, secondary80, ())?;
4807
4808 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(secondary80.as_mut_ptr()) };
4809
4810 Ok(())
4811 }
4812 }
4813
4814 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanChannel, ___E> for &'a WlanChannel
4815 where
4816 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4817 {
4818 #[inline]
4819 fn encode(
4820 self,
4821 encoder_: &mut ___E,
4822 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanChannel>,
4823 _: (),
4824 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4825 ::fidl_next::munge! {
4826 let crate::wire::WlanChannel {
4827 primary,
4828 cbw,
4829 secondary80,
4830
4831 } = out_;
4832 }
4833
4834 ::fidl_next::Encode::encode(&self.primary, encoder_, primary, ())?;
4835
4836 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(primary.as_mut_ptr()) };
4837
4838 ::fidl_next::Encode::encode(&self.cbw, encoder_, cbw, ())?;
4839
4840 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(cbw.as_mut_ptr()) };
4841
4842 ::fidl_next::Encode::encode(&self.secondary80, encoder_, secondary80, ())?;
4843
4844 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(secondary80.as_mut_ptr()) };
4845
4846 Ok(())
4847 }
4848 }
4849
4850 unsafe impl<___E>
4851 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::WlanChannel>, ___E>
4852 for WlanChannel
4853 where
4854 ___E: ::fidl_next::Encoder + ?Sized,
4855 WlanChannel: ::fidl_next::Encode<crate::wire::WlanChannel, ___E>,
4856 {
4857 #[inline]
4858 fn encode_option(
4859 this: ::core::option::Option<Self>,
4860 encoder: &mut ___E,
4861 out: &mut ::core::mem::MaybeUninit<
4862 ::fidl_next::wire::Box<'static, crate::wire::WlanChannel>,
4863 >,
4864 _: (),
4865 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4866 if let Some(inner) = this {
4867 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4868 ::fidl_next::wire::Box::encode_present(out);
4869 } else {
4870 ::fidl_next::wire::Box::encode_absent(out);
4871 }
4872
4873 Ok(())
4874 }
4875 }
4876
4877 unsafe impl<'a, ___E>
4878 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::WlanChannel>, ___E>
4879 for &'a WlanChannel
4880 where
4881 ___E: ::fidl_next::Encoder + ?Sized,
4882 &'a WlanChannel: ::fidl_next::Encode<crate::wire::WlanChannel, ___E>,
4883 {
4884 #[inline]
4885 fn encode_option(
4886 this: ::core::option::Option<Self>,
4887 encoder: &mut ___E,
4888 out: &mut ::core::mem::MaybeUninit<
4889 ::fidl_next::wire::Box<'static, crate::wire::WlanChannel>,
4890 >,
4891 _: (),
4892 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4893 if let Some(inner) = this {
4894 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4895 ::fidl_next::wire::Box::encode_present(out);
4896 } else {
4897 ::fidl_next::wire::Box::encode_absent(out);
4898 }
4899
4900 Ok(())
4901 }
4902 }
4903
4904 impl ::fidl_next::FromWire<crate::wire::WlanChannel> for WlanChannel {
4905 #[inline]
4906 fn from_wire(wire: crate::wire::WlanChannel) -> Self {
4907 Self {
4908 primary: ::fidl_next::FromWire::from_wire(wire.primary),
4909
4910 cbw: ::fidl_next::FromWire::from_wire(wire.cbw),
4911
4912 secondary80: ::fidl_next::FromWire::from_wire(wire.secondary80),
4913 }
4914 }
4915 }
4916
4917 impl ::fidl_next::FromWireRef<crate::wire::WlanChannel> for WlanChannel {
4918 #[inline]
4919 fn from_wire_ref(wire: &crate::wire::WlanChannel) -> Self {
4920 Self {
4921 primary: ::fidl_next::FromWireRef::from_wire_ref(&wire.primary),
4922
4923 cbw: ::fidl_next::FromWireRef::from_wire_ref(&wire.cbw),
4924
4925 secondary80: ::fidl_next::FromWireRef::from_wire_ref(&wire.secondary80),
4926 }
4927 }
4928 }
4929
4930 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4931 #[repr(u8)]
4932 pub enum WlanKeyType {
4933 Pairwise = 1,
4934 Group = 2,
4935 Igtk = 3,
4936 Peer = 4,
4937 UnknownOrdinal_(u8) = 5,
4938 }
4939 impl ::std::convert::From<u8> for WlanKeyType {
4940 fn from(value: u8) -> Self {
4941 match value {
4942 1 => Self::Pairwise,
4943 2 => Self::Group,
4944 3 => Self::Igtk,
4945 4 => Self::Peer,
4946
4947 _ => Self::UnknownOrdinal_(value),
4948 }
4949 }
4950 }
4951
4952 impl ::std::convert::From<WlanKeyType> for u8 {
4953 fn from(value: WlanKeyType) -> Self {
4954 match value {
4955 WlanKeyType::Pairwise => 1,
4956 WlanKeyType::Group => 2,
4957 WlanKeyType::Igtk => 3,
4958 WlanKeyType::Peer => 4,
4959
4960 WlanKeyType::UnknownOrdinal_(value) => value,
4961 }
4962 }
4963 }
4964
4965 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanKeyType, ___E> for WlanKeyType
4966 where
4967 ___E: ?Sized,
4968 {
4969 #[inline]
4970 fn encode(
4971 self,
4972 encoder: &mut ___E,
4973 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanKeyType>,
4974 _: (),
4975 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4976 ::fidl_next::Encode::encode(&self, encoder, out, ())
4977 }
4978 }
4979
4980 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanKeyType, ___E> for &'a WlanKeyType
4981 where
4982 ___E: ?Sized,
4983 {
4984 #[inline]
4985 fn encode(
4986 self,
4987 encoder: &mut ___E,
4988 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanKeyType>,
4989 _: (),
4990 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4991 ::fidl_next::munge!(let crate::wire::WlanKeyType { value } = out);
4992 let _ = value.write(u8::from(match *self {
4993 WlanKeyType::Pairwise => 1,
4994
4995 WlanKeyType::Group => 2,
4996
4997 WlanKeyType::Igtk => 3,
4998
4999 WlanKeyType::Peer => 4,
5000
5001 WlanKeyType::UnknownOrdinal_(value) => value,
5002 }));
5003
5004 Ok(())
5005 }
5006 }
5007
5008 impl ::core::convert::From<crate::wire::WlanKeyType> for WlanKeyType {
5009 fn from(wire: crate::wire::WlanKeyType) -> Self {
5010 match u8::from(wire.value) {
5011 1 => Self::Pairwise,
5012
5013 2 => Self::Group,
5014
5015 3 => Self::Igtk,
5016
5017 4 => Self::Peer,
5018
5019 value => Self::UnknownOrdinal_(value),
5020 }
5021 }
5022 }
5023
5024 impl ::fidl_next::FromWire<crate::wire::WlanKeyType> for WlanKeyType {
5025 #[inline]
5026 fn from_wire(wire: crate::wire::WlanKeyType) -> Self {
5027 Self::from(wire)
5028 }
5029 }
5030
5031 impl ::fidl_next::FromWireRef<crate::wire::WlanKeyType> for WlanKeyType {
5032 #[inline]
5033 fn from_wire_ref(wire: &crate::wire::WlanKeyType) -> Self {
5034 Self::from(*wire)
5035 }
5036 }
5037
5038 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5039 #[repr(u32)]
5040 pub enum WlanMacRole {
5041 Client = 1,
5042 Ap = 2,
5043 Mesh = 3,
5044 UnknownOrdinal_(u32) = 4,
5045 }
5046 impl ::std::convert::From<u32> for WlanMacRole {
5047 fn from(value: u32) -> Self {
5048 match value {
5049 1 => Self::Client,
5050 2 => Self::Ap,
5051 3 => Self::Mesh,
5052
5053 _ => Self::UnknownOrdinal_(value),
5054 }
5055 }
5056 }
5057
5058 impl ::std::convert::From<WlanMacRole> for u32 {
5059 fn from(value: WlanMacRole) -> Self {
5060 match value {
5061 WlanMacRole::Client => 1,
5062 WlanMacRole::Ap => 2,
5063 WlanMacRole::Mesh => 3,
5064
5065 WlanMacRole::UnknownOrdinal_(value) => value,
5066 }
5067 }
5068 }
5069
5070 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanMacRole, ___E> for WlanMacRole
5071 where
5072 ___E: ?Sized,
5073 {
5074 #[inline]
5075 fn encode(
5076 self,
5077 encoder: &mut ___E,
5078 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanMacRole>,
5079 _: (),
5080 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5081 ::fidl_next::Encode::encode(&self, encoder, out, ())
5082 }
5083 }
5084
5085 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanMacRole, ___E> for &'a WlanMacRole
5086 where
5087 ___E: ?Sized,
5088 {
5089 #[inline]
5090 fn encode(
5091 self,
5092 encoder: &mut ___E,
5093 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanMacRole>,
5094 _: (),
5095 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5096 ::fidl_next::munge!(let crate::wire::WlanMacRole { value } = out);
5097 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
5098 WlanMacRole::Client => 1,
5099
5100 WlanMacRole::Ap => 2,
5101
5102 WlanMacRole::Mesh => 3,
5103
5104 WlanMacRole::UnknownOrdinal_(value) => value,
5105 }));
5106
5107 Ok(())
5108 }
5109 }
5110
5111 impl ::core::convert::From<crate::wire::WlanMacRole> for WlanMacRole {
5112 fn from(wire: crate::wire::WlanMacRole) -> Self {
5113 match u32::from(wire.value) {
5114 1 => Self::Client,
5115
5116 2 => Self::Ap,
5117
5118 3 => Self::Mesh,
5119
5120 value => Self::UnknownOrdinal_(value),
5121 }
5122 }
5123 }
5124
5125 impl ::fidl_next::FromWire<crate::wire::WlanMacRole> for WlanMacRole {
5126 #[inline]
5127 fn from_wire(wire: crate::wire::WlanMacRole) -> Self {
5128 Self::from(wire)
5129 }
5130 }
5131
5132 impl ::fidl_next::FromWireRef<crate::wire::WlanMacRole> for WlanMacRole {
5133 #[inline]
5134 fn from_wire_ref(wire: &crate::wire::WlanMacRole) -> Self {
5135 Self::from(*wire)
5136 }
5137 }
5138
5139 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5140 #[repr(u32)]
5141 pub enum WlanPhyType {
5142 Dsss = 1,
5143 Hr = 2,
5144 Ofdm = 3,
5145 Erp = 4,
5146 Ht = 5,
5147 Dmg = 6,
5148 Vht = 7,
5149 Tvht = 8,
5150 S1G = 9,
5151 Cdmg = 10,
5152 Cmmg = 11,
5153 He = 12,
5154 UnknownOrdinal_(u32) = 13,
5155 }
5156 impl ::std::convert::From<u32> for WlanPhyType {
5157 fn from(value: u32) -> Self {
5158 match value {
5159 1 => Self::Dsss,
5160 2 => Self::Hr,
5161 3 => Self::Ofdm,
5162 4 => Self::Erp,
5163 5 => Self::Ht,
5164 6 => Self::Dmg,
5165 7 => Self::Vht,
5166 8 => Self::Tvht,
5167 9 => Self::S1G,
5168 10 => Self::Cdmg,
5169 11 => Self::Cmmg,
5170 12 => Self::He,
5171
5172 _ => Self::UnknownOrdinal_(value),
5173 }
5174 }
5175 }
5176
5177 impl ::std::convert::From<WlanPhyType> for u32 {
5178 fn from(value: WlanPhyType) -> Self {
5179 match value {
5180 WlanPhyType::Dsss => 1,
5181 WlanPhyType::Hr => 2,
5182 WlanPhyType::Ofdm => 3,
5183 WlanPhyType::Erp => 4,
5184 WlanPhyType::Ht => 5,
5185 WlanPhyType::Dmg => 6,
5186 WlanPhyType::Vht => 7,
5187 WlanPhyType::Tvht => 8,
5188 WlanPhyType::S1G => 9,
5189 WlanPhyType::Cdmg => 10,
5190 WlanPhyType::Cmmg => 11,
5191 WlanPhyType::He => 12,
5192
5193 WlanPhyType::UnknownOrdinal_(value) => value,
5194 }
5195 }
5196 }
5197
5198 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanPhyType, ___E> for WlanPhyType
5199 where
5200 ___E: ?Sized,
5201 {
5202 #[inline]
5203 fn encode(
5204 self,
5205 encoder: &mut ___E,
5206 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanPhyType>,
5207 _: (),
5208 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5209 ::fidl_next::Encode::encode(&self, encoder, out, ())
5210 }
5211 }
5212
5213 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanPhyType, ___E> for &'a WlanPhyType
5214 where
5215 ___E: ?Sized,
5216 {
5217 #[inline]
5218 fn encode(
5219 self,
5220 encoder: &mut ___E,
5221 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanPhyType>,
5222 _: (),
5223 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5224 ::fidl_next::munge!(let crate::wire::WlanPhyType { value } = out);
5225 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
5226 WlanPhyType::Dsss => 1,
5227
5228 WlanPhyType::Hr => 2,
5229
5230 WlanPhyType::Ofdm => 3,
5231
5232 WlanPhyType::Erp => 4,
5233
5234 WlanPhyType::Ht => 5,
5235
5236 WlanPhyType::Dmg => 6,
5237
5238 WlanPhyType::Vht => 7,
5239
5240 WlanPhyType::Tvht => 8,
5241
5242 WlanPhyType::S1G => 9,
5243
5244 WlanPhyType::Cdmg => 10,
5245
5246 WlanPhyType::Cmmg => 11,
5247
5248 WlanPhyType::He => 12,
5249
5250 WlanPhyType::UnknownOrdinal_(value) => value,
5251 }));
5252
5253 Ok(())
5254 }
5255 }
5256
5257 impl ::core::convert::From<crate::wire::WlanPhyType> for WlanPhyType {
5258 fn from(wire: crate::wire::WlanPhyType) -> Self {
5259 match u32::from(wire.value) {
5260 1 => Self::Dsss,
5261
5262 2 => Self::Hr,
5263
5264 3 => Self::Ofdm,
5265
5266 4 => Self::Erp,
5267
5268 5 => Self::Ht,
5269
5270 6 => Self::Dmg,
5271
5272 7 => Self::Vht,
5273
5274 8 => Self::Tvht,
5275
5276 9 => Self::S1G,
5277
5278 10 => Self::Cdmg,
5279
5280 11 => Self::Cmmg,
5281
5282 12 => Self::He,
5283
5284 value => Self::UnknownOrdinal_(value),
5285 }
5286 }
5287 }
5288
5289 impl ::fidl_next::FromWire<crate::wire::WlanPhyType> for WlanPhyType {
5290 #[inline]
5291 fn from_wire(wire: crate::wire::WlanPhyType) -> Self {
5292 Self::from(wire)
5293 }
5294 }
5295
5296 impl ::fidl_next::FromWireRef<crate::wire::WlanPhyType> for WlanPhyType {
5297 #[inline]
5298 fn from_wire_ref(wire: &crate::wire::WlanPhyType) -> Self {
5299 Self::from(*wire)
5300 }
5301 }
5302
5303 pub type WlanSoftmacHardwareCapability = u32;
5304
5305 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5306 #[repr(u32)]
5307 pub enum WlanSoftmacHardwareCapabilityBit {
5308 ShortPreamble = 32,
5309 SpectrumMgmt = 256,
5310 Qos = 512,
5311 ShortSlotTime = 1024,
5312 RadioMsmt = 4096,
5313 SimultaneousClientAp = 65536,
5314 }
5315 impl ::core::convert::TryFrom<u32> for WlanSoftmacHardwareCapabilityBit {
5316 type Error = ::fidl_next::UnknownStrictEnumMemberError;
5317 fn try_from(
5318 value: u32,
5319 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
5320 match value {
5321 32 => Ok(Self::ShortPreamble),
5322 256 => Ok(Self::SpectrumMgmt),
5323 512 => Ok(Self::Qos),
5324 1024 => Ok(Self::ShortSlotTime),
5325 4096 => Ok(Self::RadioMsmt),
5326 65536 => Ok(Self::SimultaneousClientAp),
5327
5328 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
5329 }
5330 }
5331 }
5332
5333 impl ::std::convert::From<WlanSoftmacHardwareCapabilityBit> for u32 {
5334 fn from(value: WlanSoftmacHardwareCapabilityBit) -> Self {
5335 match value {
5336 WlanSoftmacHardwareCapabilityBit::ShortPreamble => 32,
5337 WlanSoftmacHardwareCapabilityBit::SpectrumMgmt => 256,
5338 WlanSoftmacHardwareCapabilityBit::Qos => 512,
5339 WlanSoftmacHardwareCapabilityBit::ShortSlotTime => 1024,
5340 WlanSoftmacHardwareCapabilityBit::RadioMsmt => 4096,
5341 WlanSoftmacHardwareCapabilityBit::SimultaneousClientAp => 65536,
5342 }
5343 }
5344 }
5345
5346 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanSoftmacHardwareCapabilityBit, ___E>
5347 for WlanSoftmacHardwareCapabilityBit
5348 where
5349 ___E: ?Sized,
5350 {
5351 #[inline]
5352 fn encode(
5353 self,
5354 encoder: &mut ___E,
5355 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanSoftmacHardwareCapabilityBit>,
5356 _: (),
5357 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5358 ::fidl_next::Encode::encode(&self, encoder, out, ())
5359 }
5360 }
5361
5362 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanSoftmacHardwareCapabilityBit, ___E>
5363 for &'a WlanSoftmacHardwareCapabilityBit
5364 where
5365 ___E: ?Sized,
5366 {
5367 #[inline]
5368 fn encode(
5369 self,
5370 encoder: &mut ___E,
5371 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanSoftmacHardwareCapabilityBit>,
5372 _: (),
5373 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5374 ::fidl_next::munge!(let crate::wire::WlanSoftmacHardwareCapabilityBit { value } = out);
5375 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
5376 WlanSoftmacHardwareCapabilityBit::ShortPreamble => 32,
5377
5378 WlanSoftmacHardwareCapabilityBit::SpectrumMgmt => 256,
5379
5380 WlanSoftmacHardwareCapabilityBit::Qos => 512,
5381
5382 WlanSoftmacHardwareCapabilityBit::ShortSlotTime => 1024,
5383
5384 WlanSoftmacHardwareCapabilityBit::RadioMsmt => 4096,
5385
5386 WlanSoftmacHardwareCapabilityBit::SimultaneousClientAp => 65536,
5387 }));
5388
5389 Ok(())
5390 }
5391 }
5392
5393 impl ::core::convert::From<crate::wire::WlanSoftmacHardwareCapabilityBit>
5394 for WlanSoftmacHardwareCapabilityBit
5395 {
5396 fn from(wire: crate::wire::WlanSoftmacHardwareCapabilityBit) -> Self {
5397 match u32::from(wire.value) {
5398 32 => Self::ShortPreamble,
5399
5400 256 => Self::SpectrumMgmt,
5401
5402 512 => Self::Qos,
5403
5404 1024 => Self::ShortSlotTime,
5405
5406 4096 => Self::RadioMsmt,
5407
5408 65536 => Self::SimultaneousClientAp,
5409
5410 _ => unsafe { ::core::hint::unreachable_unchecked() },
5411 }
5412 }
5413 }
5414
5415 impl ::fidl_next::FromWire<crate::wire::WlanSoftmacHardwareCapabilityBit>
5416 for WlanSoftmacHardwareCapabilityBit
5417 {
5418 #[inline]
5419 fn from_wire(wire: crate::wire::WlanSoftmacHardwareCapabilityBit) -> Self {
5420 Self::from(wire)
5421 }
5422 }
5423
5424 impl ::fidl_next::FromWireRef<crate::wire::WlanSoftmacHardwareCapabilityBit>
5425 for WlanSoftmacHardwareCapabilityBit
5426 {
5427 #[inline]
5428 fn from_wire_ref(wire: &crate::wire::WlanSoftmacHardwareCapabilityBit) -> Self {
5429 Self::from(*wire)
5430 }
5431 }
5432
5433 #[doc = " One entry in a WlanTxResult report. Indicates a number of attempted transmissions on\n a particular tx vector, but does not imply successful transmission.\n"]
5434 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5435 pub struct WlanTxResultEntry {
5436 pub tx_vector_idx: u16,
5437
5438 pub attempts: u8,
5439 }
5440
5441 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanTxResultEntry, ___E> for WlanTxResultEntry
5442 where
5443 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5444 {
5445 #[inline]
5446 fn encode(
5447 self,
5448 encoder_: &mut ___E,
5449 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResultEntry>,
5450 _: (),
5451 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5452 ::fidl_next::munge! {
5453 let crate::wire::WlanTxResultEntry {
5454 tx_vector_idx,
5455 attempts,
5456
5457 } = out_;
5458 }
5459
5460 ::fidl_next::Encode::encode(self.tx_vector_idx, encoder_, tx_vector_idx, ())?;
5461
5462 let mut _field =
5463 unsafe { ::fidl_next::Slot::new_unchecked(tx_vector_idx.as_mut_ptr()) };
5464
5465 ::fidl_next::Encode::encode(self.attempts, encoder_, attempts, ())?;
5466
5467 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attempts.as_mut_ptr()) };
5468
5469 Ok(())
5470 }
5471 }
5472
5473 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanTxResultEntry, ___E>
5474 for &'a WlanTxResultEntry
5475 where
5476 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5477 {
5478 #[inline]
5479 fn encode(
5480 self,
5481 encoder_: &mut ___E,
5482 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResultEntry>,
5483 _: (),
5484 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5485 ::fidl_next::munge! {
5486 let crate::wire::WlanTxResultEntry {
5487 tx_vector_idx,
5488 attempts,
5489
5490 } = out_;
5491 }
5492
5493 ::fidl_next::Encode::encode(&self.tx_vector_idx, encoder_, tx_vector_idx, ())?;
5494
5495 let mut _field =
5496 unsafe { ::fidl_next::Slot::new_unchecked(tx_vector_idx.as_mut_ptr()) };
5497
5498 ::fidl_next::Encode::encode(&self.attempts, encoder_, attempts, ())?;
5499
5500 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attempts.as_mut_ptr()) };
5501
5502 Ok(())
5503 }
5504 }
5505
5506 unsafe impl<___E>
5507 ::fidl_next::EncodeOption<
5508 ::fidl_next::wire::Box<'static, crate::wire::WlanTxResultEntry>,
5509 ___E,
5510 > for WlanTxResultEntry
5511 where
5512 ___E: ::fidl_next::Encoder + ?Sized,
5513 WlanTxResultEntry: ::fidl_next::Encode<crate::wire::WlanTxResultEntry, ___E>,
5514 {
5515 #[inline]
5516 fn encode_option(
5517 this: ::core::option::Option<Self>,
5518 encoder: &mut ___E,
5519 out: &mut ::core::mem::MaybeUninit<
5520 ::fidl_next::wire::Box<'static, crate::wire::WlanTxResultEntry>,
5521 >,
5522 _: (),
5523 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5524 if let Some(inner) = this {
5525 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5526 ::fidl_next::wire::Box::encode_present(out);
5527 } else {
5528 ::fidl_next::wire::Box::encode_absent(out);
5529 }
5530
5531 Ok(())
5532 }
5533 }
5534
5535 unsafe impl<'a, ___E>
5536 ::fidl_next::EncodeOption<
5537 ::fidl_next::wire::Box<'static, crate::wire::WlanTxResultEntry>,
5538 ___E,
5539 > for &'a WlanTxResultEntry
5540 where
5541 ___E: ::fidl_next::Encoder + ?Sized,
5542 &'a WlanTxResultEntry: ::fidl_next::Encode<crate::wire::WlanTxResultEntry, ___E>,
5543 {
5544 #[inline]
5545 fn encode_option(
5546 this: ::core::option::Option<Self>,
5547 encoder: &mut ___E,
5548 out: &mut ::core::mem::MaybeUninit<
5549 ::fidl_next::wire::Box<'static, crate::wire::WlanTxResultEntry>,
5550 >,
5551 _: (),
5552 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5553 if let Some(inner) = this {
5554 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5555 ::fidl_next::wire::Box::encode_present(out);
5556 } else {
5557 ::fidl_next::wire::Box::encode_absent(out);
5558 }
5559
5560 Ok(())
5561 }
5562 }
5563
5564 impl ::fidl_next::FromWire<crate::wire::WlanTxResultEntry> for WlanTxResultEntry {
5565 #[inline]
5566 fn from_wire(wire: crate::wire::WlanTxResultEntry) -> Self {
5567 Self {
5568 tx_vector_idx: ::fidl_next::FromWire::from_wire(wire.tx_vector_idx),
5569
5570 attempts: ::fidl_next::FromWire::from_wire(wire.attempts),
5571 }
5572 }
5573 }
5574
5575 impl ::fidl_next::FromWireRef<crate::wire::WlanTxResultEntry> for WlanTxResultEntry {
5576 #[inline]
5577 fn from_wire_ref(wire: &crate::wire::WlanTxResultEntry) -> Self {
5578 Self {
5579 tx_vector_idx: ::fidl_next::FromWireRef::from_wire_ref(&wire.tx_vector_idx),
5580
5581 attempts: ::fidl_next::FromWireRef::from_wire_ref(&wire.attempts),
5582 }
5583 }
5584 }
5585
5586 #[doc = " Outcome of a packet transmission.\n"]
5587 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5588 #[repr(u8)]
5589 pub enum WlanTxResultCode {
5590 Failed = 0,
5591 Success = 1,
5592 UnknownOrdinal_(u8) = 2,
5593 }
5594 impl ::std::convert::From<u8> for WlanTxResultCode {
5595 fn from(value: u8) -> Self {
5596 match value {
5597 0 => Self::Failed,
5598 1 => Self::Success,
5599
5600 _ => Self::UnknownOrdinal_(value),
5601 }
5602 }
5603 }
5604
5605 impl ::std::convert::From<WlanTxResultCode> for u8 {
5606 fn from(value: WlanTxResultCode) -> Self {
5607 match value {
5608 WlanTxResultCode::Failed => 0,
5609 WlanTxResultCode::Success => 1,
5610
5611 WlanTxResultCode::UnknownOrdinal_(value) => value,
5612 }
5613 }
5614 }
5615
5616 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanTxResultCode, ___E> for WlanTxResultCode
5617 where
5618 ___E: ?Sized,
5619 {
5620 #[inline]
5621 fn encode(
5622 self,
5623 encoder: &mut ___E,
5624 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResultCode>,
5625 _: (),
5626 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5627 ::fidl_next::Encode::encode(&self, encoder, out, ())
5628 }
5629 }
5630
5631 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanTxResultCode, ___E>
5632 for &'a WlanTxResultCode
5633 where
5634 ___E: ?Sized,
5635 {
5636 #[inline]
5637 fn encode(
5638 self,
5639 encoder: &mut ___E,
5640 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResultCode>,
5641 _: (),
5642 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5643 ::fidl_next::munge!(let crate::wire::WlanTxResultCode { value } = out);
5644 let _ = value.write(u8::from(match *self {
5645 WlanTxResultCode::Failed => 0,
5646
5647 WlanTxResultCode::Success => 1,
5648
5649 WlanTxResultCode::UnknownOrdinal_(value) => value,
5650 }));
5651
5652 Ok(())
5653 }
5654 }
5655
5656 impl ::core::convert::From<crate::wire::WlanTxResultCode> for WlanTxResultCode {
5657 fn from(wire: crate::wire::WlanTxResultCode) -> Self {
5658 match u8::from(wire.value) {
5659 0 => Self::Failed,
5660
5661 1 => Self::Success,
5662
5663 value => Self::UnknownOrdinal_(value),
5664 }
5665 }
5666 }
5667
5668 impl ::fidl_next::FromWire<crate::wire::WlanTxResultCode> for WlanTxResultCode {
5669 #[inline]
5670 fn from_wire(wire: crate::wire::WlanTxResultCode) -> Self {
5671 Self::from(wire)
5672 }
5673 }
5674
5675 impl ::fidl_next::FromWireRef<crate::wire::WlanTxResultCode> for WlanTxResultCode {
5676 #[inline]
5677 fn from_wire_ref(wire: &crate::wire::WlanTxResultCode) -> Self {
5678 Self::from(*wire)
5679 }
5680 }
5681
5682 #[doc = " TX status reports are used by the Minstrel rate selection algorithm\n Tests should use the default value in //src/connectivity/wlan/testing/hw-sim/src/lib.rs\n"]
5683 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5684 pub struct WlanTxResult {
5685 pub tx_result_entry: [crate::natural::WlanTxResultEntry; 8],
5686
5687 pub peer_addr: [u8; 6],
5688
5689 pub result_code: crate::natural::WlanTxResultCode,
5690 }
5691
5692 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanTxResult, ___E> for WlanTxResult
5693 where
5694 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5695 {
5696 #[inline]
5697 fn encode(
5698 self,
5699 encoder_: &mut ___E,
5700 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResult>,
5701 _: (),
5702 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5703 ::fidl_next::munge! {
5704 let crate::wire::WlanTxResult {
5705 tx_result_entry,
5706 peer_addr,
5707 result_code,
5708
5709 } = out_;
5710 }
5711
5712 ::fidl_next::Encode::encode(self.tx_result_entry, encoder_, tx_result_entry, ())?;
5713
5714 let mut _field =
5715 unsafe { ::fidl_next::Slot::new_unchecked(tx_result_entry.as_mut_ptr()) };
5716
5717 ::fidl_next::Encode::encode(self.peer_addr, encoder_, peer_addr, ())?;
5718
5719 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(peer_addr.as_mut_ptr()) };
5720
5721 ::fidl_next::Encode::encode(self.result_code, encoder_, result_code, ())?;
5722
5723 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(result_code.as_mut_ptr()) };
5724
5725 Ok(())
5726 }
5727 }
5728
5729 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanTxResult, ___E> for &'a WlanTxResult
5730 where
5731 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5732 {
5733 #[inline]
5734 fn encode(
5735 self,
5736 encoder_: &mut ___E,
5737 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResult>,
5738 _: (),
5739 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5740 ::fidl_next::munge! {
5741 let crate::wire::WlanTxResult {
5742 tx_result_entry,
5743 peer_addr,
5744 result_code,
5745
5746 } = out_;
5747 }
5748
5749 ::fidl_next::Encode::encode(&self.tx_result_entry, encoder_, tx_result_entry, ())?;
5750
5751 let mut _field =
5752 unsafe { ::fidl_next::Slot::new_unchecked(tx_result_entry.as_mut_ptr()) };
5753
5754 ::fidl_next::Encode::encode(&self.peer_addr, encoder_, peer_addr, ())?;
5755
5756 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(peer_addr.as_mut_ptr()) };
5757
5758 ::fidl_next::Encode::encode(&self.result_code, encoder_, result_code, ())?;
5759
5760 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(result_code.as_mut_ptr()) };
5761
5762 Ok(())
5763 }
5764 }
5765
5766 unsafe impl<___E>
5767 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::WlanTxResult>, ___E>
5768 for WlanTxResult
5769 where
5770 ___E: ::fidl_next::Encoder + ?Sized,
5771 WlanTxResult: ::fidl_next::Encode<crate::wire::WlanTxResult, ___E>,
5772 {
5773 #[inline]
5774 fn encode_option(
5775 this: ::core::option::Option<Self>,
5776 encoder: &mut ___E,
5777 out: &mut ::core::mem::MaybeUninit<
5778 ::fidl_next::wire::Box<'static, crate::wire::WlanTxResult>,
5779 >,
5780 _: (),
5781 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5782 if let Some(inner) = this {
5783 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5784 ::fidl_next::wire::Box::encode_present(out);
5785 } else {
5786 ::fidl_next::wire::Box::encode_absent(out);
5787 }
5788
5789 Ok(())
5790 }
5791 }
5792
5793 unsafe impl<'a, ___E>
5794 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::WlanTxResult>, ___E>
5795 for &'a WlanTxResult
5796 where
5797 ___E: ::fidl_next::Encoder + ?Sized,
5798 &'a WlanTxResult: ::fidl_next::Encode<crate::wire::WlanTxResult, ___E>,
5799 {
5800 #[inline]
5801 fn encode_option(
5802 this: ::core::option::Option<Self>,
5803 encoder: &mut ___E,
5804 out: &mut ::core::mem::MaybeUninit<
5805 ::fidl_next::wire::Box<'static, crate::wire::WlanTxResult>,
5806 >,
5807 _: (),
5808 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5809 if let Some(inner) = this {
5810 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5811 ::fidl_next::wire::Box::encode_present(out);
5812 } else {
5813 ::fidl_next::wire::Box::encode_absent(out);
5814 }
5815
5816 Ok(())
5817 }
5818 }
5819
5820 impl ::fidl_next::FromWire<crate::wire::WlanTxResult> for WlanTxResult {
5821 #[inline]
5822 fn from_wire(wire: crate::wire::WlanTxResult) -> Self {
5823 Self {
5824 tx_result_entry: ::fidl_next::FromWire::from_wire(wire.tx_result_entry),
5825
5826 peer_addr: ::fidl_next::FromWire::from_wire(wire.peer_addr),
5827
5828 result_code: ::fidl_next::FromWire::from_wire(wire.result_code),
5829 }
5830 }
5831 }
5832
5833 impl ::fidl_next::FromWireRef<crate::wire::WlanTxResult> for WlanTxResult {
5834 #[inline]
5835 fn from_wire_ref(wire: &crate::wire::WlanTxResult) -> Self {
5836 Self {
5837 tx_result_entry: ::fidl_next::FromWireRef::from_wire_ref(&wire.tx_result_entry),
5838
5839 peer_addr: ::fidl_next::FromWireRef::from_wire_ref(&wire.peer_addr),
5840
5841 result_code: ::fidl_next::FromWireRef::from_wire_ref(&wire.result_code),
5842 }
5843 }
5844 }
5845
5846 #[doc = " WFA WMM v1.2, 2.2.2\n"]
5847 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5848 pub struct WlanWmmAccessCategoryParameters {
5849 pub ecw_min: u8,
5850
5851 pub ecw_max: u8,
5852
5853 pub aifsn: u8,
5854
5855 pub txop_limit: u16,
5856
5857 pub acm: bool,
5858 }
5859
5860 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>
5861 for WlanWmmAccessCategoryParameters
5862 where
5863 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5864 {
5865 #[inline]
5866 fn encode(
5867 self,
5868 encoder_: &mut ___E,
5869 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanWmmAccessCategoryParameters>,
5870 _: (),
5871 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5872 ::fidl_next::munge! {
5873 let crate::wire::WlanWmmAccessCategoryParameters {
5874 ecw_min,
5875 ecw_max,
5876 aifsn,
5877 txop_limit,
5878 acm,
5879
5880 } = out_;
5881 }
5882
5883 ::fidl_next::Encode::encode(self.ecw_min, encoder_, ecw_min, ())?;
5884
5885 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_min.as_mut_ptr()) };
5886
5887 ::fidl_next::Encode::encode(self.ecw_max, encoder_, ecw_max, ())?;
5888
5889 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_max.as_mut_ptr()) };
5890
5891 ::fidl_next::Encode::encode(self.aifsn, encoder_, aifsn, ())?;
5892
5893 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(aifsn.as_mut_ptr()) };
5894
5895 ::fidl_next::Encode::encode(self.txop_limit, encoder_, txop_limit, ())?;
5896
5897 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(txop_limit.as_mut_ptr()) };
5898
5899 ::fidl_next::Encode::encode(self.acm, encoder_, acm, ())?;
5900
5901 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(acm.as_mut_ptr()) };
5902
5903 Ok(())
5904 }
5905 }
5906
5907 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>
5908 for &'a WlanWmmAccessCategoryParameters
5909 where
5910 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5911 {
5912 #[inline]
5913 fn encode(
5914 self,
5915 encoder_: &mut ___E,
5916 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanWmmAccessCategoryParameters>,
5917 _: (),
5918 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5919 ::fidl_next::munge! {
5920 let crate::wire::WlanWmmAccessCategoryParameters {
5921 ecw_min,
5922 ecw_max,
5923 aifsn,
5924 txop_limit,
5925 acm,
5926
5927 } = out_;
5928 }
5929
5930 ::fidl_next::Encode::encode(&self.ecw_min, encoder_, ecw_min, ())?;
5931
5932 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_min.as_mut_ptr()) };
5933
5934 ::fidl_next::Encode::encode(&self.ecw_max, encoder_, ecw_max, ())?;
5935
5936 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_max.as_mut_ptr()) };
5937
5938 ::fidl_next::Encode::encode(&self.aifsn, encoder_, aifsn, ())?;
5939
5940 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(aifsn.as_mut_ptr()) };
5941
5942 ::fidl_next::Encode::encode(&self.txop_limit, encoder_, txop_limit, ())?;
5943
5944 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(txop_limit.as_mut_ptr()) };
5945
5946 ::fidl_next::Encode::encode(&self.acm, encoder_, acm, ())?;
5947
5948 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(acm.as_mut_ptr()) };
5949
5950 Ok(())
5951 }
5952 }
5953
5954 unsafe impl<___E>
5955 ::fidl_next::EncodeOption<
5956 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmAccessCategoryParameters>,
5957 ___E,
5958 > for WlanWmmAccessCategoryParameters
5959 where
5960 ___E: ::fidl_next::Encoder + ?Sized,
5961 WlanWmmAccessCategoryParameters:
5962 ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>,
5963 {
5964 #[inline]
5965 fn encode_option(
5966 this: ::core::option::Option<Self>,
5967 encoder: &mut ___E,
5968 out: &mut ::core::mem::MaybeUninit<
5969 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmAccessCategoryParameters>,
5970 >,
5971 _: (),
5972 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5973 if let Some(inner) = this {
5974 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5975 ::fidl_next::wire::Box::encode_present(out);
5976 } else {
5977 ::fidl_next::wire::Box::encode_absent(out);
5978 }
5979
5980 Ok(())
5981 }
5982 }
5983
5984 unsafe impl<'a, ___E>
5985 ::fidl_next::EncodeOption<
5986 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmAccessCategoryParameters>,
5987 ___E,
5988 > for &'a WlanWmmAccessCategoryParameters
5989 where
5990 ___E: ::fidl_next::Encoder + ?Sized,
5991 &'a WlanWmmAccessCategoryParameters:
5992 ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>,
5993 {
5994 #[inline]
5995 fn encode_option(
5996 this: ::core::option::Option<Self>,
5997 encoder: &mut ___E,
5998 out: &mut ::core::mem::MaybeUninit<
5999 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmAccessCategoryParameters>,
6000 >,
6001 _: (),
6002 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6003 if let Some(inner) = this {
6004 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6005 ::fidl_next::wire::Box::encode_present(out);
6006 } else {
6007 ::fidl_next::wire::Box::encode_absent(out);
6008 }
6009
6010 Ok(())
6011 }
6012 }
6013
6014 impl ::fidl_next::FromWire<crate::wire::WlanWmmAccessCategoryParameters>
6015 for WlanWmmAccessCategoryParameters
6016 {
6017 #[inline]
6018 fn from_wire(wire: crate::wire::WlanWmmAccessCategoryParameters) -> Self {
6019 Self {
6020 ecw_min: ::fidl_next::FromWire::from_wire(wire.ecw_min),
6021
6022 ecw_max: ::fidl_next::FromWire::from_wire(wire.ecw_max),
6023
6024 aifsn: ::fidl_next::FromWire::from_wire(wire.aifsn),
6025
6026 txop_limit: ::fidl_next::FromWire::from_wire(wire.txop_limit),
6027
6028 acm: ::fidl_next::FromWire::from_wire(wire.acm),
6029 }
6030 }
6031 }
6032
6033 impl ::fidl_next::FromWireRef<crate::wire::WlanWmmAccessCategoryParameters>
6034 for WlanWmmAccessCategoryParameters
6035 {
6036 #[inline]
6037 fn from_wire_ref(wire: &crate::wire::WlanWmmAccessCategoryParameters) -> Self {
6038 Self {
6039 ecw_min: ::fidl_next::FromWireRef::from_wire_ref(&wire.ecw_min),
6040
6041 ecw_max: ::fidl_next::FromWireRef::from_wire_ref(&wire.ecw_max),
6042
6043 aifsn: ::fidl_next::FromWireRef::from_wire_ref(&wire.aifsn),
6044
6045 txop_limit: ::fidl_next::FromWireRef::from_wire_ref(&wire.txop_limit),
6046
6047 acm: ::fidl_next::FromWireRef::from_wire_ref(&wire.acm),
6048 }
6049 }
6050 }
6051
6052 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6053 pub struct WlanWmmParameters {
6054 pub apsd: bool,
6055
6056 pub ac_be_params: crate::natural::WlanWmmAccessCategoryParameters,
6057
6058 pub ac_bk_params: crate::natural::WlanWmmAccessCategoryParameters,
6059
6060 pub ac_vi_params: crate::natural::WlanWmmAccessCategoryParameters,
6061
6062 pub ac_vo_params: crate::natural::WlanWmmAccessCategoryParameters,
6063 }
6064
6065 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanWmmParameters, ___E> for WlanWmmParameters
6066 where
6067 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6068 {
6069 #[inline]
6070 fn encode(
6071 self,
6072 encoder_: &mut ___E,
6073 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanWmmParameters>,
6074 _: (),
6075 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6076 ::fidl_next::munge! {
6077 let crate::wire::WlanWmmParameters {
6078 apsd,
6079 ac_be_params,
6080 ac_bk_params,
6081 ac_vi_params,
6082 ac_vo_params,
6083
6084 } = out_;
6085 }
6086
6087 ::fidl_next::Encode::encode(self.apsd, encoder_, apsd, ())?;
6088
6089 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(apsd.as_mut_ptr()) };
6090
6091 ::fidl_next::Encode::encode(self.ac_be_params, encoder_, ac_be_params, ())?;
6092
6093 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_be_params.as_mut_ptr()) };
6094
6095 ::fidl_next::Encode::encode(self.ac_bk_params, encoder_, ac_bk_params, ())?;
6096
6097 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_bk_params.as_mut_ptr()) };
6098
6099 ::fidl_next::Encode::encode(self.ac_vi_params, encoder_, ac_vi_params, ())?;
6100
6101 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vi_params.as_mut_ptr()) };
6102
6103 ::fidl_next::Encode::encode(self.ac_vo_params, encoder_, ac_vo_params, ())?;
6104
6105 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vo_params.as_mut_ptr()) };
6106
6107 Ok(())
6108 }
6109 }
6110
6111 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanWmmParameters, ___E>
6112 for &'a WlanWmmParameters
6113 where
6114 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6115 {
6116 #[inline]
6117 fn encode(
6118 self,
6119 encoder_: &mut ___E,
6120 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanWmmParameters>,
6121 _: (),
6122 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6123 ::fidl_next::munge! {
6124 let crate::wire::WlanWmmParameters {
6125 apsd,
6126 ac_be_params,
6127 ac_bk_params,
6128 ac_vi_params,
6129 ac_vo_params,
6130
6131 } = out_;
6132 }
6133
6134 ::fidl_next::Encode::encode(&self.apsd, encoder_, apsd, ())?;
6135
6136 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(apsd.as_mut_ptr()) };
6137
6138 ::fidl_next::Encode::encode(&self.ac_be_params, encoder_, ac_be_params, ())?;
6139
6140 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_be_params.as_mut_ptr()) };
6141
6142 ::fidl_next::Encode::encode(&self.ac_bk_params, encoder_, ac_bk_params, ())?;
6143
6144 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_bk_params.as_mut_ptr()) };
6145
6146 ::fidl_next::Encode::encode(&self.ac_vi_params, encoder_, ac_vi_params, ())?;
6147
6148 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vi_params.as_mut_ptr()) };
6149
6150 ::fidl_next::Encode::encode(&self.ac_vo_params, encoder_, ac_vo_params, ())?;
6151
6152 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vo_params.as_mut_ptr()) };
6153
6154 Ok(())
6155 }
6156 }
6157
6158 unsafe impl<___E>
6159 ::fidl_next::EncodeOption<
6160 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmParameters>,
6161 ___E,
6162 > for WlanWmmParameters
6163 where
6164 ___E: ::fidl_next::Encoder + ?Sized,
6165 WlanWmmParameters: ::fidl_next::Encode<crate::wire::WlanWmmParameters, ___E>,
6166 {
6167 #[inline]
6168 fn encode_option(
6169 this: ::core::option::Option<Self>,
6170 encoder: &mut ___E,
6171 out: &mut ::core::mem::MaybeUninit<
6172 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmParameters>,
6173 >,
6174 _: (),
6175 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6176 if let Some(inner) = this {
6177 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6178 ::fidl_next::wire::Box::encode_present(out);
6179 } else {
6180 ::fidl_next::wire::Box::encode_absent(out);
6181 }
6182
6183 Ok(())
6184 }
6185 }
6186
6187 unsafe impl<'a, ___E>
6188 ::fidl_next::EncodeOption<
6189 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmParameters>,
6190 ___E,
6191 > for &'a WlanWmmParameters
6192 where
6193 ___E: ::fidl_next::Encoder + ?Sized,
6194 &'a WlanWmmParameters: ::fidl_next::Encode<crate::wire::WlanWmmParameters, ___E>,
6195 {
6196 #[inline]
6197 fn encode_option(
6198 this: ::core::option::Option<Self>,
6199 encoder: &mut ___E,
6200 out: &mut ::core::mem::MaybeUninit<
6201 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmParameters>,
6202 >,
6203 _: (),
6204 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6205 if let Some(inner) = this {
6206 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6207 ::fidl_next::wire::Box::encode_present(out);
6208 } else {
6209 ::fidl_next::wire::Box::encode_absent(out);
6210 }
6211
6212 Ok(())
6213 }
6214 }
6215
6216 impl ::fidl_next::FromWire<crate::wire::WlanWmmParameters> for WlanWmmParameters {
6217 #[inline]
6218 fn from_wire(wire: crate::wire::WlanWmmParameters) -> Self {
6219 Self {
6220 apsd: ::fidl_next::FromWire::from_wire(wire.apsd),
6221
6222 ac_be_params: ::fidl_next::FromWire::from_wire(wire.ac_be_params),
6223
6224 ac_bk_params: ::fidl_next::FromWire::from_wire(wire.ac_bk_params),
6225
6226 ac_vi_params: ::fidl_next::FromWire::from_wire(wire.ac_vi_params),
6227
6228 ac_vo_params: ::fidl_next::FromWire::from_wire(wire.ac_vo_params),
6229 }
6230 }
6231 }
6232
6233 impl ::fidl_next::FromWireRef<crate::wire::WlanWmmParameters> for WlanWmmParameters {
6234 #[inline]
6235 fn from_wire_ref(wire: &crate::wire::WlanWmmParameters) -> Self {
6236 Self {
6237 apsd: ::fidl_next::FromWireRef::from_wire_ref(&wire.apsd),
6238
6239 ac_be_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_be_params),
6240
6241 ac_bk_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_bk_params),
6242
6243 ac_vi_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_vi_params),
6244
6245 ac_vo_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_vo_params),
6246 }
6247 }
6248 }
6249}
6250
6251pub mod wire {
6252
6253 #[repr(C)]
6255 pub struct ApfPacketFilterSupport<'de> {
6256 pub(crate) table: ::fidl_next::wire::Table<'de>,
6257 }
6258
6259 impl<'de> Drop for ApfPacketFilterSupport<'de> {
6260 fn drop(&mut self) {
6261 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
6262
6263 let _ = self
6264 .table
6265 .get(2)
6266 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int32>() });
6267
6268 let _ = self
6269 .table
6270 .get(3)
6271 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int32>() });
6272 }
6273 }
6274
6275 impl ::fidl_next::Constrained for ApfPacketFilterSupport<'_> {
6276 type Constraint = ();
6277
6278 fn validate(
6279 _: ::fidl_next::Slot<'_, Self>,
6280 _: Self::Constraint,
6281 ) -> Result<(), ::fidl_next::ValidationError> {
6282 Ok(())
6283 }
6284 }
6285
6286 unsafe impl ::fidl_next::Wire for ApfPacketFilterSupport<'static> {
6287 type Narrowed<'de> = ApfPacketFilterSupport<'de>;
6288
6289 #[inline]
6290 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6291 ::fidl_next::munge!(let Self { table } = out);
6292 ::fidl_next::wire::Table::zero_padding(table);
6293 }
6294 }
6295
6296 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ApfPacketFilterSupport<'de>
6297 where
6298 ___D: ::fidl_next::Decoder<'de> + ?Sized,
6299 {
6300 fn decode(
6301 slot: ::fidl_next::Slot<'_, Self>,
6302 decoder: &mut ___D,
6303 _: (),
6304 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6305 ::fidl_next::munge!(let Self { table } = slot);
6306
6307 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6308 match ordinal {
6309 0 => unsafe { ::core::hint::unreachable_unchecked() },
6310
6311 1 => {
6312 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
6313 slot.as_mut(),
6314 decoder,
6315 (),
6316 )?;
6317
6318 Ok(())
6319 }
6320
6321 2 => {
6322 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int32>(
6323 slot.as_mut(),
6324 decoder,
6325 (),
6326 )?;
6327
6328 Ok(())
6329 }
6330
6331 3 => {
6332 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int32>(
6333 slot.as_mut(),
6334 decoder,
6335 (),
6336 )?;
6337
6338 Ok(())
6339 }
6340
6341 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
6342 }
6343 })
6344 }
6345 }
6346
6347 impl<'de> ApfPacketFilterSupport<'de> {
6348 pub fn supported(&self) -> ::core::option::Option<&bool> {
6349 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6350 }
6351
6352 pub fn take_supported(&mut self) -> ::core::option::Option<bool> {
6353 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
6354 }
6355
6356 pub fn version(&self) -> ::core::option::Option<&::fidl_next::wire::Int32> {
6357 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
6358 }
6359
6360 pub fn take_version(&mut self) -> ::core::option::Option<::fidl_next::wire::Int32> {
6361 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
6362 }
6363
6364 pub fn max_filter_length(&self) -> ::core::option::Option<&::fidl_next::wire::Int32> {
6365 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
6366 }
6367
6368 pub fn take_max_filter_length(
6369 &mut self,
6370 ) -> ::core::option::Option<::fidl_next::wire::Int32> {
6371 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
6372 }
6373 }
6374
6375 impl<'de> ::core::fmt::Debug for ApfPacketFilterSupport<'de> {
6376 fn fmt(
6377 &self,
6378 f: &mut ::core::fmt::Formatter<'_>,
6379 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6380 f.debug_struct("ApfPacketFilterSupport")
6381 .field("supported", &self.supported())
6382 .field("version", &self.version())
6383 .field("max_filter_length", &self.max_filter_length())
6384 .finish()
6385 }
6386 }
6387
6388 impl<'de> ::fidl_next::IntoNatural for ApfPacketFilterSupport<'de> {
6389 type Natural = crate::natural::ApfPacketFilterSupport;
6390 }
6391
6392 #[derive(Clone, Debug)]
6394 #[repr(C)]
6395 pub struct BandRssiAdjustment {
6396 pub band: ::fidl_next_common_fuchsia_wlan_ieee80211::wire::WlanBand,
6397
6398 pub rssi_adjustment: i8,
6399 }
6400
6401 static_assertions::const_assert_eq!(std::mem::size_of::<BandRssiAdjustment>(), 2);
6402 static_assertions::const_assert_eq!(std::mem::align_of::<BandRssiAdjustment>(), 1);
6403
6404 static_assertions::const_assert_eq!(std::mem::offset_of!(BandRssiAdjustment, band), 0);
6405
6406 static_assertions::const_assert_eq!(
6407 std::mem::offset_of!(BandRssiAdjustment, rssi_adjustment),
6408 1
6409 );
6410
6411 impl ::fidl_next::Constrained for BandRssiAdjustment {
6412 type Constraint = ();
6413
6414 fn validate(
6415 _: ::fidl_next::Slot<'_, Self>,
6416 _: Self::Constraint,
6417 ) -> Result<(), ::fidl_next::ValidationError> {
6418 Ok(())
6419 }
6420 }
6421
6422 unsafe impl ::fidl_next::Wire for BandRssiAdjustment {
6423 type Narrowed<'de> = BandRssiAdjustment;
6424
6425 #[inline]
6426 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6427 ::fidl_next::munge! {
6428 let Self {
6429 band,
6430 rssi_adjustment,
6431
6432 } = &mut *out_;
6433 }
6434
6435 ::fidl_next::Wire::zero_padding(band);
6436
6437 ::fidl_next::Wire::zero_padding(rssi_adjustment);
6438 }
6439 }
6440
6441 unsafe impl<___D> ::fidl_next::Decode<___D> for BandRssiAdjustment
6442 where
6443 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6444 {
6445 fn decode(
6446 slot_: ::fidl_next::Slot<'_, Self>,
6447 decoder_: &mut ___D,
6448 _: (),
6449 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6450 ::fidl_next::munge! {
6451 let Self {
6452 mut band,
6453 mut rssi_adjustment,
6454
6455 } = slot_;
6456 }
6457
6458 let _field = band.as_mut();
6459
6460 ::fidl_next::Decode::decode(band.as_mut(), decoder_, ())?;
6461
6462 let _field = rssi_adjustment.as_mut();
6463
6464 ::fidl_next::Decode::decode(rssi_adjustment.as_mut(), decoder_, ())?;
6465
6466 Ok(())
6467 }
6468 }
6469
6470 impl ::fidl_next::IntoNatural for BandRssiAdjustment {
6471 type Natural = crate::natural::BandRssiAdjustment;
6472 }
6473
6474 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6476 #[repr(transparent)]
6477 pub struct BssType {
6478 pub(crate) value: ::fidl_next::wire::Uint32,
6479 }
6480
6481 impl ::fidl_next::Constrained for BssType {
6482 type Constraint = ();
6483
6484 fn validate(
6485 _: ::fidl_next::Slot<'_, Self>,
6486 _: Self::Constraint,
6487 ) -> Result<(), ::fidl_next::ValidationError> {
6488 Ok(())
6489 }
6490 }
6491
6492 unsafe impl ::fidl_next::Wire for BssType {
6493 type Narrowed<'de> = Self;
6494
6495 #[inline]
6496 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
6497 }
6499 }
6500
6501 impl BssType {
6502 pub const UNKNOWN: BssType = BssType { value: ::fidl_next::wire::Uint32(0) };
6503
6504 pub const INFRASTRUCTURE: BssType = BssType { value: ::fidl_next::wire::Uint32(1) };
6505
6506 pub const INDEPENDENT: BssType = BssType { value: ::fidl_next::wire::Uint32(2) };
6507
6508 pub const MESH: BssType = BssType { value: ::fidl_next::wire::Uint32(3) };
6509
6510 pub const PERSONAL: BssType = BssType { value: ::fidl_next::wire::Uint32(4) };
6511 }
6512
6513 unsafe impl<___D> ::fidl_next::Decode<___D> for BssType
6514 where
6515 ___D: ?Sized,
6516 {
6517 fn decode(
6518 slot: ::fidl_next::Slot<'_, Self>,
6519 _: &mut ___D,
6520 _: (),
6521 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6522 Ok(())
6523 }
6524 }
6525
6526 impl ::core::convert::From<crate::natural::BssType> for BssType {
6527 fn from(natural: crate::natural::BssType) -> Self {
6528 match natural {
6529 crate::natural::BssType::Unknown => BssType::UNKNOWN,
6530
6531 crate::natural::BssType::Infrastructure => BssType::INFRASTRUCTURE,
6532
6533 crate::natural::BssType::Independent => BssType::INDEPENDENT,
6534
6535 crate::natural::BssType::Mesh => BssType::MESH,
6536
6537 crate::natural::BssType::Personal => BssType::PERSONAL,
6538
6539 crate::natural::BssType::UnknownOrdinal_(value) => {
6540 BssType { value: ::fidl_next::wire::Uint32::from(value) }
6541 }
6542 }
6543 }
6544 }
6545
6546 impl ::fidl_next::IntoNatural for BssType {
6547 type Natural = crate::natural::BssType;
6548 }
6549
6550 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6552 #[repr(transparent)]
6553 pub struct ChannelBandwidth {
6554 pub(crate) value: ::fidl_next::wire::Uint32,
6555 }
6556
6557 impl ::fidl_next::Constrained for ChannelBandwidth {
6558 type Constraint = ();
6559
6560 fn validate(
6561 _: ::fidl_next::Slot<'_, Self>,
6562 _: Self::Constraint,
6563 ) -> Result<(), ::fidl_next::ValidationError> {
6564 Ok(())
6565 }
6566 }
6567
6568 unsafe impl ::fidl_next::Wire for ChannelBandwidth {
6569 type Narrowed<'de> = Self;
6570
6571 #[inline]
6572 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
6573 }
6575 }
6576
6577 impl ChannelBandwidth {
6578 pub const CBW20: ChannelBandwidth =
6579 ChannelBandwidth { value: ::fidl_next::wire::Uint32(1) };
6580
6581 pub const CBW40: ChannelBandwidth =
6582 ChannelBandwidth { value: ::fidl_next::wire::Uint32(2) };
6583
6584 pub const CBW40_BELOW: ChannelBandwidth =
6585 ChannelBandwidth { value: ::fidl_next::wire::Uint32(3) };
6586
6587 pub const CBW80: ChannelBandwidth =
6588 ChannelBandwidth { value: ::fidl_next::wire::Uint32(4) };
6589
6590 pub const CBW160: ChannelBandwidth =
6591 ChannelBandwidth { value: ::fidl_next::wire::Uint32(5) };
6592
6593 pub const CBW80_P80: ChannelBandwidth =
6594 ChannelBandwidth { value: ::fidl_next::wire::Uint32(6) };
6595 }
6596
6597 unsafe impl<___D> ::fidl_next::Decode<___D> for ChannelBandwidth
6598 where
6599 ___D: ?Sized,
6600 {
6601 fn decode(
6602 slot: ::fidl_next::Slot<'_, Self>,
6603 _: &mut ___D,
6604 _: (),
6605 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6606 Ok(())
6607 }
6608 }
6609
6610 impl ::core::convert::From<crate::natural::ChannelBandwidth> for ChannelBandwidth {
6611 fn from(natural: crate::natural::ChannelBandwidth) -> Self {
6612 match natural {
6613 crate::natural::ChannelBandwidth::Cbw20 => ChannelBandwidth::CBW20,
6614
6615 crate::natural::ChannelBandwidth::Cbw40 => ChannelBandwidth::CBW40,
6616
6617 crate::natural::ChannelBandwidth::Cbw40Below => ChannelBandwidth::CBW40_BELOW,
6618
6619 crate::natural::ChannelBandwidth::Cbw80 => ChannelBandwidth::CBW80,
6620
6621 crate::natural::ChannelBandwidth::Cbw160 => ChannelBandwidth::CBW160,
6622
6623 crate::natural::ChannelBandwidth::Cbw80P80 => ChannelBandwidth::CBW80_P80,
6624
6625 crate::natural::ChannelBandwidth::UnknownOrdinal_(value) => {
6626 ChannelBandwidth { value: ::fidl_next::wire::Uint32::from(value) }
6627 }
6628 }
6629 }
6630 }
6631
6632 impl ::fidl_next::IntoNatural for ChannelBandwidth {
6633 type Natural = crate::natural::ChannelBandwidth;
6634 }
6635
6636 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6638 #[repr(transparent)]
6639 pub struct DataPlaneType {
6640 pub(crate) value: u8,
6641 }
6642
6643 impl ::fidl_next::Constrained for DataPlaneType {
6644 type Constraint = ();
6645
6646 fn validate(
6647 _: ::fidl_next::Slot<'_, Self>,
6648 _: Self::Constraint,
6649 ) -> Result<(), ::fidl_next::ValidationError> {
6650 Ok(())
6651 }
6652 }
6653
6654 unsafe impl ::fidl_next::Wire for DataPlaneType {
6655 type Narrowed<'de> = Self;
6656
6657 #[inline]
6658 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
6659 }
6661 }
6662
6663 impl DataPlaneType {
6664 pub const ETHERNET_DEVICE: DataPlaneType = DataPlaneType { value: 1 };
6665
6666 pub const GENERIC_NETWORK_DEVICE: DataPlaneType = DataPlaneType { value: 2 };
6667 }
6668
6669 unsafe impl<___D> ::fidl_next::Decode<___D> for DataPlaneType
6670 where
6671 ___D: ?Sized,
6672 {
6673 fn decode(
6674 slot: ::fidl_next::Slot<'_, Self>,
6675 _: &mut ___D,
6676 _: (),
6677 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6678 Ok(())
6679 }
6680 }
6681
6682 impl ::core::convert::From<crate::natural::DataPlaneType> for DataPlaneType {
6683 fn from(natural: crate::natural::DataPlaneType) -> Self {
6684 match natural {
6685 crate::natural::DataPlaneType::EthernetDevice => DataPlaneType::ETHERNET_DEVICE,
6686
6687 crate::natural::DataPlaneType::GenericNetworkDevice => {
6688 DataPlaneType::GENERIC_NETWORK_DEVICE
6689 }
6690
6691 crate::natural::DataPlaneType::UnknownOrdinal_(value) => {
6692 DataPlaneType { value: u8::from(value) }
6693 }
6694 }
6695 }
6696 }
6697
6698 impl ::fidl_next::IntoNatural for DataPlaneType {
6699 type Natural = crate::natural::DataPlaneType;
6700 }
6701
6702 #[repr(C)]
6704 pub struct DataPlaneExtension<'de> {
6705 pub(crate) table: ::fidl_next::wire::Table<'de>,
6706 }
6707
6708 impl<'de> Drop for DataPlaneExtension<'de> {
6709 fn drop(&mut self) {
6710 let _ = self
6711 .table
6712 .get(1)
6713 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::DataPlaneType>() });
6714 }
6715 }
6716
6717 impl ::fidl_next::Constrained for DataPlaneExtension<'_> {
6718 type Constraint = ();
6719
6720 fn validate(
6721 _: ::fidl_next::Slot<'_, Self>,
6722 _: Self::Constraint,
6723 ) -> Result<(), ::fidl_next::ValidationError> {
6724 Ok(())
6725 }
6726 }
6727
6728 unsafe impl ::fidl_next::Wire for DataPlaneExtension<'static> {
6729 type Narrowed<'de> = DataPlaneExtension<'de>;
6730
6731 #[inline]
6732 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6733 ::fidl_next::munge!(let Self { table } = out);
6734 ::fidl_next::wire::Table::zero_padding(table);
6735 }
6736 }
6737
6738 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DataPlaneExtension<'de>
6739 where
6740 ___D: ::fidl_next::Decoder<'de> + ?Sized,
6741 {
6742 fn decode(
6743 slot: ::fidl_next::Slot<'_, Self>,
6744 decoder: &mut ___D,
6745 _: (),
6746 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6747 ::fidl_next::munge!(let Self { table } = slot);
6748
6749 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6750 match ordinal {
6751 0 => unsafe { ::core::hint::unreachable_unchecked() },
6752
6753 1 => {
6754 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::DataPlaneType>(
6755 slot.as_mut(),
6756 decoder,
6757 (),
6758 )?;
6759
6760 Ok(())
6761 }
6762
6763 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
6764 }
6765 })
6766 }
6767 }
6768
6769 impl<'de> DataPlaneExtension<'de> {
6770 pub fn data_plane_type(&self) -> ::core::option::Option<&crate::wire::DataPlaneType> {
6771 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6772 }
6773
6774 pub fn take_data_plane_type(
6775 &mut self,
6776 ) -> ::core::option::Option<crate::wire::DataPlaneType> {
6777 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
6778 }
6779 }
6780
6781 impl<'de> ::core::fmt::Debug for DataPlaneExtension<'de> {
6782 fn fmt(
6783 &self,
6784 f: &mut ::core::fmt::Formatter<'_>,
6785 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6786 f.debug_struct("DataPlaneExtension")
6787 .field("data_plane_type", &self.data_plane_type())
6788 .finish()
6789 }
6790 }
6791
6792 impl<'de> ::fidl_next::IntoNatural for DataPlaneExtension<'de> {
6793 type Natural = crate::natural::DataPlaneExtension;
6794 }
6795
6796 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6798 #[repr(transparent)]
6799 pub struct MacImplementationType {
6800 pub(crate) value: u8,
6801 }
6802
6803 impl ::fidl_next::Constrained for MacImplementationType {
6804 type Constraint = ();
6805
6806 fn validate(
6807 _: ::fidl_next::Slot<'_, Self>,
6808 _: Self::Constraint,
6809 ) -> Result<(), ::fidl_next::ValidationError> {
6810 Ok(())
6811 }
6812 }
6813
6814 unsafe impl ::fidl_next::Wire for MacImplementationType {
6815 type Narrowed<'de> = Self;
6816
6817 #[inline]
6818 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
6819 }
6821 }
6822
6823 impl MacImplementationType {
6824 pub const SOFTMAC: MacImplementationType = MacImplementationType { value: 1 };
6825
6826 pub const FULLMAC: MacImplementationType = MacImplementationType { value: 2 };
6827 }
6828
6829 unsafe impl<___D> ::fidl_next::Decode<___D> for MacImplementationType
6830 where
6831 ___D: ?Sized,
6832 {
6833 fn decode(
6834 slot: ::fidl_next::Slot<'_, Self>,
6835 _: &mut ___D,
6836 _: (),
6837 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6838 Ok(())
6839 }
6840 }
6841
6842 impl ::core::convert::From<crate::natural::MacImplementationType> for MacImplementationType {
6843 fn from(natural: crate::natural::MacImplementationType) -> Self {
6844 match natural {
6845 crate::natural::MacImplementationType::Softmac => MacImplementationType::SOFTMAC,
6846
6847 crate::natural::MacImplementationType::Fullmac => MacImplementationType::FULLMAC,
6848
6849 crate::natural::MacImplementationType::UnknownOrdinal_(value) => {
6850 MacImplementationType { value: u8::from(value) }
6851 }
6852 }
6853 }
6854 }
6855
6856 impl ::fidl_next::IntoNatural for MacImplementationType {
6857 type Natural = crate::natural::MacImplementationType;
6858 }
6859
6860 #[repr(C)]
6862 pub struct DeviceExtension<'de> {
6863 pub(crate) table: ::fidl_next::wire::Table<'de>,
6864 }
6865
6866 impl<'de> Drop for DeviceExtension<'de> {
6867 fn drop(&mut self) {
6868 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
6869
6870 let _ = self.table.get(2).map(|envelope| unsafe {
6871 envelope.read_unchecked::<crate::wire::MacImplementationType>()
6872 });
6873
6874 let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
6875 }
6876 }
6877
6878 impl ::fidl_next::Constrained for DeviceExtension<'_> {
6879 type Constraint = ();
6880
6881 fn validate(
6882 _: ::fidl_next::Slot<'_, Self>,
6883 _: Self::Constraint,
6884 ) -> Result<(), ::fidl_next::ValidationError> {
6885 Ok(())
6886 }
6887 }
6888
6889 unsafe impl ::fidl_next::Wire for DeviceExtension<'static> {
6890 type Narrowed<'de> = DeviceExtension<'de>;
6891
6892 #[inline]
6893 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6894 ::fidl_next::munge!(let Self { table } = out);
6895 ::fidl_next::wire::Table::zero_padding(table);
6896 }
6897 }
6898
6899 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceExtension<'de>
6900 where
6901 ___D: ::fidl_next::Decoder<'de> + ?Sized,
6902 {
6903 fn decode(
6904 slot: ::fidl_next::Slot<'_, Self>,
6905 decoder: &mut ___D,
6906 _: (),
6907 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6908 ::fidl_next::munge!(let Self { table } = slot);
6909
6910 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6911 match ordinal {
6912 0 => unsafe { ::core::hint::unreachable_unchecked() },
6913
6914 1 => {
6915 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
6916 slot.as_mut(),
6917 decoder,
6918 (),
6919 )?;
6920
6921 Ok(())
6922 }
6923
6924 2 => {
6925 ::fidl_next::wire::Envelope::decode_as::<
6926 ___D,
6927 crate::wire::MacImplementationType,
6928 >(slot.as_mut(), decoder, ())?;
6929
6930 Ok(())
6931 }
6932
6933 3 => {
6934 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
6935 slot.as_mut(),
6936 decoder,
6937 (),
6938 )?;
6939
6940 Ok(())
6941 }
6942
6943 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
6944 }
6945 })
6946 }
6947 }
6948
6949 impl<'de> DeviceExtension<'de> {
6950 pub fn is_synthetic(&self) -> ::core::option::Option<&bool> {
6951 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6952 }
6953
6954 pub fn take_is_synthetic(&mut self) -> ::core::option::Option<bool> {
6955 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
6956 }
6957
6958 pub fn mac_implementation_type(
6959 &self,
6960 ) -> ::core::option::Option<&crate::wire::MacImplementationType> {
6961 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
6962 }
6963
6964 pub fn take_mac_implementation_type(
6965 &mut self,
6966 ) -> ::core::option::Option<crate::wire::MacImplementationType> {
6967 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
6968 }
6969
6970 pub fn tx_status_report_supported(&self) -> ::core::option::Option<&bool> {
6971 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
6972 }
6973
6974 pub fn take_tx_status_report_supported(&mut self) -> ::core::option::Option<bool> {
6975 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
6976 }
6977 }
6978
6979 impl<'de> ::core::fmt::Debug for DeviceExtension<'de> {
6980 fn fmt(
6981 &self,
6982 f: &mut ::core::fmt::Formatter<'_>,
6983 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6984 f.debug_struct("DeviceExtension")
6985 .field("is_synthetic", &self.is_synthetic())
6986 .field("mac_implementation_type", &self.mac_implementation_type())
6987 .field("tx_status_report_supported", &self.tx_status_report_supported())
6988 .finish()
6989 }
6990 }
6991
6992 impl<'de> ::fidl_next::IntoNatural for DeviceExtension<'de> {
6993 type Natural = crate::natural::DeviceExtension;
6994 }
6995
6996 #[repr(C)]
6998 pub struct DfsFeature<'de> {
6999 pub(crate) table: ::fidl_next::wire::Table<'de>,
7000 }
7001
7002 impl<'de> Drop for DfsFeature<'de> {
7003 fn drop(&mut self) {
7004 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7005 }
7006 }
7007
7008 impl ::fidl_next::Constrained for DfsFeature<'_> {
7009 type Constraint = ();
7010
7011 fn validate(
7012 _: ::fidl_next::Slot<'_, Self>,
7013 _: Self::Constraint,
7014 ) -> Result<(), ::fidl_next::ValidationError> {
7015 Ok(())
7016 }
7017 }
7018
7019 unsafe impl ::fidl_next::Wire for DfsFeature<'static> {
7020 type Narrowed<'de> = DfsFeature<'de>;
7021
7022 #[inline]
7023 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7024 ::fidl_next::munge!(let Self { table } = out);
7025 ::fidl_next::wire::Table::zero_padding(table);
7026 }
7027 }
7028
7029 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DfsFeature<'de>
7030 where
7031 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7032 {
7033 fn decode(
7034 slot: ::fidl_next::Slot<'_, Self>,
7035 decoder: &mut ___D,
7036 _: (),
7037 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7038 ::fidl_next::munge!(let Self { table } = slot);
7039
7040 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7041 match ordinal {
7042 0 => unsafe { ::core::hint::unreachable_unchecked() },
7043
7044 1 => {
7045 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7046 slot.as_mut(),
7047 decoder,
7048 (),
7049 )?;
7050
7051 Ok(())
7052 }
7053
7054 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7055 }
7056 })
7057 }
7058 }
7059
7060 impl<'de> DfsFeature<'de> {
7061 pub fn supported(&self) -> ::core::option::Option<&bool> {
7062 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7063 }
7064
7065 pub fn take_supported(&mut self) -> ::core::option::Option<bool> {
7066 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7067 }
7068 }
7069
7070 impl<'de> ::core::fmt::Debug for DfsFeature<'de> {
7071 fn fmt(
7072 &self,
7073 f: &mut ::core::fmt::Formatter<'_>,
7074 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7075 f.debug_struct("DfsFeature").field("supported", &self.supported()).finish()
7076 }
7077 }
7078
7079 impl<'de> ::fidl_next::IntoNatural for DfsFeature<'de> {
7080 type Natural = crate::natural::DfsFeature;
7081 }
7082
7083 #[repr(C)]
7085 pub struct ScanOffloadExtension<'de> {
7086 pub(crate) table: ::fidl_next::wire::Table<'de>,
7087 }
7088
7089 impl<'de> Drop for ScanOffloadExtension<'de> {
7090 fn drop(&mut self) {
7091 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7092
7093 let _ = self.table.get(2).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7094 }
7095 }
7096
7097 impl ::fidl_next::Constrained for ScanOffloadExtension<'_> {
7098 type Constraint = ();
7099
7100 fn validate(
7101 _: ::fidl_next::Slot<'_, Self>,
7102 _: Self::Constraint,
7103 ) -> Result<(), ::fidl_next::ValidationError> {
7104 Ok(())
7105 }
7106 }
7107
7108 unsafe impl ::fidl_next::Wire for ScanOffloadExtension<'static> {
7109 type Narrowed<'de> = ScanOffloadExtension<'de>;
7110
7111 #[inline]
7112 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7113 ::fidl_next::munge!(let Self { table } = out);
7114 ::fidl_next::wire::Table::zero_padding(table);
7115 }
7116 }
7117
7118 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ScanOffloadExtension<'de>
7119 where
7120 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7121 {
7122 fn decode(
7123 slot: ::fidl_next::Slot<'_, Self>,
7124 decoder: &mut ___D,
7125 _: (),
7126 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7127 ::fidl_next::munge!(let Self { table } = slot);
7128
7129 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7130 match ordinal {
7131 0 => unsafe { ::core::hint::unreachable_unchecked() },
7132
7133 1 => {
7134 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7135 slot.as_mut(),
7136 decoder,
7137 (),
7138 )?;
7139
7140 Ok(())
7141 }
7142
7143 2 => {
7144 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7145 slot.as_mut(),
7146 decoder,
7147 (),
7148 )?;
7149
7150 Ok(())
7151 }
7152
7153 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7154 }
7155 })
7156 }
7157 }
7158
7159 impl<'de> ScanOffloadExtension<'de> {
7160 pub fn supported(&self) -> ::core::option::Option<&bool> {
7161 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7162 }
7163
7164 pub fn take_supported(&mut self) -> ::core::option::Option<bool> {
7165 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7166 }
7167
7168 pub fn scan_cancel_supported(&self) -> ::core::option::Option<&bool> {
7169 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
7170 }
7171
7172 pub fn take_scan_cancel_supported(&mut self) -> ::core::option::Option<bool> {
7173 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
7174 }
7175 }
7176
7177 impl<'de> ::core::fmt::Debug for ScanOffloadExtension<'de> {
7178 fn fmt(
7179 &self,
7180 f: &mut ::core::fmt::Formatter<'_>,
7181 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7182 f.debug_struct("ScanOffloadExtension")
7183 .field("supported", &self.supported())
7184 .field("scan_cancel_supported", &self.scan_cancel_supported())
7185 .finish()
7186 }
7187 }
7188
7189 impl<'de> ::fidl_next::IntoNatural for ScanOffloadExtension<'de> {
7190 type Natural = crate::natural::ScanOffloadExtension;
7191 }
7192
7193 #[repr(C)]
7195 pub struct ProbeResponseOffloadExtension<'de> {
7196 pub(crate) table: ::fidl_next::wire::Table<'de>,
7197 }
7198
7199 impl<'de> Drop for ProbeResponseOffloadExtension<'de> {
7200 fn drop(&mut self) {
7201 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7202 }
7203 }
7204
7205 impl ::fidl_next::Constrained for ProbeResponseOffloadExtension<'_> {
7206 type Constraint = ();
7207
7208 fn validate(
7209 _: ::fidl_next::Slot<'_, Self>,
7210 _: Self::Constraint,
7211 ) -> Result<(), ::fidl_next::ValidationError> {
7212 Ok(())
7213 }
7214 }
7215
7216 unsafe impl ::fidl_next::Wire for ProbeResponseOffloadExtension<'static> {
7217 type Narrowed<'de> = ProbeResponseOffloadExtension<'de>;
7218
7219 #[inline]
7220 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7221 ::fidl_next::munge!(let Self { table } = out);
7222 ::fidl_next::wire::Table::zero_padding(table);
7223 }
7224 }
7225
7226 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ProbeResponseOffloadExtension<'de>
7227 where
7228 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7229 {
7230 fn decode(
7231 slot: ::fidl_next::Slot<'_, Self>,
7232 decoder: &mut ___D,
7233 _: (),
7234 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7235 ::fidl_next::munge!(let Self { table } = slot);
7236
7237 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7238 match ordinal {
7239 0 => unsafe { ::core::hint::unreachable_unchecked() },
7240
7241 1 => {
7242 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7243 slot.as_mut(),
7244 decoder,
7245 (),
7246 )?;
7247
7248 Ok(())
7249 }
7250
7251 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7252 }
7253 })
7254 }
7255 }
7256
7257 impl<'de> ProbeResponseOffloadExtension<'de> {
7258 pub fn supported(&self) -> ::core::option::Option<&bool> {
7259 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7260 }
7261
7262 pub fn take_supported(&mut self) -> ::core::option::Option<bool> {
7263 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7264 }
7265 }
7266
7267 impl<'de> ::core::fmt::Debug for ProbeResponseOffloadExtension<'de> {
7268 fn fmt(
7269 &self,
7270 f: &mut ::core::fmt::Formatter<'_>,
7271 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7272 f.debug_struct("ProbeResponseOffloadExtension")
7273 .field("supported", &self.supported())
7274 .finish()
7275 }
7276 }
7277
7278 impl<'de> ::fidl_next::IntoNatural for ProbeResponseOffloadExtension<'de> {
7279 type Natural = crate::natural::ProbeResponseOffloadExtension;
7280 }
7281
7282 #[repr(C)]
7284 pub struct DiscoverySupport<'de> {
7285 pub(crate) table: ::fidl_next::wire::Table<'de>,
7286 }
7287
7288 impl<'de> Drop for DiscoverySupport<'de> {
7289 fn drop(&mut self) {
7290 let _ = self.table.get(1).map(|envelope| unsafe {
7291 envelope.read_unchecked::<crate::wire::ScanOffloadExtension<'de>>()
7292 });
7293
7294 let _ = self.table.get(2).map(|envelope| unsafe {
7295 envelope.read_unchecked::<crate::wire::ProbeResponseOffloadExtension<'de>>()
7296 });
7297 }
7298 }
7299
7300 impl ::fidl_next::Constrained for DiscoverySupport<'_> {
7301 type Constraint = ();
7302
7303 fn validate(
7304 _: ::fidl_next::Slot<'_, Self>,
7305 _: Self::Constraint,
7306 ) -> Result<(), ::fidl_next::ValidationError> {
7307 Ok(())
7308 }
7309 }
7310
7311 unsafe impl ::fidl_next::Wire for DiscoverySupport<'static> {
7312 type Narrowed<'de> = DiscoverySupport<'de>;
7313
7314 #[inline]
7315 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7316 ::fidl_next::munge!(let Self { table } = out);
7317 ::fidl_next::wire::Table::zero_padding(table);
7318 }
7319 }
7320
7321 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DiscoverySupport<'de>
7322 where
7323 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7324 {
7325 fn decode(
7326 slot: ::fidl_next::Slot<'_, Self>,
7327 decoder: &mut ___D,
7328 _: (),
7329 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7330 ::fidl_next::munge!(let Self { table } = slot);
7331
7332 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7333 match ordinal {
7334 0 => unsafe { ::core::hint::unreachable_unchecked() },
7335
7336 1 => {
7337 ::fidl_next::wire::Envelope::decode_as::<
7338 ___D,
7339 crate::wire::ScanOffloadExtension<'de>,
7340 >(slot.as_mut(), decoder, ())?;
7341
7342 Ok(())
7343 }
7344
7345 2 => {
7346 ::fidl_next::wire::Envelope::decode_as::<
7347 ___D,
7348 crate::wire::ProbeResponseOffloadExtension<'de>,
7349 >(slot.as_mut(), decoder, ())?;
7350
7351 Ok(())
7352 }
7353
7354 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7355 }
7356 })
7357 }
7358 }
7359
7360 impl<'de> DiscoverySupport<'de> {
7361 pub fn scan_offload(
7362 &self,
7363 ) -> ::core::option::Option<&crate::wire::ScanOffloadExtension<'de>> {
7364 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7365 }
7366
7367 pub fn take_scan_offload(
7368 &mut self,
7369 ) -> ::core::option::Option<crate::wire::ScanOffloadExtension<'de>> {
7370 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7371 }
7372
7373 pub fn probe_response_offload(
7374 &self,
7375 ) -> ::core::option::Option<&crate::wire::ProbeResponseOffloadExtension<'de>> {
7376 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
7377 }
7378
7379 pub fn take_probe_response_offload(
7380 &mut self,
7381 ) -> ::core::option::Option<crate::wire::ProbeResponseOffloadExtension<'de>> {
7382 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
7383 }
7384 }
7385
7386 impl<'de> ::core::fmt::Debug for DiscoverySupport<'de> {
7387 fn fmt(
7388 &self,
7389 f: &mut ::core::fmt::Formatter<'_>,
7390 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7391 f.debug_struct("DiscoverySupport")
7392 .field("scan_offload", &self.scan_offload())
7393 .field("probe_response_offload", &self.probe_response_offload())
7394 .finish()
7395 }
7396 }
7397
7398 impl<'de> ::fidl_next::IntoNatural for DiscoverySupport<'de> {
7399 type Natural = crate::natural::DiscoverySupport;
7400 }
7401
7402 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
7404 #[repr(transparent)]
7405 pub struct GuardInterval {
7406 pub(crate) value: u8,
7407 }
7408
7409 impl ::fidl_next::Constrained for GuardInterval {
7410 type Constraint = ();
7411
7412 fn validate(
7413 _: ::fidl_next::Slot<'_, Self>,
7414 _: Self::Constraint,
7415 ) -> Result<(), ::fidl_next::ValidationError> {
7416 Ok(())
7417 }
7418 }
7419
7420 unsafe impl ::fidl_next::Wire for GuardInterval {
7421 type Narrowed<'de> = Self;
7422
7423 #[inline]
7424 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
7425 }
7427 }
7428
7429 impl GuardInterval {
7430 pub const LONG_GI: GuardInterval = GuardInterval { value: 1 };
7431
7432 pub const SHORT_GI: GuardInterval = GuardInterval { value: 2 };
7433 }
7434
7435 unsafe impl<___D> ::fidl_next::Decode<___D> for GuardInterval
7436 where
7437 ___D: ?Sized,
7438 {
7439 fn decode(
7440 slot: ::fidl_next::Slot<'_, Self>,
7441 _: &mut ___D,
7442 _: (),
7443 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7444 ::fidl_next::munge!(let Self { value } = slot);
7445
7446 match u8::from(*value) {
7447 1 | 2 => (),
7448 unknown => {
7449 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
7450 }
7451 }
7452
7453 Ok(())
7454 }
7455 }
7456
7457 impl ::core::convert::From<crate::natural::GuardInterval> for GuardInterval {
7458 fn from(natural: crate::natural::GuardInterval) -> Self {
7459 match natural {
7460 crate::natural::GuardInterval::LongGi => GuardInterval::LONG_GI,
7461
7462 crate::natural::GuardInterval::ShortGi => GuardInterval::SHORT_GI,
7463 }
7464 }
7465 }
7466
7467 impl ::fidl_next::IntoNatural for GuardInterval {
7468 type Natural = crate::natural::GuardInterval;
7469 }
7470
7471 #[repr(C)]
7473 pub struct JoinBssRequest<'de> {
7474 pub(crate) table: ::fidl_next::wire::Table<'de>,
7475 }
7476
7477 impl<'de> Drop for JoinBssRequest<'de> {
7478 fn drop(&mut self) {
7479 let _ =
7480 self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<[u8; 6]>() });
7481
7482 let _ = self
7483 .table
7484 .get(2)
7485 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::BssType>() });
7486
7487 let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7488
7489 let _ = self
7490 .table
7491 .get(4)
7492 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint16>() });
7493 }
7494 }
7495
7496 impl ::fidl_next::Constrained for JoinBssRequest<'_> {
7497 type Constraint = ();
7498
7499 fn validate(
7500 _: ::fidl_next::Slot<'_, Self>,
7501 _: Self::Constraint,
7502 ) -> Result<(), ::fidl_next::ValidationError> {
7503 Ok(())
7504 }
7505 }
7506
7507 unsafe impl ::fidl_next::Wire for JoinBssRequest<'static> {
7508 type Narrowed<'de> = JoinBssRequest<'de>;
7509
7510 #[inline]
7511 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7512 ::fidl_next::munge!(let Self { table } = out);
7513 ::fidl_next::wire::Table::zero_padding(table);
7514 }
7515 }
7516
7517 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for JoinBssRequest<'de>
7518 where
7519 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7520 {
7521 fn decode(
7522 slot: ::fidl_next::Slot<'_, Self>,
7523 decoder: &mut ___D,
7524 _: (),
7525 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7526 ::fidl_next::munge!(let Self { table } = slot);
7527
7528 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7529 match ordinal {
7530 0 => unsafe { ::core::hint::unreachable_unchecked() },
7531
7532 1 => {
7533 ::fidl_next::wire::Envelope::decode_as::<___D, [u8; 6]>(
7534 slot.as_mut(),
7535 decoder,
7536 (),
7537 )?;
7538
7539 Ok(())
7540 }
7541
7542 2 => {
7543 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::BssType>(
7544 slot.as_mut(),
7545 decoder,
7546 (),
7547 )?;
7548
7549 Ok(())
7550 }
7551
7552 3 => {
7553 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7554 slot.as_mut(),
7555 decoder,
7556 (),
7557 )?;
7558
7559 Ok(())
7560 }
7561
7562 4 => {
7563 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint16>(
7564 slot.as_mut(),
7565 decoder,
7566 (),
7567 )?;
7568
7569 Ok(())
7570 }
7571
7572 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7573 }
7574 })
7575 }
7576 }
7577
7578 impl<'de> JoinBssRequest<'de> {
7579 pub fn bssid(&self) -> ::core::option::Option<&[u8; 6]> {
7580 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7581 }
7582
7583 pub fn take_bssid(&mut self) -> ::core::option::Option<[u8; 6]> {
7584 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7585 }
7586
7587 pub fn bss_type(&self) -> ::core::option::Option<&crate::wire::BssType> {
7588 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
7589 }
7590
7591 pub fn take_bss_type(&mut self) -> ::core::option::Option<crate::wire::BssType> {
7592 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
7593 }
7594
7595 pub fn remote(&self) -> ::core::option::Option<&bool> {
7596 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
7597 }
7598
7599 pub fn take_remote(&mut self) -> ::core::option::Option<bool> {
7600 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
7601 }
7602
7603 pub fn beacon_period(&self) -> ::core::option::Option<&::fidl_next::wire::Uint16> {
7604 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
7605 }
7606
7607 pub fn take_beacon_period(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint16> {
7608 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
7609 }
7610 }
7611
7612 impl<'de> ::core::fmt::Debug for JoinBssRequest<'de> {
7613 fn fmt(
7614 &self,
7615 f: &mut ::core::fmt::Formatter<'_>,
7616 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7617 f.debug_struct("JoinBssRequest")
7618 .field("bssid", &self.bssid())
7619 .field("bss_type", &self.bss_type())
7620 .field("remote", &self.remote())
7621 .field("beacon_period", &self.beacon_period())
7622 .finish()
7623 }
7624 }
7625
7626 impl<'de> ::fidl_next::IntoNatural for JoinBssRequest<'de> {
7627 type Natural = crate::natural::JoinBssRequest;
7628 }
7629
7630 #[repr(C)]
7632 pub struct RateSelectionOffloadExtension<'de> {
7633 pub(crate) table: ::fidl_next::wire::Table<'de>,
7634 }
7635
7636 impl<'de> Drop for RateSelectionOffloadExtension<'de> {
7637 fn drop(&mut self) {
7638 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7639 }
7640 }
7641
7642 impl ::fidl_next::Constrained for RateSelectionOffloadExtension<'_> {
7643 type Constraint = ();
7644
7645 fn validate(
7646 _: ::fidl_next::Slot<'_, Self>,
7647 _: Self::Constraint,
7648 ) -> Result<(), ::fidl_next::ValidationError> {
7649 Ok(())
7650 }
7651 }
7652
7653 unsafe impl ::fidl_next::Wire for RateSelectionOffloadExtension<'static> {
7654 type Narrowed<'de> = RateSelectionOffloadExtension<'de>;
7655
7656 #[inline]
7657 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7658 ::fidl_next::munge!(let Self { table } = out);
7659 ::fidl_next::wire::Table::zero_padding(table);
7660 }
7661 }
7662
7663 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for RateSelectionOffloadExtension<'de>
7664 where
7665 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7666 {
7667 fn decode(
7668 slot: ::fidl_next::Slot<'_, Self>,
7669 decoder: &mut ___D,
7670 _: (),
7671 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7672 ::fidl_next::munge!(let Self { table } = slot);
7673
7674 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7675 match ordinal {
7676 0 => unsafe { ::core::hint::unreachable_unchecked() },
7677
7678 1 => {
7679 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7680 slot.as_mut(),
7681 decoder,
7682 (),
7683 )?;
7684
7685 Ok(())
7686 }
7687
7688 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7689 }
7690 })
7691 }
7692 }
7693
7694 impl<'de> RateSelectionOffloadExtension<'de> {
7695 pub fn supported(&self) -> ::core::option::Option<&bool> {
7696 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7697 }
7698
7699 pub fn take_supported(&mut self) -> ::core::option::Option<bool> {
7700 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7701 }
7702 }
7703
7704 impl<'de> ::core::fmt::Debug for RateSelectionOffloadExtension<'de> {
7705 fn fmt(
7706 &self,
7707 f: &mut ::core::fmt::Formatter<'_>,
7708 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7709 f.debug_struct("RateSelectionOffloadExtension")
7710 .field("supported", &self.supported())
7711 .finish()
7712 }
7713 }
7714
7715 impl<'de> ::fidl_next::IntoNatural for RateSelectionOffloadExtension<'de> {
7716 type Natural = crate::natural::RateSelectionOffloadExtension;
7717 }
7718
7719 #[repr(C)]
7721 pub struct MacSublayerSupport<'de> {
7722 pub(crate) table: ::fidl_next::wire::Table<'de>,
7723 }
7724
7725 impl<'de> Drop for MacSublayerSupport<'de> {
7726 fn drop(&mut self) {
7727 let _ = self.table.get(1).map(|envelope| unsafe {
7728 envelope.read_unchecked::<crate::wire::RateSelectionOffloadExtension<'de>>()
7729 });
7730
7731 let _ = self.table.get(2).map(|envelope| unsafe {
7732 envelope.read_unchecked::<crate::wire::DataPlaneExtension<'de>>()
7733 });
7734
7735 let _ = self.table.get(3).map(|envelope| unsafe {
7736 envelope.read_unchecked::<crate::wire::DeviceExtension<'de>>()
7737 });
7738 }
7739 }
7740
7741 impl ::fidl_next::Constrained for MacSublayerSupport<'_> {
7742 type Constraint = ();
7743
7744 fn validate(
7745 _: ::fidl_next::Slot<'_, Self>,
7746 _: Self::Constraint,
7747 ) -> Result<(), ::fidl_next::ValidationError> {
7748 Ok(())
7749 }
7750 }
7751
7752 unsafe impl ::fidl_next::Wire for MacSublayerSupport<'static> {
7753 type Narrowed<'de> = MacSublayerSupport<'de>;
7754
7755 #[inline]
7756 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7757 ::fidl_next::munge!(let Self { table } = out);
7758 ::fidl_next::wire::Table::zero_padding(table);
7759 }
7760 }
7761
7762 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MacSublayerSupport<'de>
7763 where
7764 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7765 {
7766 fn decode(
7767 slot: ::fidl_next::Slot<'_, Self>,
7768 decoder: &mut ___D,
7769 _: (),
7770 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7771 ::fidl_next::munge!(let Self { table } = slot);
7772
7773 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7774 match ordinal {
7775 0 => unsafe { ::core::hint::unreachable_unchecked() },
7776
7777 1 => {
7778 ::fidl_next::wire::Envelope::decode_as::<
7779 ___D,
7780 crate::wire::RateSelectionOffloadExtension<'de>,
7781 >(slot.as_mut(), decoder, ())?;
7782
7783 Ok(())
7784 }
7785
7786 2 => {
7787 ::fidl_next::wire::Envelope::decode_as::<
7788 ___D,
7789 crate::wire::DataPlaneExtension<'de>,
7790 >(slot.as_mut(), decoder, ())?;
7791
7792 Ok(())
7793 }
7794
7795 3 => {
7796 ::fidl_next::wire::Envelope::decode_as::<
7797 ___D,
7798 crate::wire::DeviceExtension<'de>,
7799 >(slot.as_mut(), decoder, ())?;
7800
7801 Ok(())
7802 }
7803
7804 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7805 }
7806 })
7807 }
7808 }
7809
7810 impl<'de> MacSublayerSupport<'de> {
7811 pub fn rate_selection_offload(
7812 &self,
7813 ) -> ::core::option::Option<&crate::wire::RateSelectionOffloadExtension<'de>> {
7814 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7815 }
7816
7817 pub fn take_rate_selection_offload(
7818 &mut self,
7819 ) -> ::core::option::Option<crate::wire::RateSelectionOffloadExtension<'de>> {
7820 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7821 }
7822
7823 pub fn data_plane(&self) -> ::core::option::Option<&crate::wire::DataPlaneExtension<'de>> {
7824 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
7825 }
7826
7827 pub fn take_data_plane(
7828 &mut self,
7829 ) -> ::core::option::Option<crate::wire::DataPlaneExtension<'de>> {
7830 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
7831 }
7832
7833 pub fn device(&self) -> ::core::option::Option<&crate::wire::DeviceExtension<'de>> {
7834 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
7835 }
7836
7837 pub fn take_device(&mut self) -> ::core::option::Option<crate::wire::DeviceExtension<'de>> {
7838 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
7839 }
7840 }
7841
7842 impl<'de> ::core::fmt::Debug for MacSublayerSupport<'de> {
7843 fn fmt(
7844 &self,
7845 f: &mut ::core::fmt::Formatter<'_>,
7846 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7847 f.debug_struct("MacSublayerSupport")
7848 .field("rate_selection_offload", &self.rate_selection_offload())
7849 .field("data_plane", &self.data_plane())
7850 .field("device", &self.device())
7851 .finish()
7852 }
7853 }
7854
7855 impl<'de> ::fidl_next::IntoNatural for MacSublayerSupport<'de> {
7856 type Natural = crate::natural::MacSublayerSupport;
7857 }
7858
7859 #[repr(C)]
7861 pub struct MfpFeature<'de> {
7862 pub(crate) table: ::fidl_next::wire::Table<'de>,
7863 }
7864
7865 impl<'de> Drop for MfpFeature<'de> {
7866 fn drop(&mut self) {
7867 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7868 }
7869 }
7870
7871 impl ::fidl_next::Constrained for MfpFeature<'_> {
7872 type Constraint = ();
7873
7874 fn validate(
7875 _: ::fidl_next::Slot<'_, Self>,
7876 _: Self::Constraint,
7877 ) -> Result<(), ::fidl_next::ValidationError> {
7878 Ok(())
7879 }
7880 }
7881
7882 unsafe impl ::fidl_next::Wire for MfpFeature<'static> {
7883 type Narrowed<'de> = MfpFeature<'de>;
7884
7885 #[inline]
7886 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7887 ::fidl_next::munge!(let Self { table } = out);
7888 ::fidl_next::wire::Table::zero_padding(table);
7889 }
7890 }
7891
7892 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MfpFeature<'de>
7893 where
7894 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7895 {
7896 fn decode(
7897 slot: ::fidl_next::Slot<'_, Self>,
7898 decoder: &mut ___D,
7899 _: (),
7900 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7901 ::fidl_next::munge!(let Self { table } = slot);
7902
7903 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7904 match ordinal {
7905 0 => unsafe { ::core::hint::unreachable_unchecked() },
7906
7907 1 => {
7908 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7909 slot.as_mut(),
7910 decoder,
7911 (),
7912 )?;
7913
7914 Ok(())
7915 }
7916
7917 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7918 }
7919 })
7920 }
7921 }
7922
7923 impl<'de> MfpFeature<'de> {
7924 pub fn supported(&self) -> ::core::option::Option<&bool> {
7925 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7926 }
7927
7928 pub fn take_supported(&mut self) -> ::core::option::Option<bool> {
7929 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7930 }
7931 }
7932
7933 impl<'de> ::core::fmt::Debug for MfpFeature<'de> {
7934 fn fmt(
7935 &self,
7936 f: &mut ::core::fmt::Formatter<'_>,
7937 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7938 f.debug_struct("MfpFeature").field("supported", &self.supported()).finish()
7939 }
7940 }
7941
7942 impl<'de> ::fidl_next::IntoNatural for MfpFeature<'de> {
7943 type Natural = crate::natural::MfpFeature;
7944 }
7945
7946 #[repr(C)]
7948 pub struct OweFeature<'de> {
7949 pub(crate) table: ::fidl_next::wire::Table<'de>,
7950 }
7951
7952 impl<'de> Drop for OweFeature<'de> {
7953 fn drop(&mut self) {
7954 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7955 }
7956 }
7957
7958 impl ::fidl_next::Constrained for OweFeature<'_> {
7959 type Constraint = ();
7960
7961 fn validate(
7962 _: ::fidl_next::Slot<'_, Self>,
7963 _: Self::Constraint,
7964 ) -> Result<(), ::fidl_next::ValidationError> {
7965 Ok(())
7966 }
7967 }
7968
7969 unsafe impl ::fidl_next::Wire for OweFeature<'static> {
7970 type Narrowed<'de> = OweFeature<'de>;
7971
7972 #[inline]
7973 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7974 ::fidl_next::munge!(let Self { table } = out);
7975 ::fidl_next::wire::Table::zero_padding(table);
7976 }
7977 }
7978
7979 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for OweFeature<'de>
7980 where
7981 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7982 {
7983 fn decode(
7984 slot: ::fidl_next::Slot<'_, Self>,
7985 decoder: &mut ___D,
7986 _: (),
7987 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7988 ::fidl_next::munge!(let Self { table } = slot);
7989
7990 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7991 match ordinal {
7992 0 => unsafe { ::core::hint::unreachable_unchecked() },
7993
7994 1 => {
7995 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7996 slot.as_mut(),
7997 decoder,
7998 (),
7999 )?;
8000
8001 Ok(())
8002 }
8003
8004 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8005 }
8006 })
8007 }
8008 }
8009
8010 impl<'de> OweFeature<'de> {
8011 pub fn supported(&self) -> ::core::option::Option<&bool> {
8012 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8013 }
8014
8015 pub fn take_supported(&mut self) -> ::core::option::Option<bool> {
8016 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8017 }
8018 }
8019
8020 impl<'de> ::core::fmt::Debug for OweFeature<'de> {
8021 fn fmt(
8022 &self,
8023 f: &mut ::core::fmt::Formatter<'_>,
8024 ) -> ::core::result::Result<(), ::core::fmt::Error> {
8025 f.debug_struct("OweFeature").field("supported", &self.supported()).finish()
8026 }
8027 }
8028
8029 impl<'de> ::fidl_next::IntoNatural for OweFeature<'de> {
8030 type Natural = crate::natural::OweFeature;
8031 }
8032
8033 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
8035 #[repr(transparent)]
8036 pub struct PowerSaveType {
8037 pub(crate) value: ::fidl_next::wire::Uint32,
8038 }
8039
8040 impl ::fidl_next::Constrained for PowerSaveType {
8041 type Constraint = ();
8042
8043 fn validate(
8044 _: ::fidl_next::Slot<'_, Self>,
8045 _: Self::Constraint,
8046 ) -> Result<(), ::fidl_next::ValidationError> {
8047 Ok(())
8048 }
8049 }
8050
8051 unsafe impl ::fidl_next::Wire for PowerSaveType {
8052 type Narrowed<'de> = Self;
8053
8054 #[inline]
8055 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
8056 }
8058 }
8059
8060 impl PowerSaveType {
8061 pub const PS_MODE_ULTRA_LOW_POWER: PowerSaveType =
8062 PowerSaveType { value: ::fidl_next::wire::Uint32(0) };
8063
8064 pub const PS_MODE_LOW_POWER: PowerSaveType =
8065 PowerSaveType { value: ::fidl_next::wire::Uint32(1) };
8066
8067 pub const PS_MODE_BALANCED: PowerSaveType =
8068 PowerSaveType { value: ::fidl_next::wire::Uint32(2) };
8069
8070 pub const PS_MODE_PERFORMANCE: PowerSaveType =
8071 PowerSaveType { value: ::fidl_next::wire::Uint32(3) };
8072 }
8073
8074 unsafe impl<___D> ::fidl_next::Decode<___D> for PowerSaveType
8075 where
8076 ___D: ?Sized,
8077 {
8078 fn decode(
8079 slot: ::fidl_next::Slot<'_, Self>,
8080 _: &mut ___D,
8081 _: (),
8082 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8083 ::fidl_next::munge!(let Self { value } = slot);
8084
8085 match u32::from(*value) {
8086 0 | 1 | 2 | 3 => (),
8087 unknown => {
8088 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
8089 }
8090 }
8091
8092 Ok(())
8093 }
8094 }
8095
8096 impl ::core::convert::From<crate::natural::PowerSaveType> for PowerSaveType {
8097 fn from(natural: crate::natural::PowerSaveType) -> Self {
8098 match natural {
8099 crate::natural::PowerSaveType::PsModeUltraLowPower => {
8100 PowerSaveType::PS_MODE_ULTRA_LOW_POWER
8101 }
8102
8103 crate::natural::PowerSaveType::PsModeLowPower => PowerSaveType::PS_MODE_LOW_POWER,
8104
8105 crate::natural::PowerSaveType::PsModeBalanced => PowerSaveType::PS_MODE_BALANCED,
8106
8107 crate::natural::PowerSaveType::PsModePerformance => {
8108 PowerSaveType::PS_MODE_PERFORMANCE
8109 }
8110 }
8111 }
8112 }
8113
8114 impl ::fidl_next::IntoNatural for PowerSaveType {
8115 type Natural = crate::natural::PowerSaveType;
8116 }
8117
8118 #[repr(C)]
8120 pub struct SaeFeature<'de> {
8121 pub(crate) table: ::fidl_next::wire::Table<'de>,
8122 }
8123
8124 impl<'de> Drop for SaeFeature<'de> {
8125 fn drop(&mut self) {
8126 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
8127
8128 let _ = self.table.get(2).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
8129
8130 let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
8131 }
8132 }
8133
8134 impl ::fidl_next::Constrained for SaeFeature<'_> {
8135 type Constraint = ();
8136
8137 fn validate(
8138 _: ::fidl_next::Slot<'_, Self>,
8139 _: Self::Constraint,
8140 ) -> Result<(), ::fidl_next::ValidationError> {
8141 Ok(())
8142 }
8143 }
8144
8145 unsafe impl ::fidl_next::Wire for SaeFeature<'static> {
8146 type Narrowed<'de> = SaeFeature<'de>;
8147
8148 #[inline]
8149 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8150 ::fidl_next::munge!(let Self { table } = out);
8151 ::fidl_next::wire::Table::zero_padding(table);
8152 }
8153 }
8154
8155 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SaeFeature<'de>
8156 where
8157 ___D: ::fidl_next::Decoder<'de> + ?Sized,
8158 {
8159 fn decode(
8160 slot: ::fidl_next::Slot<'_, Self>,
8161 decoder: &mut ___D,
8162 _: (),
8163 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8164 ::fidl_next::munge!(let Self { table } = slot);
8165
8166 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8167 match ordinal {
8168 0 => unsafe { ::core::hint::unreachable_unchecked() },
8169
8170 1 => {
8171 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
8172 slot.as_mut(),
8173 decoder,
8174 (),
8175 )?;
8176
8177 Ok(())
8178 }
8179
8180 2 => {
8181 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
8182 slot.as_mut(),
8183 decoder,
8184 (),
8185 )?;
8186
8187 Ok(())
8188 }
8189
8190 3 => {
8191 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
8192 slot.as_mut(),
8193 decoder,
8194 (),
8195 )?;
8196
8197 Ok(())
8198 }
8199
8200 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8201 }
8202 })
8203 }
8204 }
8205
8206 impl<'de> SaeFeature<'de> {
8207 pub fn driver_handler_supported(&self) -> ::core::option::Option<&bool> {
8208 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8209 }
8210
8211 pub fn take_driver_handler_supported(&mut self) -> ::core::option::Option<bool> {
8212 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8213 }
8214
8215 pub fn sme_handler_supported(&self) -> ::core::option::Option<&bool> {
8216 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
8217 }
8218
8219 pub fn take_sme_handler_supported(&mut self) -> ::core::option::Option<bool> {
8220 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
8221 }
8222
8223 pub fn hash_to_element_supported(&self) -> ::core::option::Option<&bool> {
8224 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
8225 }
8226
8227 pub fn take_hash_to_element_supported(&mut self) -> ::core::option::Option<bool> {
8228 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
8229 }
8230 }
8231
8232 impl<'de> ::core::fmt::Debug for SaeFeature<'de> {
8233 fn fmt(
8234 &self,
8235 f: &mut ::core::fmt::Formatter<'_>,
8236 ) -> ::core::result::Result<(), ::core::fmt::Error> {
8237 f.debug_struct("SaeFeature")
8238 .field("driver_handler_supported", &self.driver_handler_supported())
8239 .field("sme_handler_supported", &self.sme_handler_supported())
8240 .field("hash_to_element_supported", &self.hash_to_element_supported())
8241 .finish()
8242 }
8243 }
8244
8245 impl<'de> ::fidl_next::IntoNatural for SaeFeature<'de> {
8246 type Natural = crate::natural::SaeFeature;
8247 }
8248
8249 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
8251 #[repr(transparent)]
8252 pub struct ScanType {
8253 pub(crate) value: ::fidl_next::wire::Uint32,
8254 }
8255
8256 impl ::fidl_next::Constrained for ScanType {
8257 type Constraint = ();
8258
8259 fn validate(
8260 _: ::fidl_next::Slot<'_, Self>,
8261 _: Self::Constraint,
8262 ) -> Result<(), ::fidl_next::ValidationError> {
8263 Ok(())
8264 }
8265 }
8266
8267 unsafe impl ::fidl_next::Wire for ScanType {
8268 type Narrowed<'de> = Self;
8269
8270 #[inline]
8271 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
8272 }
8274 }
8275
8276 impl ScanType {
8277 pub const ACTIVE: ScanType = ScanType { value: ::fidl_next::wire::Uint32(1) };
8278
8279 pub const PASSIVE: ScanType = ScanType { value: ::fidl_next::wire::Uint32(2) };
8280 }
8281
8282 unsafe impl<___D> ::fidl_next::Decode<___D> for ScanType
8283 where
8284 ___D: ?Sized,
8285 {
8286 fn decode(
8287 slot: ::fidl_next::Slot<'_, Self>,
8288 _: &mut ___D,
8289 _: (),
8290 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8291 ::fidl_next::munge!(let Self { value } = slot);
8292
8293 match u32::from(*value) {
8294 1 | 2 => (),
8295 unknown => {
8296 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
8297 }
8298 }
8299
8300 Ok(())
8301 }
8302 }
8303
8304 impl ::core::convert::From<crate::natural::ScanType> for ScanType {
8305 fn from(natural: crate::natural::ScanType) -> Self {
8306 match natural {
8307 crate::natural::ScanType::Active => ScanType::ACTIVE,
8308
8309 crate::natural::ScanType::Passive => ScanType::PASSIVE,
8310 }
8311 }
8312 }
8313
8314 impl ::fidl_next::IntoNatural for ScanType {
8315 type Natural = crate::natural::ScanType;
8316 }
8317
8318 #[repr(C)]
8320 pub struct ScheduledScanMatchSet<'de> {
8321 pub(crate) table: ::fidl_next::wire::Table<'de>,
8322 }
8323
8324 impl<'de> Drop for ScheduledScanMatchSet<'de> {
8325 fn drop(&mut self) {
8326 let _ = self.table.get(1).map(|envelope| unsafe {
8327 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
8328 });
8329
8330 let _ =
8331 self.table.get(2).map(|envelope| unsafe { envelope.read_unchecked::<[u8; 6]>() });
8332
8333 let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<i8>() });
8334
8335 let _ = self.table.get(4).map(|envelope| unsafe { envelope.read_unchecked::<i8>() });
8336
8337 let _ = self.table.get(5)
8338 .map(|envelope| unsafe {
8339 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>()
8340 });
8341 }
8342 }
8343
8344 impl ::fidl_next::Constrained for ScheduledScanMatchSet<'_> {
8345 type Constraint = ();
8346
8347 fn validate(
8348 _: ::fidl_next::Slot<'_, Self>,
8349 _: Self::Constraint,
8350 ) -> Result<(), ::fidl_next::ValidationError> {
8351 Ok(())
8352 }
8353 }
8354
8355 unsafe impl ::fidl_next::Wire for ScheduledScanMatchSet<'static> {
8356 type Narrowed<'de> = ScheduledScanMatchSet<'de>;
8357
8358 #[inline]
8359 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8360 ::fidl_next::munge!(let Self { table } = out);
8361 ::fidl_next::wire::Table::zero_padding(table);
8362 }
8363 }
8364
8365 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ScheduledScanMatchSet<'de>
8366 where
8367 ___D: ::fidl_next::Decoder<'de> + ?Sized,
8368 {
8369 fn decode(
8370 slot: ::fidl_next::Slot<'_, Self>,
8371 decoder: &mut ___D,
8372 _: (),
8373 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8374 ::fidl_next::munge!(let Self { table } = slot);
8375
8376 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8377 match ordinal {
8378 0 => unsafe { ::core::hint::unreachable_unchecked() },
8379
8380 1 => {
8381 ::fidl_next::wire::Envelope::decode_as::<
8382 ___D,
8383 ::fidl_next::wire::Vector<'de, u8>,
8384 >(slot.as_mut(), decoder, (32, ()))?;
8385
8386 let value = unsafe {
8387 slot.deref_unchecked()
8388 .deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
8389 };
8390
8391 if value.len() > 32 {
8392 return Err(::fidl_next::DecodeError::VectorTooLong {
8393 size: value.len() as u64,
8394 limit: 32,
8395 });
8396 }
8397
8398 Ok(())
8399 }
8400
8401 2 => {
8402 ::fidl_next::wire::Envelope::decode_as::<___D, [u8; 6]>(
8403 slot.as_mut(),
8404 decoder,
8405 (),
8406 )?;
8407
8408 Ok(())
8409 }
8410
8411 3 => {
8412 ::fidl_next::wire::Envelope::decode_as::<___D, i8>(
8413 slot.as_mut(),
8414 decoder,
8415 (),
8416 )?;
8417
8418 Ok(())
8419 }
8420
8421 4 => {
8422 ::fidl_next::wire::Envelope::decode_as::<___D, i8>(
8423 slot.as_mut(),
8424 decoder,
8425 (),
8426 )?;
8427
8428 Ok(())
8429 }
8430
8431 5 => {
8432 ::fidl_next::wire::Envelope::decode_as::<
8433 ___D,
8434 ::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>,
8435 >(slot.as_mut(), decoder, (4294967295, ()))?;
8436
8437 Ok(())
8438 }
8439
8440 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8441 }
8442 })
8443 }
8444 }
8445
8446 impl<'de> ScheduledScanMatchSet<'de> {
8447 pub fn ssid(&self) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, u8>> {
8448 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8449 }
8450
8451 pub fn take_ssid(&mut self) -> ::core::option::Option<::fidl_next::wire::Vector<'de, u8>> {
8452 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8453 }
8454
8455 pub fn bssid(&self) -> ::core::option::Option<&[u8; 6]> {
8456 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
8457 }
8458
8459 pub fn take_bssid(&mut self) -> ::core::option::Option<[u8; 6]> {
8460 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
8461 }
8462
8463 pub fn min_rssi_threshold(&self) -> ::core::option::Option<&i8> {
8464 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
8465 }
8466
8467 pub fn take_min_rssi_threshold(&mut self) -> ::core::option::Option<i8> {
8468 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
8469 }
8470
8471 pub fn relative_rssi_threshold(&self) -> ::core::option::Option<&i8> {
8472 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
8473 }
8474
8475 pub fn take_relative_rssi_threshold(&mut self) -> ::core::option::Option<i8> {
8476 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
8477 }
8478
8479 pub fn band_rssi_adjustments(
8480 &self,
8481 ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>
8482 {
8483 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
8484 }
8485
8486 pub fn take_band_rssi_adjustments(
8487 &mut self,
8488 ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>
8489 {
8490 unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
8491 }
8492 }
8493
8494 impl<'de> ::core::fmt::Debug for ScheduledScanMatchSet<'de> {
8495 fn fmt(
8496 &self,
8497 f: &mut ::core::fmt::Formatter<'_>,
8498 ) -> ::core::result::Result<(), ::core::fmt::Error> {
8499 f.debug_struct("ScheduledScanMatchSet")
8500 .field("ssid", &self.ssid())
8501 .field("bssid", &self.bssid())
8502 .field("min_rssi_threshold", &self.min_rssi_threshold())
8503 .field("relative_rssi_threshold", &self.relative_rssi_threshold())
8504 .field("band_rssi_adjustments", &self.band_rssi_adjustments())
8505 .finish()
8506 }
8507 }
8508
8509 impl<'de> ::fidl_next::IntoNatural for ScheduledScanMatchSet<'de> {
8510 type Natural = crate::natural::ScheduledScanMatchSet;
8511 }
8512
8513 #[derive(Clone, Debug)]
8515 #[repr(C)]
8516 pub struct ScheduledScanPlan {
8517 pub interval: ::fidl_next::wire::Uint32,
8518
8519 pub iterations: ::fidl_next::wire::Uint32,
8520 }
8521
8522 static_assertions::const_assert_eq!(std::mem::size_of::<ScheduledScanPlan>(), 8);
8523 static_assertions::const_assert_eq!(std::mem::align_of::<ScheduledScanPlan>(), 4);
8524
8525 static_assertions::const_assert_eq!(std::mem::offset_of!(ScheduledScanPlan, interval), 0);
8526
8527 static_assertions::const_assert_eq!(std::mem::offset_of!(ScheduledScanPlan, iterations), 4);
8528
8529 impl ::fidl_next::Constrained for ScheduledScanPlan {
8530 type Constraint = ();
8531
8532 fn validate(
8533 _: ::fidl_next::Slot<'_, Self>,
8534 _: Self::Constraint,
8535 ) -> Result<(), ::fidl_next::ValidationError> {
8536 Ok(())
8537 }
8538 }
8539
8540 unsafe impl ::fidl_next::Wire for ScheduledScanPlan {
8541 type Narrowed<'de> = ScheduledScanPlan;
8542
8543 #[inline]
8544 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8545 ::fidl_next::munge! {
8546 let Self {
8547 interval,
8548 iterations,
8549
8550 } = &mut *out_;
8551 }
8552
8553 ::fidl_next::Wire::zero_padding(interval);
8554
8555 ::fidl_next::Wire::zero_padding(iterations);
8556 }
8557 }
8558
8559 unsafe impl<___D> ::fidl_next::Decode<___D> for ScheduledScanPlan
8560 where
8561 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8562 {
8563 fn decode(
8564 slot_: ::fidl_next::Slot<'_, Self>,
8565 decoder_: &mut ___D,
8566 _: (),
8567 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8568 ::fidl_next::munge! {
8569 let Self {
8570 mut interval,
8571 mut iterations,
8572
8573 } = slot_;
8574 }
8575
8576 let _field = interval.as_mut();
8577
8578 ::fidl_next::Decode::decode(interval.as_mut(), decoder_, ())?;
8579
8580 let _field = iterations.as_mut();
8581
8582 ::fidl_next::Decode::decode(iterations.as_mut(), decoder_, ())?;
8583
8584 Ok(())
8585 }
8586 }
8587
8588 impl ::fidl_next::IntoNatural for ScheduledScanPlan {
8589 type Natural = crate::natural::ScheduledScanPlan;
8590 }
8591
8592 #[repr(C)]
8594 pub struct ScheduledScanRequest<'de> {
8595 pub(crate) table: ::fidl_next::wire::Table<'de>,
8596 }
8597
8598 impl<'de> Drop for ScheduledScanRequest<'de> {
8599 fn drop(&mut self) {
8600 let _ = self.table.get(1)
8601 .map(|envelope| unsafe {
8602 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanPlan>>()
8603 });
8604
8605 let _ = self.table.get(2)
8606 .map(|envelope| unsafe {
8607 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::Vector<'de, u8>>>()
8608 });
8609
8610 let _ = self.table.get(3)
8611 .map(|envelope| unsafe {
8612 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::Uint32>>()
8613 });
8614
8615 let _ = self.table.get(4).map(|envelope| unsafe { envelope.read_unchecked::<i8>() });
8616
8617 let _ = self.table.get(5).map(|envelope| unsafe { envelope.read_unchecked::<i8>() });
8618
8619 let _ = self.table.get(6)
8620 .map(|envelope| unsafe {
8621 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>()
8622 });
8623
8624 let _ = self.table.get(7)
8625 .map(|envelope| unsafe {
8626 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanMatchSet<'de>>>()
8627 });
8628 }
8629 }
8630
8631 impl ::fidl_next::Constrained for ScheduledScanRequest<'_> {
8632 type Constraint = ();
8633
8634 fn validate(
8635 _: ::fidl_next::Slot<'_, Self>,
8636 _: Self::Constraint,
8637 ) -> Result<(), ::fidl_next::ValidationError> {
8638 Ok(())
8639 }
8640 }
8641
8642 unsafe impl ::fidl_next::Wire for ScheduledScanRequest<'static> {
8643 type Narrowed<'de> = ScheduledScanRequest<'de>;
8644
8645 #[inline]
8646 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8647 ::fidl_next::munge!(let Self { table } = out);
8648 ::fidl_next::wire::Table::zero_padding(table);
8649 }
8650 }
8651
8652 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ScheduledScanRequest<'de>
8653 where
8654 ___D: ::fidl_next::Decoder<'de> + ?Sized,
8655 {
8656 fn decode(
8657 slot: ::fidl_next::Slot<'_, Self>,
8658 decoder: &mut ___D,
8659 _: (),
8660 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8661 ::fidl_next::munge!(let Self { table } = slot);
8662
8663 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8664 match ordinal {
8665 0 => unsafe { ::core::hint::unreachable_unchecked() },
8666
8667 1 => {
8668 ::fidl_next::wire::Envelope::decode_as::<
8669 ___D,
8670 ::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanPlan>,
8671 >(slot.as_mut(), decoder, (4294967295, ()))?;
8672
8673 Ok(())
8674 }
8675
8676 2 => {
8677 ::fidl_next::wire::Envelope::decode_as::<
8678 ___D,
8679 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::Vector<'de, u8>>,
8680 >(slot.as_mut(), decoder, (4294967295, (32, ())))?;
8681
8682 Ok(())
8683 }
8684
8685 3 => {
8686 ::fidl_next::wire::Envelope::decode_as::<
8687 ___D,
8688 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::Uint32>,
8689 >(slot.as_mut(), decoder, (4294967295, ()))?;
8690
8691 Ok(())
8692 }
8693
8694 4 => {
8695 ::fidl_next::wire::Envelope::decode_as::<___D, i8>(
8696 slot.as_mut(),
8697 decoder,
8698 (),
8699 )?;
8700
8701 Ok(())
8702 }
8703
8704 5 => {
8705 ::fidl_next::wire::Envelope::decode_as::<___D, i8>(
8706 slot.as_mut(),
8707 decoder,
8708 (),
8709 )?;
8710
8711 Ok(())
8712 }
8713
8714 6 => {
8715 ::fidl_next::wire::Envelope::decode_as::<
8716 ___D,
8717 ::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>,
8718 >(slot.as_mut(), decoder, (4294967295, ()))?;
8719
8720 Ok(())
8721 }
8722
8723 7 => {
8724 ::fidl_next::wire::Envelope::decode_as::<
8725 ___D,
8726 ::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanMatchSet<'de>>,
8727 >(slot.as_mut(), decoder, (4294967295, ()))?;
8728
8729 Ok(())
8730 }
8731
8732 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8733 }
8734 })
8735 }
8736 }
8737
8738 impl<'de> ScheduledScanRequest<'de> {
8739 pub fn scan_plans(
8740 &self,
8741 ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanPlan>>
8742 {
8743 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8744 }
8745
8746 pub fn take_scan_plans(
8747 &mut self,
8748 ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanPlan>>
8749 {
8750 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8751 }
8752
8753 pub fn ssids(
8754 &self,
8755 ) -> ::core::option::Option<
8756 &::fidl_next::wire::Vector<'de, ::fidl_next::wire::Vector<'de, u8>>,
8757 > {
8758 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
8759 }
8760
8761 pub fn take_ssids(
8762 &mut self,
8763 ) -> ::core::option::Option<
8764 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::Vector<'de, u8>>,
8765 > {
8766 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
8767 }
8768
8769 pub fn frequencies(
8770 &self,
8771 ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, ::fidl_next::wire::Uint32>>
8772 {
8773 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
8774 }
8775
8776 pub fn take_frequencies(
8777 &mut self,
8778 ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, ::fidl_next::wire::Uint32>>
8779 {
8780 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
8781 }
8782
8783 pub fn min_rssi_threshold(&self) -> ::core::option::Option<&i8> {
8784 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
8785 }
8786
8787 pub fn take_min_rssi_threshold(&mut self) -> ::core::option::Option<i8> {
8788 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
8789 }
8790
8791 pub fn relative_rssi_threshold(&self) -> ::core::option::Option<&i8> {
8792 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
8793 }
8794
8795 pub fn take_relative_rssi_threshold(&mut self) -> ::core::option::Option<i8> {
8796 unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
8797 }
8798
8799 pub fn band_rssi_adjustments(
8800 &self,
8801 ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>
8802 {
8803 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
8804 }
8805
8806 pub fn take_band_rssi_adjustments(
8807 &mut self,
8808 ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>
8809 {
8810 unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
8811 }
8812
8813 pub fn match_sets(
8814 &self,
8815 ) -> ::core::option::Option<
8816 &::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanMatchSet<'de>>,
8817 > {
8818 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
8819 }
8820
8821 pub fn take_match_sets(
8822 &mut self,
8823 ) -> ::core::option::Option<
8824 ::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanMatchSet<'de>>,
8825 > {
8826 unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
8827 }
8828 }
8829
8830 impl<'de> ::core::fmt::Debug for ScheduledScanRequest<'de> {
8831 fn fmt(
8832 &self,
8833 f: &mut ::core::fmt::Formatter<'_>,
8834 ) -> ::core::result::Result<(), ::core::fmt::Error> {
8835 f.debug_struct("ScheduledScanRequest")
8836 .field("scan_plans", &self.scan_plans())
8837 .field("ssids", &self.ssids())
8838 .field("frequencies", &self.frequencies())
8839 .field("min_rssi_threshold", &self.min_rssi_threshold())
8840 .field("relative_rssi_threshold", &self.relative_rssi_threshold())
8841 .field("band_rssi_adjustments", &self.band_rssi_adjustments())
8842 .field("match_sets", &self.match_sets())
8843 .finish()
8844 }
8845 }
8846
8847 impl<'de> ::fidl_next::IntoNatural for ScheduledScanRequest<'de> {
8848 type Natural = crate::natural::ScheduledScanRequest;
8849 }
8850
8851 #[repr(C)]
8853 pub struct SecuritySupport<'de> {
8854 pub(crate) table: ::fidl_next::wire::Table<'de>,
8855 }
8856
8857 impl<'de> Drop for SecuritySupport<'de> {
8858 fn drop(&mut self) {
8859 let _ = self.table.get(1).map(|envelope| unsafe {
8860 envelope.read_unchecked::<crate::wire::SaeFeature<'de>>()
8861 });
8862
8863 let _ = self.table.get(2).map(|envelope| unsafe {
8864 envelope.read_unchecked::<crate::wire::MfpFeature<'de>>()
8865 });
8866
8867 let _ = self.table.get(3).map(|envelope| unsafe {
8868 envelope.read_unchecked::<crate::wire::OweFeature<'de>>()
8869 });
8870 }
8871 }
8872
8873 impl ::fidl_next::Constrained for SecuritySupport<'_> {
8874 type Constraint = ();
8875
8876 fn validate(
8877 _: ::fidl_next::Slot<'_, Self>,
8878 _: Self::Constraint,
8879 ) -> Result<(), ::fidl_next::ValidationError> {
8880 Ok(())
8881 }
8882 }
8883
8884 unsafe impl ::fidl_next::Wire for SecuritySupport<'static> {
8885 type Narrowed<'de> = SecuritySupport<'de>;
8886
8887 #[inline]
8888 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8889 ::fidl_next::munge!(let Self { table } = out);
8890 ::fidl_next::wire::Table::zero_padding(table);
8891 }
8892 }
8893
8894 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecuritySupport<'de>
8895 where
8896 ___D: ::fidl_next::Decoder<'de> + ?Sized,
8897 {
8898 fn decode(
8899 slot: ::fidl_next::Slot<'_, Self>,
8900 decoder: &mut ___D,
8901 _: (),
8902 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8903 ::fidl_next::munge!(let Self { table } = slot);
8904
8905 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8906 match ordinal {
8907 0 => unsafe { ::core::hint::unreachable_unchecked() },
8908
8909 1 => {
8910 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::SaeFeature<'de>>(
8911 slot.as_mut(),
8912 decoder,
8913 (),
8914 )?;
8915
8916 Ok(())
8917 }
8918
8919 2 => {
8920 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::MfpFeature<'de>>(
8921 slot.as_mut(),
8922 decoder,
8923 (),
8924 )?;
8925
8926 Ok(())
8927 }
8928
8929 3 => {
8930 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::OweFeature<'de>>(
8931 slot.as_mut(),
8932 decoder,
8933 (),
8934 )?;
8935
8936 Ok(())
8937 }
8938
8939 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8940 }
8941 })
8942 }
8943 }
8944
8945 impl<'de> SecuritySupport<'de> {
8946 pub fn sae(&self) -> ::core::option::Option<&crate::wire::SaeFeature<'de>> {
8947 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8948 }
8949
8950 pub fn take_sae(&mut self) -> ::core::option::Option<crate::wire::SaeFeature<'de>> {
8951 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8952 }
8953
8954 pub fn mfp(&self) -> ::core::option::Option<&crate::wire::MfpFeature<'de>> {
8955 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
8956 }
8957
8958 pub fn take_mfp(&mut self) -> ::core::option::Option<crate::wire::MfpFeature<'de>> {
8959 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
8960 }
8961
8962 pub fn owe(&self) -> ::core::option::Option<&crate::wire::OweFeature<'de>> {
8963 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
8964 }
8965
8966 pub fn take_owe(&mut self) -> ::core::option::Option<crate::wire::OweFeature<'de>> {
8967 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
8968 }
8969 }
8970
8971 impl<'de> ::core::fmt::Debug for SecuritySupport<'de> {
8972 fn fmt(
8973 &self,
8974 f: &mut ::core::fmt::Formatter<'_>,
8975 ) -> ::core::result::Result<(), ::core::fmt::Error> {
8976 f.debug_struct("SecuritySupport")
8977 .field("sae", &self.sae())
8978 .field("mfp", &self.mfp())
8979 .field("owe", &self.owe())
8980 .finish()
8981 }
8982 }
8983
8984 impl<'de> ::fidl_next::IntoNatural for SecuritySupport<'de> {
8985 type Natural = crate::natural::SecuritySupport;
8986 }
8987
8988 #[repr(C)]
8990 pub struct SpectrumManagementSupport<'de> {
8991 pub(crate) table: ::fidl_next::wire::Table<'de>,
8992 }
8993
8994 impl<'de> Drop for SpectrumManagementSupport<'de> {
8995 fn drop(&mut self) {
8996 let _ = self.table.get(1).map(|envelope| unsafe {
8997 envelope.read_unchecked::<crate::wire::DfsFeature<'de>>()
8998 });
8999 }
9000 }
9001
9002 impl ::fidl_next::Constrained for SpectrumManagementSupport<'_> {
9003 type Constraint = ();
9004
9005 fn validate(
9006 _: ::fidl_next::Slot<'_, Self>,
9007 _: Self::Constraint,
9008 ) -> Result<(), ::fidl_next::ValidationError> {
9009 Ok(())
9010 }
9011 }
9012
9013 unsafe impl ::fidl_next::Wire for SpectrumManagementSupport<'static> {
9014 type Narrowed<'de> = SpectrumManagementSupport<'de>;
9015
9016 #[inline]
9017 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9018 ::fidl_next::munge!(let Self { table } = out);
9019 ::fidl_next::wire::Table::zero_padding(table);
9020 }
9021 }
9022
9023 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SpectrumManagementSupport<'de>
9024 where
9025 ___D: ::fidl_next::Decoder<'de> + ?Sized,
9026 {
9027 fn decode(
9028 slot: ::fidl_next::Slot<'_, Self>,
9029 decoder: &mut ___D,
9030 _: (),
9031 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9032 ::fidl_next::munge!(let Self { table } = slot);
9033
9034 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9035 match ordinal {
9036 0 => unsafe { ::core::hint::unreachable_unchecked() },
9037
9038 1 => {
9039 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::DfsFeature<'de>>(
9040 slot.as_mut(),
9041 decoder,
9042 (),
9043 )?;
9044
9045 Ok(())
9046 }
9047
9048 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9049 }
9050 })
9051 }
9052 }
9053
9054 impl<'de> SpectrumManagementSupport<'de> {
9055 pub fn dfs(&self) -> ::core::option::Option<&crate::wire::DfsFeature<'de>> {
9056 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9057 }
9058
9059 pub fn take_dfs(&mut self) -> ::core::option::Option<crate::wire::DfsFeature<'de>> {
9060 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9061 }
9062 }
9063
9064 impl<'de> ::core::fmt::Debug for SpectrumManagementSupport<'de> {
9065 fn fmt(
9066 &self,
9067 f: &mut ::core::fmt::Formatter<'_>,
9068 ) -> ::core::result::Result<(), ::core::fmt::Error> {
9069 f.debug_struct("SpectrumManagementSupport").field("dfs", &self.dfs()).finish()
9070 }
9071 }
9072
9073 impl<'de> ::fidl_next::IntoNatural for SpectrumManagementSupport<'de> {
9074 type Natural = crate::natural::SpectrumManagementSupport;
9075 }
9076
9077 #[derive(Clone, Debug)]
9079 #[repr(C)]
9080 pub struct WlanChannel {
9081 pub primary: u8,
9082
9083 pub cbw: crate::wire::ChannelBandwidth,
9084
9085 pub secondary80: u8,
9086 }
9087
9088 static_assertions::const_assert_eq!(std::mem::size_of::<WlanChannel>(), 12);
9089 static_assertions::const_assert_eq!(std::mem::align_of::<WlanChannel>(), 4);
9090
9091 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanChannel, primary), 0);
9092
9093 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanChannel, cbw), 4);
9094
9095 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanChannel, secondary80), 8);
9096
9097 impl ::fidl_next::Constrained for WlanChannel {
9098 type Constraint = ();
9099
9100 fn validate(
9101 _: ::fidl_next::Slot<'_, Self>,
9102 _: Self::Constraint,
9103 ) -> Result<(), ::fidl_next::ValidationError> {
9104 Ok(())
9105 }
9106 }
9107
9108 unsafe impl ::fidl_next::Wire for WlanChannel {
9109 type Narrowed<'de> = WlanChannel;
9110
9111 #[inline]
9112 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9113 ::fidl_next::munge! {
9114 let Self {
9115 primary,
9116 cbw,
9117 secondary80,
9118
9119 } = &mut *out_;
9120 }
9121
9122 ::fidl_next::Wire::zero_padding(primary);
9123
9124 ::fidl_next::Wire::zero_padding(cbw);
9125
9126 ::fidl_next::Wire::zero_padding(secondary80);
9127
9128 unsafe {
9129 out_.as_mut_ptr().cast::<u8>().add(9).write_bytes(0, 3);
9130 }
9131
9132 unsafe {
9133 out_.as_mut_ptr().cast::<u8>().add(1).write_bytes(0, 3);
9134 }
9135 }
9136 }
9137
9138 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanChannel
9139 where
9140 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9141 {
9142 fn decode(
9143 slot_: ::fidl_next::Slot<'_, Self>,
9144 decoder_: &mut ___D,
9145 _: (),
9146 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9147 if slot_.as_bytes()[9..12] != [0u8; 3] {
9148 return Err(::fidl_next::DecodeError::InvalidPadding);
9149 }
9150
9151 if slot_.as_bytes()[1..4] != [0u8; 3] {
9152 return Err(::fidl_next::DecodeError::InvalidPadding);
9153 }
9154
9155 ::fidl_next::munge! {
9156 let Self {
9157 mut primary,
9158 mut cbw,
9159 mut secondary80,
9160
9161 } = slot_;
9162 }
9163
9164 let _field = primary.as_mut();
9165
9166 ::fidl_next::Decode::decode(primary.as_mut(), decoder_, ())?;
9167
9168 let _field = cbw.as_mut();
9169
9170 ::fidl_next::Decode::decode(cbw.as_mut(), decoder_, ())?;
9171
9172 let _field = secondary80.as_mut();
9173
9174 ::fidl_next::Decode::decode(secondary80.as_mut(), decoder_, ())?;
9175
9176 Ok(())
9177 }
9178 }
9179
9180 impl ::fidl_next::IntoNatural for WlanChannel {
9181 type Natural = crate::natural::WlanChannel;
9182 }
9183
9184 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
9186 #[repr(transparent)]
9187 pub struct WlanKeyType {
9188 pub(crate) value: u8,
9189 }
9190
9191 impl ::fidl_next::Constrained for WlanKeyType {
9192 type Constraint = ();
9193
9194 fn validate(
9195 _: ::fidl_next::Slot<'_, Self>,
9196 _: Self::Constraint,
9197 ) -> Result<(), ::fidl_next::ValidationError> {
9198 Ok(())
9199 }
9200 }
9201
9202 unsafe impl ::fidl_next::Wire for WlanKeyType {
9203 type Narrowed<'de> = Self;
9204
9205 #[inline]
9206 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
9207 }
9209 }
9210
9211 impl WlanKeyType {
9212 pub const PAIRWISE: WlanKeyType = WlanKeyType { value: 1 };
9213
9214 pub const GROUP: WlanKeyType = WlanKeyType { value: 2 };
9215
9216 pub const IGTK: WlanKeyType = WlanKeyType { value: 3 };
9217
9218 pub const PEER: WlanKeyType = WlanKeyType { value: 4 };
9219 }
9220
9221 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanKeyType
9222 where
9223 ___D: ?Sized,
9224 {
9225 fn decode(
9226 slot: ::fidl_next::Slot<'_, Self>,
9227 _: &mut ___D,
9228 _: (),
9229 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9230 Ok(())
9231 }
9232 }
9233
9234 impl ::core::convert::From<crate::natural::WlanKeyType> for WlanKeyType {
9235 fn from(natural: crate::natural::WlanKeyType) -> Self {
9236 match natural {
9237 crate::natural::WlanKeyType::Pairwise => WlanKeyType::PAIRWISE,
9238
9239 crate::natural::WlanKeyType::Group => WlanKeyType::GROUP,
9240
9241 crate::natural::WlanKeyType::Igtk => WlanKeyType::IGTK,
9242
9243 crate::natural::WlanKeyType::Peer => WlanKeyType::PEER,
9244
9245 crate::natural::WlanKeyType::UnknownOrdinal_(value) => {
9246 WlanKeyType { value: u8::from(value) }
9247 }
9248 }
9249 }
9250 }
9251
9252 impl ::fidl_next::IntoNatural for WlanKeyType {
9253 type Natural = crate::natural::WlanKeyType;
9254 }
9255
9256 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
9258 #[repr(transparent)]
9259 pub struct WlanMacRole {
9260 pub(crate) value: ::fidl_next::wire::Uint32,
9261 }
9262
9263 impl ::fidl_next::Constrained for WlanMacRole {
9264 type Constraint = ();
9265
9266 fn validate(
9267 _: ::fidl_next::Slot<'_, Self>,
9268 _: Self::Constraint,
9269 ) -> Result<(), ::fidl_next::ValidationError> {
9270 Ok(())
9271 }
9272 }
9273
9274 unsafe impl ::fidl_next::Wire for WlanMacRole {
9275 type Narrowed<'de> = Self;
9276
9277 #[inline]
9278 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
9279 }
9281 }
9282
9283 impl WlanMacRole {
9284 pub const CLIENT: WlanMacRole = WlanMacRole { value: ::fidl_next::wire::Uint32(1) };
9285
9286 pub const AP: WlanMacRole = WlanMacRole { value: ::fidl_next::wire::Uint32(2) };
9287
9288 pub const MESH: WlanMacRole = WlanMacRole { value: ::fidl_next::wire::Uint32(3) };
9289 }
9290
9291 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanMacRole
9292 where
9293 ___D: ?Sized,
9294 {
9295 fn decode(
9296 slot: ::fidl_next::Slot<'_, Self>,
9297 _: &mut ___D,
9298 _: (),
9299 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9300 Ok(())
9301 }
9302 }
9303
9304 impl ::core::convert::From<crate::natural::WlanMacRole> for WlanMacRole {
9305 fn from(natural: crate::natural::WlanMacRole) -> Self {
9306 match natural {
9307 crate::natural::WlanMacRole::Client => WlanMacRole::CLIENT,
9308
9309 crate::natural::WlanMacRole::Ap => WlanMacRole::AP,
9310
9311 crate::natural::WlanMacRole::Mesh => WlanMacRole::MESH,
9312
9313 crate::natural::WlanMacRole::UnknownOrdinal_(value) => {
9314 WlanMacRole { value: ::fidl_next::wire::Uint32::from(value) }
9315 }
9316 }
9317 }
9318 }
9319
9320 impl ::fidl_next::IntoNatural for WlanMacRole {
9321 type Natural = crate::natural::WlanMacRole;
9322 }
9323
9324 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
9326 #[repr(transparent)]
9327 pub struct WlanPhyType {
9328 pub(crate) value: ::fidl_next::wire::Uint32,
9329 }
9330
9331 impl ::fidl_next::Constrained for WlanPhyType {
9332 type Constraint = ();
9333
9334 fn validate(
9335 _: ::fidl_next::Slot<'_, Self>,
9336 _: Self::Constraint,
9337 ) -> Result<(), ::fidl_next::ValidationError> {
9338 Ok(())
9339 }
9340 }
9341
9342 unsafe impl ::fidl_next::Wire for WlanPhyType {
9343 type Narrowed<'de> = Self;
9344
9345 #[inline]
9346 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
9347 }
9349 }
9350
9351 impl WlanPhyType {
9352 pub const DSSS: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(1) };
9353
9354 pub const HR: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(2) };
9355
9356 pub const OFDM: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(3) };
9357
9358 pub const ERP: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(4) };
9359
9360 pub const HT: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(5) };
9361
9362 pub const DMG: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(6) };
9363
9364 pub const VHT: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(7) };
9365
9366 pub const TVHT: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(8) };
9367
9368 pub const S1_G: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(9) };
9369
9370 pub const CDMG: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(10) };
9371
9372 pub const CMMG: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(11) };
9373
9374 pub const HE: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(12) };
9375 }
9376
9377 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanPhyType
9378 where
9379 ___D: ?Sized,
9380 {
9381 fn decode(
9382 slot: ::fidl_next::Slot<'_, Self>,
9383 _: &mut ___D,
9384 _: (),
9385 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9386 Ok(())
9387 }
9388 }
9389
9390 impl ::core::convert::From<crate::natural::WlanPhyType> for WlanPhyType {
9391 fn from(natural: crate::natural::WlanPhyType) -> Self {
9392 match natural {
9393 crate::natural::WlanPhyType::Dsss => WlanPhyType::DSSS,
9394
9395 crate::natural::WlanPhyType::Hr => WlanPhyType::HR,
9396
9397 crate::natural::WlanPhyType::Ofdm => WlanPhyType::OFDM,
9398
9399 crate::natural::WlanPhyType::Erp => WlanPhyType::ERP,
9400
9401 crate::natural::WlanPhyType::Ht => WlanPhyType::HT,
9402
9403 crate::natural::WlanPhyType::Dmg => WlanPhyType::DMG,
9404
9405 crate::natural::WlanPhyType::Vht => WlanPhyType::VHT,
9406
9407 crate::natural::WlanPhyType::Tvht => WlanPhyType::TVHT,
9408
9409 crate::natural::WlanPhyType::S1G => WlanPhyType::S1_G,
9410
9411 crate::natural::WlanPhyType::Cdmg => WlanPhyType::CDMG,
9412
9413 crate::natural::WlanPhyType::Cmmg => WlanPhyType::CMMG,
9414
9415 crate::natural::WlanPhyType::He => WlanPhyType::HE,
9416
9417 crate::natural::WlanPhyType::UnknownOrdinal_(value) => {
9418 WlanPhyType { value: ::fidl_next::wire::Uint32::from(value) }
9419 }
9420 }
9421 }
9422 }
9423
9424 impl ::fidl_next::IntoNatural for WlanPhyType {
9425 type Natural = crate::natural::WlanPhyType;
9426 }
9427
9428 pub type WlanSoftmacHardwareCapability = ::fidl_next::wire::Uint32;
9430
9431 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
9433 #[repr(transparent)]
9434 pub struct WlanSoftmacHardwareCapabilityBit {
9435 pub(crate) value: ::fidl_next::wire::Uint32,
9436 }
9437
9438 impl ::fidl_next::Constrained for WlanSoftmacHardwareCapabilityBit {
9439 type Constraint = ();
9440
9441 fn validate(
9442 _: ::fidl_next::Slot<'_, Self>,
9443 _: Self::Constraint,
9444 ) -> Result<(), ::fidl_next::ValidationError> {
9445 Ok(())
9446 }
9447 }
9448
9449 unsafe impl ::fidl_next::Wire for WlanSoftmacHardwareCapabilityBit {
9450 type Narrowed<'de> = Self;
9451
9452 #[inline]
9453 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
9454 }
9456 }
9457
9458 impl WlanSoftmacHardwareCapabilityBit {
9459 pub const SHORT_PREAMBLE: WlanSoftmacHardwareCapabilityBit =
9460 WlanSoftmacHardwareCapabilityBit { value: ::fidl_next::wire::Uint32(32) };
9461
9462 pub const SPECTRUM_MGMT: WlanSoftmacHardwareCapabilityBit =
9463 WlanSoftmacHardwareCapabilityBit { value: ::fidl_next::wire::Uint32(256) };
9464
9465 pub const QOS: WlanSoftmacHardwareCapabilityBit =
9466 WlanSoftmacHardwareCapabilityBit { value: ::fidl_next::wire::Uint32(512) };
9467
9468 pub const SHORT_SLOT_TIME: WlanSoftmacHardwareCapabilityBit =
9469 WlanSoftmacHardwareCapabilityBit { value: ::fidl_next::wire::Uint32(1024) };
9470
9471 pub const RADIO_MSMT: WlanSoftmacHardwareCapabilityBit =
9472 WlanSoftmacHardwareCapabilityBit { value: ::fidl_next::wire::Uint32(4096) };
9473
9474 pub const SIMULTANEOUS_CLIENT_AP: WlanSoftmacHardwareCapabilityBit =
9475 WlanSoftmacHardwareCapabilityBit { value: ::fidl_next::wire::Uint32(65536) };
9476 }
9477
9478 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanSoftmacHardwareCapabilityBit
9479 where
9480 ___D: ?Sized,
9481 {
9482 fn decode(
9483 slot: ::fidl_next::Slot<'_, Self>,
9484 _: &mut ___D,
9485 _: (),
9486 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9487 ::fidl_next::munge!(let Self { value } = slot);
9488
9489 match u32::from(*value) {
9490 32 | 256 | 512 | 1024 | 4096 | 65536 => (),
9491 unknown => {
9492 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
9493 }
9494 }
9495
9496 Ok(())
9497 }
9498 }
9499
9500 impl ::core::convert::From<crate::natural::WlanSoftmacHardwareCapabilityBit>
9501 for WlanSoftmacHardwareCapabilityBit
9502 {
9503 fn from(natural: crate::natural::WlanSoftmacHardwareCapabilityBit) -> Self {
9504 match natural {
9505 crate::natural::WlanSoftmacHardwareCapabilityBit::ShortPreamble => {
9506 WlanSoftmacHardwareCapabilityBit::SHORT_PREAMBLE
9507 }
9508
9509 crate::natural::WlanSoftmacHardwareCapabilityBit::SpectrumMgmt => {
9510 WlanSoftmacHardwareCapabilityBit::SPECTRUM_MGMT
9511 }
9512
9513 crate::natural::WlanSoftmacHardwareCapabilityBit::Qos => {
9514 WlanSoftmacHardwareCapabilityBit::QOS
9515 }
9516
9517 crate::natural::WlanSoftmacHardwareCapabilityBit::ShortSlotTime => {
9518 WlanSoftmacHardwareCapabilityBit::SHORT_SLOT_TIME
9519 }
9520
9521 crate::natural::WlanSoftmacHardwareCapabilityBit::RadioMsmt => {
9522 WlanSoftmacHardwareCapabilityBit::RADIO_MSMT
9523 }
9524
9525 crate::natural::WlanSoftmacHardwareCapabilityBit::SimultaneousClientAp => {
9526 WlanSoftmacHardwareCapabilityBit::SIMULTANEOUS_CLIENT_AP
9527 }
9528 }
9529 }
9530 }
9531
9532 impl ::fidl_next::IntoNatural for WlanSoftmacHardwareCapabilityBit {
9533 type Natural = crate::natural::WlanSoftmacHardwareCapabilityBit;
9534 }
9535
9536 #[derive(Clone, Debug)]
9538 #[repr(C)]
9539 pub struct WlanTxResultEntry {
9540 pub tx_vector_idx: ::fidl_next::wire::Uint16,
9541
9542 pub attempts: u8,
9543 }
9544
9545 static_assertions::const_assert_eq!(std::mem::size_of::<WlanTxResultEntry>(), 4);
9546 static_assertions::const_assert_eq!(std::mem::align_of::<WlanTxResultEntry>(), 2);
9547
9548 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanTxResultEntry, tx_vector_idx), 0);
9549
9550 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanTxResultEntry, attempts), 2);
9551
9552 impl ::fidl_next::Constrained for WlanTxResultEntry {
9553 type Constraint = ();
9554
9555 fn validate(
9556 _: ::fidl_next::Slot<'_, Self>,
9557 _: Self::Constraint,
9558 ) -> Result<(), ::fidl_next::ValidationError> {
9559 Ok(())
9560 }
9561 }
9562
9563 unsafe impl ::fidl_next::Wire for WlanTxResultEntry {
9564 type Narrowed<'de> = WlanTxResultEntry;
9565
9566 #[inline]
9567 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9568 ::fidl_next::munge! {
9569 let Self {
9570 tx_vector_idx,
9571 attempts,
9572
9573 } = &mut *out_;
9574 }
9575
9576 ::fidl_next::Wire::zero_padding(tx_vector_idx);
9577
9578 ::fidl_next::Wire::zero_padding(attempts);
9579
9580 unsafe {
9581 out_.as_mut_ptr().cast::<u8>().add(3).write_bytes(0, 1);
9582 }
9583 }
9584 }
9585
9586 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanTxResultEntry
9587 where
9588 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9589 {
9590 fn decode(
9591 slot_: ::fidl_next::Slot<'_, Self>,
9592 decoder_: &mut ___D,
9593 _: (),
9594 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9595 if slot_.as_bytes()[3..4] != [0u8; 1] {
9596 return Err(::fidl_next::DecodeError::InvalidPadding);
9597 }
9598
9599 ::fidl_next::munge! {
9600 let Self {
9601 mut tx_vector_idx,
9602 mut attempts,
9603
9604 } = slot_;
9605 }
9606
9607 let _field = tx_vector_idx.as_mut();
9608
9609 ::fidl_next::Decode::decode(tx_vector_idx.as_mut(), decoder_, ())?;
9610
9611 let _field = attempts.as_mut();
9612
9613 ::fidl_next::Decode::decode(attempts.as_mut(), decoder_, ())?;
9614
9615 Ok(())
9616 }
9617 }
9618
9619 impl ::fidl_next::IntoNatural for WlanTxResultEntry {
9620 type Natural = crate::natural::WlanTxResultEntry;
9621 }
9622
9623 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
9625 #[repr(transparent)]
9626 pub struct WlanTxResultCode {
9627 pub(crate) value: u8,
9628 }
9629
9630 impl ::fidl_next::Constrained for WlanTxResultCode {
9631 type Constraint = ();
9632
9633 fn validate(
9634 _: ::fidl_next::Slot<'_, Self>,
9635 _: Self::Constraint,
9636 ) -> Result<(), ::fidl_next::ValidationError> {
9637 Ok(())
9638 }
9639 }
9640
9641 unsafe impl ::fidl_next::Wire for WlanTxResultCode {
9642 type Narrowed<'de> = Self;
9643
9644 #[inline]
9645 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
9646 }
9648 }
9649
9650 impl WlanTxResultCode {
9651 pub const FAILED: WlanTxResultCode = WlanTxResultCode { value: 0 };
9652
9653 pub const SUCCESS: WlanTxResultCode = WlanTxResultCode { value: 1 };
9654 }
9655
9656 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanTxResultCode
9657 where
9658 ___D: ?Sized,
9659 {
9660 fn decode(
9661 slot: ::fidl_next::Slot<'_, Self>,
9662 _: &mut ___D,
9663 _: (),
9664 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9665 Ok(())
9666 }
9667 }
9668
9669 impl ::core::convert::From<crate::natural::WlanTxResultCode> for WlanTxResultCode {
9670 fn from(natural: crate::natural::WlanTxResultCode) -> Self {
9671 match natural {
9672 crate::natural::WlanTxResultCode::Failed => WlanTxResultCode::FAILED,
9673
9674 crate::natural::WlanTxResultCode::Success => WlanTxResultCode::SUCCESS,
9675
9676 crate::natural::WlanTxResultCode::UnknownOrdinal_(value) => {
9677 WlanTxResultCode { value: u8::from(value) }
9678 }
9679 }
9680 }
9681 }
9682
9683 impl ::fidl_next::IntoNatural for WlanTxResultCode {
9684 type Natural = crate::natural::WlanTxResultCode;
9685 }
9686
9687 #[derive(Clone, Debug)]
9689 #[repr(C)]
9690 pub struct WlanTxResult {
9691 pub tx_result_entry: [crate::wire::WlanTxResultEntry; 8],
9692
9693 pub peer_addr: [u8; 6],
9694
9695 pub result_code: crate::wire::WlanTxResultCode,
9696 }
9697
9698 static_assertions::const_assert_eq!(std::mem::size_of::<WlanTxResult>(), 40);
9699 static_assertions::const_assert_eq!(std::mem::align_of::<WlanTxResult>(), 2);
9700
9701 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanTxResult, tx_result_entry), 0);
9702
9703 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanTxResult, peer_addr), 32);
9704
9705 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanTxResult, result_code), 38);
9706
9707 impl ::fidl_next::Constrained for WlanTxResult {
9708 type Constraint = ();
9709
9710 fn validate(
9711 _: ::fidl_next::Slot<'_, Self>,
9712 _: Self::Constraint,
9713 ) -> Result<(), ::fidl_next::ValidationError> {
9714 Ok(())
9715 }
9716 }
9717
9718 unsafe impl ::fidl_next::Wire for WlanTxResult {
9719 type Narrowed<'de> = WlanTxResult;
9720
9721 #[inline]
9722 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9723 ::fidl_next::munge! {
9724 let Self {
9725 tx_result_entry,
9726 peer_addr,
9727 result_code,
9728
9729 } = &mut *out_;
9730 }
9731
9732 ::fidl_next::Wire::zero_padding(tx_result_entry);
9733
9734 ::fidl_next::Wire::zero_padding(peer_addr);
9735
9736 ::fidl_next::Wire::zero_padding(result_code);
9737
9738 unsafe {
9739 out_.as_mut_ptr().cast::<u8>().add(39).write_bytes(0, 1);
9740 }
9741 }
9742 }
9743
9744 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanTxResult
9745 where
9746 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9747 {
9748 fn decode(
9749 slot_: ::fidl_next::Slot<'_, Self>,
9750 decoder_: &mut ___D,
9751 _: (),
9752 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9753 if slot_.as_bytes()[39..40] != [0u8; 1] {
9754 return Err(::fidl_next::DecodeError::InvalidPadding);
9755 }
9756
9757 ::fidl_next::munge! {
9758 let Self {
9759 mut tx_result_entry,
9760 mut peer_addr,
9761 mut result_code,
9762
9763 } = slot_;
9764 }
9765
9766 let _field = tx_result_entry.as_mut();
9767
9768 ::fidl_next::Decode::decode(tx_result_entry.as_mut(), decoder_, ())?;
9769
9770 let _field = peer_addr.as_mut();
9771
9772 ::fidl_next::Decode::decode(peer_addr.as_mut(), decoder_, ())?;
9773
9774 let _field = result_code.as_mut();
9775
9776 ::fidl_next::Decode::decode(result_code.as_mut(), decoder_, ())?;
9777
9778 Ok(())
9779 }
9780 }
9781
9782 impl ::fidl_next::IntoNatural for WlanTxResult {
9783 type Natural = crate::natural::WlanTxResult;
9784 }
9785
9786 #[derive(Clone, Debug)]
9788 #[repr(C)]
9789 pub struct WlanWmmAccessCategoryParameters {
9790 pub ecw_min: u8,
9791
9792 pub ecw_max: u8,
9793
9794 pub aifsn: u8,
9795
9796 pub txop_limit: ::fidl_next::wire::Uint16,
9797
9798 pub acm: bool,
9799 }
9800
9801 static_assertions::const_assert_eq!(std::mem::size_of::<WlanWmmAccessCategoryParameters>(), 8);
9802 static_assertions::const_assert_eq!(std::mem::align_of::<WlanWmmAccessCategoryParameters>(), 2);
9803
9804 static_assertions::const_assert_eq!(
9805 std::mem::offset_of!(WlanWmmAccessCategoryParameters, ecw_min),
9806 0
9807 );
9808
9809 static_assertions::const_assert_eq!(
9810 std::mem::offset_of!(WlanWmmAccessCategoryParameters, ecw_max),
9811 1
9812 );
9813
9814 static_assertions::const_assert_eq!(
9815 std::mem::offset_of!(WlanWmmAccessCategoryParameters, aifsn),
9816 2
9817 );
9818
9819 static_assertions::const_assert_eq!(
9820 std::mem::offset_of!(WlanWmmAccessCategoryParameters, txop_limit),
9821 4
9822 );
9823
9824 static_assertions::const_assert_eq!(
9825 std::mem::offset_of!(WlanWmmAccessCategoryParameters, acm),
9826 6
9827 );
9828
9829 impl ::fidl_next::Constrained for WlanWmmAccessCategoryParameters {
9830 type Constraint = ();
9831
9832 fn validate(
9833 _: ::fidl_next::Slot<'_, Self>,
9834 _: Self::Constraint,
9835 ) -> Result<(), ::fidl_next::ValidationError> {
9836 Ok(())
9837 }
9838 }
9839
9840 unsafe impl ::fidl_next::Wire for WlanWmmAccessCategoryParameters {
9841 type Narrowed<'de> = WlanWmmAccessCategoryParameters;
9842
9843 #[inline]
9844 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9845 ::fidl_next::munge! {
9846 let Self {
9847 ecw_min,
9848 ecw_max,
9849 aifsn,
9850 txop_limit,
9851 acm,
9852
9853 } = &mut *out_;
9854 }
9855
9856 ::fidl_next::Wire::zero_padding(ecw_min);
9857
9858 ::fidl_next::Wire::zero_padding(ecw_max);
9859
9860 ::fidl_next::Wire::zero_padding(aifsn);
9861
9862 ::fidl_next::Wire::zero_padding(txop_limit);
9863
9864 ::fidl_next::Wire::zero_padding(acm);
9865
9866 unsafe {
9867 out_.as_mut_ptr().cast::<u8>().add(7).write_bytes(0, 1);
9868 }
9869
9870 unsafe {
9871 out_.as_mut_ptr().cast::<u8>().add(3).write_bytes(0, 1);
9872 }
9873 }
9874 }
9875
9876 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanWmmAccessCategoryParameters
9877 where
9878 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9879 {
9880 fn decode(
9881 slot_: ::fidl_next::Slot<'_, Self>,
9882 decoder_: &mut ___D,
9883 _: (),
9884 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9885 if slot_.as_bytes()[7..8] != [0u8; 1] {
9886 return Err(::fidl_next::DecodeError::InvalidPadding);
9887 }
9888
9889 if slot_.as_bytes()[3..4] != [0u8; 1] {
9890 return Err(::fidl_next::DecodeError::InvalidPadding);
9891 }
9892
9893 ::fidl_next::munge! {
9894 let Self {
9895 mut ecw_min,
9896 mut ecw_max,
9897 mut aifsn,
9898 mut txop_limit,
9899 mut acm,
9900
9901 } = slot_;
9902 }
9903
9904 let _field = ecw_min.as_mut();
9905
9906 ::fidl_next::Decode::decode(ecw_min.as_mut(), decoder_, ())?;
9907
9908 let _field = ecw_max.as_mut();
9909
9910 ::fidl_next::Decode::decode(ecw_max.as_mut(), decoder_, ())?;
9911
9912 let _field = aifsn.as_mut();
9913
9914 ::fidl_next::Decode::decode(aifsn.as_mut(), decoder_, ())?;
9915
9916 let _field = txop_limit.as_mut();
9917
9918 ::fidl_next::Decode::decode(txop_limit.as_mut(), decoder_, ())?;
9919
9920 let _field = acm.as_mut();
9921
9922 ::fidl_next::Decode::decode(acm.as_mut(), decoder_, ())?;
9923
9924 Ok(())
9925 }
9926 }
9927
9928 impl ::fidl_next::IntoNatural for WlanWmmAccessCategoryParameters {
9929 type Natural = crate::natural::WlanWmmAccessCategoryParameters;
9930 }
9931
9932 #[derive(Clone, Debug)]
9934 #[repr(C)]
9935 pub struct WlanWmmParameters {
9936 pub apsd: bool,
9937
9938 pub ac_be_params: crate::wire::WlanWmmAccessCategoryParameters,
9939
9940 pub ac_bk_params: crate::wire::WlanWmmAccessCategoryParameters,
9941
9942 pub ac_vi_params: crate::wire::WlanWmmAccessCategoryParameters,
9943
9944 pub ac_vo_params: crate::wire::WlanWmmAccessCategoryParameters,
9945 }
9946
9947 static_assertions::const_assert_eq!(std::mem::size_of::<WlanWmmParameters>(), 34);
9948 static_assertions::const_assert_eq!(std::mem::align_of::<WlanWmmParameters>(), 2);
9949
9950 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanWmmParameters, apsd), 0);
9951
9952 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanWmmParameters, ac_be_params), 2);
9953
9954 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanWmmParameters, ac_bk_params), 10);
9955
9956 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanWmmParameters, ac_vi_params), 18);
9957
9958 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanWmmParameters, ac_vo_params), 26);
9959
9960 impl ::fidl_next::Constrained for WlanWmmParameters {
9961 type Constraint = ();
9962
9963 fn validate(
9964 _: ::fidl_next::Slot<'_, Self>,
9965 _: Self::Constraint,
9966 ) -> Result<(), ::fidl_next::ValidationError> {
9967 Ok(())
9968 }
9969 }
9970
9971 unsafe impl ::fidl_next::Wire for WlanWmmParameters {
9972 type Narrowed<'de> = WlanWmmParameters;
9973
9974 #[inline]
9975 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9976 ::fidl_next::munge! {
9977 let Self {
9978 apsd,
9979 ac_be_params,
9980 ac_bk_params,
9981 ac_vi_params,
9982 ac_vo_params,
9983
9984 } = &mut *out_;
9985 }
9986
9987 ::fidl_next::Wire::zero_padding(apsd);
9988
9989 ::fidl_next::Wire::zero_padding(ac_be_params);
9990
9991 ::fidl_next::Wire::zero_padding(ac_bk_params);
9992
9993 ::fidl_next::Wire::zero_padding(ac_vi_params);
9994
9995 ::fidl_next::Wire::zero_padding(ac_vo_params);
9996
9997 unsafe {
9998 out_.as_mut_ptr().cast::<u8>().add(1).write_bytes(0, 1);
9999 }
10000 }
10001 }
10002
10003 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanWmmParameters
10004 where
10005 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10006 {
10007 fn decode(
10008 slot_: ::fidl_next::Slot<'_, Self>,
10009 decoder_: &mut ___D,
10010 _: (),
10011 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10012 if slot_.as_bytes()[1..2] != [0u8; 1] {
10013 return Err(::fidl_next::DecodeError::InvalidPadding);
10014 }
10015
10016 ::fidl_next::munge! {
10017 let Self {
10018 mut apsd,
10019 mut ac_be_params,
10020 mut ac_bk_params,
10021 mut ac_vi_params,
10022 mut ac_vo_params,
10023
10024 } = slot_;
10025 }
10026
10027 let _field = apsd.as_mut();
10028
10029 ::fidl_next::Decode::decode(apsd.as_mut(), decoder_, ())?;
10030
10031 let _field = ac_be_params.as_mut();
10032
10033 ::fidl_next::Decode::decode(ac_be_params.as_mut(), decoder_, ())?;
10034
10035 let _field = ac_bk_params.as_mut();
10036
10037 ::fidl_next::Decode::decode(ac_bk_params.as_mut(), decoder_, ())?;
10038
10039 let _field = ac_vi_params.as_mut();
10040
10041 ::fidl_next::Decode::decode(ac_vi_params.as_mut(), decoder_, ())?;
10042
10043 let _field = ac_vo_params.as_mut();
10044
10045 ::fidl_next::Decode::decode(ac_vo_params.as_mut(), decoder_, ())?;
10046
10047 Ok(())
10048 }
10049 }
10050
10051 impl ::fidl_next::IntoNatural for WlanWmmParameters {
10052 type Natural = crate::natural::WlanWmmParameters;
10053 }
10054}
10055
10056pub mod wire_optional {}
10057
10058pub mod generic {
10059
10060 pub struct BandRssiAdjustment<T0, T1> {
10062 pub band: T0,
10063
10064 pub rssi_adjustment: T1,
10065 }
10066
10067 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::BandRssiAdjustment, ___E>
10068 for BandRssiAdjustment<T0, T1>
10069 where
10070 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10071 T0: ::fidl_next::Encode<::fidl_next_common_fuchsia_wlan_ieee80211::wire::WlanBand, ___E>,
10072 T1: ::fidl_next::Encode<i8, ___E>,
10073 {
10074 #[inline]
10075 fn encode(
10076 self,
10077 encoder_: &mut ___E,
10078 out_: &mut ::core::mem::MaybeUninit<crate::wire::BandRssiAdjustment>,
10079 _: (),
10080 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10081 ::fidl_next::munge! {
10082 let crate::wire::BandRssiAdjustment {
10083 band,
10084 rssi_adjustment,
10085
10086 } = out_;
10087 }
10088
10089 ::fidl_next::Encode::encode(self.band, encoder_, band, ())?;
10090
10091 ::fidl_next::Encode::encode(self.rssi_adjustment, encoder_, rssi_adjustment, ())?;
10092
10093 Ok(())
10094 }
10095 }
10096
10097 pub struct ScheduledScanPlan<T0, T1> {
10099 pub interval: T0,
10100
10101 pub iterations: T1,
10102 }
10103
10104 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::ScheduledScanPlan, ___E>
10105 for ScheduledScanPlan<T0, T1>
10106 where
10107 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10108 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
10109 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
10110 {
10111 #[inline]
10112 fn encode(
10113 self,
10114 encoder_: &mut ___E,
10115 out_: &mut ::core::mem::MaybeUninit<crate::wire::ScheduledScanPlan>,
10116 _: (),
10117 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10118 ::fidl_next::munge! {
10119 let crate::wire::ScheduledScanPlan {
10120 interval,
10121 iterations,
10122
10123 } = out_;
10124 }
10125
10126 ::fidl_next::Encode::encode(self.interval, encoder_, interval, ())?;
10127
10128 ::fidl_next::Encode::encode(self.iterations, encoder_, iterations, ())?;
10129
10130 Ok(())
10131 }
10132 }
10133
10134 pub struct WlanChannel<T0, T1, T2> {
10136 pub primary: T0,
10137
10138 pub cbw: T1,
10139
10140 pub secondary80: T2,
10141 }
10142
10143 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::WlanChannel, ___E>
10144 for WlanChannel<T0, T1, T2>
10145 where
10146 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10147 T0: ::fidl_next::Encode<u8, ___E>,
10148 T1: ::fidl_next::Encode<crate::wire::ChannelBandwidth, ___E>,
10149 T2: ::fidl_next::Encode<u8, ___E>,
10150 {
10151 #[inline]
10152 fn encode(
10153 self,
10154 encoder_: &mut ___E,
10155 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanChannel>,
10156 _: (),
10157 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10158 ::fidl_next::munge! {
10159 let crate::wire::WlanChannel {
10160 primary,
10161 cbw,
10162 secondary80,
10163
10164 } = out_;
10165 }
10166
10167 ::fidl_next::Encode::encode(self.primary, encoder_, primary, ())?;
10168
10169 ::fidl_next::Encode::encode(self.cbw, encoder_, cbw, ())?;
10170
10171 ::fidl_next::Encode::encode(self.secondary80, encoder_, secondary80, ())?;
10172
10173 Ok(())
10174 }
10175 }
10176
10177 pub struct WlanTxResultEntry<T0, T1> {
10179 pub tx_vector_idx: T0,
10180
10181 pub attempts: T1,
10182 }
10183
10184 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::WlanTxResultEntry, ___E>
10185 for WlanTxResultEntry<T0, T1>
10186 where
10187 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10188 T0: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
10189 T1: ::fidl_next::Encode<u8, ___E>,
10190 {
10191 #[inline]
10192 fn encode(
10193 self,
10194 encoder_: &mut ___E,
10195 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResultEntry>,
10196 _: (),
10197 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10198 ::fidl_next::munge! {
10199 let crate::wire::WlanTxResultEntry {
10200 tx_vector_idx,
10201 attempts,
10202
10203 } = out_;
10204 }
10205
10206 ::fidl_next::Encode::encode(self.tx_vector_idx, encoder_, tx_vector_idx, ())?;
10207
10208 ::fidl_next::Encode::encode(self.attempts, encoder_, attempts, ())?;
10209
10210 Ok(())
10211 }
10212 }
10213
10214 pub struct WlanTxResult<T0, T1, T2> {
10216 pub tx_result_entry: T0,
10217
10218 pub peer_addr: T1,
10219
10220 pub result_code: T2,
10221 }
10222
10223 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::WlanTxResult, ___E>
10224 for WlanTxResult<T0, T1, T2>
10225 where
10226 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10227 T0: ::fidl_next::Encode<[crate::wire::WlanTxResultEntry; 8], ___E>,
10228 T1: ::fidl_next::Encode<[u8; 6], ___E>,
10229 T2: ::fidl_next::Encode<crate::wire::WlanTxResultCode, ___E>,
10230 {
10231 #[inline]
10232 fn encode(
10233 self,
10234 encoder_: &mut ___E,
10235 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResult>,
10236 _: (),
10237 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10238 ::fidl_next::munge! {
10239 let crate::wire::WlanTxResult {
10240 tx_result_entry,
10241 peer_addr,
10242 result_code,
10243
10244 } = out_;
10245 }
10246
10247 ::fidl_next::Encode::encode(self.tx_result_entry, encoder_, tx_result_entry, ())?;
10248
10249 ::fidl_next::Encode::encode(self.peer_addr, encoder_, peer_addr, ())?;
10250
10251 ::fidl_next::Encode::encode(self.result_code, encoder_, result_code, ())?;
10252
10253 Ok(())
10254 }
10255 }
10256
10257 pub struct WlanWmmAccessCategoryParameters<T0, T1, T2, T3, T4> {
10259 pub ecw_min: T0,
10260
10261 pub ecw_max: T1,
10262
10263 pub aifsn: T2,
10264
10265 pub txop_limit: T3,
10266
10267 pub acm: T4,
10268 }
10269
10270 unsafe impl<___E, T0, T1, T2, T3, T4>
10271 ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>
10272 for WlanWmmAccessCategoryParameters<T0, T1, T2, T3, T4>
10273 where
10274 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10275 T0: ::fidl_next::Encode<u8, ___E>,
10276 T1: ::fidl_next::Encode<u8, ___E>,
10277 T2: ::fidl_next::Encode<u8, ___E>,
10278 T3: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
10279 T4: ::fidl_next::Encode<bool, ___E>,
10280 {
10281 #[inline]
10282 fn encode(
10283 self,
10284 encoder_: &mut ___E,
10285 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanWmmAccessCategoryParameters>,
10286 _: (),
10287 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10288 ::fidl_next::munge! {
10289 let crate::wire::WlanWmmAccessCategoryParameters {
10290 ecw_min,
10291 ecw_max,
10292 aifsn,
10293 txop_limit,
10294 acm,
10295
10296 } = out_;
10297 }
10298
10299 ::fidl_next::Encode::encode(self.ecw_min, encoder_, ecw_min, ())?;
10300
10301 ::fidl_next::Encode::encode(self.ecw_max, encoder_, ecw_max, ())?;
10302
10303 ::fidl_next::Encode::encode(self.aifsn, encoder_, aifsn, ())?;
10304
10305 ::fidl_next::Encode::encode(self.txop_limit, encoder_, txop_limit, ())?;
10306
10307 ::fidl_next::Encode::encode(self.acm, encoder_, acm, ())?;
10308
10309 Ok(())
10310 }
10311 }
10312
10313 pub struct WlanWmmParameters<T0, T1, T2, T3, T4> {
10315 pub apsd: T0,
10316
10317 pub ac_be_params: T1,
10318
10319 pub ac_bk_params: T2,
10320
10321 pub ac_vi_params: T3,
10322
10323 pub ac_vo_params: T4,
10324 }
10325
10326 unsafe impl<___E, T0, T1, T2, T3, T4> ::fidl_next::Encode<crate::wire::WlanWmmParameters, ___E>
10327 for WlanWmmParameters<T0, T1, T2, T3, T4>
10328 where
10329 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10330 T0: ::fidl_next::Encode<bool, ___E>,
10331 T1: ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>,
10332 T2: ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>,
10333 T3: ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>,
10334 T4: ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>,
10335 {
10336 #[inline]
10337 fn encode(
10338 self,
10339 encoder_: &mut ___E,
10340 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanWmmParameters>,
10341 _: (),
10342 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10343 ::fidl_next::munge! {
10344 let crate::wire::WlanWmmParameters {
10345 apsd,
10346 ac_be_params,
10347 ac_bk_params,
10348 ac_vi_params,
10349 ac_vo_params,
10350
10351 } = out_;
10352 }
10353
10354 ::fidl_next::Encode::encode(self.apsd, encoder_, apsd, ())?;
10355
10356 ::fidl_next::Encode::encode(self.ac_be_params, encoder_, ac_be_params, ())?;
10357
10358 ::fidl_next::Encode::encode(self.ac_bk_params, encoder_, ac_bk_params, ())?;
10359
10360 ::fidl_next::Encode::encode(self.ac_vi_params, encoder_, ac_vi_params, ())?;
10361
10362 ::fidl_next::Encode::encode(self.ac_vo_params, encoder_, ac_vo_params, ())?;
10363
10364 Ok(())
10365 }
10366 }
10367}
10368
10369pub use self::natural::*;
10370
10371#[doc = " This constant defined the fixed length for arrays containing the capabilities\n for each band supported by a device driver.\n"]
10372pub const MAX_BANDS: u8 = 16 as u8;
10373
10374#[doc = " This constant defines fixed length for arrays containing MAC roles supported by\n PHY entities.\n"]
10375pub const MAX_SUPPORTED_MAC_ROLES: u8 = 16 as u8;
10376
10377#[doc = " This constant defines fixed length for arrays containing PHY types supported by\n PHY entities.\n"]
10378pub const MAX_SUPPORTED_PHY_TYPES: u8 = 64 as u8;
10379
10380pub const WLAN_MAC_MAX_EXT_RATES: u32 = 255 as u32;
10381
10382pub const WLAN_MAC_MAX_SUPP_RATES: u32 = 8 as u32;
10383
10384pub const WLAN_TX_RESULT_MAX_ENTRY: u32 = 8 as u32;
10385
10386pub const WLAN_TX_VECTOR_IDX_INVALID: u16 = 0 as u16;