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