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 = " Firmware RSSI threshold monitoring offload support.\n"]
3100 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3101 pub struct RssiMonitorSupport {
3102 pub supported: ::core::option::Option<bool>,
3103 }
3104
3105 impl RssiMonitorSupport {
3106 fn __max_ordinal(&self) -> usize {
3107 if self.supported.is_some() {
3108 return 1;
3109 }
3110
3111 0
3112 }
3113 }
3114
3115 unsafe impl<___E> ::fidl_next::Encode<crate::wire::RssiMonitorSupport<'static>, ___E>
3116 for RssiMonitorSupport
3117 where
3118 ___E: ::fidl_next::Encoder + ?Sized,
3119 {
3120 #[inline]
3121 fn encode(
3122 mut self,
3123 encoder: &mut ___E,
3124 out: &mut ::core::mem::MaybeUninit<crate::wire::RssiMonitorSupport<'static>>,
3125 _: (),
3126 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3127 ::fidl_next::munge!(let crate::wire::RssiMonitorSupport { table } = out);
3128
3129 let max_ord = self.__max_ordinal();
3130
3131 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3132 ::fidl_next::Wire::zero_padding(&mut out);
3133
3134 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3135 ::fidl_next::wire::Envelope,
3136 >(encoder, max_ord);
3137
3138 for i in 1..=max_ord {
3139 match i {
3140 1 => {
3141 if let Some(value) = self.supported.take() {
3142 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3143 value,
3144 preallocated.encoder,
3145 &mut out,
3146 (),
3147 )?;
3148 } else {
3149 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3150 }
3151 }
3152
3153 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3154 }
3155 unsafe {
3156 preallocated.write_next(out.assume_init_ref());
3157 }
3158 }
3159
3160 ::fidl_next::wire::Table::encode_len(table, max_ord);
3161
3162 Ok(())
3163 }
3164 }
3165
3166 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RssiMonitorSupport<'static>, ___E>
3167 for &'a RssiMonitorSupport
3168 where
3169 ___E: ::fidl_next::Encoder + ?Sized,
3170 {
3171 #[inline]
3172 fn encode(
3173 self,
3174 encoder: &mut ___E,
3175 out: &mut ::core::mem::MaybeUninit<crate::wire::RssiMonitorSupport<'static>>,
3176 _: (),
3177 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3178 ::fidl_next::munge!(let crate::wire::RssiMonitorSupport { table } = out);
3179
3180 let max_ord = self.__max_ordinal();
3181
3182 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3183 ::fidl_next::Wire::zero_padding(&mut out);
3184
3185 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3186 ::fidl_next::wire::Envelope,
3187 >(encoder, max_ord);
3188
3189 for i in 1..=max_ord {
3190 match i {
3191 1 => {
3192 if let Some(value) = &self.supported {
3193 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3194 value,
3195 preallocated.encoder,
3196 &mut out,
3197 (),
3198 )?;
3199 } else {
3200 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3201 }
3202 }
3203
3204 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3205 }
3206 unsafe {
3207 preallocated.write_next(out.assume_init_ref());
3208 }
3209 }
3210
3211 ::fidl_next::wire::Table::encode_len(table, max_ord);
3212
3213 Ok(())
3214 }
3215 }
3216
3217 impl<'de> ::fidl_next::FromWire<crate::wire::RssiMonitorSupport<'de>> for RssiMonitorSupport {
3218 #[inline]
3219 fn from_wire(wire_: crate::wire::RssiMonitorSupport<'de>) -> Self {
3220 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3221
3222 let supported = wire_.table.get(1);
3223
3224 Self {
3225 supported: supported.map(|envelope| {
3226 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
3227 }),
3228 }
3229 }
3230 }
3231
3232 impl<'de> ::fidl_next::FromWireRef<crate::wire::RssiMonitorSupport<'de>> for RssiMonitorSupport {
3233 #[inline]
3234 fn from_wire_ref(wire: &crate::wire::RssiMonitorSupport<'de>) -> Self {
3235 Self {
3236 supported: wire.table.get(1).map(|envelope| {
3237 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3238 envelope.deref_unchecked::<bool>()
3239 })
3240 }),
3241 }
3242 }
3243 }
3244
3245 #[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"]
3246 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3247 pub struct SaeFeature {
3248 pub driver_handler_supported: ::core::option::Option<bool>,
3249
3250 pub sme_handler_supported: ::core::option::Option<bool>,
3251
3252 pub hash_to_element_supported: ::core::option::Option<bool>,
3253
3254 pub pmksa_caching_supported: ::core::option::Option<bool>,
3255 }
3256
3257 impl SaeFeature {
3258 fn __max_ordinal(&self) -> usize {
3259 if self.pmksa_caching_supported.is_some() {
3260 return 4;
3261 }
3262
3263 if self.hash_to_element_supported.is_some() {
3264 return 3;
3265 }
3266
3267 if self.sme_handler_supported.is_some() {
3268 return 2;
3269 }
3270
3271 if self.driver_handler_supported.is_some() {
3272 return 1;
3273 }
3274
3275 0
3276 }
3277 }
3278
3279 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SaeFeature<'static>, ___E> for SaeFeature
3280 where
3281 ___E: ::fidl_next::Encoder + ?Sized,
3282 {
3283 #[inline]
3284 fn encode(
3285 mut self,
3286 encoder: &mut ___E,
3287 out: &mut ::core::mem::MaybeUninit<crate::wire::SaeFeature<'static>>,
3288 _: (),
3289 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3290 ::fidl_next::munge!(let crate::wire::SaeFeature { table } = out);
3291
3292 let max_ord = self.__max_ordinal();
3293
3294 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3295 ::fidl_next::Wire::zero_padding(&mut out);
3296
3297 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3298 ::fidl_next::wire::Envelope,
3299 >(encoder, max_ord);
3300
3301 for i in 1..=max_ord {
3302 match i {
3303 4 => {
3304 if let Some(value) = self.pmksa_caching_supported.take() {
3305 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3306 value,
3307 preallocated.encoder,
3308 &mut out,
3309 (),
3310 )?;
3311 } else {
3312 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3313 }
3314 }
3315
3316 3 => {
3317 if let Some(value) = self.hash_to_element_supported.take() {
3318 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3319 value,
3320 preallocated.encoder,
3321 &mut out,
3322 (),
3323 )?;
3324 } else {
3325 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3326 }
3327 }
3328
3329 2 => {
3330 if let Some(value) = self.sme_handler_supported.take() {
3331 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3332 value,
3333 preallocated.encoder,
3334 &mut out,
3335 (),
3336 )?;
3337 } else {
3338 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3339 }
3340 }
3341
3342 1 => {
3343 if let Some(value) = self.driver_handler_supported.take() {
3344 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3345 value,
3346 preallocated.encoder,
3347 &mut out,
3348 (),
3349 )?;
3350 } else {
3351 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3352 }
3353 }
3354
3355 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3356 }
3357 unsafe {
3358 preallocated.write_next(out.assume_init_ref());
3359 }
3360 }
3361
3362 ::fidl_next::wire::Table::encode_len(table, max_ord);
3363
3364 Ok(())
3365 }
3366 }
3367
3368 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SaeFeature<'static>, ___E> for &'a SaeFeature
3369 where
3370 ___E: ::fidl_next::Encoder + ?Sized,
3371 {
3372 #[inline]
3373 fn encode(
3374 self,
3375 encoder: &mut ___E,
3376 out: &mut ::core::mem::MaybeUninit<crate::wire::SaeFeature<'static>>,
3377 _: (),
3378 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3379 ::fidl_next::munge!(let crate::wire::SaeFeature { table } = out);
3380
3381 let max_ord = self.__max_ordinal();
3382
3383 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3384 ::fidl_next::Wire::zero_padding(&mut out);
3385
3386 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3387 ::fidl_next::wire::Envelope,
3388 >(encoder, max_ord);
3389
3390 for i in 1..=max_ord {
3391 match i {
3392 4 => {
3393 if let Some(value) = &self.pmksa_caching_supported {
3394 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3395 value,
3396 preallocated.encoder,
3397 &mut out,
3398 (),
3399 )?;
3400 } else {
3401 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3402 }
3403 }
3404
3405 3 => {
3406 if let Some(value) = &self.hash_to_element_supported {
3407 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3408 value,
3409 preallocated.encoder,
3410 &mut out,
3411 (),
3412 )?;
3413 } else {
3414 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3415 }
3416 }
3417
3418 2 => {
3419 if let Some(value) = &self.sme_handler_supported {
3420 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3421 value,
3422 preallocated.encoder,
3423 &mut out,
3424 (),
3425 )?;
3426 } else {
3427 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3428 }
3429 }
3430
3431 1 => {
3432 if let Some(value) = &self.driver_handler_supported {
3433 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3434 value,
3435 preallocated.encoder,
3436 &mut out,
3437 (),
3438 )?;
3439 } else {
3440 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3441 }
3442 }
3443
3444 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3445 }
3446 unsafe {
3447 preallocated.write_next(out.assume_init_ref());
3448 }
3449 }
3450
3451 ::fidl_next::wire::Table::encode_len(table, max_ord);
3452
3453 Ok(())
3454 }
3455 }
3456
3457 impl<'de> ::fidl_next::FromWire<crate::wire::SaeFeature<'de>> for SaeFeature {
3458 #[inline]
3459 fn from_wire(wire_: crate::wire::SaeFeature<'de>) -> Self {
3460 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3461
3462 let driver_handler_supported = wire_.table.get(1);
3463
3464 let sme_handler_supported = wire_.table.get(2);
3465
3466 let hash_to_element_supported = wire_.table.get(3);
3467
3468 let pmksa_caching_supported = wire_.table.get(4);
3469
3470 Self {
3471 driver_handler_supported: driver_handler_supported.map(|envelope| {
3472 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
3473 }),
3474
3475 sme_handler_supported: sme_handler_supported.map(|envelope| {
3476 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
3477 }),
3478
3479 hash_to_element_supported: hash_to_element_supported.map(|envelope| {
3480 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
3481 }),
3482
3483 pmksa_caching_supported: pmksa_caching_supported.map(|envelope| {
3484 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
3485 }),
3486 }
3487 }
3488 }
3489
3490 impl<'de> ::fidl_next::FromWireRef<crate::wire::SaeFeature<'de>> for SaeFeature {
3491 #[inline]
3492 fn from_wire_ref(wire: &crate::wire::SaeFeature<'de>) -> Self {
3493 Self {
3494 driver_handler_supported: wire.table.get(1).map(|envelope| {
3495 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3496 envelope.deref_unchecked::<bool>()
3497 })
3498 }),
3499
3500 sme_handler_supported: wire.table.get(2).map(|envelope| {
3501 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3502 envelope.deref_unchecked::<bool>()
3503 })
3504 }),
3505
3506 hash_to_element_supported: wire.table.get(3).map(|envelope| {
3507 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3508 envelope.deref_unchecked::<bool>()
3509 })
3510 }),
3511
3512 pmksa_caching_supported: wire.table.get(4).map(|envelope| {
3513 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3514 envelope.deref_unchecked::<bool>()
3515 })
3516 }),
3517 }
3518 }
3519 }
3520
3521 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3522 #[repr(u32)]
3523 pub enum ScanType {
3524 Active = 1,
3525 Passive = 2,
3526 }
3527 impl ::core::convert::TryFrom<u32> for ScanType {
3528 type Error = ::fidl_next::UnknownStrictEnumMemberError;
3529 fn try_from(
3530 value: u32,
3531 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
3532 match value {
3533 1 => Ok(Self::Active),
3534 2 => Ok(Self::Passive),
3535
3536 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
3537 }
3538 }
3539 }
3540
3541 impl ::std::convert::From<ScanType> for u32 {
3542 fn from(value: ScanType) -> Self {
3543 match value {
3544 ScanType::Active => 1,
3545 ScanType::Passive => 2,
3546 }
3547 }
3548 }
3549
3550 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ScanType, ___E> for ScanType
3551 where
3552 ___E: ?Sized,
3553 {
3554 #[inline]
3555 fn encode(
3556 self,
3557 encoder: &mut ___E,
3558 out: &mut ::core::mem::MaybeUninit<crate::wire::ScanType>,
3559 _: (),
3560 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3561 ::fidl_next::Encode::encode(&self, encoder, out, ())
3562 }
3563 }
3564
3565 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ScanType, ___E> for &'a ScanType
3566 where
3567 ___E: ?Sized,
3568 {
3569 #[inline]
3570 fn encode(
3571 self,
3572 encoder: &mut ___E,
3573 out: &mut ::core::mem::MaybeUninit<crate::wire::ScanType>,
3574 _: (),
3575 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3576 ::fidl_next::munge!(let crate::wire::ScanType { value } = out);
3577 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
3578 ScanType::Active => 1,
3579
3580 ScanType::Passive => 2,
3581 }));
3582
3583 Ok(())
3584 }
3585 }
3586
3587 impl ::core::convert::From<crate::wire::ScanType> for ScanType {
3588 fn from(wire: crate::wire::ScanType) -> Self {
3589 match u32::from(wire.value) {
3590 1 => Self::Active,
3591
3592 2 => Self::Passive,
3593
3594 _ => unsafe { ::core::hint::unreachable_unchecked() },
3595 }
3596 }
3597 }
3598
3599 impl ::fidl_next::FromWire<crate::wire::ScanType> for ScanType {
3600 #[inline]
3601 fn from_wire(wire: crate::wire::ScanType) -> Self {
3602 Self::from(wire)
3603 }
3604 }
3605
3606 impl ::fidl_next::FromWireRef<crate::wire::ScanType> for ScanType {
3607 #[inline]
3608 fn from_wire_ref(wire: &crate::wire::ScanType) -> Self {
3609 Self::from(*wire)
3610 }
3611 }
3612
3613 #[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"]
3614 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3615 pub struct ScheduledScanMatchSet {
3616 pub ssid: ::core::option::Option<::std::vec::Vec<u8>>,
3617
3618 pub bssid: ::core::option::Option<[u8; 6]>,
3619
3620 pub min_rssi_threshold: ::core::option::Option<i8>,
3621
3622 pub relative_rssi_threshold: ::core::option::Option<i8>,
3623
3624 pub band_rssi_adjustments:
3625 ::core::option::Option<::std::vec::Vec<crate::natural::BandRssiAdjustment>>,
3626 }
3627
3628 impl ScheduledScanMatchSet {
3629 fn __max_ordinal(&self) -> usize {
3630 if self.band_rssi_adjustments.is_some() {
3631 return 5;
3632 }
3633
3634 if self.relative_rssi_threshold.is_some() {
3635 return 4;
3636 }
3637
3638 if self.min_rssi_threshold.is_some() {
3639 return 3;
3640 }
3641
3642 if self.bssid.is_some() {
3643 return 2;
3644 }
3645
3646 if self.ssid.is_some() {
3647 return 1;
3648 }
3649
3650 0
3651 }
3652 }
3653
3654 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ScheduledScanMatchSet<'static>, ___E>
3655 for ScheduledScanMatchSet
3656 where
3657 ___E: ::fidl_next::Encoder + ?Sized,
3658 {
3659 #[inline]
3660 fn encode(
3661 mut self,
3662 encoder: &mut ___E,
3663 out: &mut ::core::mem::MaybeUninit<crate::wire::ScheduledScanMatchSet<'static>>,
3664 _: (),
3665 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3666 ::fidl_next::munge!(let crate::wire::ScheduledScanMatchSet { table } = out);
3667
3668 let max_ord = self.__max_ordinal();
3669
3670 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3671 ::fidl_next::Wire::zero_padding(&mut out);
3672
3673 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3674 ::fidl_next::wire::Envelope,
3675 >(encoder, max_ord);
3676
3677 for i in 1..=max_ord {
3678 match i {
3679 5 => {
3680 if let Some(value) = self.band_rssi_adjustments.take() {
3681 ::fidl_next::wire::Envelope::encode_value::<
3682 ::fidl_next::wire::Vector<'static, crate::wire::BandRssiAdjustment>,
3683 ___E,
3684 >(
3685 value, preallocated.encoder, &mut out, (4294967295, ())
3686 )?;
3687 } else {
3688 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3689 }
3690 }
3691
3692 4 => {
3693 if let Some(value) = self.relative_rssi_threshold.take() {
3694 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
3695 value,
3696 preallocated.encoder,
3697 &mut out,
3698 (),
3699 )?;
3700 } else {
3701 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3702 }
3703 }
3704
3705 3 => {
3706 if let Some(value) = self.min_rssi_threshold.take() {
3707 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
3708 value,
3709 preallocated.encoder,
3710 &mut out,
3711 (),
3712 )?;
3713 } else {
3714 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3715 }
3716 }
3717
3718 2 => {
3719 if let Some(value) = self.bssid.take() {
3720 ::fidl_next::wire::Envelope::encode_value::<[u8; 6], ___E>(
3721 value,
3722 preallocated.encoder,
3723 &mut out,
3724 (),
3725 )?;
3726 } else {
3727 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3728 }
3729 }
3730
3731 1 => {
3732 if let Some(value) = self.ssid.take() {
3733 ::fidl_next::wire::Envelope::encode_value::<
3734 ::fidl_next::wire::Vector<'static, u8>,
3735 ___E,
3736 >(
3737 value, preallocated.encoder, &mut out, (32, ())
3738 )?;
3739 } else {
3740 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3741 }
3742 }
3743
3744 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3745 }
3746 unsafe {
3747 preallocated.write_next(out.assume_init_ref());
3748 }
3749 }
3750
3751 ::fidl_next::wire::Table::encode_len(table, max_ord);
3752
3753 Ok(())
3754 }
3755 }
3756
3757 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ScheduledScanMatchSet<'static>, ___E>
3758 for &'a ScheduledScanMatchSet
3759 where
3760 ___E: ::fidl_next::Encoder + ?Sized,
3761 {
3762 #[inline]
3763 fn encode(
3764 self,
3765 encoder: &mut ___E,
3766 out: &mut ::core::mem::MaybeUninit<crate::wire::ScheduledScanMatchSet<'static>>,
3767 _: (),
3768 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3769 ::fidl_next::munge!(let crate::wire::ScheduledScanMatchSet { table } = out);
3770
3771 let max_ord = self.__max_ordinal();
3772
3773 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3774 ::fidl_next::Wire::zero_padding(&mut out);
3775
3776 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3777 ::fidl_next::wire::Envelope,
3778 >(encoder, max_ord);
3779
3780 for i in 1..=max_ord {
3781 match i {
3782 5 => {
3783 if let Some(value) = &self.band_rssi_adjustments {
3784 ::fidl_next::wire::Envelope::encode_value::<
3785 ::fidl_next::wire::Vector<'static, crate::wire::BandRssiAdjustment>,
3786 ___E,
3787 >(
3788 value, preallocated.encoder, &mut out, (4294967295, ())
3789 )?;
3790 } else {
3791 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3792 }
3793 }
3794
3795 4 => {
3796 if let Some(value) = &self.relative_rssi_threshold {
3797 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
3798 value,
3799 preallocated.encoder,
3800 &mut out,
3801 (),
3802 )?;
3803 } else {
3804 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3805 }
3806 }
3807
3808 3 => {
3809 if let Some(value) = &self.min_rssi_threshold {
3810 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
3811 value,
3812 preallocated.encoder,
3813 &mut out,
3814 (),
3815 )?;
3816 } else {
3817 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3818 }
3819 }
3820
3821 2 => {
3822 if let Some(value) = &self.bssid {
3823 ::fidl_next::wire::Envelope::encode_value::<[u8; 6], ___E>(
3824 value,
3825 preallocated.encoder,
3826 &mut out,
3827 (),
3828 )?;
3829 } else {
3830 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3831 }
3832 }
3833
3834 1 => {
3835 if let Some(value) = &self.ssid {
3836 ::fidl_next::wire::Envelope::encode_value::<
3837 ::fidl_next::wire::Vector<'static, u8>,
3838 ___E,
3839 >(
3840 value, preallocated.encoder, &mut out, (32, ())
3841 )?;
3842 } else {
3843 ::fidl_next::wire::Envelope::encode_zero(&mut out)
3844 }
3845 }
3846
3847 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3848 }
3849 unsafe {
3850 preallocated.write_next(out.assume_init_ref());
3851 }
3852 }
3853
3854 ::fidl_next::wire::Table::encode_len(table, max_ord);
3855
3856 Ok(())
3857 }
3858 }
3859
3860 impl<'de> ::fidl_next::FromWire<crate::wire::ScheduledScanMatchSet<'de>> for ScheduledScanMatchSet {
3861 #[inline]
3862 fn from_wire(wire_: crate::wire::ScheduledScanMatchSet<'de>) -> Self {
3863 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3864
3865 let ssid = wire_.table.get(1);
3866
3867 let bssid = wire_.table.get(2);
3868
3869 let min_rssi_threshold = wire_.table.get(3);
3870
3871 let relative_rssi_threshold = wire_.table.get(4);
3872
3873 let band_rssi_adjustments = wire_.table.get(5);
3874
3875 Self {
3876
3877
3878 ssid: ssid.map(|envelope| ::fidl_next::FromWire::from_wire(
3879 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>() }
3880 )),
3881
3882
3883 bssid: bssid.map(|envelope| ::fidl_next::FromWire::from_wire(
3884 unsafe { envelope.read_unchecked::<[u8; 6]>() }
3885 )),
3886
3887
3888 min_rssi_threshold: min_rssi_threshold.map(|envelope| ::fidl_next::FromWire::from_wire(
3889 unsafe { envelope.read_unchecked::<i8>() }
3890 )),
3891
3892
3893 relative_rssi_threshold: relative_rssi_threshold.map(|envelope| ::fidl_next::FromWire::from_wire(
3894 unsafe { envelope.read_unchecked::<i8>() }
3895 )),
3896
3897
3898 band_rssi_adjustments: band_rssi_adjustments.map(|envelope| ::fidl_next::FromWire::from_wire(
3899 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>() }
3900 )),
3901
3902 }
3903 }
3904 }
3905
3906 impl<'de> ::fidl_next::FromWireRef<crate::wire::ScheduledScanMatchSet<'de>>
3907 for ScheduledScanMatchSet
3908 {
3909 #[inline]
3910 fn from_wire_ref(wire: &crate::wire::ScheduledScanMatchSet<'de>) -> Self {
3911 Self {
3912
3913
3914 ssid: wire.table.get(1)
3915 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3916 unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>() }
3917 )),
3918
3919
3920 bssid: wire.table.get(2)
3921 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3922 unsafe { envelope.deref_unchecked::<[u8; 6]>() }
3923 )),
3924
3925
3926 min_rssi_threshold: wire.table.get(3)
3927 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3928 unsafe { envelope.deref_unchecked::<i8>() }
3929 )),
3930
3931
3932 relative_rssi_threshold: wire.table.get(4)
3933 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3934 unsafe { envelope.deref_unchecked::<i8>() }
3935 )),
3936
3937
3938 band_rssi_adjustments: wire.table.get(5)
3939 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3940 unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>() }
3941 )),
3942
3943 }
3944 }
3945 }
3946
3947 #[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"]
3948 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3949 #[repr(C)]
3950 pub struct ScheduledScanPlan {
3951 pub interval: u32,
3952
3953 pub iterations: u32,
3954 }
3955
3956 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ScheduledScanPlan, ___E> for ScheduledScanPlan
3957 where
3958 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3959 {
3960 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3961 Self,
3962 crate::wire::ScheduledScanPlan,
3963 > = unsafe {
3964 ::fidl_next::CopyOptimization::enable_if(
3965 true
3966
3967 && <
3968 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
3969 >::COPY_OPTIMIZATION.is_enabled()
3970
3971 && <
3972 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
3973 >::COPY_OPTIMIZATION.is_enabled()
3974
3975 )
3976 };
3977
3978 #[inline]
3979 fn encode(
3980 self,
3981 encoder_: &mut ___E,
3982 out_: &mut ::core::mem::MaybeUninit<crate::wire::ScheduledScanPlan>,
3983 _: (),
3984 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3985 ::fidl_next::munge! {
3986 let crate::wire::ScheduledScanPlan {
3987 interval,
3988 iterations,
3989
3990 } = out_;
3991 }
3992
3993 ::fidl_next::Encode::encode(self.interval, encoder_, interval, ())?;
3994
3995 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(interval.as_mut_ptr()) };
3996
3997 ::fidl_next::Encode::encode(self.iterations, encoder_, iterations, ())?;
3998
3999 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterations.as_mut_ptr()) };
4000
4001 Ok(())
4002 }
4003 }
4004
4005 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ScheduledScanPlan, ___E>
4006 for &'a ScheduledScanPlan
4007 where
4008 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4009 {
4010 #[inline]
4011 fn encode(
4012 self,
4013 encoder_: &mut ___E,
4014 out_: &mut ::core::mem::MaybeUninit<crate::wire::ScheduledScanPlan>,
4015 _: (),
4016 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4017 ::fidl_next::munge! {
4018 let crate::wire::ScheduledScanPlan {
4019 interval,
4020 iterations,
4021
4022 } = out_;
4023 }
4024
4025 ::fidl_next::Encode::encode(&self.interval, encoder_, interval, ())?;
4026
4027 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(interval.as_mut_ptr()) };
4028
4029 ::fidl_next::Encode::encode(&self.iterations, encoder_, iterations, ())?;
4030
4031 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterations.as_mut_ptr()) };
4032
4033 Ok(())
4034 }
4035 }
4036
4037 unsafe impl<___E>
4038 ::fidl_next::EncodeOption<
4039 ::fidl_next::wire::Box<'static, crate::wire::ScheduledScanPlan>,
4040 ___E,
4041 > for ScheduledScanPlan
4042 where
4043 ___E: ::fidl_next::Encoder + ?Sized,
4044 ScheduledScanPlan: ::fidl_next::Encode<crate::wire::ScheduledScanPlan, ___E>,
4045 {
4046 #[inline]
4047 fn encode_option(
4048 this: ::core::option::Option<Self>,
4049 encoder: &mut ___E,
4050 out: &mut ::core::mem::MaybeUninit<
4051 ::fidl_next::wire::Box<'static, crate::wire::ScheduledScanPlan>,
4052 >,
4053 _: (),
4054 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4055 if let Some(inner) = this {
4056 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4057 ::fidl_next::wire::Box::encode_present(out);
4058 } else {
4059 ::fidl_next::wire::Box::encode_absent(out);
4060 }
4061
4062 Ok(())
4063 }
4064 }
4065
4066 unsafe impl<'a, ___E>
4067 ::fidl_next::EncodeOption<
4068 ::fidl_next::wire::Box<'static, crate::wire::ScheduledScanPlan>,
4069 ___E,
4070 > for &'a ScheduledScanPlan
4071 where
4072 ___E: ::fidl_next::Encoder + ?Sized,
4073 &'a ScheduledScanPlan: ::fidl_next::Encode<crate::wire::ScheduledScanPlan, ___E>,
4074 {
4075 #[inline]
4076 fn encode_option(
4077 this: ::core::option::Option<Self>,
4078 encoder: &mut ___E,
4079 out: &mut ::core::mem::MaybeUninit<
4080 ::fidl_next::wire::Box<'static, crate::wire::ScheduledScanPlan>,
4081 >,
4082 _: (),
4083 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4084 if let Some(inner) = this {
4085 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4086 ::fidl_next::wire::Box::encode_present(out);
4087 } else {
4088 ::fidl_next::wire::Box::encode_absent(out);
4089 }
4090
4091 Ok(())
4092 }
4093 }
4094
4095 impl ::fidl_next::FromWire<crate::wire::ScheduledScanPlan> for ScheduledScanPlan {
4096 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4097 crate::wire::ScheduledScanPlan,
4098 Self,
4099 > = unsafe {
4100 ::fidl_next::CopyOptimization::enable_if(
4101 true
4102 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
4103 .is_enabled()
4104 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
4105 .is_enabled(),
4106 )
4107 };
4108
4109 #[inline]
4110 fn from_wire(wire: crate::wire::ScheduledScanPlan) -> Self {
4111 Self {
4112 interval: ::fidl_next::FromWire::from_wire(wire.interval),
4113
4114 iterations: ::fidl_next::FromWire::from_wire(wire.iterations),
4115 }
4116 }
4117 }
4118
4119 impl ::fidl_next::FromWireRef<crate::wire::ScheduledScanPlan> for ScheduledScanPlan {
4120 #[inline]
4121 fn from_wire_ref(wire: &crate::wire::ScheduledScanPlan) -> Self {
4122 Self {
4123 interval: ::fidl_next::FromWireRef::from_wire_ref(&wire.interval),
4124
4125 iterations: ::fidl_next::FromWireRef::from_wire_ref(&wire.iterations),
4126 }
4127 }
4128 }
4129
4130 #[doc = " Request for scheduled scanning.\n"]
4131 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4132 pub struct ScheduledScanRequest {
4133 pub scan_plans: ::core::option::Option<::std::vec::Vec<crate::natural::ScheduledScanPlan>>,
4134
4135 pub ssids: ::core::option::Option<::std::vec::Vec<::std::vec::Vec<u8>>>,
4136
4137 pub frequencies: ::core::option::Option<::std::vec::Vec<u32>>,
4138
4139 pub min_rssi_threshold: ::core::option::Option<i8>,
4140
4141 pub relative_rssi_threshold: ::core::option::Option<i8>,
4142
4143 pub band_rssi_adjustments:
4144 ::core::option::Option<::std::vec::Vec<crate::natural::BandRssiAdjustment>>,
4145
4146 pub match_sets:
4147 ::core::option::Option<::std::vec::Vec<crate::natural::ScheduledScanMatchSet>>,
4148 }
4149
4150 impl ScheduledScanRequest {
4151 fn __max_ordinal(&self) -> usize {
4152 if self.match_sets.is_some() {
4153 return 7;
4154 }
4155
4156 if self.band_rssi_adjustments.is_some() {
4157 return 6;
4158 }
4159
4160 if self.relative_rssi_threshold.is_some() {
4161 return 5;
4162 }
4163
4164 if self.min_rssi_threshold.is_some() {
4165 return 4;
4166 }
4167
4168 if self.frequencies.is_some() {
4169 return 3;
4170 }
4171
4172 if self.ssids.is_some() {
4173 return 2;
4174 }
4175
4176 if self.scan_plans.is_some() {
4177 return 1;
4178 }
4179
4180 0
4181 }
4182 }
4183
4184 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ScheduledScanRequest<'static>, ___E>
4185 for ScheduledScanRequest
4186 where
4187 ___E: ::fidl_next::Encoder + ?Sized,
4188 {
4189 #[inline]
4190 fn encode(
4191 mut self,
4192 encoder: &mut ___E,
4193 out: &mut ::core::mem::MaybeUninit<crate::wire::ScheduledScanRequest<'static>>,
4194 _: (),
4195 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4196 ::fidl_next::munge!(let crate::wire::ScheduledScanRequest { table } = out);
4197
4198 let max_ord = self.__max_ordinal();
4199
4200 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4201 ::fidl_next::Wire::zero_padding(&mut out);
4202
4203 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4204 ::fidl_next::wire::Envelope,
4205 >(encoder, max_ord);
4206
4207 for i in 1..=max_ord {
4208 match i {
4209 7 => {
4210 if let Some(value) = self.match_sets.take() {
4211 ::fidl_next::wire::Envelope::encode_value::<
4212 ::fidl_next::wire::Vector<
4213 'static,
4214 crate::wire::ScheduledScanMatchSet<'static>,
4215 >,
4216 ___E,
4217 >(
4218 value, preallocated.encoder, &mut out, (4294967295, ())
4219 )?;
4220 } else {
4221 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4222 }
4223 }
4224
4225 6 => {
4226 if let Some(value) = self.band_rssi_adjustments.take() {
4227 ::fidl_next::wire::Envelope::encode_value::<
4228 ::fidl_next::wire::Vector<'static, crate::wire::BandRssiAdjustment>,
4229 ___E,
4230 >(
4231 value, preallocated.encoder, &mut out, (4294967295, ())
4232 )?;
4233 } else {
4234 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4235 }
4236 }
4237
4238 5 => {
4239 if let Some(value) = self.relative_rssi_threshold.take() {
4240 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
4241 value,
4242 preallocated.encoder,
4243 &mut out,
4244 (),
4245 )?;
4246 } else {
4247 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4248 }
4249 }
4250
4251 4 => {
4252 if let Some(value) = self.min_rssi_threshold.take() {
4253 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
4254 value,
4255 preallocated.encoder,
4256 &mut out,
4257 (),
4258 )?;
4259 } else {
4260 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4261 }
4262 }
4263
4264 3 => {
4265 if let Some(value) = self.frequencies.take() {
4266 ::fidl_next::wire::Envelope::encode_value::<
4267 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::Uint32>,
4268 ___E,
4269 >(
4270 value, preallocated.encoder, &mut out, (4294967295, ())
4271 )?;
4272 } else {
4273 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4274 }
4275 }
4276
4277 2 => {
4278 if let Some(value) = self.ssids.take() {
4279 ::fidl_next::wire::Envelope::encode_value::<
4280 ::fidl_next::wire::Vector<
4281 'static,
4282 ::fidl_next::wire::Vector<'static, u8>,
4283 >,
4284 ___E,
4285 >(
4286 value, preallocated.encoder, &mut out, (4294967295, (32, ()))
4287 )?;
4288 } else {
4289 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4290 }
4291 }
4292
4293 1 => {
4294 if let Some(value) = self.scan_plans.take() {
4295 ::fidl_next::wire::Envelope::encode_value::<
4296 ::fidl_next::wire::Vector<'static, crate::wire::ScheduledScanPlan>,
4297 ___E,
4298 >(
4299 value, preallocated.encoder, &mut out, (4294967295, ())
4300 )?;
4301 } else {
4302 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4303 }
4304 }
4305
4306 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4307 }
4308 unsafe {
4309 preallocated.write_next(out.assume_init_ref());
4310 }
4311 }
4312
4313 ::fidl_next::wire::Table::encode_len(table, max_ord);
4314
4315 Ok(())
4316 }
4317 }
4318
4319 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ScheduledScanRequest<'static>, ___E>
4320 for &'a ScheduledScanRequest
4321 where
4322 ___E: ::fidl_next::Encoder + ?Sized,
4323 {
4324 #[inline]
4325 fn encode(
4326 self,
4327 encoder: &mut ___E,
4328 out: &mut ::core::mem::MaybeUninit<crate::wire::ScheduledScanRequest<'static>>,
4329 _: (),
4330 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4331 ::fidl_next::munge!(let crate::wire::ScheduledScanRequest { table } = out);
4332
4333 let max_ord = self.__max_ordinal();
4334
4335 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4336 ::fidl_next::Wire::zero_padding(&mut out);
4337
4338 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4339 ::fidl_next::wire::Envelope,
4340 >(encoder, max_ord);
4341
4342 for i in 1..=max_ord {
4343 match i {
4344 7 => {
4345 if let Some(value) = &self.match_sets {
4346 ::fidl_next::wire::Envelope::encode_value::<
4347 ::fidl_next::wire::Vector<
4348 'static,
4349 crate::wire::ScheduledScanMatchSet<'static>,
4350 >,
4351 ___E,
4352 >(
4353 value, preallocated.encoder, &mut out, (4294967295, ())
4354 )?;
4355 } else {
4356 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4357 }
4358 }
4359
4360 6 => {
4361 if let Some(value) = &self.band_rssi_adjustments {
4362 ::fidl_next::wire::Envelope::encode_value::<
4363 ::fidl_next::wire::Vector<'static, crate::wire::BandRssiAdjustment>,
4364 ___E,
4365 >(
4366 value, preallocated.encoder, &mut out, (4294967295, ())
4367 )?;
4368 } else {
4369 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4370 }
4371 }
4372
4373 5 => {
4374 if let Some(value) = &self.relative_rssi_threshold {
4375 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
4376 value,
4377 preallocated.encoder,
4378 &mut out,
4379 (),
4380 )?;
4381 } else {
4382 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4383 }
4384 }
4385
4386 4 => {
4387 if let Some(value) = &self.min_rssi_threshold {
4388 ::fidl_next::wire::Envelope::encode_value::<i8, ___E>(
4389 value,
4390 preallocated.encoder,
4391 &mut out,
4392 (),
4393 )?;
4394 } else {
4395 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4396 }
4397 }
4398
4399 3 => {
4400 if let Some(value) = &self.frequencies {
4401 ::fidl_next::wire::Envelope::encode_value::<
4402 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::Uint32>,
4403 ___E,
4404 >(
4405 value, preallocated.encoder, &mut out, (4294967295, ())
4406 )?;
4407 } else {
4408 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4409 }
4410 }
4411
4412 2 => {
4413 if let Some(value) = &self.ssids {
4414 ::fidl_next::wire::Envelope::encode_value::<
4415 ::fidl_next::wire::Vector<
4416 'static,
4417 ::fidl_next::wire::Vector<'static, u8>,
4418 >,
4419 ___E,
4420 >(
4421 value, preallocated.encoder, &mut out, (4294967295, (32, ()))
4422 )?;
4423 } else {
4424 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4425 }
4426 }
4427
4428 1 => {
4429 if let Some(value) = &self.scan_plans {
4430 ::fidl_next::wire::Envelope::encode_value::<
4431 ::fidl_next::wire::Vector<'static, crate::wire::ScheduledScanPlan>,
4432 ___E,
4433 >(
4434 value, preallocated.encoder, &mut out, (4294967295, ())
4435 )?;
4436 } else {
4437 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4438 }
4439 }
4440
4441 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4442 }
4443 unsafe {
4444 preallocated.write_next(out.assume_init_ref());
4445 }
4446 }
4447
4448 ::fidl_next::wire::Table::encode_len(table, max_ord);
4449
4450 Ok(())
4451 }
4452 }
4453
4454 impl<'de> ::fidl_next::FromWire<crate::wire::ScheduledScanRequest<'de>> for ScheduledScanRequest {
4455 #[inline]
4456 fn from_wire(wire_: crate::wire::ScheduledScanRequest<'de>) -> Self {
4457 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4458
4459 let scan_plans = wire_.table.get(1);
4460
4461 let ssids = wire_.table.get(2);
4462
4463 let frequencies = wire_.table.get(3);
4464
4465 let min_rssi_threshold = wire_.table.get(4);
4466
4467 let relative_rssi_threshold = wire_.table.get(5);
4468
4469 let band_rssi_adjustments = wire_.table.get(6);
4470
4471 let match_sets = wire_.table.get(7);
4472
4473 Self {
4474
4475
4476 scan_plans: scan_plans.map(|envelope| ::fidl_next::FromWire::from_wire(
4477 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanPlan>>() }
4478 )),
4479
4480
4481 ssids: ssids.map(|envelope| ::fidl_next::FromWire::from_wire(
4482 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::Vector<'de, u8>>>() }
4483 )),
4484
4485
4486 frequencies: frequencies.map(|envelope| ::fidl_next::FromWire::from_wire(
4487 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::Uint32>>() }
4488 )),
4489
4490
4491 min_rssi_threshold: min_rssi_threshold.map(|envelope| ::fidl_next::FromWire::from_wire(
4492 unsafe { envelope.read_unchecked::<i8>() }
4493 )),
4494
4495
4496 relative_rssi_threshold: relative_rssi_threshold.map(|envelope| ::fidl_next::FromWire::from_wire(
4497 unsafe { envelope.read_unchecked::<i8>() }
4498 )),
4499
4500
4501 band_rssi_adjustments: band_rssi_adjustments.map(|envelope| ::fidl_next::FromWire::from_wire(
4502 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>() }
4503 )),
4504
4505
4506 match_sets: match_sets.map(|envelope| ::fidl_next::FromWire::from_wire(
4507 unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanMatchSet<'de>>>() }
4508 )),
4509
4510 }
4511 }
4512 }
4513
4514 impl<'de> ::fidl_next::FromWireRef<crate::wire::ScheduledScanRequest<'de>>
4515 for ScheduledScanRequest
4516 {
4517 #[inline]
4518 fn from_wire_ref(wire: &crate::wire::ScheduledScanRequest<'de>) -> Self {
4519 Self {
4520
4521
4522 scan_plans: wire.table.get(1)
4523 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4524 unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanPlan>>() }
4525 )),
4526
4527
4528 ssids: wire.table.get(2)
4529 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4530 unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::Vector<'de, u8>>>() }
4531 )),
4532
4533
4534 frequencies: wire.table.get(3)
4535 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4536 unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::Uint32>>() }
4537 )),
4538
4539
4540 min_rssi_threshold: wire.table.get(4)
4541 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4542 unsafe { envelope.deref_unchecked::<i8>() }
4543 )),
4544
4545
4546 relative_rssi_threshold: wire.table.get(5)
4547 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4548 unsafe { envelope.deref_unchecked::<i8>() }
4549 )),
4550
4551
4552 band_rssi_adjustments: wire.table.get(6)
4553 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4554 unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>() }
4555 )),
4556
4557
4558 match_sets: wire.table.get(7)
4559 .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4560 unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanMatchSet<'de>>>() }
4561 )),
4562
4563 }
4564 }
4565 }
4566
4567 #[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"]
4568 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4569 pub struct SecuritySupport {
4570 pub sae: ::core::option::Option<crate::natural::SaeFeature>,
4571
4572 pub mfp: ::core::option::Option<crate::natural::MfpFeature>,
4573
4574 pub owe: ::core::option::Option<crate::natural::OweFeature>,
4575 }
4576
4577 impl SecuritySupport {
4578 fn __max_ordinal(&self) -> usize {
4579 if self.owe.is_some() {
4580 return 3;
4581 }
4582
4583 if self.mfp.is_some() {
4584 return 2;
4585 }
4586
4587 if self.sae.is_some() {
4588 return 1;
4589 }
4590
4591 0
4592 }
4593 }
4594
4595 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SecuritySupport<'static>, ___E>
4596 for SecuritySupport
4597 where
4598 ___E: ::fidl_next::Encoder + ?Sized,
4599 {
4600 #[inline]
4601 fn encode(
4602 mut self,
4603 encoder: &mut ___E,
4604 out: &mut ::core::mem::MaybeUninit<crate::wire::SecuritySupport<'static>>,
4605 _: (),
4606 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4607 ::fidl_next::munge!(let crate::wire::SecuritySupport { table } = out);
4608
4609 let max_ord = self.__max_ordinal();
4610
4611 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4612 ::fidl_next::Wire::zero_padding(&mut out);
4613
4614 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4615 ::fidl_next::wire::Envelope,
4616 >(encoder, max_ord);
4617
4618 for i in 1..=max_ord {
4619 match i {
4620 3 => {
4621 if let Some(value) = self.owe.take() {
4622 ::fidl_next::wire::Envelope::encode_value::<
4623 crate::wire::OweFeature<'static>,
4624 ___E,
4625 >(
4626 value, preallocated.encoder, &mut out, ()
4627 )?;
4628 } else {
4629 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4630 }
4631 }
4632
4633 2 => {
4634 if let Some(value) = self.mfp.take() {
4635 ::fidl_next::wire::Envelope::encode_value::<
4636 crate::wire::MfpFeature<'static>,
4637 ___E,
4638 >(
4639 value, preallocated.encoder, &mut out, ()
4640 )?;
4641 } else {
4642 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4643 }
4644 }
4645
4646 1 => {
4647 if let Some(value) = self.sae.take() {
4648 ::fidl_next::wire::Envelope::encode_value::<
4649 crate::wire::SaeFeature<'static>,
4650 ___E,
4651 >(
4652 value, preallocated.encoder, &mut out, ()
4653 )?;
4654 } else {
4655 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4656 }
4657 }
4658
4659 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4660 }
4661 unsafe {
4662 preallocated.write_next(out.assume_init_ref());
4663 }
4664 }
4665
4666 ::fidl_next::wire::Table::encode_len(table, max_ord);
4667
4668 Ok(())
4669 }
4670 }
4671
4672 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SecuritySupport<'static>, ___E>
4673 for &'a SecuritySupport
4674 where
4675 ___E: ::fidl_next::Encoder + ?Sized,
4676 {
4677 #[inline]
4678 fn encode(
4679 self,
4680 encoder: &mut ___E,
4681 out: &mut ::core::mem::MaybeUninit<crate::wire::SecuritySupport<'static>>,
4682 _: (),
4683 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4684 ::fidl_next::munge!(let crate::wire::SecuritySupport { table } = out);
4685
4686 let max_ord = self.__max_ordinal();
4687
4688 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4689 ::fidl_next::Wire::zero_padding(&mut out);
4690
4691 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4692 ::fidl_next::wire::Envelope,
4693 >(encoder, max_ord);
4694
4695 for i in 1..=max_ord {
4696 match i {
4697 3 => {
4698 if let Some(value) = &self.owe {
4699 ::fidl_next::wire::Envelope::encode_value::<
4700 crate::wire::OweFeature<'static>,
4701 ___E,
4702 >(
4703 value, preallocated.encoder, &mut out, ()
4704 )?;
4705 } else {
4706 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4707 }
4708 }
4709
4710 2 => {
4711 if let Some(value) = &self.mfp {
4712 ::fidl_next::wire::Envelope::encode_value::<
4713 crate::wire::MfpFeature<'static>,
4714 ___E,
4715 >(
4716 value, preallocated.encoder, &mut out, ()
4717 )?;
4718 } else {
4719 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4720 }
4721 }
4722
4723 1 => {
4724 if let Some(value) = &self.sae {
4725 ::fidl_next::wire::Envelope::encode_value::<
4726 crate::wire::SaeFeature<'static>,
4727 ___E,
4728 >(
4729 value, preallocated.encoder, &mut out, ()
4730 )?;
4731 } else {
4732 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4733 }
4734 }
4735
4736 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4737 }
4738 unsafe {
4739 preallocated.write_next(out.assume_init_ref());
4740 }
4741 }
4742
4743 ::fidl_next::wire::Table::encode_len(table, max_ord);
4744
4745 Ok(())
4746 }
4747 }
4748
4749 impl<'de> ::fidl_next::FromWire<crate::wire::SecuritySupport<'de>> for SecuritySupport {
4750 #[inline]
4751 fn from_wire(wire_: crate::wire::SecuritySupport<'de>) -> Self {
4752 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4753
4754 let sae = wire_.table.get(1);
4755
4756 let mfp = wire_.table.get(2);
4757
4758 let owe = wire_.table.get(3);
4759
4760 Self {
4761 sae: sae.map(|envelope| {
4762 ::fidl_next::FromWire::from_wire(unsafe {
4763 envelope.read_unchecked::<crate::wire::SaeFeature<'de>>()
4764 })
4765 }),
4766
4767 mfp: mfp.map(|envelope| {
4768 ::fidl_next::FromWire::from_wire(unsafe {
4769 envelope.read_unchecked::<crate::wire::MfpFeature<'de>>()
4770 })
4771 }),
4772
4773 owe: owe.map(|envelope| {
4774 ::fidl_next::FromWire::from_wire(unsafe {
4775 envelope.read_unchecked::<crate::wire::OweFeature<'de>>()
4776 })
4777 }),
4778 }
4779 }
4780 }
4781
4782 impl<'de> ::fidl_next::FromWireRef<crate::wire::SecuritySupport<'de>> for SecuritySupport {
4783 #[inline]
4784 fn from_wire_ref(wire: &crate::wire::SecuritySupport<'de>) -> Self {
4785 Self {
4786 sae: wire.table.get(1).map(|envelope| {
4787 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4788 envelope.deref_unchecked::<crate::wire::SaeFeature<'de>>()
4789 })
4790 }),
4791
4792 mfp: wire.table.get(2).map(|envelope| {
4793 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4794 envelope.deref_unchecked::<crate::wire::MfpFeature<'de>>()
4795 })
4796 }),
4797
4798 owe: wire.table.get(3).map(|envelope| {
4799 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4800 envelope.deref_unchecked::<crate::wire::OweFeature<'de>>()
4801 })
4802 }),
4803 }
4804 }
4805 }
4806
4807 #[doc = " Features related to spectrum management.\n See IEEE 802.11-2016 4.5.5, 11.8, and 11.9.\n"]
4808 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4809 pub struct SpectrumManagementSupport {
4810 pub dfs: ::core::option::Option<crate::natural::DfsFeature>,
4811 }
4812
4813 impl SpectrumManagementSupport {
4814 fn __max_ordinal(&self) -> usize {
4815 if self.dfs.is_some() {
4816 return 1;
4817 }
4818
4819 0
4820 }
4821 }
4822
4823 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SpectrumManagementSupport<'static>, ___E>
4824 for SpectrumManagementSupport
4825 where
4826 ___E: ::fidl_next::Encoder + ?Sized,
4827 {
4828 #[inline]
4829 fn encode(
4830 mut self,
4831 encoder: &mut ___E,
4832 out: &mut ::core::mem::MaybeUninit<crate::wire::SpectrumManagementSupport<'static>>,
4833 _: (),
4834 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4835 ::fidl_next::munge!(let crate::wire::SpectrumManagementSupport { table } = out);
4836
4837 let max_ord = self.__max_ordinal();
4838
4839 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4840 ::fidl_next::Wire::zero_padding(&mut out);
4841
4842 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4843 ::fidl_next::wire::Envelope,
4844 >(encoder, max_ord);
4845
4846 for i in 1..=max_ord {
4847 match i {
4848 1 => {
4849 if let Some(value) = self.dfs.take() {
4850 ::fidl_next::wire::Envelope::encode_value::<
4851 crate::wire::DfsFeature<'static>,
4852 ___E,
4853 >(
4854 value, preallocated.encoder, &mut out, ()
4855 )?;
4856 } else {
4857 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4858 }
4859 }
4860
4861 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4862 }
4863 unsafe {
4864 preallocated.write_next(out.assume_init_ref());
4865 }
4866 }
4867
4868 ::fidl_next::wire::Table::encode_len(table, max_ord);
4869
4870 Ok(())
4871 }
4872 }
4873
4874 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SpectrumManagementSupport<'static>, ___E>
4875 for &'a SpectrumManagementSupport
4876 where
4877 ___E: ::fidl_next::Encoder + ?Sized,
4878 {
4879 #[inline]
4880 fn encode(
4881 self,
4882 encoder: &mut ___E,
4883 out: &mut ::core::mem::MaybeUninit<crate::wire::SpectrumManagementSupport<'static>>,
4884 _: (),
4885 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4886 ::fidl_next::munge!(let crate::wire::SpectrumManagementSupport { table } = out);
4887
4888 let max_ord = self.__max_ordinal();
4889
4890 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4891 ::fidl_next::Wire::zero_padding(&mut out);
4892
4893 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4894 ::fidl_next::wire::Envelope,
4895 >(encoder, max_ord);
4896
4897 for i in 1..=max_ord {
4898 match i {
4899 1 => {
4900 if let Some(value) = &self.dfs {
4901 ::fidl_next::wire::Envelope::encode_value::<
4902 crate::wire::DfsFeature<'static>,
4903 ___E,
4904 >(
4905 value, preallocated.encoder, &mut out, ()
4906 )?;
4907 } else {
4908 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4909 }
4910 }
4911
4912 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4913 }
4914 unsafe {
4915 preallocated.write_next(out.assume_init_ref());
4916 }
4917 }
4918
4919 ::fidl_next::wire::Table::encode_len(table, max_ord);
4920
4921 Ok(())
4922 }
4923 }
4924
4925 impl<'de> ::fidl_next::FromWire<crate::wire::SpectrumManagementSupport<'de>>
4926 for SpectrumManagementSupport
4927 {
4928 #[inline]
4929 fn from_wire(wire_: crate::wire::SpectrumManagementSupport<'de>) -> Self {
4930 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4931
4932 let dfs = wire_.table.get(1);
4933
4934 Self {
4935 dfs: dfs.map(|envelope| {
4936 ::fidl_next::FromWire::from_wire(unsafe {
4937 envelope.read_unchecked::<crate::wire::DfsFeature<'de>>()
4938 })
4939 }),
4940 }
4941 }
4942 }
4943
4944 impl<'de> ::fidl_next::FromWireRef<crate::wire::SpectrumManagementSupport<'de>>
4945 for SpectrumManagementSupport
4946 {
4947 #[inline]
4948 fn from_wire_ref(wire: &crate::wire::SpectrumManagementSupport<'de>) -> Self {
4949 Self {
4950 dfs: wire.table.get(1).map(|envelope| {
4951 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4952 envelope.deref_unchecked::<crate::wire::DfsFeature<'de>>()
4953 })
4954 }),
4955 }
4956 }
4957 }
4958
4959 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4960 pub struct WlanChannel {
4961 pub primary: u8,
4962
4963 pub cbw: crate::natural::ChannelBandwidth,
4964
4965 pub secondary80: u8,
4966 }
4967
4968 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanChannel, ___E> for WlanChannel
4969 where
4970 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4971 {
4972 #[inline]
4973 fn encode(
4974 self,
4975 encoder_: &mut ___E,
4976 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanChannel>,
4977 _: (),
4978 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4979 ::fidl_next::munge! {
4980 let crate::wire::WlanChannel {
4981 primary,
4982 cbw,
4983 secondary80,
4984
4985 } = out_;
4986 }
4987
4988 ::fidl_next::Encode::encode(self.primary, encoder_, primary, ())?;
4989
4990 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(primary.as_mut_ptr()) };
4991
4992 ::fidl_next::Encode::encode(self.cbw, encoder_, cbw, ())?;
4993
4994 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(cbw.as_mut_ptr()) };
4995
4996 ::fidl_next::Encode::encode(self.secondary80, encoder_, secondary80, ())?;
4997
4998 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(secondary80.as_mut_ptr()) };
4999
5000 Ok(())
5001 }
5002 }
5003
5004 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanChannel, ___E> for &'a WlanChannel
5005 where
5006 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5007 {
5008 #[inline]
5009 fn encode(
5010 self,
5011 encoder_: &mut ___E,
5012 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanChannel>,
5013 _: (),
5014 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5015 ::fidl_next::munge! {
5016 let crate::wire::WlanChannel {
5017 primary,
5018 cbw,
5019 secondary80,
5020
5021 } = out_;
5022 }
5023
5024 ::fidl_next::Encode::encode(&self.primary, encoder_, primary, ())?;
5025
5026 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(primary.as_mut_ptr()) };
5027
5028 ::fidl_next::Encode::encode(&self.cbw, encoder_, cbw, ())?;
5029
5030 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(cbw.as_mut_ptr()) };
5031
5032 ::fidl_next::Encode::encode(&self.secondary80, encoder_, secondary80, ())?;
5033
5034 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(secondary80.as_mut_ptr()) };
5035
5036 Ok(())
5037 }
5038 }
5039
5040 unsafe impl<___E>
5041 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::WlanChannel>, ___E>
5042 for WlanChannel
5043 where
5044 ___E: ::fidl_next::Encoder + ?Sized,
5045 WlanChannel: ::fidl_next::Encode<crate::wire::WlanChannel, ___E>,
5046 {
5047 #[inline]
5048 fn encode_option(
5049 this: ::core::option::Option<Self>,
5050 encoder: &mut ___E,
5051 out: &mut ::core::mem::MaybeUninit<
5052 ::fidl_next::wire::Box<'static, crate::wire::WlanChannel>,
5053 >,
5054 _: (),
5055 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5056 if let Some(inner) = this {
5057 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5058 ::fidl_next::wire::Box::encode_present(out);
5059 } else {
5060 ::fidl_next::wire::Box::encode_absent(out);
5061 }
5062
5063 Ok(())
5064 }
5065 }
5066
5067 unsafe impl<'a, ___E>
5068 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::WlanChannel>, ___E>
5069 for &'a WlanChannel
5070 where
5071 ___E: ::fidl_next::Encoder + ?Sized,
5072 &'a WlanChannel: ::fidl_next::Encode<crate::wire::WlanChannel, ___E>,
5073 {
5074 #[inline]
5075 fn encode_option(
5076 this: ::core::option::Option<Self>,
5077 encoder: &mut ___E,
5078 out: &mut ::core::mem::MaybeUninit<
5079 ::fidl_next::wire::Box<'static, crate::wire::WlanChannel>,
5080 >,
5081 _: (),
5082 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5083 if let Some(inner) = this {
5084 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5085 ::fidl_next::wire::Box::encode_present(out);
5086 } else {
5087 ::fidl_next::wire::Box::encode_absent(out);
5088 }
5089
5090 Ok(())
5091 }
5092 }
5093
5094 impl ::fidl_next::FromWire<crate::wire::WlanChannel> for WlanChannel {
5095 #[inline]
5096 fn from_wire(wire: crate::wire::WlanChannel) -> Self {
5097 Self {
5098 primary: ::fidl_next::FromWire::from_wire(wire.primary),
5099
5100 cbw: ::fidl_next::FromWire::from_wire(wire.cbw),
5101
5102 secondary80: ::fidl_next::FromWire::from_wire(wire.secondary80),
5103 }
5104 }
5105 }
5106
5107 impl ::fidl_next::FromWireRef<crate::wire::WlanChannel> for WlanChannel {
5108 #[inline]
5109 fn from_wire_ref(wire: &crate::wire::WlanChannel) -> Self {
5110 Self {
5111 primary: ::fidl_next::FromWireRef::from_wire_ref(&wire.primary),
5112
5113 cbw: ::fidl_next::FromWireRef::from_wire_ref(&wire.cbw),
5114
5115 secondary80: ::fidl_next::FromWireRef::from_wire_ref(&wire.secondary80),
5116 }
5117 }
5118 }
5119
5120 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5121 #[repr(u8)]
5122 pub enum WlanKeyType {
5123 Pairwise = 1,
5124 Group = 2,
5125 Igtk = 3,
5126 Peer = 4,
5127 UnknownOrdinal_(u8) = 5,
5128 }
5129 impl ::std::convert::From<u8> for WlanKeyType {
5130 fn from(value: u8) -> Self {
5131 match value {
5132 1 => Self::Pairwise,
5133 2 => Self::Group,
5134 3 => Self::Igtk,
5135 4 => Self::Peer,
5136
5137 _ => Self::UnknownOrdinal_(value),
5138 }
5139 }
5140 }
5141
5142 impl ::std::convert::From<WlanKeyType> for u8 {
5143 fn from(value: WlanKeyType) -> Self {
5144 match value {
5145 WlanKeyType::Pairwise => 1,
5146 WlanKeyType::Group => 2,
5147 WlanKeyType::Igtk => 3,
5148 WlanKeyType::Peer => 4,
5149
5150 WlanKeyType::UnknownOrdinal_(value) => value,
5151 }
5152 }
5153 }
5154
5155 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanKeyType, ___E> for WlanKeyType
5156 where
5157 ___E: ?Sized,
5158 {
5159 #[inline]
5160 fn encode(
5161 self,
5162 encoder: &mut ___E,
5163 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanKeyType>,
5164 _: (),
5165 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5166 ::fidl_next::Encode::encode(&self, encoder, out, ())
5167 }
5168 }
5169
5170 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanKeyType, ___E> for &'a WlanKeyType
5171 where
5172 ___E: ?Sized,
5173 {
5174 #[inline]
5175 fn encode(
5176 self,
5177 encoder: &mut ___E,
5178 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanKeyType>,
5179 _: (),
5180 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5181 ::fidl_next::munge!(let crate::wire::WlanKeyType { value } = out);
5182 let _ = value.write(u8::from(match *self {
5183 WlanKeyType::Pairwise => 1,
5184
5185 WlanKeyType::Group => 2,
5186
5187 WlanKeyType::Igtk => 3,
5188
5189 WlanKeyType::Peer => 4,
5190
5191 WlanKeyType::UnknownOrdinal_(value) => value,
5192 }));
5193
5194 Ok(())
5195 }
5196 }
5197
5198 impl ::core::convert::From<crate::wire::WlanKeyType> for WlanKeyType {
5199 fn from(wire: crate::wire::WlanKeyType) -> Self {
5200 match u8::from(wire.value) {
5201 1 => Self::Pairwise,
5202
5203 2 => Self::Group,
5204
5205 3 => Self::Igtk,
5206
5207 4 => Self::Peer,
5208
5209 value => Self::UnknownOrdinal_(value),
5210 }
5211 }
5212 }
5213
5214 impl ::fidl_next::FromWire<crate::wire::WlanKeyType> for WlanKeyType {
5215 #[inline]
5216 fn from_wire(wire: crate::wire::WlanKeyType) -> Self {
5217 Self::from(wire)
5218 }
5219 }
5220
5221 impl ::fidl_next::FromWireRef<crate::wire::WlanKeyType> for WlanKeyType {
5222 #[inline]
5223 fn from_wire_ref(wire: &crate::wire::WlanKeyType) -> Self {
5224 Self::from(*wire)
5225 }
5226 }
5227
5228 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5229 #[repr(u32)]
5230 pub enum WlanMacRole {
5231 Client = 1,
5232 Ap = 2,
5233 Mesh = 3,
5234 UnknownOrdinal_(u32) = 4,
5235 }
5236 impl ::std::convert::From<u32> for WlanMacRole {
5237 fn from(value: u32) -> Self {
5238 match value {
5239 1 => Self::Client,
5240 2 => Self::Ap,
5241 3 => Self::Mesh,
5242
5243 _ => Self::UnknownOrdinal_(value),
5244 }
5245 }
5246 }
5247
5248 impl ::std::convert::From<WlanMacRole> for u32 {
5249 fn from(value: WlanMacRole) -> Self {
5250 match value {
5251 WlanMacRole::Client => 1,
5252 WlanMacRole::Ap => 2,
5253 WlanMacRole::Mesh => 3,
5254
5255 WlanMacRole::UnknownOrdinal_(value) => value,
5256 }
5257 }
5258 }
5259
5260 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanMacRole, ___E> for WlanMacRole
5261 where
5262 ___E: ?Sized,
5263 {
5264 #[inline]
5265 fn encode(
5266 self,
5267 encoder: &mut ___E,
5268 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanMacRole>,
5269 _: (),
5270 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5271 ::fidl_next::Encode::encode(&self, encoder, out, ())
5272 }
5273 }
5274
5275 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanMacRole, ___E> for &'a WlanMacRole
5276 where
5277 ___E: ?Sized,
5278 {
5279 #[inline]
5280 fn encode(
5281 self,
5282 encoder: &mut ___E,
5283 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanMacRole>,
5284 _: (),
5285 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5286 ::fidl_next::munge!(let crate::wire::WlanMacRole { value } = out);
5287 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
5288 WlanMacRole::Client => 1,
5289
5290 WlanMacRole::Ap => 2,
5291
5292 WlanMacRole::Mesh => 3,
5293
5294 WlanMacRole::UnknownOrdinal_(value) => value,
5295 }));
5296
5297 Ok(())
5298 }
5299 }
5300
5301 impl ::core::convert::From<crate::wire::WlanMacRole> for WlanMacRole {
5302 fn from(wire: crate::wire::WlanMacRole) -> Self {
5303 match u32::from(wire.value) {
5304 1 => Self::Client,
5305
5306 2 => Self::Ap,
5307
5308 3 => Self::Mesh,
5309
5310 value => Self::UnknownOrdinal_(value),
5311 }
5312 }
5313 }
5314
5315 impl ::fidl_next::FromWire<crate::wire::WlanMacRole> for WlanMacRole {
5316 #[inline]
5317 fn from_wire(wire: crate::wire::WlanMacRole) -> Self {
5318 Self::from(wire)
5319 }
5320 }
5321
5322 impl ::fidl_next::FromWireRef<crate::wire::WlanMacRole> for WlanMacRole {
5323 #[inline]
5324 fn from_wire_ref(wire: &crate::wire::WlanMacRole) -> Self {
5325 Self::from(*wire)
5326 }
5327 }
5328
5329 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5330 #[repr(u32)]
5331 pub enum WlanPhyType {
5332 Dsss = 1,
5333 Hr = 2,
5334 Ofdm = 3,
5335 Erp = 4,
5336 Ht = 5,
5337 Dmg = 6,
5338 Vht = 7,
5339 Tvht = 8,
5340 S1G = 9,
5341 Cdmg = 10,
5342 Cmmg = 11,
5343 He = 12,
5344 UnknownOrdinal_(u32) = 13,
5345 }
5346 impl ::std::convert::From<u32> for WlanPhyType {
5347 fn from(value: u32) -> Self {
5348 match value {
5349 1 => Self::Dsss,
5350 2 => Self::Hr,
5351 3 => Self::Ofdm,
5352 4 => Self::Erp,
5353 5 => Self::Ht,
5354 6 => Self::Dmg,
5355 7 => Self::Vht,
5356 8 => Self::Tvht,
5357 9 => Self::S1G,
5358 10 => Self::Cdmg,
5359 11 => Self::Cmmg,
5360 12 => Self::He,
5361
5362 _ => Self::UnknownOrdinal_(value),
5363 }
5364 }
5365 }
5366
5367 impl ::std::convert::From<WlanPhyType> for u32 {
5368 fn from(value: WlanPhyType) -> Self {
5369 match value {
5370 WlanPhyType::Dsss => 1,
5371 WlanPhyType::Hr => 2,
5372 WlanPhyType::Ofdm => 3,
5373 WlanPhyType::Erp => 4,
5374 WlanPhyType::Ht => 5,
5375 WlanPhyType::Dmg => 6,
5376 WlanPhyType::Vht => 7,
5377 WlanPhyType::Tvht => 8,
5378 WlanPhyType::S1G => 9,
5379 WlanPhyType::Cdmg => 10,
5380 WlanPhyType::Cmmg => 11,
5381 WlanPhyType::He => 12,
5382
5383 WlanPhyType::UnknownOrdinal_(value) => value,
5384 }
5385 }
5386 }
5387
5388 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanPhyType, ___E> for WlanPhyType
5389 where
5390 ___E: ?Sized,
5391 {
5392 #[inline]
5393 fn encode(
5394 self,
5395 encoder: &mut ___E,
5396 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanPhyType>,
5397 _: (),
5398 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5399 ::fidl_next::Encode::encode(&self, encoder, out, ())
5400 }
5401 }
5402
5403 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanPhyType, ___E> for &'a WlanPhyType
5404 where
5405 ___E: ?Sized,
5406 {
5407 #[inline]
5408 fn encode(
5409 self,
5410 encoder: &mut ___E,
5411 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanPhyType>,
5412 _: (),
5413 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5414 ::fidl_next::munge!(let crate::wire::WlanPhyType { value } = out);
5415 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
5416 WlanPhyType::Dsss => 1,
5417
5418 WlanPhyType::Hr => 2,
5419
5420 WlanPhyType::Ofdm => 3,
5421
5422 WlanPhyType::Erp => 4,
5423
5424 WlanPhyType::Ht => 5,
5425
5426 WlanPhyType::Dmg => 6,
5427
5428 WlanPhyType::Vht => 7,
5429
5430 WlanPhyType::Tvht => 8,
5431
5432 WlanPhyType::S1G => 9,
5433
5434 WlanPhyType::Cdmg => 10,
5435
5436 WlanPhyType::Cmmg => 11,
5437
5438 WlanPhyType::He => 12,
5439
5440 WlanPhyType::UnknownOrdinal_(value) => value,
5441 }));
5442
5443 Ok(())
5444 }
5445 }
5446
5447 impl ::core::convert::From<crate::wire::WlanPhyType> for WlanPhyType {
5448 fn from(wire: crate::wire::WlanPhyType) -> Self {
5449 match u32::from(wire.value) {
5450 1 => Self::Dsss,
5451
5452 2 => Self::Hr,
5453
5454 3 => Self::Ofdm,
5455
5456 4 => Self::Erp,
5457
5458 5 => Self::Ht,
5459
5460 6 => Self::Dmg,
5461
5462 7 => Self::Vht,
5463
5464 8 => Self::Tvht,
5465
5466 9 => Self::S1G,
5467
5468 10 => Self::Cdmg,
5469
5470 11 => Self::Cmmg,
5471
5472 12 => Self::He,
5473
5474 value => Self::UnknownOrdinal_(value),
5475 }
5476 }
5477 }
5478
5479 impl ::fidl_next::FromWire<crate::wire::WlanPhyType> for WlanPhyType {
5480 #[inline]
5481 fn from_wire(wire: crate::wire::WlanPhyType) -> Self {
5482 Self::from(wire)
5483 }
5484 }
5485
5486 impl ::fidl_next::FromWireRef<crate::wire::WlanPhyType> for WlanPhyType {
5487 #[inline]
5488 fn from_wire_ref(wire: &crate::wire::WlanPhyType) -> Self {
5489 Self::from(*wire)
5490 }
5491 }
5492
5493 pub type WlanSoftmacHardwareCapability = u32;
5494
5495 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5496 #[repr(u32)]
5497 pub enum WlanSoftmacHardwareCapabilityBit {
5498 ShortPreamble = 32,
5499 SpectrumMgmt = 256,
5500 Qos = 512,
5501 ShortSlotTime = 1024,
5502 RadioMsmt = 4096,
5503 SimultaneousClientAp = 65536,
5504 }
5505 impl ::core::convert::TryFrom<u32> for WlanSoftmacHardwareCapabilityBit {
5506 type Error = ::fidl_next::UnknownStrictEnumMemberError;
5507 fn try_from(
5508 value: u32,
5509 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
5510 match value {
5511 32 => Ok(Self::ShortPreamble),
5512 256 => Ok(Self::SpectrumMgmt),
5513 512 => Ok(Self::Qos),
5514 1024 => Ok(Self::ShortSlotTime),
5515 4096 => Ok(Self::RadioMsmt),
5516 65536 => Ok(Self::SimultaneousClientAp),
5517
5518 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
5519 }
5520 }
5521 }
5522
5523 impl ::std::convert::From<WlanSoftmacHardwareCapabilityBit> for u32 {
5524 fn from(value: WlanSoftmacHardwareCapabilityBit) -> Self {
5525 match value {
5526 WlanSoftmacHardwareCapabilityBit::ShortPreamble => 32,
5527 WlanSoftmacHardwareCapabilityBit::SpectrumMgmt => 256,
5528 WlanSoftmacHardwareCapabilityBit::Qos => 512,
5529 WlanSoftmacHardwareCapabilityBit::ShortSlotTime => 1024,
5530 WlanSoftmacHardwareCapabilityBit::RadioMsmt => 4096,
5531 WlanSoftmacHardwareCapabilityBit::SimultaneousClientAp => 65536,
5532 }
5533 }
5534 }
5535
5536 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanSoftmacHardwareCapabilityBit, ___E>
5537 for WlanSoftmacHardwareCapabilityBit
5538 where
5539 ___E: ?Sized,
5540 {
5541 #[inline]
5542 fn encode(
5543 self,
5544 encoder: &mut ___E,
5545 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanSoftmacHardwareCapabilityBit>,
5546 _: (),
5547 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5548 ::fidl_next::Encode::encode(&self, encoder, out, ())
5549 }
5550 }
5551
5552 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanSoftmacHardwareCapabilityBit, ___E>
5553 for &'a WlanSoftmacHardwareCapabilityBit
5554 where
5555 ___E: ?Sized,
5556 {
5557 #[inline]
5558 fn encode(
5559 self,
5560 encoder: &mut ___E,
5561 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanSoftmacHardwareCapabilityBit>,
5562 _: (),
5563 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5564 ::fidl_next::munge!(let crate::wire::WlanSoftmacHardwareCapabilityBit { value } = out);
5565 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
5566 WlanSoftmacHardwareCapabilityBit::ShortPreamble => 32,
5567
5568 WlanSoftmacHardwareCapabilityBit::SpectrumMgmt => 256,
5569
5570 WlanSoftmacHardwareCapabilityBit::Qos => 512,
5571
5572 WlanSoftmacHardwareCapabilityBit::ShortSlotTime => 1024,
5573
5574 WlanSoftmacHardwareCapabilityBit::RadioMsmt => 4096,
5575
5576 WlanSoftmacHardwareCapabilityBit::SimultaneousClientAp => 65536,
5577 }));
5578
5579 Ok(())
5580 }
5581 }
5582
5583 impl ::core::convert::From<crate::wire::WlanSoftmacHardwareCapabilityBit>
5584 for WlanSoftmacHardwareCapabilityBit
5585 {
5586 fn from(wire: crate::wire::WlanSoftmacHardwareCapabilityBit) -> Self {
5587 match u32::from(wire.value) {
5588 32 => Self::ShortPreamble,
5589
5590 256 => Self::SpectrumMgmt,
5591
5592 512 => Self::Qos,
5593
5594 1024 => Self::ShortSlotTime,
5595
5596 4096 => Self::RadioMsmt,
5597
5598 65536 => Self::SimultaneousClientAp,
5599
5600 _ => unsafe { ::core::hint::unreachable_unchecked() },
5601 }
5602 }
5603 }
5604
5605 impl ::fidl_next::FromWire<crate::wire::WlanSoftmacHardwareCapabilityBit>
5606 for WlanSoftmacHardwareCapabilityBit
5607 {
5608 #[inline]
5609 fn from_wire(wire: crate::wire::WlanSoftmacHardwareCapabilityBit) -> Self {
5610 Self::from(wire)
5611 }
5612 }
5613
5614 impl ::fidl_next::FromWireRef<crate::wire::WlanSoftmacHardwareCapabilityBit>
5615 for WlanSoftmacHardwareCapabilityBit
5616 {
5617 #[inline]
5618 fn from_wire_ref(wire: &crate::wire::WlanSoftmacHardwareCapabilityBit) -> Self {
5619 Self::from(*wire)
5620 }
5621 }
5622
5623 #[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"]
5624 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5625 pub struct WlanTxResultEntry {
5626 pub tx_vector_idx: u16,
5627
5628 pub attempts: u8,
5629 }
5630
5631 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanTxResultEntry, ___E> for WlanTxResultEntry
5632 where
5633 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5634 {
5635 #[inline]
5636 fn encode(
5637 self,
5638 encoder_: &mut ___E,
5639 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResultEntry>,
5640 _: (),
5641 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5642 ::fidl_next::munge! {
5643 let crate::wire::WlanTxResultEntry {
5644 tx_vector_idx,
5645 attempts,
5646
5647 } = out_;
5648 }
5649
5650 ::fidl_next::Encode::encode(self.tx_vector_idx, encoder_, tx_vector_idx, ())?;
5651
5652 let mut _field =
5653 unsafe { ::fidl_next::Slot::new_unchecked(tx_vector_idx.as_mut_ptr()) };
5654
5655 ::fidl_next::Encode::encode(self.attempts, encoder_, attempts, ())?;
5656
5657 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attempts.as_mut_ptr()) };
5658
5659 Ok(())
5660 }
5661 }
5662
5663 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanTxResultEntry, ___E>
5664 for &'a WlanTxResultEntry
5665 where
5666 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5667 {
5668 #[inline]
5669 fn encode(
5670 self,
5671 encoder_: &mut ___E,
5672 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResultEntry>,
5673 _: (),
5674 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5675 ::fidl_next::munge! {
5676 let crate::wire::WlanTxResultEntry {
5677 tx_vector_idx,
5678 attempts,
5679
5680 } = out_;
5681 }
5682
5683 ::fidl_next::Encode::encode(&self.tx_vector_idx, encoder_, tx_vector_idx, ())?;
5684
5685 let mut _field =
5686 unsafe { ::fidl_next::Slot::new_unchecked(tx_vector_idx.as_mut_ptr()) };
5687
5688 ::fidl_next::Encode::encode(&self.attempts, encoder_, attempts, ())?;
5689
5690 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attempts.as_mut_ptr()) };
5691
5692 Ok(())
5693 }
5694 }
5695
5696 unsafe impl<___E>
5697 ::fidl_next::EncodeOption<
5698 ::fidl_next::wire::Box<'static, crate::wire::WlanTxResultEntry>,
5699 ___E,
5700 > for WlanTxResultEntry
5701 where
5702 ___E: ::fidl_next::Encoder + ?Sized,
5703 WlanTxResultEntry: ::fidl_next::Encode<crate::wire::WlanTxResultEntry, ___E>,
5704 {
5705 #[inline]
5706 fn encode_option(
5707 this: ::core::option::Option<Self>,
5708 encoder: &mut ___E,
5709 out: &mut ::core::mem::MaybeUninit<
5710 ::fidl_next::wire::Box<'static, crate::wire::WlanTxResultEntry>,
5711 >,
5712 _: (),
5713 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5714 if let Some(inner) = this {
5715 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5716 ::fidl_next::wire::Box::encode_present(out);
5717 } else {
5718 ::fidl_next::wire::Box::encode_absent(out);
5719 }
5720
5721 Ok(())
5722 }
5723 }
5724
5725 unsafe impl<'a, ___E>
5726 ::fidl_next::EncodeOption<
5727 ::fidl_next::wire::Box<'static, crate::wire::WlanTxResultEntry>,
5728 ___E,
5729 > for &'a WlanTxResultEntry
5730 where
5731 ___E: ::fidl_next::Encoder + ?Sized,
5732 &'a WlanTxResultEntry: ::fidl_next::Encode<crate::wire::WlanTxResultEntry, ___E>,
5733 {
5734 #[inline]
5735 fn encode_option(
5736 this: ::core::option::Option<Self>,
5737 encoder: &mut ___E,
5738 out: &mut ::core::mem::MaybeUninit<
5739 ::fidl_next::wire::Box<'static, crate::wire::WlanTxResultEntry>,
5740 >,
5741 _: (),
5742 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5743 if let Some(inner) = this {
5744 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5745 ::fidl_next::wire::Box::encode_present(out);
5746 } else {
5747 ::fidl_next::wire::Box::encode_absent(out);
5748 }
5749
5750 Ok(())
5751 }
5752 }
5753
5754 impl ::fidl_next::FromWire<crate::wire::WlanTxResultEntry> for WlanTxResultEntry {
5755 #[inline]
5756 fn from_wire(wire: crate::wire::WlanTxResultEntry) -> Self {
5757 Self {
5758 tx_vector_idx: ::fidl_next::FromWire::from_wire(wire.tx_vector_idx),
5759
5760 attempts: ::fidl_next::FromWire::from_wire(wire.attempts),
5761 }
5762 }
5763 }
5764
5765 impl ::fidl_next::FromWireRef<crate::wire::WlanTxResultEntry> for WlanTxResultEntry {
5766 #[inline]
5767 fn from_wire_ref(wire: &crate::wire::WlanTxResultEntry) -> Self {
5768 Self {
5769 tx_vector_idx: ::fidl_next::FromWireRef::from_wire_ref(&wire.tx_vector_idx),
5770
5771 attempts: ::fidl_next::FromWireRef::from_wire_ref(&wire.attempts),
5772 }
5773 }
5774 }
5775
5776 #[doc = " Outcome of a packet transmission.\n"]
5777 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5778 #[repr(u8)]
5779 pub enum WlanTxResultCode {
5780 Failed = 0,
5781 Success = 1,
5782 UnknownOrdinal_(u8) = 2,
5783 }
5784 impl ::std::convert::From<u8> for WlanTxResultCode {
5785 fn from(value: u8) -> Self {
5786 match value {
5787 0 => Self::Failed,
5788 1 => Self::Success,
5789
5790 _ => Self::UnknownOrdinal_(value),
5791 }
5792 }
5793 }
5794
5795 impl ::std::convert::From<WlanTxResultCode> for u8 {
5796 fn from(value: WlanTxResultCode) -> Self {
5797 match value {
5798 WlanTxResultCode::Failed => 0,
5799 WlanTxResultCode::Success => 1,
5800
5801 WlanTxResultCode::UnknownOrdinal_(value) => value,
5802 }
5803 }
5804 }
5805
5806 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanTxResultCode, ___E> for WlanTxResultCode
5807 where
5808 ___E: ?Sized,
5809 {
5810 #[inline]
5811 fn encode(
5812 self,
5813 encoder: &mut ___E,
5814 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResultCode>,
5815 _: (),
5816 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5817 ::fidl_next::Encode::encode(&self, encoder, out, ())
5818 }
5819 }
5820
5821 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanTxResultCode, ___E>
5822 for &'a WlanTxResultCode
5823 where
5824 ___E: ?Sized,
5825 {
5826 #[inline]
5827 fn encode(
5828 self,
5829 encoder: &mut ___E,
5830 out: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResultCode>,
5831 _: (),
5832 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5833 ::fidl_next::munge!(let crate::wire::WlanTxResultCode { value } = out);
5834 let _ = value.write(u8::from(match *self {
5835 WlanTxResultCode::Failed => 0,
5836
5837 WlanTxResultCode::Success => 1,
5838
5839 WlanTxResultCode::UnknownOrdinal_(value) => value,
5840 }));
5841
5842 Ok(())
5843 }
5844 }
5845
5846 impl ::core::convert::From<crate::wire::WlanTxResultCode> for WlanTxResultCode {
5847 fn from(wire: crate::wire::WlanTxResultCode) -> Self {
5848 match u8::from(wire.value) {
5849 0 => Self::Failed,
5850
5851 1 => Self::Success,
5852
5853 value => Self::UnknownOrdinal_(value),
5854 }
5855 }
5856 }
5857
5858 impl ::fidl_next::FromWire<crate::wire::WlanTxResultCode> for WlanTxResultCode {
5859 #[inline]
5860 fn from_wire(wire: crate::wire::WlanTxResultCode) -> Self {
5861 Self::from(wire)
5862 }
5863 }
5864
5865 impl ::fidl_next::FromWireRef<crate::wire::WlanTxResultCode> for WlanTxResultCode {
5866 #[inline]
5867 fn from_wire_ref(wire: &crate::wire::WlanTxResultCode) -> Self {
5868 Self::from(*wire)
5869 }
5870 }
5871
5872 #[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"]
5873 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5874 pub struct WlanTxResult {
5875 pub tx_result_entry: [crate::natural::WlanTxResultEntry; 8],
5876
5877 pub peer_addr: [u8; 6],
5878
5879 pub result_code: crate::natural::WlanTxResultCode,
5880 }
5881
5882 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanTxResult, ___E> for WlanTxResult
5883 where
5884 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5885 {
5886 #[inline]
5887 fn encode(
5888 self,
5889 encoder_: &mut ___E,
5890 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResult>,
5891 _: (),
5892 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5893 ::fidl_next::munge! {
5894 let crate::wire::WlanTxResult {
5895 tx_result_entry,
5896 peer_addr,
5897 result_code,
5898
5899 } = out_;
5900 }
5901
5902 ::fidl_next::Encode::encode(self.tx_result_entry, encoder_, tx_result_entry, ())?;
5903
5904 let mut _field =
5905 unsafe { ::fidl_next::Slot::new_unchecked(tx_result_entry.as_mut_ptr()) };
5906
5907 ::fidl_next::Encode::encode(self.peer_addr, encoder_, peer_addr, ())?;
5908
5909 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(peer_addr.as_mut_ptr()) };
5910
5911 ::fidl_next::Encode::encode(self.result_code, encoder_, result_code, ())?;
5912
5913 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(result_code.as_mut_ptr()) };
5914
5915 Ok(())
5916 }
5917 }
5918
5919 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanTxResult, ___E> for &'a WlanTxResult
5920 where
5921 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5922 {
5923 #[inline]
5924 fn encode(
5925 self,
5926 encoder_: &mut ___E,
5927 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResult>,
5928 _: (),
5929 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5930 ::fidl_next::munge! {
5931 let crate::wire::WlanTxResult {
5932 tx_result_entry,
5933 peer_addr,
5934 result_code,
5935
5936 } = out_;
5937 }
5938
5939 ::fidl_next::Encode::encode(&self.tx_result_entry, encoder_, tx_result_entry, ())?;
5940
5941 let mut _field =
5942 unsafe { ::fidl_next::Slot::new_unchecked(tx_result_entry.as_mut_ptr()) };
5943
5944 ::fidl_next::Encode::encode(&self.peer_addr, encoder_, peer_addr, ())?;
5945
5946 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(peer_addr.as_mut_ptr()) };
5947
5948 ::fidl_next::Encode::encode(&self.result_code, encoder_, result_code, ())?;
5949
5950 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(result_code.as_mut_ptr()) };
5951
5952 Ok(())
5953 }
5954 }
5955
5956 unsafe impl<___E>
5957 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::WlanTxResult>, ___E>
5958 for WlanTxResult
5959 where
5960 ___E: ::fidl_next::Encoder + ?Sized,
5961 WlanTxResult: ::fidl_next::Encode<crate::wire::WlanTxResult, ___E>,
5962 {
5963 #[inline]
5964 fn encode_option(
5965 this: ::core::option::Option<Self>,
5966 encoder: &mut ___E,
5967 out: &mut ::core::mem::MaybeUninit<
5968 ::fidl_next::wire::Box<'static, crate::wire::WlanTxResult>,
5969 >,
5970 _: (),
5971 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5972 if let Some(inner) = this {
5973 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5974 ::fidl_next::wire::Box::encode_present(out);
5975 } else {
5976 ::fidl_next::wire::Box::encode_absent(out);
5977 }
5978
5979 Ok(())
5980 }
5981 }
5982
5983 unsafe impl<'a, ___E>
5984 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::WlanTxResult>, ___E>
5985 for &'a WlanTxResult
5986 where
5987 ___E: ::fidl_next::Encoder + ?Sized,
5988 &'a WlanTxResult: ::fidl_next::Encode<crate::wire::WlanTxResult, ___E>,
5989 {
5990 #[inline]
5991 fn encode_option(
5992 this: ::core::option::Option<Self>,
5993 encoder: &mut ___E,
5994 out: &mut ::core::mem::MaybeUninit<
5995 ::fidl_next::wire::Box<'static, crate::wire::WlanTxResult>,
5996 >,
5997 _: (),
5998 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5999 if let Some(inner) = this {
6000 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6001 ::fidl_next::wire::Box::encode_present(out);
6002 } else {
6003 ::fidl_next::wire::Box::encode_absent(out);
6004 }
6005
6006 Ok(())
6007 }
6008 }
6009
6010 impl ::fidl_next::FromWire<crate::wire::WlanTxResult> for WlanTxResult {
6011 #[inline]
6012 fn from_wire(wire: crate::wire::WlanTxResult) -> Self {
6013 Self {
6014 tx_result_entry: ::fidl_next::FromWire::from_wire(wire.tx_result_entry),
6015
6016 peer_addr: ::fidl_next::FromWire::from_wire(wire.peer_addr),
6017
6018 result_code: ::fidl_next::FromWire::from_wire(wire.result_code),
6019 }
6020 }
6021 }
6022
6023 impl ::fidl_next::FromWireRef<crate::wire::WlanTxResult> for WlanTxResult {
6024 #[inline]
6025 fn from_wire_ref(wire: &crate::wire::WlanTxResult) -> Self {
6026 Self {
6027 tx_result_entry: ::fidl_next::FromWireRef::from_wire_ref(&wire.tx_result_entry),
6028
6029 peer_addr: ::fidl_next::FromWireRef::from_wire_ref(&wire.peer_addr),
6030
6031 result_code: ::fidl_next::FromWireRef::from_wire_ref(&wire.result_code),
6032 }
6033 }
6034 }
6035
6036 #[doc = " WFA WMM v1.2, 2.2.2\n"]
6037 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6038 pub struct WlanWmmAccessCategoryParameters {
6039 pub ecw_min: u8,
6040
6041 pub ecw_max: u8,
6042
6043 pub aifsn: u8,
6044
6045 pub txop_limit: u16,
6046
6047 pub acm: bool,
6048 }
6049
6050 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>
6051 for WlanWmmAccessCategoryParameters
6052 where
6053 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6054 {
6055 #[inline]
6056 fn encode(
6057 self,
6058 encoder_: &mut ___E,
6059 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanWmmAccessCategoryParameters>,
6060 _: (),
6061 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6062 ::fidl_next::munge! {
6063 let crate::wire::WlanWmmAccessCategoryParameters {
6064 ecw_min,
6065 ecw_max,
6066 aifsn,
6067 txop_limit,
6068 acm,
6069
6070 } = out_;
6071 }
6072
6073 ::fidl_next::Encode::encode(self.ecw_min, encoder_, ecw_min, ())?;
6074
6075 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_min.as_mut_ptr()) };
6076
6077 ::fidl_next::Encode::encode(self.ecw_max, encoder_, ecw_max, ())?;
6078
6079 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_max.as_mut_ptr()) };
6080
6081 ::fidl_next::Encode::encode(self.aifsn, encoder_, aifsn, ())?;
6082
6083 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(aifsn.as_mut_ptr()) };
6084
6085 ::fidl_next::Encode::encode(self.txop_limit, encoder_, txop_limit, ())?;
6086
6087 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(txop_limit.as_mut_ptr()) };
6088
6089 ::fidl_next::Encode::encode(self.acm, encoder_, acm, ())?;
6090
6091 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(acm.as_mut_ptr()) };
6092
6093 Ok(())
6094 }
6095 }
6096
6097 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>
6098 for &'a WlanWmmAccessCategoryParameters
6099 where
6100 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6101 {
6102 #[inline]
6103 fn encode(
6104 self,
6105 encoder_: &mut ___E,
6106 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanWmmAccessCategoryParameters>,
6107 _: (),
6108 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6109 ::fidl_next::munge! {
6110 let crate::wire::WlanWmmAccessCategoryParameters {
6111 ecw_min,
6112 ecw_max,
6113 aifsn,
6114 txop_limit,
6115 acm,
6116
6117 } = out_;
6118 }
6119
6120 ::fidl_next::Encode::encode(&self.ecw_min, encoder_, ecw_min, ())?;
6121
6122 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_min.as_mut_ptr()) };
6123
6124 ::fidl_next::Encode::encode(&self.ecw_max, encoder_, ecw_max, ())?;
6125
6126 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_max.as_mut_ptr()) };
6127
6128 ::fidl_next::Encode::encode(&self.aifsn, encoder_, aifsn, ())?;
6129
6130 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(aifsn.as_mut_ptr()) };
6131
6132 ::fidl_next::Encode::encode(&self.txop_limit, encoder_, txop_limit, ())?;
6133
6134 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(txop_limit.as_mut_ptr()) };
6135
6136 ::fidl_next::Encode::encode(&self.acm, encoder_, acm, ())?;
6137
6138 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(acm.as_mut_ptr()) };
6139
6140 Ok(())
6141 }
6142 }
6143
6144 unsafe impl<___E>
6145 ::fidl_next::EncodeOption<
6146 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmAccessCategoryParameters>,
6147 ___E,
6148 > for WlanWmmAccessCategoryParameters
6149 where
6150 ___E: ::fidl_next::Encoder + ?Sized,
6151 WlanWmmAccessCategoryParameters:
6152 ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>,
6153 {
6154 #[inline]
6155 fn encode_option(
6156 this: ::core::option::Option<Self>,
6157 encoder: &mut ___E,
6158 out: &mut ::core::mem::MaybeUninit<
6159 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmAccessCategoryParameters>,
6160 >,
6161 _: (),
6162 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6163 if let Some(inner) = this {
6164 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6165 ::fidl_next::wire::Box::encode_present(out);
6166 } else {
6167 ::fidl_next::wire::Box::encode_absent(out);
6168 }
6169
6170 Ok(())
6171 }
6172 }
6173
6174 unsafe impl<'a, ___E>
6175 ::fidl_next::EncodeOption<
6176 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmAccessCategoryParameters>,
6177 ___E,
6178 > for &'a WlanWmmAccessCategoryParameters
6179 where
6180 ___E: ::fidl_next::Encoder + ?Sized,
6181 &'a WlanWmmAccessCategoryParameters:
6182 ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>,
6183 {
6184 #[inline]
6185 fn encode_option(
6186 this: ::core::option::Option<Self>,
6187 encoder: &mut ___E,
6188 out: &mut ::core::mem::MaybeUninit<
6189 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmAccessCategoryParameters>,
6190 >,
6191 _: (),
6192 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6193 if let Some(inner) = this {
6194 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6195 ::fidl_next::wire::Box::encode_present(out);
6196 } else {
6197 ::fidl_next::wire::Box::encode_absent(out);
6198 }
6199
6200 Ok(())
6201 }
6202 }
6203
6204 impl ::fidl_next::FromWire<crate::wire::WlanWmmAccessCategoryParameters>
6205 for WlanWmmAccessCategoryParameters
6206 {
6207 #[inline]
6208 fn from_wire(wire: crate::wire::WlanWmmAccessCategoryParameters) -> Self {
6209 Self {
6210 ecw_min: ::fidl_next::FromWire::from_wire(wire.ecw_min),
6211
6212 ecw_max: ::fidl_next::FromWire::from_wire(wire.ecw_max),
6213
6214 aifsn: ::fidl_next::FromWire::from_wire(wire.aifsn),
6215
6216 txop_limit: ::fidl_next::FromWire::from_wire(wire.txop_limit),
6217
6218 acm: ::fidl_next::FromWire::from_wire(wire.acm),
6219 }
6220 }
6221 }
6222
6223 impl ::fidl_next::FromWireRef<crate::wire::WlanWmmAccessCategoryParameters>
6224 for WlanWmmAccessCategoryParameters
6225 {
6226 #[inline]
6227 fn from_wire_ref(wire: &crate::wire::WlanWmmAccessCategoryParameters) -> Self {
6228 Self {
6229 ecw_min: ::fidl_next::FromWireRef::from_wire_ref(&wire.ecw_min),
6230
6231 ecw_max: ::fidl_next::FromWireRef::from_wire_ref(&wire.ecw_max),
6232
6233 aifsn: ::fidl_next::FromWireRef::from_wire_ref(&wire.aifsn),
6234
6235 txop_limit: ::fidl_next::FromWireRef::from_wire_ref(&wire.txop_limit),
6236
6237 acm: ::fidl_next::FromWireRef::from_wire_ref(&wire.acm),
6238 }
6239 }
6240 }
6241
6242 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6243 pub struct WlanWmmParameters {
6244 pub apsd: bool,
6245
6246 pub ac_be_params: crate::natural::WlanWmmAccessCategoryParameters,
6247
6248 pub ac_bk_params: crate::natural::WlanWmmAccessCategoryParameters,
6249
6250 pub ac_vi_params: crate::natural::WlanWmmAccessCategoryParameters,
6251
6252 pub ac_vo_params: crate::natural::WlanWmmAccessCategoryParameters,
6253 }
6254
6255 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanWmmParameters, ___E> for WlanWmmParameters
6256 where
6257 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6258 {
6259 #[inline]
6260 fn encode(
6261 self,
6262 encoder_: &mut ___E,
6263 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanWmmParameters>,
6264 _: (),
6265 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6266 ::fidl_next::munge! {
6267 let crate::wire::WlanWmmParameters {
6268 apsd,
6269 ac_be_params,
6270 ac_bk_params,
6271 ac_vi_params,
6272 ac_vo_params,
6273
6274 } = out_;
6275 }
6276
6277 ::fidl_next::Encode::encode(self.apsd, encoder_, apsd, ())?;
6278
6279 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(apsd.as_mut_ptr()) };
6280
6281 ::fidl_next::Encode::encode(self.ac_be_params, encoder_, ac_be_params, ())?;
6282
6283 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_be_params.as_mut_ptr()) };
6284
6285 ::fidl_next::Encode::encode(self.ac_bk_params, encoder_, ac_bk_params, ())?;
6286
6287 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_bk_params.as_mut_ptr()) };
6288
6289 ::fidl_next::Encode::encode(self.ac_vi_params, encoder_, ac_vi_params, ())?;
6290
6291 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vi_params.as_mut_ptr()) };
6292
6293 ::fidl_next::Encode::encode(self.ac_vo_params, encoder_, ac_vo_params, ())?;
6294
6295 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vo_params.as_mut_ptr()) };
6296
6297 Ok(())
6298 }
6299 }
6300
6301 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WlanWmmParameters, ___E>
6302 for &'a WlanWmmParameters
6303 where
6304 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6305 {
6306 #[inline]
6307 fn encode(
6308 self,
6309 encoder_: &mut ___E,
6310 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanWmmParameters>,
6311 _: (),
6312 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6313 ::fidl_next::munge! {
6314 let crate::wire::WlanWmmParameters {
6315 apsd,
6316 ac_be_params,
6317 ac_bk_params,
6318 ac_vi_params,
6319 ac_vo_params,
6320
6321 } = out_;
6322 }
6323
6324 ::fidl_next::Encode::encode(&self.apsd, encoder_, apsd, ())?;
6325
6326 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(apsd.as_mut_ptr()) };
6327
6328 ::fidl_next::Encode::encode(&self.ac_be_params, encoder_, ac_be_params, ())?;
6329
6330 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_be_params.as_mut_ptr()) };
6331
6332 ::fidl_next::Encode::encode(&self.ac_bk_params, encoder_, ac_bk_params, ())?;
6333
6334 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_bk_params.as_mut_ptr()) };
6335
6336 ::fidl_next::Encode::encode(&self.ac_vi_params, encoder_, ac_vi_params, ())?;
6337
6338 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vi_params.as_mut_ptr()) };
6339
6340 ::fidl_next::Encode::encode(&self.ac_vo_params, encoder_, ac_vo_params, ())?;
6341
6342 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vo_params.as_mut_ptr()) };
6343
6344 Ok(())
6345 }
6346 }
6347
6348 unsafe impl<___E>
6349 ::fidl_next::EncodeOption<
6350 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmParameters>,
6351 ___E,
6352 > for WlanWmmParameters
6353 where
6354 ___E: ::fidl_next::Encoder + ?Sized,
6355 WlanWmmParameters: ::fidl_next::Encode<crate::wire::WlanWmmParameters, ___E>,
6356 {
6357 #[inline]
6358 fn encode_option(
6359 this: ::core::option::Option<Self>,
6360 encoder: &mut ___E,
6361 out: &mut ::core::mem::MaybeUninit<
6362 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmParameters>,
6363 >,
6364 _: (),
6365 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6366 if let Some(inner) = this {
6367 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6368 ::fidl_next::wire::Box::encode_present(out);
6369 } else {
6370 ::fidl_next::wire::Box::encode_absent(out);
6371 }
6372
6373 Ok(())
6374 }
6375 }
6376
6377 unsafe impl<'a, ___E>
6378 ::fidl_next::EncodeOption<
6379 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmParameters>,
6380 ___E,
6381 > for &'a WlanWmmParameters
6382 where
6383 ___E: ::fidl_next::Encoder + ?Sized,
6384 &'a WlanWmmParameters: ::fidl_next::Encode<crate::wire::WlanWmmParameters, ___E>,
6385 {
6386 #[inline]
6387 fn encode_option(
6388 this: ::core::option::Option<Self>,
6389 encoder: &mut ___E,
6390 out: &mut ::core::mem::MaybeUninit<
6391 ::fidl_next::wire::Box<'static, crate::wire::WlanWmmParameters>,
6392 >,
6393 _: (),
6394 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6395 if let Some(inner) = this {
6396 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6397 ::fidl_next::wire::Box::encode_present(out);
6398 } else {
6399 ::fidl_next::wire::Box::encode_absent(out);
6400 }
6401
6402 Ok(())
6403 }
6404 }
6405
6406 impl ::fidl_next::FromWire<crate::wire::WlanWmmParameters> for WlanWmmParameters {
6407 #[inline]
6408 fn from_wire(wire: crate::wire::WlanWmmParameters) -> Self {
6409 Self {
6410 apsd: ::fidl_next::FromWire::from_wire(wire.apsd),
6411
6412 ac_be_params: ::fidl_next::FromWire::from_wire(wire.ac_be_params),
6413
6414 ac_bk_params: ::fidl_next::FromWire::from_wire(wire.ac_bk_params),
6415
6416 ac_vi_params: ::fidl_next::FromWire::from_wire(wire.ac_vi_params),
6417
6418 ac_vo_params: ::fidl_next::FromWire::from_wire(wire.ac_vo_params),
6419 }
6420 }
6421 }
6422
6423 impl ::fidl_next::FromWireRef<crate::wire::WlanWmmParameters> for WlanWmmParameters {
6424 #[inline]
6425 fn from_wire_ref(wire: &crate::wire::WlanWmmParameters) -> Self {
6426 Self {
6427 apsd: ::fidl_next::FromWireRef::from_wire_ref(&wire.apsd),
6428
6429 ac_be_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_be_params),
6430
6431 ac_bk_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_bk_params),
6432
6433 ac_vi_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_vi_params),
6434
6435 ac_vo_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_vo_params),
6436 }
6437 }
6438 }
6439}
6440
6441pub mod wire {
6442
6443 #[repr(C)]
6445 pub struct ApfPacketFilterSupport<'de> {
6446 pub(crate) table: ::fidl_next::wire::Table<'de>,
6447 }
6448
6449 impl<'de> Drop for ApfPacketFilterSupport<'de> {
6450 fn drop(&mut self) {
6451 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
6452
6453 let _ = self
6454 .table
6455 .get(2)
6456 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int32>() });
6457
6458 let _ = self
6459 .table
6460 .get(3)
6461 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int32>() });
6462 }
6463 }
6464
6465 impl ::fidl_next::Constrained for ApfPacketFilterSupport<'_> {
6466 type Constraint = ();
6467
6468 fn validate(
6469 _: ::fidl_next::Slot<'_, Self>,
6470 _: Self::Constraint,
6471 ) -> Result<(), ::fidl_next::ValidationError> {
6472 Ok(())
6473 }
6474 }
6475
6476 unsafe impl ::fidl_next::Wire for ApfPacketFilterSupport<'static> {
6477 type Narrowed<'de> = ApfPacketFilterSupport<'de>;
6478
6479 #[inline]
6480 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6481 ::fidl_next::munge!(let Self { table } = out);
6482 ::fidl_next::wire::Table::zero_padding(table);
6483 }
6484 }
6485
6486 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ApfPacketFilterSupport<'de>
6487 where
6488 ___D: ::fidl_next::Decoder<'de> + ?Sized,
6489 {
6490 fn decode(
6491 slot: ::fidl_next::Slot<'_, Self>,
6492 decoder: &mut ___D,
6493 _: (),
6494 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6495 ::fidl_next::munge!(let Self { table } = slot);
6496
6497 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6498 match ordinal {
6499 0 => unsafe { ::core::hint::unreachable_unchecked() },
6500
6501 1 => {
6502 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
6503 slot.as_mut(),
6504 decoder,
6505 (),
6506 )?;
6507
6508 Ok(())
6509 }
6510
6511 2 => {
6512 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int32>(
6513 slot.as_mut(),
6514 decoder,
6515 (),
6516 )?;
6517
6518 Ok(())
6519 }
6520
6521 3 => {
6522 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int32>(
6523 slot.as_mut(),
6524 decoder,
6525 (),
6526 )?;
6527
6528 Ok(())
6529 }
6530
6531 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
6532 }
6533 })
6534 }
6535 }
6536
6537 impl<'de> ApfPacketFilterSupport<'de> {
6538 pub fn supported(&self) -> ::core::option::Option<&bool> {
6539 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6540 }
6541
6542 pub fn take_supported(&mut self) -> ::core::option::Option<bool> {
6543 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
6544 }
6545
6546 pub fn version(&self) -> ::core::option::Option<&::fidl_next::wire::Int32> {
6547 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
6548 }
6549
6550 pub fn take_version(&mut self) -> ::core::option::Option<::fidl_next::wire::Int32> {
6551 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
6552 }
6553
6554 pub fn max_filter_length(&self) -> ::core::option::Option<&::fidl_next::wire::Int32> {
6555 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
6556 }
6557
6558 pub fn take_max_filter_length(
6559 &mut self,
6560 ) -> ::core::option::Option<::fidl_next::wire::Int32> {
6561 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
6562 }
6563 }
6564
6565 impl<'de> ::core::fmt::Debug for ApfPacketFilterSupport<'de> {
6566 fn fmt(
6567 &self,
6568 f: &mut ::core::fmt::Formatter<'_>,
6569 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6570 f.debug_struct("ApfPacketFilterSupport")
6571 .field("supported", &self.supported())
6572 .field("version", &self.version())
6573 .field("max_filter_length", &self.max_filter_length())
6574 .finish()
6575 }
6576 }
6577
6578 impl<'de> ::fidl_next::IntoNatural for ApfPacketFilterSupport<'de> {
6579 type Natural = crate::natural::ApfPacketFilterSupport;
6580 }
6581
6582 #[derive(Clone, Debug)]
6584 #[repr(C)]
6585 pub struct BandRssiAdjustment {
6586 pub band: ::fidl_next_common_fuchsia_wlan_ieee80211::wire::WlanBand,
6587
6588 pub rssi_adjustment: i8,
6589 }
6590
6591 static_assertions::const_assert_eq!(std::mem::size_of::<BandRssiAdjustment>(), 2);
6592 static_assertions::const_assert_eq!(std::mem::align_of::<BandRssiAdjustment>(), 1);
6593
6594 static_assertions::const_assert_eq!(std::mem::offset_of!(BandRssiAdjustment, band), 0);
6595
6596 static_assertions::const_assert_eq!(
6597 std::mem::offset_of!(BandRssiAdjustment, rssi_adjustment),
6598 1
6599 );
6600
6601 impl ::fidl_next::Constrained for BandRssiAdjustment {
6602 type Constraint = ();
6603
6604 fn validate(
6605 _: ::fidl_next::Slot<'_, Self>,
6606 _: Self::Constraint,
6607 ) -> Result<(), ::fidl_next::ValidationError> {
6608 Ok(())
6609 }
6610 }
6611
6612 unsafe impl ::fidl_next::Wire for BandRssiAdjustment {
6613 type Narrowed<'de> = BandRssiAdjustment;
6614
6615 #[inline]
6616 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6617 ::fidl_next::munge! {
6618 let Self {
6619 band,
6620 rssi_adjustment,
6621
6622 } = &mut *out_;
6623 }
6624
6625 ::fidl_next::Wire::zero_padding(band);
6626
6627 ::fidl_next::Wire::zero_padding(rssi_adjustment);
6628 }
6629 }
6630
6631 unsafe impl<___D> ::fidl_next::Decode<___D> for BandRssiAdjustment
6632 where
6633 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6634 {
6635 fn decode(
6636 slot_: ::fidl_next::Slot<'_, Self>,
6637 decoder_: &mut ___D,
6638 _: (),
6639 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6640 ::fidl_next::munge! {
6641 let Self {
6642 mut band,
6643 mut rssi_adjustment,
6644
6645 } = slot_;
6646 }
6647
6648 let _field = band.as_mut();
6649
6650 ::fidl_next::Decode::decode(band.as_mut(), decoder_, ())?;
6651
6652 let _field = rssi_adjustment.as_mut();
6653
6654 ::fidl_next::Decode::decode(rssi_adjustment.as_mut(), decoder_, ())?;
6655
6656 Ok(())
6657 }
6658 }
6659
6660 impl ::fidl_next::IntoNatural for BandRssiAdjustment {
6661 type Natural = crate::natural::BandRssiAdjustment;
6662 }
6663
6664 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6666 #[repr(transparent)]
6667 pub struct BssType {
6668 pub(crate) value: ::fidl_next::wire::Uint32,
6669 }
6670
6671 impl ::fidl_next::Constrained for BssType {
6672 type Constraint = ();
6673
6674 fn validate(
6675 _: ::fidl_next::Slot<'_, Self>,
6676 _: Self::Constraint,
6677 ) -> Result<(), ::fidl_next::ValidationError> {
6678 Ok(())
6679 }
6680 }
6681
6682 unsafe impl ::fidl_next::Wire for BssType {
6683 type Narrowed<'de> = Self;
6684
6685 #[inline]
6686 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
6687 }
6689 }
6690
6691 impl BssType {
6692 pub const UNKNOWN: BssType = BssType { value: ::fidl_next::wire::Uint32(0) };
6693
6694 pub const INFRASTRUCTURE: BssType = BssType { value: ::fidl_next::wire::Uint32(1) };
6695
6696 pub const INDEPENDENT: BssType = BssType { value: ::fidl_next::wire::Uint32(2) };
6697
6698 pub const MESH: BssType = BssType { value: ::fidl_next::wire::Uint32(3) };
6699
6700 pub const PERSONAL: BssType = BssType { value: ::fidl_next::wire::Uint32(4) };
6701 }
6702
6703 unsafe impl<___D> ::fidl_next::Decode<___D> for BssType
6704 where
6705 ___D: ?Sized,
6706 {
6707 fn decode(
6708 slot: ::fidl_next::Slot<'_, Self>,
6709 _: &mut ___D,
6710 _: (),
6711 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6712 Ok(())
6713 }
6714 }
6715
6716 impl ::core::convert::From<crate::natural::BssType> for BssType {
6717 fn from(natural: crate::natural::BssType) -> Self {
6718 match natural {
6719 crate::natural::BssType::Unknown => BssType::UNKNOWN,
6720
6721 crate::natural::BssType::Infrastructure => BssType::INFRASTRUCTURE,
6722
6723 crate::natural::BssType::Independent => BssType::INDEPENDENT,
6724
6725 crate::natural::BssType::Mesh => BssType::MESH,
6726
6727 crate::natural::BssType::Personal => BssType::PERSONAL,
6728
6729 crate::natural::BssType::UnknownOrdinal_(value) => {
6730 BssType { value: ::fidl_next::wire::Uint32::from(value) }
6731 }
6732 }
6733 }
6734 }
6735
6736 impl ::fidl_next::IntoNatural for BssType {
6737 type Natural = crate::natural::BssType;
6738 }
6739
6740 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6742 #[repr(transparent)]
6743 pub struct ChannelBandwidth {
6744 pub(crate) value: ::fidl_next::wire::Uint32,
6745 }
6746
6747 impl ::fidl_next::Constrained for ChannelBandwidth {
6748 type Constraint = ();
6749
6750 fn validate(
6751 _: ::fidl_next::Slot<'_, Self>,
6752 _: Self::Constraint,
6753 ) -> Result<(), ::fidl_next::ValidationError> {
6754 Ok(())
6755 }
6756 }
6757
6758 unsafe impl ::fidl_next::Wire for ChannelBandwidth {
6759 type Narrowed<'de> = Self;
6760
6761 #[inline]
6762 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
6763 }
6765 }
6766
6767 impl ChannelBandwidth {
6768 pub const CBW20: ChannelBandwidth =
6769 ChannelBandwidth { value: ::fidl_next::wire::Uint32(1) };
6770
6771 pub const CBW40: ChannelBandwidth =
6772 ChannelBandwidth { value: ::fidl_next::wire::Uint32(2) };
6773
6774 pub const CBW40_BELOW: ChannelBandwidth =
6775 ChannelBandwidth { value: ::fidl_next::wire::Uint32(3) };
6776
6777 pub const CBW80: ChannelBandwidth =
6778 ChannelBandwidth { value: ::fidl_next::wire::Uint32(4) };
6779
6780 pub const CBW160: ChannelBandwidth =
6781 ChannelBandwidth { value: ::fidl_next::wire::Uint32(5) };
6782
6783 pub const CBW80_P80: ChannelBandwidth =
6784 ChannelBandwidth { value: ::fidl_next::wire::Uint32(6) };
6785 }
6786
6787 unsafe impl<___D> ::fidl_next::Decode<___D> for ChannelBandwidth
6788 where
6789 ___D: ?Sized,
6790 {
6791 fn decode(
6792 slot: ::fidl_next::Slot<'_, Self>,
6793 _: &mut ___D,
6794 _: (),
6795 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6796 Ok(())
6797 }
6798 }
6799
6800 impl ::core::convert::From<crate::natural::ChannelBandwidth> for ChannelBandwidth {
6801 fn from(natural: crate::natural::ChannelBandwidth) -> Self {
6802 match natural {
6803 crate::natural::ChannelBandwidth::Cbw20 => ChannelBandwidth::CBW20,
6804
6805 crate::natural::ChannelBandwidth::Cbw40 => ChannelBandwidth::CBW40,
6806
6807 crate::natural::ChannelBandwidth::Cbw40Below => ChannelBandwidth::CBW40_BELOW,
6808
6809 crate::natural::ChannelBandwidth::Cbw80 => ChannelBandwidth::CBW80,
6810
6811 crate::natural::ChannelBandwidth::Cbw160 => ChannelBandwidth::CBW160,
6812
6813 crate::natural::ChannelBandwidth::Cbw80P80 => ChannelBandwidth::CBW80_P80,
6814
6815 crate::natural::ChannelBandwidth::UnknownOrdinal_(value) => {
6816 ChannelBandwidth { value: ::fidl_next::wire::Uint32::from(value) }
6817 }
6818 }
6819 }
6820 }
6821
6822 impl ::fidl_next::IntoNatural for ChannelBandwidth {
6823 type Natural = crate::natural::ChannelBandwidth;
6824 }
6825
6826 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6828 #[repr(transparent)]
6829 pub struct DataPlaneType {
6830 pub(crate) value: u8,
6831 }
6832
6833 impl ::fidl_next::Constrained for DataPlaneType {
6834 type Constraint = ();
6835
6836 fn validate(
6837 _: ::fidl_next::Slot<'_, Self>,
6838 _: Self::Constraint,
6839 ) -> Result<(), ::fidl_next::ValidationError> {
6840 Ok(())
6841 }
6842 }
6843
6844 unsafe impl ::fidl_next::Wire for DataPlaneType {
6845 type Narrowed<'de> = Self;
6846
6847 #[inline]
6848 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
6849 }
6851 }
6852
6853 impl DataPlaneType {
6854 pub const ETHERNET_DEVICE: DataPlaneType = DataPlaneType { value: 1 };
6855
6856 pub const GENERIC_NETWORK_DEVICE: DataPlaneType = DataPlaneType { value: 2 };
6857 }
6858
6859 unsafe impl<___D> ::fidl_next::Decode<___D> for DataPlaneType
6860 where
6861 ___D: ?Sized,
6862 {
6863 fn decode(
6864 slot: ::fidl_next::Slot<'_, Self>,
6865 _: &mut ___D,
6866 _: (),
6867 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6868 Ok(())
6869 }
6870 }
6871
6872 impl ::core::convert::From<crate::natural::DataPlaneType> for DataPlaneType {
6873 fn from(natural: crate::natural::DataPlaneType) -> Self {
6874 match natural {
6875 crate::natural::DataPlaneType::EthernetDevice => DataPlaneType::ETHERNET_DEVICE,
6876
6877 crate::natural::DataPlaneType::GenericNetworkDevice => {
6878 DataPlaneType::GENERIC_NETWORK_DEVICE
6879 }
6880
6881 crate::natural::DataPlaneType::UnknownOrdinal_(value) => {
6882 DataPlaneType { value: u8::from(value) }
6883 }
6884 }
6885 }
6886 }
6887
6888 impl ::fidl_next::IntoNatural for DataPlaneType {
6889 type Natural = crate::natural::DataPlaneType;
6890 }
6891
6892 #[repr(C)]
6894 pub struct DataPlaneExtension<'de> {
6895 pub(crate) table: ::fidl_next::wire::Table<'de>,
6896 }
6897
6898 impl<'de> Drop for DataPlaneExtension<'de> {
6899 fn drop(&mut self) {
6900 let _ = self
6901 .table
6902 .get(1)
6903 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::DataPlaneType>() });
6904 }
6905 }
6906
6907 impl ::fidl_next::Constrained for DataPlaneExtension<'_> {
6908 type Constraint = ();
6909
6910 fn validate(
6911 _: ::fidl_next::Slot<'_, Self>,
6912 _: Self::Constraint,
6913 ) -> Result<(), ::fidl_next::ValidationError> {
6914 Ok(())
6915 }
6916 }
6917
6918 unsafe impl ::fidl_next::Wire for DataPlaneExtension<'static> {
6919 type Narrowed<'de> = DataPlaneExtension<'de>;
6920
6921 #[inline]
6922 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6923 ::fidl_next::munge!(let Self { table } = out);
6924 ::fidl_next::wire::Table::zero_padding(table);
6925 }
6926 }
6927
6928 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DataPlaneExtension<'de>
6929 where
6930 ___D: ::fidl_next::Decoder<'de> + ?Sized,
6931 {
6932 fn decode(
6933 slot: ::fidl_next::Slot<'_, Self>,
6934 decoder: &mut ___D,
6935 _: (),
6936 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6937 ::fidl_next::munge!(let Self { table } = slot);
6938
6939 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6940 match ordinal {
6941 0 => unsafe { ::core::hint::unreachable_unchecked() },
6942
6943 1 => {
6944 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::DataPlaneType>(
6945 slot.as_mut(),
6946 decoder,
6947 (),
6948 )?;
6949
6950 Ok(())
6951 }
6952
6953 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
6954 }
6955 })
6956 }
6957 }
6958
6959 impl<'de> DataPlaneExtension<'de> {
6960 pub fn data_plane_type(&self) -> ::core::option::Option<&crate::wire::DataPlaneType> {
6961 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6962 }
6963
6964 pub fn take_data_plane_type(
6965 &mut self,
6966 ) -> ::core::option::Option<crate::wire::DataPlaneType> {
6967 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
6968 }
6969 }
6970
6971 impl<'de> ::core::fmt::Debug for DataPlaneExtension<'de> {
6972 fn fmt(
6973 &self,
6974 f: &mut ::core::fmt::Formatter<'_>,
6975 ) -> ::core::result::Result<(), ::core::fmt::Error> {
6976 f.debug_struct("DataPlaneExtension")
6977 .field("data_plane_type", &self.data_plane_type())
6978 .finish()
6979 }
6980 }
6981
6982 impl<'de> ::fidl_next::IntoNatural for DataPlaneExtension<'de> {
6983 type Natural = crate::natural::DataPlaneExtension;
6984 }
6985
6986 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6988 #[repr(transparent)]
6989 pub struct MacImplementationType {
6990 pub(crate) value: u8,
6991 }
6992
6993 impl ::fidl_next::Constrained for MacImplementationType {
6994 type Constraint = ();
6995
6996 fn validate(
6997 _: ::fidl_next::Slot<'_, Self>,
6998 _: Self::Constraint,
6999 ) -> Result<(), ::fidl_next::ValidationError> {
7000 Ok(())
7001 }
7002 }
7003
7004 unsafe impl ::fidl_next::Wire for MacImplementationType {
7005 type Narrowed<'de> = Self;
7006
7007 #[inline]
7008 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
7009 }
7011 }
7012
7013 impl MacImplementationType {
7014 pub const SOFTMAC: MacImplementationType = MacImplementationType { value: 1 };
7015
7016 pub const FULLMAC: MacImplementationType = MacImplementationType { value: 2 };
7017 }
7018
7019 unsafe impl<___D> ::fidl_next::Decode<___D> for MacImplementationType
7020 where
7021 ___D: ?Sized,
7022 {
7023 fn decode(
7024 slot: ::fidl_next::Slot<'_, Self>,
7025 _: &mut ___D,
7026 _: (),
7027 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7028 Ok(())
7029 }
7030 }
7031
7032 impl ::core::convert::From<crate::natural::MacImplementationType> for MacImplementationType {
7033 fn from(natural: crate::natural::MacImplementationType) -> Self {
7034 match natural {
7035 crate::natural::MacImplementationType::Softmac => MacImplementationType::SOFTMAC,
7036
7037 crate::natural::MacImplementationType::Fullmac => MacImplementationType::FULLMAC,
7038
7039 crate::natural::MacImplementationType::UnknownOrdinal_(value) => {
7040 MacImplementationType { value: u8::from(value) }
7041 }
7042 }
7043 }
7044 }
7045
7046 impl ::fidl_next::IntoNatural for MacImplementationType {
7047 type Natural = crate::natural::MacImplementationType;
7048 }
7049
7050 #[repr(C)]
7052 pub struct DeviceExtension<'de> {
7053 pub(crate) table: ::fidl_next::wire::Table<'de>,
7054 }
7055
7056 impl<'de> Drop for DeviceExtension<'de> {
7057 fn drop(&mut self) {
7058 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7059
7060 let _ = self.table.get(2).map(|envelope| unsafe {
7061 envelope.read_unchecked::<crate::wire::MacImplementationType>()
7062 });
7063
7064 let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7065 }
7066 }
7067
7068 impl ::fidl_next::Constrained for DeviceExtension<'_> {
7069 type Constraint = ();
7070
7071 fn validate(
7072 _: ::fidl_next::Slot<'_, Self>,
7073 _: Self::Constraint,
7074 ) -> Result<(), ::fidl_next::ValidationError> {
7075 Ok(())
7076 }
7077 }
7078
7079 unsafe impl ::fidl_next::Wire for DeviceExtension<'static> {
7080 type Narrowed<'de> = DeviceExtension<'de>;
7081
7082 #[inline]
7083 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7084 ::fidl_next::munge!(let Self { table } = out);
7085 ::fidl_next::wire::Table::zero_padding(table);
7086 }
7087 }
7088
7089 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DeviceExtension<'de>
7090 where
7091 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7092 {
7093 fn decode(
7094 slot: ::fidl_next::Slot<'_, Self>,
7095 decoder: &mut ___D,
7096 _: (),
7097 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7098 ::fidl_next::munge!(let Self { table } = slot);
7099
7100 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7101 match ordinal {
7102 0 => unsafe { ::core::hint::unreachable_unchecked() },
7103
7104 1 => {
7105 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7106 slot.as_mut(),
7107 decoder,
7108 (),
7109 )?;
7110
7111 Ok(())
7112 }
7113
7114 2 => {
7115 ::fidl_next::wire::Envelope::decode_as::<
7116 ___D,
7117 crate::wire::MacImplementationType,
7118 >(slot.as_mut(), decoder, ())?;
7119
7120 Ok(())
7121 }
7122
7123 3 => {
7124 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7125 slot.as_mut(),
7126 decoder,
7127 (),
7128 )?;
7129
7130 Ok(())
7131 }
7132
7133 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7134 }
7135 })
7136 }
7137 }
7138
7139 impl<'de> DeviceExtension<'de> {
7140 pub fn is_synthetic(&self) -> ::core::option::Option<&bool> {
7141 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7142 }
7143
7144 pub fn take_is_synthetic(&mut self) -> ::core::option::Option<bool> {
7145 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7146 }
7147
7148 pub fn mac_implementation_type(
7149 &self,
7150 ) -> ::core::option::Option<&crate::wire::MacImplementationType> {
7151 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
7152 }
7153
7154 pub fn take_mac_implementation_type(
7155 &mut self,
7156 ) -> ::core::option::Option<crate::wire::MacImplementationType> {
7157 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
7158 }
7159
7160 pub fn tx_status_report_supported(&self) -> ::core::option::Option<&bool> {
7161 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
7162 }
7163
7164 pub fn take_tx_status_report_supported(&mut self) -> ::core::option::Option<bool> {
7165 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
7166 }
7167 }
7168
7169 impl<'de> ::core::fmt::Debug for DeviceExtension<'de> {
7170 fn fmt(
7171 &self,
7172 f: &mut ::core::fmt::Formatter<'_>,
7173 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7174 f.debug_struct("DeviceExtension")
7175 .field("is_synthetic", &self.is_synthetic())
7176 .field("mac_implementation_type", &self.mac_implementation_type())
7177 .field("tx_status_report_supported", &self.tx_status_report_supported())
7178 .finish()
7179 }
7180 }
7181
7182 impl<'de> ::fidl_next::IntoNatural for DeviceExtension<'de> {
7183 type Natural = crate::natural::DeviceExtension;
7184 }
7185
7186 #[repr(C)]
7188 pub struct DfsFeature<'de> {
7189 pub(crate) table: ::fidl_next::wire::Table<'de>,
7190 }
7191
7192 impl<'de> Drop for DfsFeature<'de> {
7193 fn drop(&mut self) {
7194 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7195 }
7196 }
7197
7198 impl ::fidl_next::Constrained for DfsFeature<'_> {
7199 type Constraint = ();
7200
7201 fn validate(
7202 _: ::fidl_next::Slot<'_, Self>,
7203 _: Self::Constraint,
7204 ) -> Result<(), ::fidl_next::ValidationError> {
7205 Ok(())
7206 }
7207 }
7208
7209 unsafe impl ::fidl_next::Wire for DfsFeature<'static> {
7210 type Narrowed<'de> = DfsFeature<'de>;
7211
7212 #[inline]
7213 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7214 ::fidl_next::munge!(let Self { table } = out);
7215 ::fidl_next::wire::Table::zero_padding(table);
7216 }
7217 }
7218
7219 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DfsFeature<'de>
7220 where
7221 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7222 {
7223 fn decode(
7224 slot: ::fidl_next::Slot<'_, Self>,
7225 decoder: &mut ___D,
7226 _: (),
7227 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7228 ::fidl_next::munge!(let Self { table } = slot);
7229
7230 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7231 match ordinal {
7232 0 => unsafe { ::core::hint::unreachable_unchecked() },
7233
7234 1 => {
7235 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7236 slot.as_mut(),
7237 decoder,
7238 (),
7239 )?;
7240
7241 Ok(())
7242 }
7243
7244 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7245 }
7246 })
7247 }
7248 }
7249
7250 impl<'de> DfsFeature<'de> {
7251 pub fn supported(&self) -> ::core::option::Option<&bool> {
7252 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7253 }
7254
7255 pub fn take_supported(&mut self) -> ::core::option::Option<bool> {
7256 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7257 }
7258 }
7259
7260 impl<'de> ::core::fmt::Debug for DfsFeature<'de> {
7261 fn fmt(
7262 &self,
7263 f: &mut ::core::fmt::Formatter<'_>,
7264 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7265 f.debug_struct("DfsFeature").field("supported", &self.supported()).finish()
7266 }
7267 }
7268
7269 impl<'de> ::fidl_next::IntoNatural for DfsFeature<'de> {
7270 type Natural = crate::natural::DfsFeature;
7271 }
7272
7273 #[repr(C)]
7275 pub struct ScanOffloadExtension<'de> {
7276 pub(crate) table: ::fidl_next::wire::Table<'de>,
7277 }
7278
7279 impl<'de> Drop for ScanOffloadExtension<'de> {
7280 fn drop(&mut self) {
7281 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7282
7283 let _ = self.table.get(2).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7284 }
7285 }
7286
7287 impl ::fidl_next::Constrained for ScanOffloadExtension<'_> {
7288 type Constraint = ();
7289
7290 fn validate(
7291 _: ::fidl_next::Slot<'_, Self>,
7292 _: Self::Constraint,
7293 ) -> Result<(), ::fidl_next::ValidationError> {
7294 Ok(())
7295 }
7296 }
7297
7298 unsafe impl ::fidl_next::Wire for ScanOffloadExtension<'static> {
7299 type Narrowed<'de> = ScanOffloadExtension<'de>;
7300
7301 #[inline]
7302 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7303 ::fidl_next::munge!(let Self { table } = out);
7304 ::fidl_next::wire::Table::zero_padding(table);
7305 }
7306 }
7307
7308 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ScanOffloadExtension<'de>
7309 where
7310 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7311 {
7312 fn decode(
7313 slot: ::fidl_next::Slot<'_, Self>,
7314 decoder: &mut ___D,
7315 _: (),
7316 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7317 ::fidl_next::munge!(let Self { table } = slot);
7318
7319 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7320 match ordinal {
7321 0 => unsafe { ::core::hint::unreachable_unchecked() },
7322
7323 1 => {
7324 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7325 slot.as_mut(),
7326 decoder,
7327 (),
7328 )?;
7329
7330 Ok(())
7331 }
7332
7333 2 => {
7334 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7335 slot.as_mut(),
7336 decoder,
7337 (),
7338 )?;
7339
7340 Ok(())
7341 }
7342
7343 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7344 }
7345 })
7346 }
7347 }
7348
7349 impl<'de> ScanOffloadExtension<'de> {
7350 pub fn supported(&self) -> ::core::option::Option<&bool> {
7351 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7352 }
7353
7354 pub fn take_supported(&mut self) -> ::core::option::Option<bool> {
7355 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7356 }
7357
7358 pub fn scan_cancel_supported(&self) -> ::core::option::Option<&bool> {
7359 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
7360 }
7361
7362 pub fn take_scan_cancel_supported(&mut self) -> ::core::option::Option<bool> {
7363 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
7364 }
7365 }
7366
7367 impl<'de> ::core::fmt::Debug for ScanOffloadExtension<'de> {
7368 fn fmt(
7369 &self,
7370 f: &mut ::core::fmt::Formatter<'_>,
7371 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7372 f.debug_struct("ScanOffloadExtension")
7373 .field("supported", &self.supported())
7374 .field("scan_cancel_supported", &self.scan_cancel_supported())
7375 .finish()
7376 }
7377 }
7378
7379 impl<'de> ::fidl_next::IntoNatural for ScanOffloadExtension<'de> {
7380 type Natural = crate::natural::ScanOffloadExtension;
7381 }
7382
7383 #[repr(C)]
7385 pub struct ProbeResponseOffloadExtension<'de> {
7386 pub(crate) table: ::fidl_next::wire::Table<'de>,
7387 }
7388
7389 impl<'de> Drop for ProbeResponseOffloadExtension<'de> {
7390 fn drop(&mut self) {
7391 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7392 }
7393 }
7394
7395 impl ::fidl_next::Constrained for ProbeResponseOffloadExtension<'_> {
7396 type Constraint = ();
7397
7398 fn validate(
7399 _: ::fidl_next::Slot<'_, Self>,
7400 _: Self::Constraint,
7401 ) -> Result<(), ::fidl_next::ValidationError> {
7402 Ok(())
7403 }
7404 }
7405
7406 unsafe impl ::fidl_next::Wire for ProbeResponseOffloadExtension<'static> {
7407 type Narrowed<'de> = ProbeResponseOffloadExtension<'de>;
7408
7409 #[inline]
7410 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7411 ::fidl_next::munge!(let Self { table } = out);
7412 ::fidl_next::wire::Table::zero_padding(table);
7413 }
7414 }
7415
7416 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ProbeResponseOffloadExtension<'de>
7417 where
7418 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7419 {
7420 fn decode(
7421 slot: ::fidl_next::Slot<'_, Self>,
7422 decoder: &mut ___D,
7423 _: (),
7424 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7425 ::fidl_next::munge!(let Self { table } = slot);
7426
7427 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7428 match ordinal {
7429 0 => unsafe { ::core::hint::unreachable_unchecked() },
7430
7431 1 => {
7432 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7433 slot.as_mut(),
7434 decoder,
7435 (),
7436 )?;
7437
7438 Ok(())
7439 }
7440
7441 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7442 }
7443 })
7444 }
7445 }
7446
7447 impl<'de> ProbeResponseOffloadExtension<'de> {
7448 pub fn supported(&self) -> ::core::option::Option<&bool> {
7449 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7450 }
7451
7452 pub fn take_supported(&mut self) -> ::core::option::Option<bool> {
7453 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7454 }
7455 }
7456
7457 impl<'de> ::core::fmt::Debug for ProbeResponseOffloadExtension<'de> {
7458 fn fmt(
7459 &self,
7460 f: &mut ::core::fmt::Formatter<'_>,
7461 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7462 f.debug_struct("ProbeResponseOffloadExtension")
7463 .field("supported", &self.supported())
7464 .finish()
7465 }
7466 }
7467
7468 impl<'de> ::fidl_next::IntoNatural for ProbeResponseOffloadExtension<'de> {
7469 type Natural = crate::natural::ProbeResponseOffloadExtension;
7470 }
7471
7472 #[repr(C)]
7474 pub struct DiscoverySupport<'de> {
7475 pub(crate) table: ::fidl_next::wire::Table<'de>,
7476 }
7477
7478 impl<'de> Drop for DiscoverySupport<'de> {
7479 fn drop(&mut self) {
7480 let _ = self.table.get(1).map(|envelope| unsafe {
7481 envelope.read_unchecked::<crate::wire::ScanOffloadExtension<'de>>()
7482 });
7483
7484 let _ = self.table.get(2).map(|envelope| unsafe {
7485 envelope.read_unchecked::<crate::wire::ProbeResponseOffloadExtension<'de>>()
7486 });
7487 }
7488 }
7489
7490 impl ::fidl_next::Constrained for DiscoverySupport<'_> {
7491 type Constraint = ();
7492
7493 fn validate(
7494 _: ::fidl_next::Slot<'_, Self>,
7495 _: Self::Constraint,
7496 ) -> Result<(), ::fidl_next::ValidationError> {
7497 Ok(())
7498 }
7499 }
7500
7501 unsafe impl ::fidl_next::Wire for DiscoverySupport<'static> {
7502 type Narrowed<'de> = DiscoverySupport<'de>;
7503
7504 #[inline]
7505 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7506 ::fidl_next::munge!(let Self { table } = out);
7507 ::fidl_next::wire::Table::zero_padding(table);
7508 }
7509 }
7510
7511 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DiscoverySupport<'de>
7512 where
7513 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7514 {
7515 fn decode(
7516 slot: ::fidl_next::Slot<'_, Self>,
7517 decoder: &mut ___D,
7518 _: (),
7519 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7520 ::fidl_next::munge!(let Self { table } = slot);
7521
7522 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7523 match ordinal {
7524 0 => unsafe { ::core::hint::unreachable_unchecked() },
7525
7526 1 => {
7527 ::fidl_next::wire::Envelope::decode_as::<
7528 ___D,
7529 crate::wire::ScanOffloadExtension<'de>,
7530 >(slot.as_mut(), decoder, ())?;
7531
7532 Ok(())
7533 }
7534
7535 2 => {
7536 ::fidl_next::wire::Envelope::decode_as::<
7537 ___D,
7538 crate::wire::ProbeResponseOffloadExtension<'de>,
7539 >(slot.as_mut(), decoder, ())?;
7540
7541 Ok(())
7542 }
7543
7544 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7545 }
7546 })
7547 }
7548 }
7549
7550 impl<'de> DiscoverySupport<'de> {
7551 pub fn scan_offload(
7552 &self,
7553 ) -> ::core::option::Option<&crate::wire::ScanOffloadExtension<'de>> {
7554 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7555 }
7556
7557 pub fn take_scan_offload(
7558 &mut self,
7559 ) -> ::core::option::Option<crate::wire::ScanOffloadExtension<'de>> {
7560 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7561 }
7562
7563 pub fn probe_response_offload(
7564 &self,
7565 ) -> ::core::option::Option<&crate::wire::ProbeResponseOffloadExtension<'de>> {
7566 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
7567 }
7568
7569 pub fn take_probe_response_offload(
7570 &mut self,
7571 ) -> ::core::option::Option<crate::wire::ProbeResponseOffloadExtension<'de>> {
7572 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
7573 }
7574 }
7575
7576 impl<'de> ::core::fmt::Debug for DiscoverySupport<'de> {
7577 fn fmt(
7578 &self,
7579 f: &mut ::core::fmt::Formatter<'_>,
7580 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7581 f.debug_struct("DiscoverySupport")
7582 .field("scan_offload", &self.scan_offload())
7583 .field("probe_response_offload", &self.probe_response_offload())
7584 .finish()
7585 }
7586 }
7587
7588 impl<'de> ::fidl_next::IntoNatural for DiscoverySupport<'de> {
7589 type Natural = crate::natural::DiscoverySupport;
7590 }
7591
7592 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
7594 #[repr(transparent)]
7595 pub struct GuardInterval {
7596 pub(crate) value: u8,
7597 }
7598
7599 impl ::fidl_next::Constrained for GuardInterval {
7600 type Constraint = ();
7601
7602 fn validate(
7603 _: ::fidl_next::Slot<'_, Self>,
7604 _: Self::Constraint,
7605 ) -> Result<(), ::fidl_next::ValidationError> {
7606 Ok(())
7607 }
7608 }
7609
7610 unsafe impl ::fidl_next::Wire for GuardInterval {
7611 type Narrowed<'de> = Self;
7612
7613 #[inline]
7614 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
7615 }
7617 }
7618
7619 impl GuardInterval {
7620 pub const LONG_GI: GuardInterval = GuardInterval { value: 1 };
7621
7622 pub const SHORT_GI: GuardInterval = GuardInterval { value: 2 };
7623 }
7624
7625 unsafe impl<___D> ::fidl_next::Decode<___D> for GuardInterval
7626 where
7627 ___D: ?Sized,
7628 {
7629 fn decode(
7630 slot: ::fidl_next::Slot<'_, Self>,
7631 _: &mut ___D,
7632 _: (),
7633 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7634 ::fidl_next::munge!(let Self { value } = slot);
7635
7636 match u8::from(*value) {
7637 1 | 2 => (),
7638 unknown => {
7639 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
7640 }
7641 }
7642
7643 Ok(())
7644 }
7645 }
7646
7647 impl ::core::convert::From<crate::natural::GuardInterval> for GuardInterval {
7648 fn from(natural: crate::natural::GuardInterval) -> Self {
7649 match natural {
7650 crate::natural::GuardInterval::LongGi => GuardInterval::LONG_GI,
7651
7652 crate::natural::GuardInterval::ShortGi => GuardInterval::SHORT_GI,
7653 }
7654 }
7655 }
7656
7657 impl ::fidl_next::IntoNatural for GuardInterval {
7658 type Natural = crate::natural::GuardInterval;
7659 }
7660
7661 #[repr(C)]
7663 pub struct JoinBssRequest<'de> {
7664 pub(crate) table: ::fidl_next::wire::Table<'de>,
7665 }
7666
7667 impl<'de> Drop for JoinBssRequest<'de> {
7668 fn drop(&mut self) {
7669 let _ =
7670 self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<[u8; 6]>() });
7671
7672 let _ = self
7673 .table
7674 .get(2)
7675 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::BssType>() });
7676
7677 let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7678
7679 let _ = self
7680 .table
7681 .get(4)
7682 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint16>() });
7683 }
7684 }
7685
7686 impl ::fidl_next::Constrained for JoinBssRequest<'_> {
7687 type Constraint = ();
7688
7689 fn validate(
7690 _: ::fidl_next::Slot<'_, Self>,
7691 _: Self::Constraint,
7692 ) -> Result<(), ::fidl_next::ValidationError> {
7693 Ok(())
7694 }
7695 }
7696
7697 unsafe impl ::fidl_next::Wire for JoinBssRequest<'static> {
7698 type Narrowed<'de> = JoinBssRequest<'de>;
7699
7700 #[inline]
7701 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7702 ::fidl_next::munge!(let Self { table } = out);
7703 ::fidl_next::wire::Table::zero_padding(table);
7704 }
7705 }
7706
7707 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for JoinBssRequest<'de>
7708 where
7709 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7710 {
7711 fn decode(
7712 slot: ::fidl_next::Slot<'_, Self>,
7713 decoder: &mut ___D,
7714 _: (),
7715 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7716 ::fidl_next::munge!(let Self { table } = slot);
7717
7718 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7719 match ordinal {
7720 0 => unsafe { ::core::hint::unreachable_unchecked() },
7721
7722 1 => {
7723 ::fidl_next::wire::Envelope::decode_as::<___D, [u8; 6]>(
7724 slot.as_mut(),
7725 decoder,
7726 (),
7727 )?;
7728
7729 Ok(())
7730 }
7731
7732 2 => {
7733 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::BssType>(
7734 slot.as_mut(),
7735 decoder,
7736 (),
7737 )?;
7738
7739 Ok(())
7740 }
7741
7742 3 => {
7743 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7744 slot.as_mut(),
7745 decoder,
7746 (),
7747 )?;
7748
7749 Ok(())
7750 }
7751
7752 4 => {
7753 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint16>(
7754 slot.as_mut(),
7755 decoder,
7756 (),
7757 )?;
7758
7759 Ok(())
7760 }
7761
7762 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7763 }
7764 })
7765 }
7766 }
7767
7768 impl<'de> JoinBssRequest<'de> {
7769 pub fn bssid(&self) -> ::core::option::Option<&[u8; 6]> {
7770 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7771 }
7772
7773 pub fn take_bssid(&mut self) -> ::core::option::Option<[u8; 6]> {
7774 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7775 }
7776
7777 pub fn bss_type(&self) -> ::core::option::Option<&crate::wire::BssType> {
7778 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
7779 }
7780
7781 pub fn take_bss_type(&mut self) -> ::core::option::Option<crate::wire::BssType> {
7782 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
7783 }
7784
7785 pub fn remote(&self) -> ::core::option::Option<&bool> {
7786 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
7787 }
7788
7789 pub fn take_remote(&mut self) -> ::core::option::Option<bool> {
7790 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
7791 }
7792
7793 pub fn beacon_period(&self) -> ::core::option::Option<&::fidl_next::wire::Uint16> {
7794 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
7795 }
7796
7797 pub fn take_beacon_period(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint16> {
7798 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
7799 }
7800 }
7801
7802 impl<'de> ::core::fmt::Debug for JoinBssRequest<'de> {
7803 fn fmt(
7804 &self,
7805 f: &mut ::core::fmt::Formatter<'_>,
7806 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7807 f.debug_struct("JoinBssRequest")
7808 .field("bssid", &self.bssid())
7809 .field("bss_type", &self.bss_type())
7810 .field("remote", &self.remote())
7811 .field("beacon_period", &self.beacon_period())
7812 .finish()
7813 }
7814 }
7815
7816 impl<'de> ::fidl_next::IntoNatural for JoinBssRequest<'de> {
7817 type Natural = crate::natural::JoinBssRequest;
7818 }
7819
7820 #[repr(C)]
7822 pub struct RateSelectionOffloadExtension<'de> {
7823 pub(crate) table: ::fidl_next::wire::Table<'de>,
7824 }
7825
7826 impl<'de> Drop for RateSelectionOffloadExtension<'de> {
7827 fn drop(&mut self) {
7828 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
7829 }
7830 }
7831
7832 impl ::fidl_next::Constrained for RateSelectionOffloadExtension<'_> {
7833 type Constraint = ();
7834
7835 fn validate(
7836 _: ::fidl_next::Slot<'_, Self>,
7837 _: Self::Constraint,
7838 ) -> Result<(), ::fidl_next::ValidationError> {
7839 Ok(())
7840 }
7841 }
7842
7843 unsafe impl ::fidl_next::Wire for RateSelectionOffloadExtension<'static> {
7844 type Narrowed<'de> = RateSelectionOffloadExtension<'de>;
7845
7846 #[inline]
7847 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7848 ::fidl_next::munge!(let Self { table } = out);
7849 ::fidl_next::wire::Table::zero_padding(table);
7850 }
7851 }
7852
7853 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for RateSelectionOffloadExtension<'de>
7854 where
7855 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7856 {
7857 fn decode(
7858 slot: ::fidl_next::Slot<'_, Self>,
7859 decoder: &mut ___D,
7860 _: (),
7861 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7862 ::fidl_next::munge!(let Self { table } = slot);
7863
7864 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7865 match ordinal {
7866 0 => unsafe { ::core::hint::unreachable_unchecked() },
7867
7868 1 => {
7869 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
7870 slot.as_mut(),
7871 decoder,
7872 (),
7873 )?;
7874
7875 Ok(())
7876 }
7877
7878 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7879 }
7880 })
7881 }
7882 }
7883
7884 impl<'de> RateSelectionOffloadExtension<'de> {
7885 pub fn supported(&self) -> ::core::option::Option<&bool> {
7886 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
7887 }
7888
7889 pub fn take_supported(&mut self) -> ::core::option::Option<bool> {
7890 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
7891 }
7892 }
7893
7894 impl<'de> ::core::fmt::Debug for RateSelectionOffloadExtension<'de> {
7895 fn fmt(
7896 &self,
7897 f: &mut ::core::fmt::Formatter<'_>,
7898 ) -> ::core::result::Result<(), ::core::fmt::Error> {
7899 f.debug_struct("RateSelectionOffloadExtension")
7900 .field("supported", &self.supported())
7901 .finish()
7902 }
7903 }
7904
7905 impl<'de> ::fidl_next::IntoNatural for RateSelectionOffloadExtension<'de> {
7906 type Natural = crate::natural::RateSelectionOffloadExtension;
7907 }
7908
7909 #[repr(C)]
7911 pub struct MacSublayerSupport<'de> {
7912 pub(crate) table: ::fidl_next::wire::Table<'de>,
7913 }
7914
7915 impl<'de> Drop for MacSublayerSupport<'de> {
7916 fn drop(&mut self) {
7917 let _ = self.table.get(1).map(|envelope| unsafe {
7918 envelope.read_unchecked::<crate::wire::RateSelectionOffloadExtension<'de>>()
7919 });
7920
7921 let _ = self.table.get(2).map(|envelope| unsafe {
7922 envelope.read_unchecked::<crate::wire::DataPlaneExtension<'de>>()
7923 });
7924
7925 let _ = self.table.get(3).map(|envelope| unsafe {
7926 envelope.read_unchecked::<crate::wire::DeviceExtension<'de>>()
7927 });
7928 }
7929 }
7930
7931 impl ::fidl_next::Constrained for MacSublayerSupport<'_> {
7932 type Constraint = ();
7933
7934 fn validate(
7935 _: ::fidl_next::Slot<'_, Self>,
7936 _: Self::Constraint,
7937 ) -> Result<(), ::fidl_next::ValidationError> {
7938 Ok(())
7939 }
7940 }
7941
7942 unsafe impl ::fidl_next::Wire for MacSublayerSupport<'static> {
7943 type Narrowed<'de> = MacSublayerSupport<'de>;
7944
7945 #[inline]
7946 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7947 ::fidl_next::munge!(let Self { table } = out);
7948 ::fidl_next::wire::Table::zero_padding(table);
7949 }
7950 }
7951
7952 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MacSublayerSupport<'de>
7953 where
7954 ___D: ::fidl_next::Decoder<'de> + ?Sized,
7955 {
7956 fn decode(
7957 slot: ::fidl_next::Slot<'_, Self>,
7958 decoder: &mut ___D,
7959 _: (),
7960 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7961 ::fidl_next::munge!(let Self { table } = slot);
7962
7963 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
7964 match ordinal {
7965 0 => unsafe { ::core::hint::unreachable_unchecked() },
7966
7967 1 => {
7968 ::fidl_next::wire::Envelope::decode_as::<
7969 ___D,
7970 crate::wire::RateSelectionOffloadExtension<'de>,
7971 >(slot.as_mut(), decoder, ())?;
7972
7973 Ok(())
7974 }
7975
7976 2 => {
7977 ::fidl_next::wire::Envelope::decode_as::<
7978 ___D,
7979 crate::wire::DataPlaneExtension<'de>,
7980 >(slot.as_mut(), decoder, ())?;
7981
7982 Ok(())
7983 }
7984
7985 3 => {
7986 ::fidl_next::wire::Envelope::decode_as::<
7987 ___D,
7988 crate::wire::DeviceExtension<'de>,
7989 >(slot.as_mut(), decoder, ())?;
7990
7991 Ok(())
7992 }
7993
7994 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
7995 }
7996 })
7997 }
7998 }
7999
8000 impl<'de> MacSublayerSupport<'de> {
8001 pub fn rate_selection_offload(
8002 &self,
8003 ) -> ::core::option::Option<&crate::wire::RateSelectionOffloadExtension<'de>> {
8004 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8005 }
8006
8007 pub fn take_rate_selection_offload(
8008 &mut self,
8009 ) -> ::core::option::Option<crate::wire::RateSelectionOffloadExtension<'de>> {
8010 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8011 }
8012
8013 pub fn data_plane(&self) -> ::core::option::Option<&crate::wire::DataPlaneExtension<'de>> {
8014 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
8015 }
8016
8017 pub fn take_data_plane(
8018 &mut self,
8019 ) -> ::core::option::Option<crate::wire::DataPlaneExtension<'de>> {
8020 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
8021 }
8022
8023 pub fn device(&self) -> ::core::option::Option<&crate::wire::DeviceExtension<'de>> {
8024 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
8025 }
8026
8027 pub fn take_device(&mut self) -> ::core::option::Option<crate::wire::DeviceExtension<'de>> {
8028 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
8029 }
8030 }
8031
8032 impl<'de> ::core::fmt::Debug for MacSublayerSupport<'de> {
8033 fn fmt(
8034 &self,
8035 f: &mut ::core::fmt::Formatter<'_>,
8036 ) -> ::core::result::Result<(), ::core::fmt::Error> {
8037 f.debug_struct("MacSublayerSupport")
8038 .field("rate_selection_offload", &self.rate_selection_offload())
8039 .field("data_plane", &self.data_plane())
8040 .field("device", &self.device())
8041 .finish()
8042 }
8043 }
8044
8045 impl<'de> ::fidl_next::IntoNatural for MacSublayerSupport<'de> {
8046 type Natural = crate::natural::MacSublayerSupport;
8047 }
8048
8049 #[repr(C)]
8051 pub struct MfpFeature<'de> {
8052 pub(crate) table: ::fidl_next::wire::Table<'de>,
8053 }
8054
8055 impl<'de> Drop for MfpFeature<'de> {
8056 fn drop(&mut self) {
8057 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
8058 }
8059 }
8060
8061 impl ::fidl_next::Constrained for MfpFeature<'_> {
8062 type Constraint = ();
8063
8064 fn validate(
8065 _: ::fidl_next::Slot<'_, Self>,
8066 _: Self::Constraint,
8067 ) -> Result<(), ::fidl_next::ValidationError> {
8068 Ok(())
8069 }
8070 }
8071
8072 unsafe impl ::fidl_next::Wire for MfpFeature<'static> {
8073 type Narrowed<'de> = MfpFeature<'de>;
8074
8075 #[inline]
8076 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8077 ::fidl_next::munge!(let Self { table } = out);
8078 ::fidl_next::wire::Table::zero_padding(table);
8079 }
8080 }
8081
8082 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MfpFeature<'de>
8083 where
8084 ___D: ::fidl_next::Decoder<'de> + ?Sized,
8085 {
8086 fn decode(
8087 slot: ::fidl_next::Slot<'_, Self>,
8088 decoder: &mut ___D,
8089 _: (),
8090 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8091 ::fidl_next::munge!(let Self { table } = slot);
8092
8093 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8094 match ordinal {
8095 0 => unsafe { ::core::hint::unreachable_unchecked() },
8096
8097 1 => {
8098 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
8099 slot.as_mut(),
8100 decoder,
8101 (),
8102 )?;
8103
8104 Ok(())
8105 }
8106
8107 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8108 }
8109 })
8110 }
8111 }
8112
8113 impl<'de> MfpFeature<'de> {
8114 pub fn supported(&self) -> ::core::option::Option<&bool> {
8115 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8116 }
8117
8118 pub fn take_supported(&mut self) -> ::core::option::Option<bool> {
8119 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8120 }
8121 }
8122
8123 impl<'de> ::core::fmt::Debug for MfpFeature<'de> {
8124 fn fmt(
8125 &self,
8126 f: &mut ::core::fmt::Formatter<'_>,
8127 ) -> ::core::result::Result<(), ::core::fmt::Error> {
8128 f.debug_struct("MfpFeature").field("supported", &self.supported()).finish()
8129 }
8130 }
8131
8132 impl<'de> ::fidl_next::IntoNatural for MfpFeature<'de> {
8133 type Natural = crate::natural::MfpFeature;
8134 }
8135
8136 #[repr(C)]
8138 pub struct OweFeature<'de> {
8139 pub(crate) table: ::fidl_next::wire::Table<'de>,
8140 }
8141
8142 impl<'de> Drop for OweFeature<'de> {
8143 fn drop(&mut self) {
8144 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
8145 }
8146 }
8147
8148 impl ::fidl_next::Constrained for OweFeature<'_> {
8149 type Constraint = ();
8150
8151 fn validate(
8152 _: ::fidl_next::Slot<'_, Self>,
8153 _: Self::Constraint,
8154 ) -> Result<(), ::fidl_next::ValidationError> {
8155 Ok(())
8156 }
8157 }
8158
8159 unsafe impl ::fidl_next::Wire for OweFeature<'static> {
8160 type Narrowed<'de> = OweFeature<'de>;
8161
8162 #[inline]
8163 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8164 ::fidl_next::munge!(let Self { table } = out);
8165 ::fidl_next::wire::Table::zero_padding(table);
8166 }
8167 }
8168
8169 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for OweFeature<'de>
8170 where
8171 ___D: ::fidl_next::Decoder<'de> + ?Sized,
8172 {
8173 fn decode(
8174 slot: ::fidl_next::Slot<'_, Self>,
8175 decoder: &mut ___D,
8176 _: (),
8177 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8178 ::fidl_next::munge!(let Self { table } = slot);
8179
8180 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8181 match ordinal {
8182 0 => unsafe { ::core::hint::unreachable_unchecked() },
8183
8184 1 => {
8185 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
8186 slot.as_mut(),
8187 decoder,
8188 (),
8189 )?;
8190
8191 Ok(())
8192 }
8193
8194 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8195 }
8196 })
8197 }
8198 }
8199
8200 impl<'de> OweFeature<'de> {
8201 pub fn supported(&self) -> ::core::option::Option<&bool> {
8202 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8203 }
8204
8205 pub fn take_supported(&mut self) -> ::core::option::Option<bool> {
8206 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8207 }
8208 }
8209
8210 impl<'de> ::core::fmt::Debug for OweFeature<'de> {
8211 fn fmt(
8212 &self,
8213 f: &mut ::core::fmt::Formatter<'_>,
8214 ) -> ::core::result::Result<(), ::core::fmt::Error> {
8215 f.debug_struct("OweFeature").field("supported", &self.supported()).finish()
8216 }
8217 }
8218
8219 impl<'de> ::fidl_next::IntoNatural for OweFeature<'de> {
8220 type Natural = crate::natural::OweFeature;
8221 }
8222
8223 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
8225 #[repr(transparent)]
8226 pub struct PowerSaveType {
8227 pub(crate) value: ::fidl_next::wire::Uint32,
8228 }
8229
8230 impl ::fidl_next::Constrained for PowerSaveType {
8231 type Constraint = ();
8232
8233 fn validate(
8234 _: ::fidl_next::Slot<'_, Self>,
8235 _: Self::Constraint,
8236 ) -> Result<(), ::fidl_next::ValidationError> {
8237 Ok(())
8238 }
8239 }
8240
8241 unsafe impl ::fidl_next::Wire for PowerSaveType {
8242 type Narrowed<'de> = Self;
8243
8244 #[inline]
8245 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
8246 }
8248 }
8249
8250 impl PowerSaveType {
8251 pub const PS_MODE_ULTRA_LOW_POWER: PowerSaveType =
8252 PowerSaveType { value: ::fidl_next::wire::Uint32(0) };
8253
8254 pub const PS_MODE_LOW_POWER: PowerSaveType =
8255 PowerSaveType { value: ::fidl_next::wire::Uint32(1) };
8256
8257 pub const PS_MODE_BALANCED: PowerSaveType =
8258 PowerSaveType { value: ::fidl_next::wire::Uint32(2) };
8259
8260 pub const PS_MODE_PERFORMANCE: PowerSaveType =
8261 PowerSaveType { value: ::fidl_next::wire::Uint32(3) };
8262 }
8263
8264 unsafe impl<___D> ::fidl_next::Decode<___D> for PowerSaveType
8265 where
8266 ___D: ?Sized,
8267 {
8268 fn decode(
8269 slot: ::fidl_next::Slot<'_, Self>,
8270 _: &mut ___D,
8271 _: (),
8272 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8273 ::fidl_next::munge!(let Self { value } = slot);
8274
8275 match u32::from(*value) {
8276 0 | 1 | 2 | 3 => (),
8277 unknown => {
8278 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
8279 }
8280 }
8281
8282 Ok(())
8283 }
8284 }
8285
8286 impl ::core::convert::From<crate::natural::PowerSaveType> for PowerSaveType {
8287 fn from(natural: crate::natural::PowerSaveType) -> Self {
8288 match natural {
8289 crate::natural::PowerSaveType::PsModeUltraLowPower => {
8290 PowerSaveType::PS_MODE_ULTRA_LOW_POWER
8291 }
8292
8293 crate::natural::PowerSaveType::PsModeLowPower => PowerSaveType::PS_MODE_LOW_POWER,
8294
8295 crate::natural::PowerSaveType::PsModeBalanced => PowerSaveType::PS_MODE_BALANCED,
8296
8297 crate::natural::PowerSaveType::PsModePerformance => {
8298 PowerSaveType::PS_MODE_PERFORMANCE
8299 }
8300 }
8301 }
8302 }
8303
8304 impl ::fidl_next::IntoNatural for PowerSaveType {
8305 type Natural = crate::natural::PowerSaveType;
8306 }
8307
8308 #[repr(C)]
8310 pub struct RssiMonitorSupport<'de> {
8311 pub(crate) table: ::fidl_next::wire::Table<'de>,
8312 }
8313
8314 impl<'de> Drop for RssiMonitorSupport<'de> {
8315 fn drop(&mut self) {
8316 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
8317 }
8318 }
8319
8320 impl ::fidl_next::Constrained for RssiMonitorSupport<'_> {
8321 type Constraint = ();
8322
8323 fn validate(
8324 _: ::fidl_next::Slot<'_, Self>,
8325 _: Self::Constraint,
8326 ) -> Result<(), ::fidl_next::ValidationError> {
8327 Ok(())
8328 }
8329 }
8330
8331 unsafe impl ::fidl_next::Wire for RssiMonitorSupport<'static> {
8332 type Narrowed<'de> = RssiMonitorSupport<'de>;
8333
8334 #[inline]
8335 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8336 ::fidl_next::munge!(let Self { table } = out);
8337 ::fidl_next::wire::Table::zero_padding(table);
8338 }
8339 }
8340
8341 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for RssiMonitorSupport<'de>
8342 where
8343 ___D: ::fidl_next::Decoder<'de> + ?Sized,
8344 {
8345 fn decode(
8346 slot: ::fidl_next::Slot<'_, Self>,
8347 decoder: &mut ___D,
8348 _: (),
8349 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8350 ::fidl_next::munge!(let Self { table } = slot);
8351
8352 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8353 match ordinal {
8354 0 => unsafe { ::core::hint::unreachable_unchecked() },
8355
8356 1 => {
8357 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
8358 slot.as_mut(),
8359 decoder,
8360 (),
8361 )?;
8362
8363 Ok(())
8364 }
8365
8366 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8367 }
8368 })
8369 }
8370 }
8371
8372 impl<'de> RssiMonitorSupport<'de> {
8373 pub fn supported(&self) -> ::core::option::Option<&bool> {
8374 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8375 }
8376
8377 pub fn take_supported(&mut self) -> ::core::option::Option<bool> {
8378 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8379 }
8380 }
8381
8382 impl<'de> ::core::fmt::Debug for RssiMonitorSupport<'de> {
8383 fn fmt(
8384 &self,
8385 f: &mut ::core::fmt::Formatter<'_>,
8386 ) -> ::core::result::Result<(), ::core::fmt::Error> {
8387 f.debug_struct("RssiMonitorSupport").field("supported", &self.supported()).finish()
8388 }
8389 }
8390
8391 impl<'de> ::fidl_next::IntoNatural for RssiMonitorSupport<'de> {
8392 type Natural = crate::natural::RssiMonitorSupport;
8393 }
8394
8395 #[repr(C)]
8397 pub struct SaeFeature<'de> {
8398 pub(crate) table: ::fidl_next::wire::Table<'de>,
8399 }
8400
8401 impl<'de> Drop for SaeFeature<'de> {
8402 fn drop(&mut self) {
8403 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
8404
8405 let _ = self.table.get(2).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
8406
8407 let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
8408
8409 let _ = self.table.get(4).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
8410 }
8411 }
8412
8413 impl ::fidl_next::Constrained for SaeFeature<'_> {
8414 type Constraint = ();
8415
8416 fn validate(
8417 _: ::fidl_next::Slot<'_, Self>,
8418 _: Self::Constraint,
8419 ) -> Result<(), ::fidl_next::ValidationError> {
8420 Ok(())
8421 }
8422 }
8423
8424 unsafe impl ::fidl_next::Wire for SaeFeature<'static> {
8425 type Narrowed<'de> = SaeFeature<'de>;
8426
8427 #[inline]
8428 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8429 ::fidl_next::munge!(let Self { table } = out);
8430 ::fidl_next::wire::Table::zero_padding(table);
8431 }
8432 }
8433
8434 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SaeFeature<'de>
8435 where
8436 ___D: ::fidl_next::Decoder<'de> + ?Sized,
8437 {
8438 fn decode(
8439 slot: ::fidl_next::Slot<'_, Self>,
8440 decoder: &mut ___D,
8441 _: (),
8442 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8443 ::fidl_next::munge!(let Self { table } = slot);
8444
8445 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8446 match ordinal {
8447 0 => unsafe { ::core::hint::unreachable_unchecked() },
8448
8449 1 => {
8450 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
8451 slot.as_mut(),
8452 decoder,
8453 (),
8454 )?;
8455
8456 Ok(())
8457 }
8458
8459 2 => {
8460 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
8461 slot.as_mut(),
8462 decoder,
8463 (),
8464 )?;
8465
8466 Ok(())
8467 }
8468
8469 3 => {
8470 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
8471 slot.as_mut(),
8472 decoder,
8473 (),
8474 )?;
8475
8476 Ok(())
8477 }
8478
8479 4 => {
8480 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
8481 slot.as_mut(),
8482 decoder,
8483 (),
8484 )?;
8485
8486 Ok(())
8487 }
8488
8489 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8490 }
8491 })
8492 }
8493 }
8494
8495 impl<'de> SaeFeature<'de> {
8496 pub fn driver_handler_supported(&self) -> ::core::option::Option<&bool> {
8497 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8498 }
8499
8500 pub fn take_driver_handler_supported(&mut self) -> ::core::option::Option<bool> {
8501 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8502 }
8503
8504 pub fn sme_handler_supported(&self) -> ::core::option::Option<&bool> {
8505 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
8506 }
8507
8508 pub fn take_sme_handler_supported(&mut self) -> ::core::option::Option<bool> {
8509 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
8510 }
8511
8512 pub fn hash_to_element_supported(&self) -> ::core::option::Option<&bool> {
8513 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
8514 }
8515
8516 pub fn take_hash_to_element_supported(&mut self) -> ::core::option::Option<bool> {
8517 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
8518 }
8519
8520 pub fn pmksa_caching_supported(&self) -> ::core::option::Option<&bool> {
8521 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
8522 }
8523
8524 pub fn take_pmksa_caching_supported(&mut self) -> ::core::option::Option<bool> {
8525 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
8526 }
8527 }
8528
8529 impl<'de> ::core::fmt::Debug for SaeFeature<'de> {
8530 fn fmt(
8531 &self,
8532 f: &mut ::core::fmt::Formatter<'_>,
8533 ) -> ::core::result::Result<(), ::core::fmt::Error> {
8534 f.debug_struct("SaeFeature")
8535 .field("driver_handler_supported", &self.driver_handler_supported())
8536 .field("sme_handler_supported", &self.sme_handler_supported())
8537 .field("hash_to_element_supported", &self.hash_to_element_supported())
8538 .field("pmksa_caching_supported", &self.pmksa_caching_supported())
8539 .finish()
8540 }
8541 }
8542
8543 impl<'de> ::fidl_next::IntoNatural for SaeFeature<'de> {
8544 type Natural = crate::natural::SaeFeature;
8545 }
8546
8547 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
8549 #[repr(transparent)]
8550 pub struct ScanType {
8551 pub(crate) value: ::fidl_next::wire::Uint32,
8552 }
8553
8554 impl ::fidl_next::Constrained for ScanType {
8555 type Constraint = ();
8556
8557 fn validate(
8558 _: ::fidl_next::Slot<'_, Self>,
8559 _: Self::Constraint,
8560 ) -> Result<(), ::fidl_next::ValidationError> {
8561 Ok(())
8562 }
8563 }
8564
8565 unsafe impl ::fidl_next::Wire for ScanType {
8566 type Narrowed<'de> = Self;
8567
8568 #[inline]
8569 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
8570 }
8572 }
8573
8574 impl ScanType {
8575 pub const ACTIVE: ScanType = ScanType { value: ::fidl_next::wire::Uint32(1) };
8576
8577 pub const PASSIVE: ScanType = ScanType { value: ::fidl_next::wire::Uint32(2) };
8578 }
8579
8580 unsafe impl<___D> ::fidl_next::Decode<___D> for ScanType
8581 where
8582 ___D: ?Sized,
8583 {
8584 fn decode(
8585 slot: ::fidl_next::Slot<'_, Self>,
8586 _: &mut ___D,
8587 _: (),
8588 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8589 ::fidl_next::munge!(let Self { value } = slot);
8590
8591 match u32::from(*value) {
8592 1 | 2 => (),
8593 unknown => {
8594 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
8595 }
8596 }
8597
8598 Ok(())
8599 }
8600 }
8601
8602 impl ::core::convert::From<crate::natural::ScanType> for ScanType {
8603 fn from(natural: crate::natural::ScanType) -> Self {
8604 match natural {
8605 crate::natural::ScanType::Active => ScanType::ACTIVE,
8606
8607 crate::natural::ScanType::Passive => ScanType::PASSIVE,
8608 }
8609 }
8610 }
8611
8612 impl ::fidl_next::IntoNatural for ScanType {
8613 type Natural = crate::natural::ScanType;
8614 }
8615
8616 #[repr(C)]
8618 pub struct ScheduledScanMatchSet<'de> {
8619 pub(crate) table: ::fidl_next::wire::Table<'de>,
8620 }
8621
8622 impl<'de> Drop for ScheduledScanMatchSet<'de> {
8623 fn drop(&mut self) {
8624 let _ = self.table.get(1).map(|envelope| unsafe {
8625 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
8626 });
8627
8628 let _ =
8629 self.table.get(2).map(|envelope| unsafe { envelope.read_unchecked::<[u8; 6]>() });
8630
8631 let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<i8>() });
8632
8633 let _ = self.table.get(4).map(|envelope| unsafe { envelope.read_unchecked::<i8>() });
8634
8635 let _ = self.table.get(5)
8636 .map(|envelope| unsafe {
8637 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>()
8638 });
8639 }
8640 }
8641
8642 impl ::fidl_next::Constrained for ScheduledScanMatchSet<'_> {
8643 type Constraint = ();
8644
8645 fn validate(
8646 _: ::fidl_next::Slot<'_, Self>,
8647 _: Self::Constraint,
8648 ) -> Result<(), ::fidl_next::ValidationError> {
8649 Ok(())
8650 }
8651 }
8652
8653 unsafe impl ::fidl_next::Wire for ScheduledScanMatchSet<'static> {
8654 type Narrowed<'de> = ScheduledScanMatchSet<'de>;
8655
8656 #[inline]
8657 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8658 ::fidl_next::munge!(let Self { table } = out);
8659 ::fidl_next::wire::Table::zero_padding(table);
8660 }
8661 }
8662
8663 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ScheduledScanMatchSet<'de>
8664 where
8665 ___D: ::fidl_next::Decoder<'de> + ?Sized,
8666 {
8667 fn decode(
8668 slot: ::fidl_next::Slot<'_, Self>,
8669 decoder: &mut ___D,
8670 _: (),
8671 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8672 ::fidl_next::munge!(let Self { table } = slot);
8673
8674 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8675 match ordinal {
8676 0 => unsafe { ::core::hint::unreachable_unchecked() },
8677
8678 1 => {
8679 ::fidl_next::wire::Envelope::decode_as::<
8680 ___D,
8681 ::fidl_next::wire::Vector<'de, u8>,
8682 >(slot.as_mut(), decoder, (32, ()))?;
8683
8684 let value = unsafe {
8685 slot.deref_unchecked()
8686 .deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
8687 };
8688
8689 if value.len() > 32 {
8690 return Err(::fidl_next::DecodeError::VectorTooLong {
8691 size: value.len() as u64,
8692 limit: 32,
8693 });
8694 }
8695
8696 Ok(())
8697 }
8698
8699 2 => {
8700 ::fidl_next::wire::Envelope::decode_as::<___D, [u8; 6]>(
8701 slot.as_mut(),
8702 decoder,
8703 (),
8704 )?;
8705
8706 Ok(())
8707 }
8708
8709 3 => {
8710 ::fidl_next::wire::Envelope::decode_as::<___D, i8>(
8711 slot.as_mut(),
8712 decoder,
8713 (),
8714 )?;
8715
8716 Ok(())
8717 }
8718
8719 4 => {
8720 ::fidl_next::wire::Envelope::decode_as::<___D, i8>(
8721 slot.as_mut(),
8722 decoder,
8723 (),
8724 )?;
8725
8726 Ok(())
8727 }
8728
8729 5 => {
8730 ::fidl_next::wire::Envelope::decode_as::<
8731 ___D,
8732 ::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>,
8733 >(slot.as_mut(), decoder, (4294967295, ()))?;
8734
8735 Ok(())
8736 }
8737
8738 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8739 }
8740 })
8741 }
8742 }
8743
8744 impl<'de> ScheduledScanMatchSet<'de> {
8745 pub fn ssid(&self) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, u8>> {
8746 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8747 }
8748
8749 pub fn take_ssid(&mut self) -> ::core::option::Option<::fidl_next::wire::Vector<'de, u8>> {
8750 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8751 }
8752
8753 pub fn bssid(&self) -> ::core::option::Option<&[u8; 6]> {
8754 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
8755 }
8756
8757 pub fn take_bssid(&mut self) -> ::core::option::Option<[u8; 6]> {
8758 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
8759 }
8760
8761 pub fn min_rssi_threshold(&self) -> ::core::option::Option<&i8> {
8762 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
8763 }
8764
8765 pub fn take_min_rssi_threshold(&mut self) -> ::core::option::Option<i8> {
8766 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
8767 }
8768
8769 pub fn relative_rssi_threshold(&self) -> ::core::option::Option<&i8> {
8770 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
8771 }
8772
8773 pub fn take_relative_rssi_threshold(&mut self) -> ::core::option::Option<i8> {
8774 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
8775 }
8776
8777 pub fn band_rssi_adjustments(
8778 &self,
8779 ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>
8780 {
8781 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
8782 }
8783
8784 pub fn take_band_rssi_adjustments(
8785 &mut self,
8786 ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>
8787 {
8788 unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
8789 }
8790 }
8791
8792 impl<'de> ::core::fmt::Debug for ScheduledScanMatchSet<'de> {
8793 fn fmt(
8794 &self,
8795 f: &mut ::core::fmt::Formatter<'_>,
8796 ) -> ::core::result::Result<(), ::core::fmt::Error> {
8797 f.debug_struct("ScheduledScanMatchSet")
8798 .field("ssid", &self.ssid())
8799 .field("bssid", &self.bssid())
8800 .field("min_rssi_threshold", &self.min_rssi_threshold())
8801 .field("relative_rssi_threshold", &self.relative_rssi_threshold())
8802 .field("band_rssi_adjustments", &self.band_rssi_adjustments())
8803 .finish()
8804 }
8805 }
8806
8807 impl<'de> ::fidl_next::IntoNatural for ScheduledScanMatchSet<'de> {
8808 type Natural = crate::natural::ScheduledScanMatchSet;
8809 }
8810
8811 #[derive(Clone, Debug)]
8813 #[repr(C)]
8814 pub struct ScheduledScanPlan {
8815 pub interval: ::fidl_next::wire::Uint32,
8816
8817 pub iterations: ::fidl_next::wire::Uint32,
8818 }
8819
8820 static_assertions::const_assert_eq!(std::mem::size_of::<ScheduledScanPlan>(), 8);
8821 static_assertions::const_assert_eq!(std::mem::align_of::<ScheduledScanPlan>(), 4);
8822
8823 static_assertions::const_assert_eq!(std::mem::offset_of!(ScheduledScanPlan, interval), 0);
8824
8825 static_assertions::const_assert_eq!(std::mem::offset_of!(ScheduledScanPlan, iterations), 4);
8826
8827 impl ::fidl_next::Constrained for ScheduledScanPlan {
8828 type Constraint = ();
8829
8830 fn validate(
8831 _: ::fidl_next::Slot<'_, Self>,
8832 _: Self::Constraint,
8833 ) -> Result<(), ::fidl_next::ValidationError> {
8834 Ok(())
8835 }
8836 }
8837
8838 unsafe impl ::fidl_next::Wire for ScheduledScanPlan {
8839 type Narrowed<'de> = ScheduledScanPlan;
8840
8841 #[inline]
8842 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8843 ::fidl_next::munge! {
8844 let Self {
8845 interval,
8846 iterations,
8847
8848 } = &mut *out_;
8849 }
8850
8851 ::fidl_next::Wire::zero_padding(interval);
8852
8853 ::fidl_next::Wire::zero_padding(iterations);
8854 }
8855 }
8856
8857 unsafe impl<___D> ::fidl_next::Decode<___D> for ScheduledScanPlan
8858 where
8859 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8860 {
8861 fn decode(
8862 slot_: ::fidl_next::Slot<'_, Self>,
8863 decoder_: &mut ___D,
8864 _: (),
8865 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8866 ::fidl_next::munge! {
8867 let Self {
8868 mut interval,
8869 mut iterations,
8870
8871 } = slot_;
8872 }
8873
8874 let _field = interval.as_mut();
8875
8876 ::fidl_next::Decode::decode(interval.as_mut(), decoder_, ())?;
8877
8878 let _field = iterations.as_mut();
8879
8880 ::fidl_next::Decode::decode(iterations.as_mut(), decoder_, ())?;
8881
8882 Ok(())
8883 }
8884 }
8885
8886 impl ::fidl_next::IntoNatural for ScheduledScanPlan {
8887 type Natural = crate::natural::ScheduledScanPlan;
8888 }
8889
8890 #[repr(C)]
8892 pub struct ScheduledScanRequest<'de> {
8893 pub(crate) table: ::fidl_next::wire::Table<'de>,
8894 }
8895
8896 impl<'de> Drop for ScheduledScanRequest<'de> {
8897 fn drop(&mut self) {
8898 let _ = self.table.get(1)
8899 .map(|envelope| unsafe {
8900 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanPlan>>()
8901 });
8902
8903 let _ = self.table.get(2)
8904 .map(|envelope| unsafe {
8905 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::Vector<'de, u8>>>()
8906 });
8907
8908 let _ = self.table.get(3)
8909 .map(|envelope| unsafe {
8910 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::Uint32>>()
8911 });
8912
8913 let _ = self.table.get(4).map(|envelope| unsafe { envelope.read_unchecked::<i8>() });
8914
8915 let _ = self.table.get(5).map(|envelope| unsafe { envelope.read_unchecked::<i8>() });
8916
8917 let _ = self.table.get(6)
8918 .map(|envelope| unsafe {
8919 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>()
8920 });
8921
8922 let _ = self.table.get(7)
8923 .map(|envelope| unsafe {
8924 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanMatchSet<'de>>>()
8925 });
8926 }
8927 }
8928
8929 impl ::fidl_next::Constrained for ScheduledScanRequest<'_> {
8930 type Constraint = ();
8931
8932 fn validate(
8933 _: ::fidl_next::Slot<'_, Self>,
8934 _: Self::Constraint,
8935 ) -> Result<(), ::fidl_next::ValidationError> {
8936 Ok(())
8937 }
8938 }
8939
8940 unsafe impl ::fidl_next::Wire for ScheduledScanRequest<'static> {
8941 type Narrowed<'de> = ScheduledScanRequest<'de>;
8942
8943 #[inline]
8944 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8945 ::fidl_next::munge!(let Self { table } = out);
8946 ::fidl_next::wire::Table::zero_padding(table);
8947 }
8948 }
8949
8950 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ScheduledScanRequest<'de>
8951 where
8952 ___D: ::fidl_next::Decoder<'de> + ?Sized,
8953 {
8954 fn decode(
8955 slot: ::fidl_next::Slot<'_, Self>,
8956 decoder: &mut ___D,
8957 _: (),
8958 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8959 ::fidl_next::munge!(let Self { table } = slot);
8960
8961 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8962 match ordinal {
8963 0 => unsafe { ::core::hint::unreachable_unchecked() },
8964
8965 1 => {
8966 ::fidl_next::wire::Envelope::decode_as::<
8967 ___D,
8968 ::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanPlan>,
8969 >(slot.as_mut(), decoder, (4294967295, ()))?;
8970
8971 Ok(())
8972 }
8973
8974 2 => {
8975 ::fidl_next::wire::Envelope::decode_as::<
8976 ___D,
8977 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::Vector<'de, u8>>,
8978 >(slot.as_mut(), decoder, (4294967295, (32, ())))?;
8979
8980 Ok(())
8981 }
8982
8983 3 => {
8984 ::fidl_next::wire::Envelope::decode_as::<
8985 ___D,
8986 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::Uint32>,
8987 >(slot.as_mut(), decoder, (4294967295, ()))?;
8988
8989 Ok(())
8990 }
8991
8992 4 => {
8993 ::fidl_next::wire::Envelope::decode_as::<___D, i8>(
8994 slot.as_mut(),
8995 decoder,
8996 (),
8997 )?;
8998
8999 Ok(())
9000 }
9001
9002 5 => {
9003 ::fidl_next::wire::Envelope::decode_as::<___D, i8>(
9004 slot.as_mut(),
9005 decoder,
9006 (),
9007 )?;
9008
9009 Ok(())
9010 }
9011
9012 6 => {
9013 ::fidl_next::wire::Envelope::decode_as::<
9014 ___D,
9015 ::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>,
9016 >(slot.as_mut(), decoder, (4294967295, ()))?;
9017
9018 Ok(())
9019 }
9020
9021 7 => {
9022 ::fidl_next::wire::Envelope::decode_as::<
9023 ___D,
9024 ::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanMatchSet<'de>>,
9025 >(slot.as_mut(), decoder, (4294967295, ()))?;
9026
9027 Ok(())
9028 }
9029
9030 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9031 }
9032 })
9033 }
9034 }
9035
9036 impl<'de> ScheduledScanRequest<'de> {
9037 pub fn scan_plans(
9038 &self,
9039 ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanPlan>>
9040 {
9041 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9042 }
9043
9044 pub fn take_scan_plans(
9045 &mut self,
9046 ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanPlan>>
9047 {
9048 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9049 }
9050
9051 pub fn ssids(
9052 &self,
9053 ) -> ::core::option::Option<
9054 &::fidl_next::wire::Vector<'de, ::fidl_next::wire::Vector<'de, u8>>,
9055 > {
9056 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
9057 }
9058
9059 pub fn take_ssids(
9060 &mut self,
9061 ) -> ::core::option::Option<
9062 ::fidl_next::wire::Vector<'de, ::fidl_next::wire::Vector<'de, u8>>,
9063 > {
9064 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
9065 }
9066
9067 pub fn frequencies(
9068 &self,
9069 ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, ::fidl_next::wire::Uint32>>
9070 {
9071 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
9072 }
9073
9074 pub fn take_frequencies(
9075 &mut self,
9076 ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, ::fidl_next::wire::Uint32>>
9077 {
9078 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
9079 }
9080
9081 pub fn min_rssi_threshold(&self) -> ::core::option::Option<&i8> {
9082 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
9083 }
9084
9085 pub fn take_min_rssi_threshold(&mut self) -> ::core::option::Option<i8> {
9086 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
9087 }
9088
9089 pub fn relative_rssi_threshold(&self) -> ::core::option::Option<&i8> {
9090 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
9091 }
9092
9093 pub fn take_relative_rssi_threshold(&mut self) -> ::core::option::Option<i8> {
9094 unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
9095 }
9096
9097 pub fn band_rssi_adjustments(
9098 &self,
9099 ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>
9100 {
9101 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
9102 }
9103
9104 pub fn take_band_rssi_adjustments(
9105 &mut self,
9106 ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::BandRssiAdjustment>>
9107 {
9108 unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
9109 }
9110
9111 pub fn match_sets(
9112 &self,
9113 ) -> ::core::option::Option<
9114 &::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanMatchSet<'de>>,
9115 > {
9116 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
9117 }
9118
9119 pub fn take_match_sets(
9120 &mut self,
9121 ) -> ::core::option::Option<
9122 ::fidl_next::wire::Vector<'de, crate::wire::ScheduledScanMatchSet<'de>>,
9123 > {
9124 unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
9125 }
9126 }
9127
9128 impl<'de> ::core::fmt::Debug for ScheduledScanRequest<'de> {
9129 fn fmt(
9130 &self,
9131 f: &mut ::core::fmt::Formatter<'_>,
9132 ) -> ::core::result::Result<(), ::core::fmt::Error> {
9133 f.debug_struct("ScheduledScanRequest")
9134 .field("scan_plans", &self.scan_plans())
9135 .field("ssids", &self.ssids())
9136 .field("frequencies", &self.frequencies())
9137 .field("min_rssi_threshold", &self.min_rssi_threshold())
9138 .field("relative_rssi_threshold", &self.relative_rssi_threshold())
9139 .field("band_rssi_adjustments", &self.band_rssi_adjustments())
9140 .field("match_sets", &self.match_sets())
9141 .finish()
9142 }
9143 }
9144
9145 impl<'de> ::fidl_next::IntoNatural for ScheduledScanRequest<'de> {
9146 type Natural = crate::natural::ScheduledScanRequest;
9147 }
9148
9149 #[repr(C)]
9151 pub struct SecuritySupport<'de> {
9152 pub(crate) table: ::fidl_next::wire::Table<'de>,
9153 }
9154
9155 impl<'de> Drop for SecuritySupport<'de> {
9156 fn drop(&mut self) {
9157 let _ = self.table.get(1).map(|envelope| unsafe {
9158 envelope.read_unchecked::<crate::wire::SaeFeature<'de>>()
9159 });
9160
9161 let _ = self.table.get(2).map(|envelope| unsafe {
9162 envelope.read_unchecked::<crate::wire::MfpFeature<'de>>()
9163 });
9164
9165 let _ = self.table.get(3).map(|envelope| unsafe {
9166 envelope.read_unchecked::<crate::wire::OweFeature<'de>>()
9167 });
9168 }
9169 }
9170
9171 impl ::fidl_next::Constrained for SecuritySupport<'_> {
9172 type Constraint = ();
9173
9174 fn validate(
9175 _: ::fidl_next::Slot<'_, Self>,
9176 _: Self::Constraint,
9177 ) -> Result<(), ::fidl_next::ValidationError> {
9178 Ok(())
9179 }
9180 }
9181
9182 unsafe impl ::fidl_next::Wire for SecuritySupport<'static> {
9183 type Narrowed<'de> = SecuritySupport<'de>;
9184
9185 #[inline]
9186 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9187 ::fidl_next::munge!(let Self { table } = out);
9188 ::fidl_next::wire::Table::zero_padding(table);
9189 }
9190 }
9191
9192 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecuritySupport<'de>
9193 where
9194 ___D: ::fidl_next::Decoder<'de> + ?Sized,
9195 {
9196 fn decode(
9197 slot: ::fidl_next::Slot<'_, Self>,
9198 decoder: &mut ___D,
9199 _: (),
9200 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9201 ::fidl_next::munge!(let Self { table } = slot);
9202
9203 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9204 match ordinal {
9205 0 => unsafe { ::core::hint::unreachable_unchecked() },
9206
9207 1 => {
9208 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::SaeFeature<'de>>(
9209 slot.as_mut(),
9210 decoder,
9211 (),
9212 )?;
9213
9214 Ok(())
9215 }
9216
9217 2 => {
9218 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::MfpFeature<'de>>(
9219 slot.as_mut(),
9220 decoder,
9221 (),
9222 )?;
9223
9224 Ok(())
9225 }
9226
9227 3 => {
9228 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::OweFeature<'de>>(
9229 slot.as_mut(),
9230 decoder,
9231 (),
9232 )?;
9233
9234 Ok(())
9235 }
9236
9237 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9238 }
9239 })
9240 }
9241 }
9242
9243 impl<'de> SecuritySupport<'de> {
9244 pub fn sae(&self) -> ::core::option::Option<&crate::wire::SaeFeature<'de>> {
9245 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9246 }
9247
9248 pub fn take_sae(&mut self) -> ::core::option::Option<crate::wire::SaeFeature<'de>> {
9249 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9250 }
9251
9252 pub fn mfp(&self) -> ::core::option::Option<&crate::wire::MfpFeature<'de>> {
9253 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
9254 }
9255
9256 pub fn take_mfp(&mut self) -> ::core::option::Option<crate::wire::MfpFeature<'de>> {
9257 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
9258 }
9259
9260 pub fn owe(&self) -> ::core::option::Option<&crate::wire::OweFeature<'de>> {
9261 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
9262 }
9263
9264 pub fn take_owe(&mut self) -> ::core::option::Option<crate::wire::OweFeature<'de>> {
9265 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
9266 }
9267 }
9268
9269 impl<'de> ::core::fmt::Debug for SecuritySupport<'de> {
9270 fn fmt(
9271 &self,
9272 f: &mut ::core::fmt::Formatter<'_>,
9273 ) -> ::core::result::Result<(), ::core::fmt::Error> {
9274 f.debug_struct("SecuritySupport")
9275 .field("sae", &self.sae())
9276 .field("mfp", &self.mfp())
9277 .field("owe", &self.owe())
9278 .finish()
9279 }
9280 }
9281
9282 impl<'de> ::fidl_next::IntoNatural for SecuritySupport<'de> {
9283 type Natural = crate::natural::SecuritySupport;
9284 }
9285
9286 #[repr(C)]
9288 pub struct SpectrumManagementSupport<'de> {
9289 pub(crate) table: ::fidl_next::wire::Table<'de>,
9290 }
9291
9292 impl<'de> Drop for SpectrumManagementSupport<'de> {
9293 fn drop(&mut self) {
9294 let _ = self.table.get(1).map(|envelope| unsafe {
9295 envelope.read_unchecked::<crate::wire::DfsFeature<'de>>()
9296 });
9297 }
9298 }
9299
9300 impl ::fidl_next::Constrained for SpectrumManagementSupport<'_> {
9301 type Constraint = ();
9302
9303 fn validate(
9304 _: ::fidl_next::Slot<'_, Self>,
9305 _: Self::Constraint,
9306 ) -> Result<(), ::fidl_next::ValidationError> {
9307 Ok(())
9308 }
9309 }
9310
9311 unsafe impl ::fidl_next::Wire for SpectrumManagementSupport<'static> {
9312 type Narrowed<'de> = SpectrumManagementSupport<'de>;
9313
9314 #[inline]
9315 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9316 ::fidl_next::munge!(let Self { table } = out);
9317 ::fidl_next::wire::Table::zero_padding(table);
9318 }
9319 }
9320
9321 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SpectrumManagementSupport<'de>
9322 where
9323 ___D: ::fidl_next::Decoder<'de> + ?Sized,
9324 {
9325 fn decode(
9326 slot: ::fidl_next::Slot<'_, Self>,
9327 decoder: &mut ___D,
9328 _: (),
9329 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9330 ::fidl_next::munge!(let Self { table } = slot);
9331
9332 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9333 match ordinal {
9334 0 => unsafe { ::core::hint::unreachable_unchecked() },
9335
9336 1 => {
9337 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::DfsFeature<'de>>(
9338 slot.as_mut(),
9339 decoder,
9340 (),
9341 )?;
9342
9343 Ok(())
9344 }
9345
9346 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9347 }
9348 })
9349 }
9350 }
9351
9352 impl<'de> SpectrumManagementSupport<'de> {
9353 pub fn dfs(&self) -> ::core::option::Option<&crate::wire::DfsFeature<'de>> {
9354 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9355 }
9356
9357 pub fn take_dfs(&mut self) -> ::core::option::Option<crate::wire::DfsFeature<'de>> {
9358 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9359 }
9360 }
9361
9362 impl<'de> ::core::fmt::Debug for SpectrumManagementSupport<'de> {
9363 fn fmt(
9364 &self,
9365 f: &mut ::core::fmt::Formatter<'_>,
9366 ) -> ::core::result::Result<(), ::core::fmt::Error> {
9367 f.debug_struct("SpectrumManagementSupport").field("dfs", &self.dfs()).finish()
9368 }
9369 }
9370
9371 impl<'de> ::fidl_next::IntoNatural for SpectrumManagementSupport<'de> {
9372 type Natural = crate::natural::SpectrumManagementSupport;
9373 }
9374
9375 #[derive(Clone, Debug)]
9377 #[repr(C)]
9378 pub struct WlanChannel {
9379 pub primary: u8,
9380
9381 pub cbw: crate::wire::ChannelBandwidth,
9382
9383 pub secondary80: u8,
9384 }
9385
9386 static_assertions::const_assert_eq!(std::mem::size_of::<WlanChannel>(), 12);
9387 static_assertions::const_assert_eq!(std::mem::align_of::<WlanChannel>(), 4);
9388
9389 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanChannel, primary), 0);
9390
9391 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanChannel, cbw), 4);
9392
9393 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanChannel, secondary80), 8);
9394
9395 impl ::fidl_next::Constrained for WlanChannel {
9396 type Constraint = ();
9397
9398 fn validate(
9399 _: ::fidl_next::Slot<'_, Self>,
9400 _: Self::Constraint,
9401 ) -> Result<(), ::fidl_next::ValidationError> {
9402 Ok(())
9403 }
9404 }
9405
9406 unsafe impl ::fidl_next::Wire for WlanChannel {
9407 type Narrowed<'de> = WlanChannel;
9408
9409 #[inline]
9410 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9411 ::fidl_next::munge! {
9412 let Self {
9413 primary,
9414 cbw,
9415 secondary80,
9416
9417 } = &mut *out_;
9418 }
9419
9420 ::fidl_next::Wire::zero_padding(primary);
9421
9422 ::fidl_next::Wire::zero_padding(cbw);
9423
9424 ::fidl_next::Wire::zero_padding(secondary80);
9425
9426 unsafe {
9427 out_.as_mut_ptr().cast::<u8>().add(9).write_bytes(0, 3);
9428 }
9429
9430 unsafe {
9431 out_.as_mut_ptr().cast::<u8>().add(1).write_bytes(0, 3);
9432 }
9433 }
9434 }
9435
9436 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanChannel
9437 where
9438 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9439 {
9440 fn decode(
9441 slot_: ::fidl_next::Slot<'_, Self>,
9442 decoder_: &mut ___D,
9443 _: (),
9444 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9445 if slot_.as_bytes()[9..12] != [0u8; 3] {
9446 return Err(::fidl_next::DecodeError::InvalidPadding);
9447 }
9448
9449 if slot_.as_bytes()[1..4] != [0u8; 3] {
9450 return Err(::fidl_next::DecodeError::InvalidPadding);
9451 }
9452
9453 ::fidl_next::munge! {
9454 let Self {
9455 mut primary,
9456 mut cbw,
9457 mut secondary80,
9458
9459 } = slot_;
9460 }
9461
9462 let _field = primary.as_mut();
9463
9464 ::fidl_next::Decode::decode(primary.as_mut(), decoder_, ())?;
9465
9466 let _field = cbw.as_mut();
9467
9468 ::fidl_next::Decode::decode(cbw.as_mut(), decoder_, ())?;
9469
9470 let _field = secondary80.as_mut();
9471
9472 ::fidl_next::Decode::decode(secondary80.as_mut(), decoder_, ())?;
9473
9474 Ok(())
9475 }
9476 }
9477
9478 impl ::fidl_next::IntoNatural for WlanChannel {
9479 type Natural = crate::natural::WlanChannel;
9480 }
9481
9482 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
9484 #[repr(transparent)]
9485 pub struct WlanKeyType {
9486 pub(crate) value: u8,
9487 }
9488
9489 impl ::fidl_next::Constrained for WlanKeyType {
9490 type Constraint = ();
9491
9492 fn validate(
9493 _: ::fidl_next::Slot<'_, Self>,
9494 _: Self::Constraint,
9495 ) -> Result<(), ::fidl_next::ValidationError> {
9496 Ok(())
9497 }
9498 }
9499
9500 unsafe impl ::fidl_next::Wire for WlanKeyType {
9501 type Narrowed<'de> = Self;
9502
9503 #[inline]
9504 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
9505 }
9507 }
9508
9509 impl WlanKeyType {
9510 pub const PAIRWISE: WlanKeyType = WlanKeyType { value: 1 };
9511
9512 pub const GROUP: WlanKeyType = WlanKeyType { value: 2 };
9513
9514 pub const IGTK: WlanKeyType = WlanKeyType { value: 3 };
9515
9516 pub const PEER: WlanKeyType = WlanKeyType { value: 4 };
9517 }
9518
9519 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanKeyType
9520 where
9521 ___D: ?Sized,
9522 {
9523 fn decode(
9524 slot: ::fidl_next::Slot<'_, Self>,
9525 _: &mut ___D,
9526 _: (),
9527 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9528 Ok(())
9529 }
9530 }
9531
9532 impl ::core::convert::From<crate::natural::WlanKeyType> for WlanKeyType {
9533 fn from(natural: crate::natural::WlanKeyType) -> Self {
9534 match natural {
9535 crate::natural::WlanKeyType::Pairwise => WlanKeyType::PAIRWISE,
9536
9537 crate::natural::WlanKeyType::Group => WlanKeyType::GROUP,
9538
9539 crate::natural::WlanKeyType::Igtk => WlanKeyType::IGTK,
9540
9541 crate::natural::WlanKeyType::Peer => WlanKeyType::PEER,
9542
9543 crate::natural::WlanKeyType::UnknownOrdinal_(value) => {
9544 WlanKeyType { value: u8::from(value) }
9545 }
9546 }
9547 }
9548 }
9549
9550 impl ::fidl_next::IntoNatural for WlanKeyType {
9551 type Natural = crate::natural::WlanKeyType;
9552 }
9553
9554 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
9556 #[repr(transparent)]
9557 pub struct WlanMacRole {
9558 pub(crate) value: ::fidl_next::wire::Uint32,
9559 }
9560
9561 impl ::fidl_next::Constrained for WlanMacRole {
9562 type Constraint = ();
9563
9564 fn validate(
9565 _: ::fidl_next::Slot<'_, Self>,
9566 _: Self::Constraint,
9567 ) -> Result<(), ::fidl_next::ValidationError> {
9568 Ok(())
9569 }
9570 }
9571
9572 unsafe impl ::fidl_next::Wire for WlanMacRole {
9573 type Narrowed<'de> = Self;
9574
9575 #[inline]
9576 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
9577 }
9579 }
9580
9581 impl WlanMacRole {
9582 pub const CLIENT: WlanMacRole = WlanMacRole { value: ::fidl_next::wire::Uint32(1) };
9583
9584 pub const AP: WlanMacRole = WlanMacRole { value: ::fidl_next::wire::Uint32(2) };
9585
9586 pub const MESH: WlanMacRole = WlanMacRole { value: ::fidl_next::wire::Uint32(3) };
9587 }
9588
9589 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanMacRole
9590 where
9591 ___D: ?Sized,
9592 {
9593 fn decode(
9594 slot: ::fidl_next::Slot<'_, Self>,
9595 _: &mut ___D,
9596 _: (),
9597 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9598 Ok(())
9599 }
9600 }
9601
9602 impl ::core::convert::From<crate::natural::WlanMacRole> for WlanMacRole {
9603 fn from(natural: crate::natural::WlanMacRole) -> Self {
9604 match natural {
9605 crate::natural::WlanMacRole::Client => WlanMacRole::CLIENT,
9606
9607 crate::natural::WlanMacRole::Ap => WlanMacRole::AP,
9608
9609 crate::natural::WlanMacRole::Mesh => WlanMacRole::MESH,
9610
9611 crate::natural::WlanMacRole::UnknownOrdinal_(value) => {
9612 WlanMacRole { value: ::fidl_next::wire::Uint32::from(value) }
9613 }
9614 }
9615 }
9616 }
9617
9618 impl ::fidl_next::IntoNatural for WlanMacRole {
9619 type Natural = crate::natural::WlanMacRole;
9620 }
9621
9622 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
9624 #[repr(transparent)]
9625 pub struct WlanPhyType {
9626 pub(crate) value: ::fidl_next::wire::Uint32,
9627 }
9628
9629 impl ::fidl_next::Constrained for WlanPhyType {
9630 type Constraint = ();
9631
9632 fn validate(
9633 _: ::fidl_next::Slot<'_, Self>,
9634 _: Self::Constraint,
9635 ) -> Result<(), ::fidl_next::ValidationError> {
9636 Ok(())
9637 }
9638 }
9639
9640 unsafe impl ::fidl_next::Wire for WlanPhyType {
9641 type Narrowed<'de> = Self;
9642
9643 #[inline]
9644 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
9645 }
9647 }
9648
9649 impl WlanPhyType {
9650 pub const DSSS: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(1) };
9651
9652 pub const HR: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(2) };
9653
9654 pub const OFDM: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(3) };
9655
9656 pub const ERP: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(4) };
9657
9658 pub const HT: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(5) };
9659
9660 pub const DMG: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(6) };
9661
9662 pub const VHT: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(7) };
9663
9664 pub const TVHT: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(8) };
9665
9666 pub const S1_G: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(9) };
9667
9668 pub const CDMG: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(10) };
9669
9670 pub const CMMG: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(11) };
9671
9672 pub const HE: WlanPhyType = WlanPhyType { value: ::fidl_next::wire::Uint32(12) };
9673 }
9674
9675 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanPhyType
9676 where
9677 ___D: ?Sized,
9678 {
9679 fn decode(
9680 slot: ::fidl_next::Slot<'_, Self>,
9681 _: &mut ___D,
9682 _: (),
9683 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9684 Ok(())
9685 }
9686 }
9687
9688 impl ::core::convert::From<crate::natural::WlanPhyType> for WlanPhyType {
9689 fn from(natural: crate::natural::WlanPhyType) -> Self {
9690 match natural {
9691 crate::natural::WlanPhyType::Dsss => WlanPhyType::DSSS,
9692
9693 crate::natural::WlanPhyType::Hr => WlanPhyType::HR,
9694
9695 crate::natural::WlanPhyType::Ofdm => WlanPhyType::OFDM,
9696
9697 crate::natural::WlanPhyType::Erp => WlanPhyType::ERP,
9698
9699 crate::natural::WlanPhyType::Ht => WlanPhyType::HT,
9700
9701 crate::natural::WlanPhyType::Dmg => WlanPhyType::DMG,
9702
9703 crate::natural::WlanPhyType::Vht => WlanPhyType::VHT,
9704
9705 crate::natural::WlanPhyType::Tvht => WlanPhyType::TVHT,
9706
9707 crate::natural::WlanPhyType::S1G => WlanPhyType::S1_G,
9708
9709 crate::natural::WlanPhyType::Cdmg => WlanPhyType::CDMG,
9710
9711 crate::natural::WlanPhyType::Cmmg => WlanPhyType::CMMG,
9712
9713 crate::natural::WlanPhyType::He => WlanPhyType::HE,
9714
9715 crate::natural::WlanPhyType::UnknownOrdinal_(value) => {
9716 WlanPhyType { value: ::fidl_next::wire::Uint32::from(value) }
9717 }
9718 }
9719 }
9720 }
9721
9722 impl ::fidl_next::IntoNatural for WlanPhyType {
9723 type Natural = crate::natural::WlanPhyType;
9724 }
9725
9726 pub type WlanSoftmacHardwareCapability = ::fidl_next::wire::Uint32;
9728
9729 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
9731 #[repr(transparent)]
9732 pub struct WlanSoftmacHardwareCapabilityBit {
9733 pub(crate) value: ::fidl_next::wire::Uint32,
9734 }
9735
9736 impl ::fidl_next::Constrained for WlanSoftmacHardwareCapabilityBit {
9737 type Constraint = ();
9738
9739 fn validate(
9740 _: ::fidl_next::Slot<'_, Self>,
9741 _: Self::Constraint,
9742 ) -> Result<(), ::fidl_next::ValidationError> {
9743 Ok(())
9744 }
9745 }
9746
9747 unsafe impl ::fidl_next::Wire for WlanSoftmacHardwareCapabilityBit {
9748 type Narrowed<'de> = Self;
9749
9750 #[inline]
9751 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
9752 }
9754 }
9755
9756 impl WlanSoftmacHardwareCapabilityBit {
9757 pub const SHORT_PREAMBLE: WlanSoftmacHardwareCapabilityBit =
9758 WlanSoftmacHardwareCapabilityBit { value: ::fidl_next::wire::Uint32(32) };
9759
9760 pub const SPECTRUM_MGMT: WlanSoftmacHardwareCapabilityBit =
9761 WlanSoftmacHardwareCapabilityBit { value: ::fidl_next::wire::Uint32(256) };
9762
9763 pub const QOS: WlanSoftmacHardwareCapabilityBit =
9764 WlanSoftmacHardwareCapabilityBit { value: ::fidl_next::wire::Uint32(512) };
9765
9766 pub const SHORT_SLOT_TIME: WlanSoftmacHardwareCapabilityBit =
9767 WlanSoftmacHardwareCapabilityBit { value: ::fidl_next::wire::Uint32(1024) };
9768
9769 pub const RADIO_MSMT: WlanSoftmacHardwareCapabilityBit =
9770 WlanSoftmacHardwareCapabilityBit { value: ::fidl_next::wire::Uint32(4096) };
9771
9772 pub const SIMULTANEOUS_CLIENT_AP: WlanSoftmacHardwareCapabilityBit =
9773 WlanSoftmacHardwareCapabilityBit { value: ::fidl_next::wire::Uint32(65536) };
9774 }
9775
9776 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanSoftmacHardwareCapabilityBit
9777 where
9778 ___D: ?Sized,
9779 {
9780 fn decode(
9781 slot: ::fidl_next::Slot<'_, Self>,
9782 _: &mut ___D,
9783 _: (),
9784 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9785 ::fidl_next::munge!(let Self { value } = slot);
9786
9787 match u32::from(*value) {
9788 32 | 256 | 512 | 1024 | 4096 | 65536 => (),
9789 unknown => {
9790 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
9791 }
9792 }
9793
9794 Ok(())
9795 }
9796 }
9797
9798 impl ::core::convert::From<crate::natural::WlanSoftmacHardwareCapabilityBit>
9799 for WlanSoftmacHardwareCapabilityBit
9800 {
9801 fn from(natural: crate::natural::WlanSoftmacHardwareCapabilityBit) -> Self {
9802 match natural {
9803 crate::natural::WlanSoftmacHardwareCapabilityBit::ShortPreamble => {
9804 WlanSoftmacHardwareCapabilityBit::SHORT_PREAMBLE
9805 }
9806
9807 crate::natural::WlanSoftmacHardwareCapabilityBit::SpectrumMgmt => {
9808 WlanSoftmacHardwareCapabilityBit::SPECTRUM_MGMT
9809 }
9810
9811 crate::natural::WlanSoftmacHardwareCapabilityBit::Qos => {
9812 WlanSoftmacHardwareCapabilityBit::QOS
9813 }
9814
9815 crate::natural::WlanSoftmacHardwareCapabilityBit::ShortSlotTime => {
9816 WlanSoftmacHardwareCapabilityBit::SHORT_SLOT_TIME
9817 }
9818
9819 crate::natural::WlanSoftmacHardwareCapabilityBit::RadioMsmt => {
9820 WlanSoftmacHardwareCapabilityBit::RADIO_MSMT
9821 }
9822
9823 crate::natural::WlanSoftmacHardwareCapabilityBit::SimultaneousClientAp => {
9824 WlanSoftmacHardwareCapabilityBit::SIMULTANEOUS_CLIENT_AP
9825 }
9826 }
9827 }
9828 }
9829
9830 impl ::fidl_next::IntoNatural for WlanSoftmacHardwareCapabilityBit {
9831 type Natural = crate::natural::WlanSoftmacHardwareCapabilityBit;
9832 }
9833
9834 #[derive(Clone, Debug)]
9836 #[repr(C)]
9837 pub struct WlanTxResultEntry {
9838 pub tx_vector_idx: ::fidl_next::wire::Uint16,
9839
9840 pub attempts: u8,
9841 }
9842
9843 static_assertions::const_assert_eq!(std::mem::size_of::<WlanTxResultEntry>(), 4);
9844 static_assertions::const_assert_eq!(std::mem::align_of::<WlanTxResultEntry>(), 2);
9845
9846 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanTxResultEntry, tx_vector_idx), 0);
9847
9848 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanTxResultEntry, attempts), 2);
9849
9850 impl ::fidl_next::Constrained for WlanTxResultEntry {
9851 type Constraint = ();
9852
9853 fn validate(
9854 _: ::fidl_next::Slot<'_, Self>,
9855 _: Self::Constraint,
9856 ) -> Result<(), ::fidl_next::ValidationError> {
9857 Ok(())
9858 }
9859 }
9860
9861 unsafe impl ::fidl_next::Wire for WlanTxResultEntry {
9862 type Narrowed<'de> = WlanTxResultEntry;
9863
9864 #[inline]
9865 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9866 ::fidl_next::munge! {
9867 let Self {
9868 tx_vector_idx,
9869 attempts,
9870
9871 } = &mut *out_;
9872 }
9873
9874 ::fidl_next::Wire::zero_padding(tx_vector_idx);
9875
9876 ::fidl_next::Wire::zero_padding(attempts);
9877
9878 unsafe {
9879 out_.as_mut_ptr().cast::<u8>().add(3).write_bytes(0, 1);
9880 }
9881 }
9882 }
9883
9884 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanTxResultEntry
9885 where
9886 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9887 {
9888 fn decode(
9889 slot_: ::fidl_next::Slot<'_, Self>,
9890 decoder_: &mut ___D,
9891 _: (),
9892 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9893 if slot_.as_bytes()[3..4] != [0u8; 1] {
9894 return Err(::fidl_next::DecodeError::InvalidPadding);
9895 }
9896
9897 ::fidl_next::munge! {
9898 let Self {
9899 mut tx_vector_idx,
9900 mut attempts,
9901
9902 } = slot_;
9903 }
9904
9905 let _field = tx_vector_idx.as_mut();
9906
9907 ::fidl_next::Decode::decode(tx_vector_idx.as_mut(), decoder_, ())?;
9908
9909 let _field = attempts.as_mut();
9910
9911 ::fidl_next::Decode::decode(attempts.as_mut(), decoder_, ())?;
9912
9913 Ok(())
9914 }
9915 }
9916
9917 impl ::fidl_next::IntoNatural for WlanTxResultEntry {
9918 type Natural = crate::natural::WlanTxResultEntry;
9919 }
9920
9921 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
9923 #[repr(transparent)]
9924 pub struct WlanTxResultCode {
9925 pub(crate) value: u8,
9926 }
9927
9928 impl ::fidl_next::Constrained for WlanTxResultCode {
9929 type Constraint = ();
9930
9931 fn validate(
9932 _: ::fidl_next::Slot<'_, Self>,
9933 _: Self::Constraint,
9934 ) -> Result<(), ::fidl_next::ValidationError> {
9935 Ok(())
9936 }
9937 }
9938
9939 unsafe impl ::fidl_next::Wire for WlanTxResultCode {
9940 type Narrowed<'de> = Self;
9941
9942 #[inline]
9943 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
9944 }
9946 }
9947
9948 impl WlanTxResultCode {
9949 pub const FAILED: WlanTxResultCode = WlanTxResultCode { value: 0 };
9950
9951 pub const SUCCESS: WlanTxResultCode = WlanTxResultCode { value: 1 };
9952 }
9953
9954 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanTxResultCode
9955 where
9956 ___D: ?Sized,
9957 {
9958 fn decode(
9959 slot: ::fidl_next::Slot<'_, Self>,
9960 _: &mut ___D,
9961 _: (),
9962 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9963 Ok(())
9964 }
9965 }
9966
9967 impl ::core::convert::From<crate::natural::WlanTxResultCode> for WlanTxResultCode {
9968 fn from(natural: crate::natural::WlanTxResultCode) -> Self {
9969 match natural {
9970 crate::natural::WlanTxResultCode::Failed => WlanTxResultCode::FAILED,
9971
9972 crate::natural::WlanTxResultCode::Success => WlanTxResultCode::SUCCESS,
9973
9974 crate::natural::WlanTxResultCode::UnknownOrdinal_(value) => {
9975 WlanTxResultCode { value: u8::from(value) }
9976 }
9977 }
9978 }
9979 }
9980
9981 impl ::fidl_next::IntoNatural for WlanTxResultCode {
9982 type Natural = crate::natural::WlanTxResultCode;
9983 }
9984
9985 #[derive(Clone, Debug)]
9987 #[repr(C)]
9988 pub struct WlanTxResult {
9989 pub tx_result_entry: [crate::wire::WlanTxResultEntry; 8],
9990
9991 pub peer_addr: [u8; 6],
9992
9993 pub result_code: crate::wire::WlanTxResultCode,
9994 }
9995
9996 static_assertions::const_assert_eq!(std::mem::size_of::<WlanTxResult>(), 40);
9997 static_assertions::const_assert_eq!(std::mem::align_of::<WlanTxResult>(), 2);
9998
9999 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanTxResult, tx_result_entry), 0);
10000
10001 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanTxResult, peer_addr), 32);
10002
10003 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanTxResult, result_code), 38);
10004
10005 impl ::fidl_next::Constrained for WlanTxResult {
10006 type Constraint = ();
10007
10008 fn validate(
10009 _: ::fidl_next::Slot<'_, Self>,
10010 _: Self::Constraint,
10011 ) -> Result<(), ::fidl_next::ValidationError> {
10012 Ok(())
10013 }
10014 }
10015
10016 unsafe impl ::fidl_next::Wire for WlanTxResult {
10017 type Narrowed<'de> = WlanTxResult;
10018
10019 #[inline]
10020 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10021 ::fidl_next::munge! {
10022 let Self {
10023 tx_result_entry,
10024 peer_addr,
10025 result_code,
10026
10027 } = &mut *out_;
10028 }
10029
10030 ::fidl_next::Wire::zero_padding(tx_result_entry);
10031
10032 ::fidl_next::Wire::zero_padding(peer_addr);
10033
10034 ::fidl_next::Wire::zero_padding(result_code);
10035
10036 unsafe {
10037 out_.as_mut_ptr().cast::<u8>().add(39).write_bytes(0, 1);
10038 }
10039 }
10040 }
10041
10042 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanTxResult
10043 where
10044 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10045 {
10046 fn decode(
10047 slot_: ::fidl_next::Slot<'_, Self>,
10048 decoder_: &mut ___D,
10049 _: (),
10050 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10051 if slot_.as_bytes()[39..40] != [0u8; 1] {
10052 return Err(::fidl_next::DecodeError::InvalidPadding);
10053 }
10054
10055 ::fidl_next::munge! {
10056 let Self {
10057 mut tx_result_entry,
10058 mut peer_addr,
10059 mut result_code,
10060
10061 } = slot_;
10062 }
10063
10064 let _field = tx_result_entry.as_mut();
10065
10066 ::fidl_next::Decode::decode(tx_result_entry.as_mut(), decoder_, ())?;
10067
10068 let _field = peer_addr.as_mut();
10069
10070 ::fidl_next::Decode::decode(peer_addr.as_mut(), decoder_, ())?;
10071
10072 let _field = result_code.as_mut();
10073
10074 ::fidl_next::Decode::decode(result_code.as_mut(), decoder_, ())?;
10075
10076 Ok(())
10077 }
10078 }
10079
10080 impl ::fidl_next::IntoNatural for WlanTxResult {
10081 type Natural = crate::natural::WlanTxResult;
10082 }
10083
10084 #[derive(Clone, Debug)]
10086 #[repr(C)]
10087 pub struct WlanWmmAccessCategoryParameters {
10088 pub ecw_min: u8,
10089
10090 pub ecw_max: u8,
10091
10092 pub aifsn: u8,
10093
10094 pub txop_limit: ::fidl_next::wire::Uint16,
10095
10096 pub acm: bool,
10097 }
10098
10099 static_assertions::const_assert_eq!(std::mem::size_of::<WlanWmmAccessCategoryParameters>(), 8);
10100 static_assertions::const_assert_eq!(std::mem::align_of::<WlanWmmAccessCategoryParameters>(), 2);
10101
10102 static_assertions::const_assert_eq!(
10103 std::mem::offset_of!(WlanWmmAccessCategoryParameters, ecw_min),
10104 0
10105 );
10106
10107 static_assertions::const_assert_eq!(
10108 std::mem::offset_of!(WlanWmmAccessCategoryParameters, ecw_max),
10109 1
10110 );
10111
10112 static_assertions::const_assert_eq!(
10113 std::mem::offset_of!(WlanWmmAccessCategoryParameters, aifsn),
10114 2
10115 );
10116
10117 static_assertions::const_assert_eq!(
10118 std::mem::offset_of!(WlanWmmAccessCategoryParameters, txop_limit),
10119 4
10120 );
10121
10122 static_assertions::const_assert_eq!(
10123 std::mem::offset_of!(WlanWmmAccessCategoryParameters, acm),
10124 6
10125 );
10126
10127 impl ::fidl_next::Constrained for WlanWmmAccessCategoryParameters {
10128 type Constraint = ();
10129
10130 fn validate(
10131 _: ::fidl_next::Slot<'_, Self>,
10132 _: Self::Constraint,
10133 ) -> Result<(), ::fidl_next::ValidationError> {
10134 Ok(())
10135 }
10136 }
10137
10138 unsafe impl ::fidl_next::Wire for WlanWmmAccessCategoryParameters {
10139 type Narrowed<'de> = WlanWmmAccessCategoryParameters;
10140
10141 #[inline]
10142 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10143 ::fidl_next::munge! {
10144 let Self {
10145 ecw_min,
10146 ecw_max,
10147 aifsn,
10148 txop_limit,
10149 acm,
10150
10151 } = &mut *out_;
10152 }
10153
10154 ::fidl_next::Wire::zero_padding(ecw_min);
10155
10156 ::fidl_next::Wire::zero_padding(ecw_max);
10157
10158 ::fidl_next::Wire::zero_padding(aifsn);
10159
10160 ::fidl_next::Wire::zero_padding(txop_limit);
10161
10162 ::fidl_next::Wire::zero_padding(acm);
10163
10164 unsafe {
10165 out_.as_mut_ptr().cast::<u8>().add(7).write_bytes(0, 1);
10166 }
10167
10168 unsafe {
10169 out_.as_mut_ptr().cast::<u8>().add(3).write_bytes(0, 1);
10170 }
10171 }
10172 }
10173
10174 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanWmmAccessCategoryParameters
10175 where
10176 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10177 {
10178 fn decode(
10179 slot_: ::fidl_next::Slot<'_, Self>,
10180 decoder_: &mut ___D,
10181 _: (),
10182 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10183 if slot_.as_bytes()[7..8] != [0u8; 1] {
10184 return Err(::fidl_next::DecodeError::InvalidPadding);
10185 }
10186
10187 if slot_.as_bytes()[3..4] != [0u8; 1] {
10188 return Err(::fidl_next::DecodeError::InvalidPadding);
10189 }
10190
10191 ::fidl_next::munge! {
10192 let Self {
10193 mut ecw_min,
10194 mut ecw_max,
10195 mut aifsn,
10196 mut txop_limit,
10197 mut acm,
10198
10199 } = slot_;
10200 }
10201
10202 let _field = ecw_min.as_mut();
10203
10204 ::fidl_next::Decode::decode(ecw_min.as_mut(), decoder_, ())?;
10205
10206 let _field = ecw_max.as_mut();
10207
10208 ::fidl_next::Decode::decode(ecw_max.as_mut(), decoder_, ())?;
10209
10210 let _field = aifsn.as_mut();
10211
10212 ::fidl_next::Decode::decode(aifsn.as_mut(), decoder_, ())?;
10213
10214 let _field = txop_limit.as_mut();
10215
10216 ::fidl_next::Decode::decode(txop_limit.as_mut(), decoder_, ())?;
10217
10218 let _field = acm.as_mut();
10219
10220 ::fidl_next::Decode::decode(acm.as_mut(), decoder_, ())?;
10221
10222 Ok(())
10223 }
10224 }
10225
10226 impl ::fidl_next::IntoNatural for WlanWmmAccessCategoryParameters {
10227 type Natural = crate::natural::WlanWmmAccessCategoryParameters;
10228 }
10229
10230 #[derive(Clone, Debug)]
10232 #[repr(C)]
10233 pub struct WlanWmmParameters {
10234 pub apsd: bool,
10235
10236 pub ac_be_params: crate::wire::WlanWmmAccessCategoryParameters,
10237
10238 pub ac_bk_params: crate::wire::WlanWmmAccessCategoryParameters,
10239
10240 pub ac_vi_params: crate::wire::WlanWmmAccessCategoryParameters,
10241
10242 pub ac_vo_params: crate::wire::WlanWmmAccessCategoryParameters,
10243 }
10244
10245 static_assertions::const_assert_eq!(std::mem::size_of::<WlanWmmParameters>(), 34);
10246 static_assertions::const_assert_eq!(std::mem::align_of::<WlanWmmParameters>(), 2);
10247
10248 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanWmmParameters, apsd), 0);
10249
10250 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanWmmParameters, ac_be_params), 2);
10251
10252 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanWmmParameters, ac_bk_params), 10);
10253
10254 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanWmmParameters, ac_vi_params), 18);
10255
10256 static_assertions::const_assert_eq!(std::mem::offset_of!(WlanWmmParameters, ac_vo_params), 26);
10257
10258 impl ::fidl_next::Constrained for WlanWmmParameters {
10259 type Constraint = ();
10260
10261 fn validate(
10262 _: ::fidl_next::Slot<'_, Self>,
10263 _: Self::Constraint,
10264 ) -> Result<(), ::fidl_next::ValidationError> {
10265 Ok(())
10266 }
10267 }
10268
10269 unsafe impl ::fidl_next::Wire for WlanWmmParameters {
10270 type Narrowed<'de> = WlanWmmParameters;
10271
10272 #[inline]
10273 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10274 ::fidl_next::munge! {
10275 let Self {
10276 apsd,
10277 ac_be_params,
10278 ac_bk_params,
10279 ac_vi_params,
10280 ac_vo_params,
10281
10282 } = &mut *out_;
10283 }
10284
10285 ::fidl_next::Wire::zero_padding(apsd);
10286
10287 ::fidl_next::Wire::zero_padding(ac_be_params);
10288
10289 ::fidl_next::Wire::zero_padding(ac_bk_params);
10290
10291 ::fidl_next::Wire::zero_padding(ac_vi_params);
10292
10293 ::fidl_next::Wire::zero_padding(ac_vo_params);
10294
10295 unsafe {
10296 out_.as_mut_ptr().cast::<u8>().add(1).write_bytes(0, 1);
10297 }
10298 }
10299 }
10300
10301 unsafe impl<___D> ::fidl_next::Decode<___D> for WlanWmmParameters
10302 where
10303 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10304 {
10305 fn decode(
10306 slot_: ::fidl_next::Slot<'_, Self>,
10307 decoder_: &mut ___D,
10308 _: (),
10309 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10310 if slot_.as_bytes()[1..2] != [0u8; 1] {
10311 return Err(::fidl_next::DecodeError::InvalidPadding);
10312 }
10313
10314 ::fidl_next::munge! {
10315 let Self {
10316 mut apsd,
10317 mut ac_be_params,
10318 mut ac_bk_params,
10319 mut ac_vi_params,
10320 mut ac_vo_params,
10321
10322 } = slot_;
10323 }
10324
10325 let _field = apsd.as_mut();
10326
10327 ::fidl_next::Decode::decode(apsd.as_mut(), decoder_, ())?;
10328
10329 let _field = ac_be_params.as_mut();
10330
10331 ::fidl_next::Decode::decode(ac_be_params.as_mut(), decoder_, ())?;
10332
10333 let _field = ac_bk_params.as_mut();
10334
10335 ::fidl_next::Decode::decode(ac_bk_params.as_mut(), decoder_, ())?;
10336
10337 let _field = ac_vi_params.as_mut();
10338
10339 ::fidl_next::Decode::decode(ac_vi_params.as_mut(), decoder_, ())?;
10340
10341 let _field = ac_vo_params.as_mut();
10342
10343 ::fidl_next::Decode::decode(ac_vo_params.as_mut(), decoder_, ())?;
10344
10345 Ok(())
10346 }
10347 }
10348
10349 impl ::fidl_next::IntoNatural for WlanWmmParameters {
10350 type Natural = crate::natural::WlanWmmParameters;
10351 }
10352}
10353
10354pub mod wire_optional {}
10355
10356pub mod generic {
10357
10358 pub struct BandRssiAdjustment<T0, T1> {
10360 pub band: T0,
10361
10362 pub rssi_adjustment: T1,
10363 }
10364
10365 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::BandRssiAdjustment, ___E>
10366 for BandRssiAdjustment<T0, T1>
10367 where
10368 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10369 T0: ::fidl_next::Encode<::fidl_next_common_fuchsia_wlan_ieee80211::wire::WlanBand, ___E>,
10370 T1: ::fidl_next::Encode<i8, ___E>,
10371 {
10372 #[inline]
10373 fn encode(
10374 self,
10375 encoder_: &mut ___E,
10376 out_: &mut ::core::mem::MaybeUninit<crate::wire::BandRssiAdjustment>,
10377 _: (),
10378 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10379 ::fidl_next::munge! {
10380 let crate::wire::BandRssiAdjustment {
10381 band,
10382 rssi_adjustment,
10383
10384 } = out_;
10385 }
10386
10387 ::fidl_next::Encode::encode(self.band, encoder_, band, ())?;
10388
10389 ::fidl_next::Encode::encode(self.rssi_adjustment, encoder_, rssi_adjustment, ())?;
10390
10391 Ok(())
10392 }
10393 }
10394
10395 pub struct ScheduledScanPlan<T0, T1> {
10397 pub interval: T0,
10398
10399 pub iterations: T1,
10400 }
10401
10402 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::ScheduledScanPlan, ___E>
10403 for ScheduledScanPlan<T0, T1>
10404 where
10405 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10406 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
10407 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
10408 {
10409 #[inline]
10410 fn encode(
10411 self,
10412 encoder_: &mut ___E,
10413 out_: &mut ::core::mem::MaybeUninit<crate::wire::ScheduledScanPlan>,
10414 _: (),
10415 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10416 ::fidl_next::munge! {
10417 let crate::wire::ScheduledScanPlan {
10418 interval,
10419 iterations,
10420
10421 } = out_;
10422 }
10423
10424 ::fidl_next::Encode::encode(self.interval, encoder_, interval, ())?;
10425
10426 ::fidl_next::Encode::encode(self.iterations, encoder_, iterations, ())?;
10427
10428 Ok(())
10429 }
10430 }
10431
10432 pub struct WlanChannel<T0, T1, T2> {
10434 pub primary: T0,
10435
10436 pub cbw: T1,
10437
10438 pub secondary80: T2,
10439 }
10440
10441 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::WlanChannel, ___E>
10442 for WlanChannel<T0, T1, T2>
10443 where
10444 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10445 T0: ::fidl_next::Encode<u8, ___E>,
10446 T1: ::fidl_next::Encode<crate::wire::ChannelBandwidth, ___E>,
10447 T2: ::fidl_next::Encode<u8, ___E>,
10448 {
10449 #[inline]
10450 fn encode(
10451 self,
10452 encoder_: &mut ___E,
10453 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanChannel>,
10454 _: (),
10455 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10456 ::fidl_next::munge! {
10457 let crate::wire::WlanChannel {
10458 primary,
10459 cbw,
10460 secondary80,
10461
10462 } = out_;
10463 }
10464
10465 ::fidl_next::Encode::encode(self.primary, encoder_, primary, ())?;
10466
10467 ::fidl_next::Encode::encode(self.cbw, encoder_, cbw, ())?;
10468
10469 ::fidl_next::Encode::encode(self.secondary80, encoder_, secondary80, ())?;
10470
10471 Ok(())
10472 }
10473 }
10474
10475 pub struct WlanTxResultEntry<T0, T1> {
10477 pub tx_vector_idx: T0,
10478
10479 pub attempts: T1,
10480 }
10481
10482 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::WlanTxResultEntry, ___E>
10483 for WlanTxResultEntry<T0, T1>
10484 where
10485 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10486 T0: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
10487 T1: ::fidl_next::Encode<u8, ___E>,
10488 {
10489 #[inline]
10490 fn encode(
10491 self,
10492 encoder_: &mut ___E,
10493 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResultEntry>,
10494 _: (),
10495 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10496 ::fidl_next::munge! {
10497 let crate::wire::WlanTxResultEntry {
10498 tx_vector_idx,
10499 attempts,
10500
10501 } = out_;
10502 }
10503
10504 ::fidl_next::Encode::encode(self.tx_vector_idx, encoder_, tx_vector_idx, ())?;
10505
10506 ::fidl_next::Encode::encode(self.attempts, encoder_, attempts, ())?;
10507
10508 Ok(())
10509 }
10510 }
10511
10512 pub struct WlanTxResult<T0, T1, T2> {
10514 pub tx_result_entry: T0,
10515
10516 pub peer_addr: T1,
10517
10518 pub result_code: T2,
10519 }
10520
10521 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::WlanTxResult, ___E>
10522 for WlanTxResult<T0, T1, T2>
10523 where
10524 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10525 T0: ::fidl_next::Encode<[crate::wire::WlanTxResultEntry; 8], ___E>,
10526 T1: ::fidl_next::Encode<[u8; 6], ___E>,
10527 T2: ::fidl_next::Encode<crate::wire::WlanTxResultCode, ___E>,
10528 {
10529 #[inline]
10530 fn encode(
10531 self,
10532 encoder_: &mut ___E,
10533 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanTxResult>,
10534 _: (),
10535 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10536 ::fidl_next::munge! {
10537 let crate::wire::WlanTxResult {
10538 tx_result_entry,
10539 peer_addr,
10540 result_code,
10541
10542 } = out_;
10543 }
10544
10545 ::fidl_next::Encode::encode(self.tx_result_entry, encoder_, tx_result_entry, ())?;
10546
10547 ::fidl_next::Encode::encode(self.peer_addr, encoder_, peer_addr, ())?;
10548
10549 ::fidl_next::Encode::encode(self.result_code, encoder_, result_code, ())?;
10550
10551 Ok(())
10552 }
10553 }
10554
10555 pub struct WlanWmmAccessCategoryParameters<T0, T1, T2, T3, T4> {
10557 pub ecw_min: T0,
10558
10559 pub ecw_max: T1,
10560
10561 pub aifsn: T2,
10562
10563 pub txop_limit: T3,
10564
10565 pub acm: T4,
10566 }
10567
10568 unsafe impl<___E, T0, T1, T2, T3, T4>
10569 ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>
10570 for WlanWmmAccessCategoryParameters<T0, T1, T2, T3, T4>
10571 where
10572 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10573 T0: ::fidl_next::Encode<u8, ___E>,
10574 T1: ::fidl_next::Encode<u8, ___E>,
10575 T2: ::fidl_next::Encode<u8, ___E>,
10576 T3: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
10577 T4: ::fidl_next::Encode<bool, ___E>,
10578 {
10579 #[inline]
10580 fn encode(
10581 self,
10582 encoder_: &mut ___E,
10583 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanWmmAccessCategoryParameters>,
10584 _: (),
10585 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10586 ::fidl_next::munge! {
10587 let crate::wire::WlanWmmAccessCategoryParameters {
10588 ecw_min,
10589 ecw_max,
10590 aifsn,
10591 txop_limit,
10592 acm,
10593
10594 } = out_;
10595 }
10596
10597 ::fidl_next::Encode::encode(self.ecw_min, encoder_, ecw_min, ())?;
10598
10599 ::fidl_next::Encode::encode(self.ecw_max, encoder_, ecw_max, ())?;
10600
10601 ::fidl_next::Encode::encode(self.aifsn, encoder_, aifsn, ())?;
10602
10603 ::fidl_next::Encode::encode(self.txop_limit, encoder_, txop_limit, ())?;
10604
10605 ::fidl_next::Encode::encode(self.acm, encoder_, acm, ())?;
10606
10607 Ok(())
10608 }
10609 }
10610
10611 pub struct WlanWmmParameters<T0, T1, T2, T3, T4> {
10613 pub apsd: T0,
10614
10615 pub ac_be_params: T1,
10616
10617 pub ac_bk_params: T2,
10618
10619 pub ac_vi_params: T3,
10620
10621 pub ac_vo_params: T4,
10622 }
10623
10624 unsafe impl<___E, T0, T1, T2, T3, T4> ::fidl_next::Encode<crate::wire::WlanWmmParameters, ___E>
10625 for WlanWmmParameters<T0, T1, T2, T3, T4>
10626 where
10627 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10628 T0: ::fidl_next::Encode<bool, ___E>,
10629 T1: ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>,
10630 T2: ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>,
10631 T3: ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>,
10632 T4: ::fidl_next::Encode<crate::wire::WlanWmmAccessCategoryParameters, ___E>,
10633 {
10634 #[inline]
10635 fn encode(
10636 self,
10637 encoder_: &mut ___E,
10638 out_: &mut ::core::mem::MaybeUninit<crate::wire::WlanWmmParameters>,
10639 _: (),
10640 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10641 ::fidl_next::munge! {
10642 let crate::wire::WlanWmmParameters {
10643 apsd,
10644 ac_be_params,
10645 ac_bk_params,
10646 ac_vi_params,
10647 ac_vo_params,
10648
10649 } = out_;
10650 }
10651
10652 ::fidl_next::Encode::encode(self.apsd, encoder_, apsd, ())?;
10653
10654 ::fidl_next::Encode::encode(self.ac_be_params, encoder_, ac_be_params, ())?;
10655
10656 ::fidl_next::Encode::encode(self.ac_bk_params, encoder_, ac_bk_params, ())?;
10657
10658 ::fidl_next::Encode::encode(self.ac_vi_params, encoder_, ac_vi_params, ())?;
10659
10660 ::fidl_next::Encode::encode(self.ac_vo_params, encoder_, ac_vo_params, ())?;
10661
10662 Ok(())
10663 }
10664 }
10665}
10666
10667pub use self::natural::*;
10668
10669#[doc = " This constant defined the fixed length for arrays containing the capabilities\n for each band supported by a device driver.\n"]
10670pub const MAX_BANDS: u8 = 16 as u8;
10671
10672#[doc = " This constant defines fixed length for arrays containing MAC roles supported by\n PHY entities.\n"]
10673pub const MAX_SUPPORTED_MAC_ROLES: u8 = 16 as u8;
10674
10675#[doc = " This constant defines fixed length for arrays containing PHY types supported by\n PHY entities.\n"]
10676pub const MAX_SUPPORTED_PHY_TYPES: u8 = 64 as u8;
10677
10678pub const WLAN_MAC_MAX_EXT_RATES: u32 = 255 as u32;
10679
10680pub const WLAN_MAC_MAX_SUPP_RATES: u32 = 8 as u32;
10681
10682pub const WLAN_TX_RESULT_MAX_ENTRY: u32 = 8 as u32;
10683
10684pub const WLAN_TX_VECTOR_IDX_INVALID: u16 = 0 as u16;