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