Skip to main content

fidl_next_common_fuchsia_wlan_internal/
fidl_next_common_fuchsia_wlan_internal.rs

1// DO NOT EDIT: This file is machine-generated by fidlgen
2#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7    #[doc = " WLAN security protocols.\n\n WPA protocols are additionally enumerated by their authentication suite\n (i.e., Personal vs. Enterprise).\n"]
8    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9    #[repr(u32)]
10    pub enum Protocol {
11        Open = 1,
12        Wep = 2,
13        Wpa1 = 3,
14        Wpa2Personal = 4,
15        Wpa2Enterprise = 5,
16        Wpa3Personal = 6,
17        Wpa3Enterprise = 7,
18        Owe = 8,
19        UnknownOrdinal_(u32) = 9,
20    }
21    impl ::std::convert::From<u32> for Protocol {
22        fn from(value: u32) -> Self {
23            match value {
24                1 => Self::Open,
25                2 => Self::Wep,
26                3 => Self::Wpa1,
27                4 => Self::Wpa2Personal,
28                5 => Self::Wpa2Enterprise,
29                6 => Self::Wpa3Personal,
30                7 => Self::Wpa3Enterprise,
31                8 => Self::Owe,
32
33                _ => Self::UnknownOrdinal_(value),
34            }
35        }
36    }
37
38    impl ::std::convert::From<Protocol> for u32 {
39        fn from(value: Protocol) -> Self {
40            match value {
41                Protocol::Open => 1,
42                Protocol::Wep => 2,
43                Protocol::Wpa1 => 3,
44                Protocol::Wpa2Personal => 4,
45                Protocol::Wpa2Enterprise => 5,
46                Protocol::Wpa3Personal => 6,
47                Protocol::Wpa3Enterprise => 7,
48                Protocol::Owe => 8,
49
50                Protocol::UnknownOrdinal_(value) => value,
51            }
52        }
53    }
54
55    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Protocol, ___E> for Protocol
56    where
57        ___E: ?Sized,
58    {
59        #[inline]
60        fn encode(
61            self,
62            encoder: &mut ___E,
63            out: &mut ::core::mem::MaybeUninit<crate::wire::Protocol>,
64            _: (),
65        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
66            ::fidl_next::Encode::encode(&self, encoder, out, ())
67        }
68    }
69
70    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Protocol, ___E> for &'a Protocol
71    where
72        ___E: ?Sized,
73    {
74        #[inline]
75        fn encode(
76            self,
77            encoder: &mut ___E,
78            out: &mut ::core::mem::MaybeUninit<crate::wire::Protocol>,
79            _: (),
80        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
81            ::fidl_next::munge!(let crate::wire::Protocol { value } = out);
82            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
83                Protocol::Open => 1,
84
85                Protocol::Wep => 2,
86
87                Protocol::Wpa1 => 3,
88
89                Protocol::Wpa2Personal => 4,
90
91                Protocol::Wpa2Enterprise => 5,
92
93                Protocol::Wpa3Personal => 6,
94
95                Protocol::Wpa3Enterprise => 7,
96
97                Protocol::Owe => 8,
98
99                Protocol::UnknownOrdinal_(value) => value,
100            }));
101
102            Ok(())
103        }
104    }
105
106    impl ::core::convert::From<crate::wire::Protocol> for Protocol {
107        fn from(wire: crate::wire::Protocol) -> Self {
108            match u32::from(wire.value) {
109                1 => Self::Open,
110
111                2 => Self::Wep,
112
113                3 => Self::Wpa1,
114
115                4 => Self::Wpa2Personal,
116
117                5 => Self::Wpa2Enterprise,
118
119                6 => Self::Wpa3Personal,
120
121                7 => Self::Wpa3Enterprise,
122
123                8 => Self::Owe,
124
125                value => Self::UnknownOrdinal_(value),
126            }
127        }
128    }
129
130    impl ::fidl_next::FromWire<crate::wire::Protocol> for Protocol {
131        #[inline]
132        fn from_wire(wire: crate::wire::Protocol) -> Self {
133            Self::from(wire)
134        }
135    }
136
137    impl ::fidl_next::FromWireRef<crate::wire::Protocol> for Protocol {
138        #[inline]
139        fn from_wire_ref(wire: &crate::wire::Protocol) -> Self {
140            Self::from(*wire)
141        }
142    }
143
144    #[doc = " Pairs credentials with a particular security protocol. This type requires\n validation, as `Protocol` and `Credentials` may disagree. FIDL APIs that use\n this type generally restrict authentication to `protocol`.\n"]
145    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
146    pub struct Authentication {
147        pub protocol: crate::natural::Protocol,
148
149        pub credentials: ::core::option::Option<::std::boxed::Box<crate::natural::Credentials>>,
150    }
151
152    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Authentication<'static>, ___E> for Authentication
153    where
154        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
155        ___E: ::fidl_next::Encoder,
156    {
157        #[inline]
158        fn encode(
159            self,
160            encoder_: &mut ___E,
161            out_: &mut ::core::mem::MaybeUninit<crate::wire::Authentication<'static>>,
162            _: (),
163        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
164            ::fidl_next::munge! {
165                let crate::wire::Authentication {
166                    protocol,
167                    credentials,
168
169                } = out_;
170            }
171
172            ::fidl_next::Encode::encode(self.protocol, encoder_, protocol, ())?;
173
174            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(protocol.as_mut_ptr()) };
175
176            ::fidl_next::Encode::encode(self.credentials, encoder_, credentials, ())?;
177
178            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(credentials.as_mut_ptr()) };
179
180            Ok(())
181        }
182    }
183
184    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Authentication<'static>, ___E>
185        for &'a Authentication
186    where
187        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
188        ___E: ::fidl_next::Encoder,
189    {
190        #[inline]
191        fn encode(
192            self,
193            encoder_: &mut ___E,
194            out_: &mut ::core::mem::MaybeUninit<crate::wire::Authentication<'static>>,
195            _: (),
196        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
197            ::fidl_next::munge! {
198                let crate::wire::Authentication {
199                    protocol,
200                    credentials,
201
202                } = out_;
203            }
204
205            ::fidl_next::Encode::encode(&self.protocol, encoder_, protocol, ())?;
206
207            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(protocol.as_mut_ptr()) };
208
209            ::fidl_next::Encode::encode(&self.credentials, encoder_, credentials, ())?;
210
211            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(credentials.as_mut_ptr()) };
212
213            Ok(())
214        }
215    }
216
217    unsafe impl<___E>
218        ::fidl_next::EncodeOption<
219            ::fidl_next::wire::Box<'static, crate::wire::Authentication<'static>>,
220            ___E,
221        > for Authentication
222    where
223        ___E: ::fidl_next::Encoder + ?Sized,
224        Authentication: ::fidl_next::Encode<crate::wire::Authentication<'static>, ___E>,
225    {
226        #[inline]
227        fn encode_option(
228            this: ::core::option::Option<Self>,
229            encoder: &mut ___E,
230            out: &mut ::core::mem::MaybeUninit<
231                ::fidl_next::wire::Box<'static, crate::wire::Authentication<'static>>,
232            >,
233            _: (),
234        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
235            if let Some(inner) = this {
236                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
237                ::fidl_next::wire::Box::encode_present(out);
238            } else {
239                ::fidl_next::wire::Box::encode_absent(out);
240            }
241
242            Ok(())
243        }
244    }
245
246    unsafe impl<'a, ___E>
247        ::fidl_next::EncodeOption<
248            ::fidl_next::wire::Box<'static, crate::wire::Authentication<'static>>,
249            ___E,
250        > for &'a Authentication
251    where
252        ___E: ::fidl_next::Encoder + ?Sized,
253        &'a Authentication: ::fidl_next::Encode<crate::wire::Authentication<'static>, ___E>,
254    {
255        #[inline]
256        fn encode_option(
257            this: ::core::option::Option<Self>,
258            encoder: &mut ___E,
259            out: &mut ::core::mem::MaybeUninit<
260                ::fidl_next::wire::Box<'static, crate::wire::Authentication<'static>>,
261            >,
262            _: (),
263        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
264            if let Some(inner) = this {
265                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
266                ::fidl_next::wire::Box::encode_present(out);
267            } else {
268                ::fidl_next::wire::Box::encode_absent(out);
269            }
270
271            Ok(())
272        }
273    }
274
275    impl<'de> ::fidl_next::FromWire<crate::wire::Authentication<'de>> for Authentication {
276        #[inline]
277        fn from_wire(wire: crate::wire::Authentication<'de>) -> Self {
278            Self {
279                protocol: ::fidl_next::FromWire::from_wire(wire.protocol),
280
281                credentials: ::fidl_next::FromWire::from_wire(wire.credentials),
282            }
283        }
284    }
285
286    impl<'de> ::fidl_next::FromWireRef<crate::wire::Authentication<'de>> for Authentication {
287        #[inline]
288        fn from_wire_ref(wire: &crate::wire::Authentication<'de>) -> Self {
289            Self {
290                protocol: ::fidl_next::FromWireRef::from_wire_ref(&wire.protocol),
291
292                credentials: ::fidl_next::FromWireRef::from_wire_ref(&wire.credentials),
293            }
294        }
295    }
296
297    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
298    #[repr(u32)]
299    pub enum BtCoexistenceMode {
300        ModeAuto = 1,
301        ModeOff = 2,
302    }
303    impl ::core::convert::TryFrom<u32> for BtCoexistenceMode {
304        type Error = ::fidl_next::UnknownStrictEnumMemberError;
305        fn try_from(
306            value: u32,
307        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
308            match value {
309                1 => Ok(Self::ModeAuto),
310                2 => Ok(Self::ModeOff),
311
312                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
313            }
314        }
315    }
316
317    impl ::std::convert::From<BtCoexistenceMode> for u32 {
318        fn from(value: BtCoexistenceMode) -> Self {
319            match value {
320                BtCoexistenceMode::ModeAuto => 1,
321                BtCoexistenceMode::ModeOff => 2,
322            }
323        }
324    }
325
326    unsafe impl<___E> ::fidl_next::Encode<crate::wire::BtCoexistenceMode, ___E> for BtCoexistenceMode
327    where
328        ___E: ?Sized,
329    {
330        #[inline]
331        fn encode(
332            self,
333            encoder: &mut ___E,
334            out: &mut ::core::mem::MaybeUninit<crate::wire::BtCoexistenceMode>,
335            _: (),
336        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
337            ::fidl_next::Encode::encode(&self, encoder, out, ())
338        }
339    }
340
341    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::BtCoexistenceMode, ___E>
342        for &'a BtCoexistenceMode
343    where
344        ___E: ?Sized,
345    {
346        #[inline]
347        fn encode(
348            self,
349            encoder: &mut ___E,
350            out: &mut ::core::mem::MaybeUninit<crate::wire::BtCoexistenceMode>,
351            _: (),
352        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
353            ::fidl_next::munge!(let crate::wire::BtCoexistenceMode { value } = out);
354            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
355                BtCoexistenceMode::ModeAuto => 1,
356
357                BtCoexistenceMode::ModeOff => 2,
358            }));
359
360            Ok(())
361        }
362    }
363
364    impl ::core::convert::From<crate::wire::BtCoexistenceMode> for BtCoexistenceMode {
365        fn from(wire: crate::wire::BtCoexistenceMode) -> Self {
366            match u32::from(wire.value) {
367                1 => Self::ModeAuto,
368
369                2 => Self::ModeOff,
370
371                _ => unsafe { ::core::hint::unreachable_unchecked() },
372            }
373        }
374    }
375
376    impl ::fidl_next::FromWire<crate::wire::BtCoexistenceMode> for BtCoexistenceMode {
377        #[inline]
378        fn from_wire(wire: crate::wire::BtCoexistenceMode) -> Self {
379            Self::from(wire)
380        }
381    }
382
383    impl ::fidl_next::FromWireRef<crate::wire::BtCoexistenceMode> for BtCoexistenceMode {
384        #[inline]
385        fn from_wire_ref(wire: &crate::wire::BtCoexistenceMode) -> Self {
386            Self::from(*wire)
387        }
388    }
389
390    #[derive(Debug, Clone, PartialEq)]
391    pub struct ChannelSwitchInfo {
392        pub new_primary_channel: ::fidl_next_common_fuchsia_wlan_ieee80211::natural::ChannelNumber,
393
394        pub bandwidth: ::fidl_next_common_fuchsia_wlan_ieee80211::natural::ChannelBandwidth,
395
396        pub vht_secondary_80_channel:
397            ::fidl_next_common_fuchsia_wlan_ieee80211::natural::ChannelNumber,
398    }
399
400    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ChannelSwitchInfo, ___E> for ChannelSwitchInfo
401    where
402        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
403    {
404        #[inline]
405        fn encode(
406            self,
407            encoder_: &mut ___E,
408            out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSwitchInfo>,
409            _: (),
410        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
411            ::fidl_next::munge! {
412                let crate::wire::ChannelSwitchInfo {
413                    new_primary_channel,
414                    bandwidth,
415                    vht_secondary_80_channel,
416
417                } = out_;
418            }
419
420            ::fidl_next::Encode::encode(
421                self.new_primary_channel,
422                encoder_,
423                new_primary_channel,
424                (),
425            )?;
426
427            let mut _field =
428                unsafe { ::fidl_next::Slot::new_unchecked(new_primary_channel.as_mut_ptr()) };
429
430            ::fidl_next::Encode::encode(self.bandwidth, encoder_, bandwidth, ())?;
431
432            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bandwidth.as_mut_ptr()) };
433
434            ::fidl_next::Encode::encode(
435                self.vht_secondary_80_channel,
436                encoder_,
437                vht_secondary_80_channel,
438                (),
439            )?;
440
441            let mut _field =
442                unsafe { ::fidl_next::Slot::new_unchecked(vht_secondary_80_channel.as_mut_ptr()) };
443
444            Ok(())
445        }
446    }
447
448    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ChannelSwitchInfo, ___E>
449        for &'a ChannelSwitchInfo
450    where
451        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
452    {
453        #[inline]
454        fn encode(
455            self,
456            encoder_: &mut ___E,
457            out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSwitchInfo>,
458            _: (),
459        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
460            ::fidl_next::munge! {
461                let crate::wire::ChannelSwitchInfo {
462                    new_primary_channel,
463                    bandwidth,
464                    vht_secondary_80_channel,
465
466                } = out_;
467            }
468
469            ::fidl_next::Encode::encode(
470                &self.new_primary_channel,
471                encoder_,
472                new_primary_channel,
473                (),
474            )?;
475
476            let mut _field =
477                unsafe { ::fidl_next::Slot::new_unchecked(new_primary_channel.as_mut_ptr()) };
478
479            ::fidl_next::Encode::encode(&self.bandwidth, encoder_, bandwidth, ())?;
480
481            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bandwidth.as_mut_ptr()) };
482
483            ::fidl_next::Encode::encode(
484                &self.vht_secondary_80_channel,
485                encoder_,
486                vht_secondary_80_channel,
487                (),
488            )?;
489
490            let mut _field =
491                unsafe { ::fidl_next::Slot::new_unchecked(vht_secondary_80_channel.as_mut_ptr()) };
492
493            Ok(())
494        }
495    }
496
497    unsafe impl<___E>
498        ::fidl_next::EncodeOption<
499            ::fidl_next::wire::Box<'static, crate::wire::ChannelSwitchInfo>,
500            ___E,
501        > for ChannelSwitchInfo
502    where
503        ___E: ::fidl_next::Encoder + ?Sized,
504        ChannelSwitchInfo: ::fidl_next::Encode<crate::wire::ChannelSwitchInfo, ___E>,
505    {
506        #[inline]
507        fn encode_option(
508            this: ::core::option::Option<Self>,
509            encoder: &mut ___E,
510            out: &mut ::core::mem::MaybeUninit<
511                ::fidl_next::wire::Box<'static, crate::wire::ChannelSwitchInfo>,
512            >,
513            _: (),
514        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
515            if let Some(inner) = this {
516                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
517                ::fidl_next::wire::Box::encode_present(out);
518            } else {
519                ::fidl_next::wire::Box::encode_absent(out);
520            }
521
522            Ok(())
523        }
524    }
525
526    unsafe impl<'a, ___E>
527        ::fidl_next::EncodeOption<
528            ::fidl_next::wire::Box<'static, crate::wire::ChannelSwitchInfo>,
529            ___E,
530        > for &'a ChannelSwitchInfo
531    where
532        ___E: ::fidl_next::Encoder + ?Sized,
533        &'a ChannelSwitchInfo: ::fidl_next::Encode<crate::wire::ChannelSwitchInfo, ___E>,
534    {
535        #[inline]
536        fn encode_option(
537            this: ::core::option::Option<Self>,
538            encoder: &mut ___E,
539            out: &mut ::core::mem::MaybeUninit<
540                ::fidl_next::wire::Box<'static, crate::wire::ChannelSwitchInfo>,
541            >,
542            _: (),
543        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
544            if let Some(inner) = this {
545                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
546                ::fidl_next::wire::Box::encode_present(out);
547            } else {
548                ::fidl_next::wire::Box::encode_absent(out);
549            }
550
551            Ok(())
552        }
553    }
554
555    impl ::fidl_next::FromWire<crate::wire::ChannelSwitchInfo> for ChannelSwitchInfo {
556        #[inline]
557        fn from_wire(wire: crate::wire::ChannelSwitchInfo) -> Self {
558            Self {
559                new_primary_channel: ::fidl_next::FromWire::from_wire(wire.new_primary_channel),
560
561                bandwidth: ::fidl_next::FromWire::from_wire(wire.bandwidth),
562
563                vht_secondary_80_channel: ::fidl_next::FromWire::from_wire(
564                    wire.vht_secondary_80_channel,
565                ),
566            }
567        }
568    }
569
570    impl ::fidl_next::FromWireRef<crate::wire::ChannelSwitchInfo> for ChannelSwitchInfo {
571        #[inline]
572        fn from_wire_ref(wire: &crate::wire::ChannelSwitchInfo) -> Self {
573            Self {
574                new_primary_channel: ::fidl_next::FromWireRef::from_wire_ref(
575                    &wire.new_primary_channel,
576                ),
577
578                bandwidth: ::fidl_next::FromWireRef::from_wire_ref(&wire.bandwidth),
579
580                vht_secondary_80_channel: ::fidl_next::FromWireRef::from_wire_ref(
581                    &wire.vht_secondary_80_channel,
582                ),
583            }
584        }
585    }
586
587    #[doc = " WEP credentials.\n"]
588    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
589    pub struct WepCredentials {
590        pub key: ::std::vec::Vec<u8>,
591    }
592
593    unsafe impl<___E> ::fidl_next::Encode<crate::wire::WepCredentials<'static>, ___E> for WepCredentials
594    where
595        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
596        ___E: ::fidl_next::Encoder,
597    {
598        #[inline]
599        fn encode(
600            self,
601            encoder_: &mut ___E,
602            out_: &mut ::core::mem::MaybeUninit<crate::wire::WepCredentials<'static>>,
603            _: (),
604        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
605            ::fidl_next::munge! {
606                let crate::wire::WepCredentials {
607                    key,
608
609                } = out_;
610            }
611
612            ::fidl_next::Encode::encode(self.key, encoder_, key, (4294967295, ()))?;
613
614            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
615            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
616
617            Ok(())
618        }
619    }
620
621    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WepCredentials<'static>, ___E>
622        for &'a WepCredentials
623    where
624        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
625        ___E: ::fidl_next::Encoder,
626    {
627        #[inline]
628        fn encode(
629            self,
630            encoder_: &mut ___E,
631            out_: &mut ::core::mem::MaybeUninit<crate::wire::WepCredentials<'static>>,
632            _: (),
633        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
634            ::fidl_next::munge! {
635                let crate::wire::WepCredentials {
636                    key,
637
638                } = out_;
639            }
640
641            ::fidl_next::Encode::encode(&self.key, encoder_, key, (4294967295, ()))?;
642
643            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
644            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
645
646            Ok(())
647        }
648    }
649
650    unsafe impl<___E>
651        ::fidl_next::EncodeOption<
652            ::fidl_next::wire::Box<'static, crate::wire::WepCredentials<'static>>,
653            ___E,
654        > for WepCredentials
655    where
656        ___E: ::fidl_next::Encoder + ?Sized,
657        WepCredentials: ::fidl_next::Encode<crate::wire::WepCredentials<'static>, ___E>,
658    {
659        #[inline]
660        fn encode_option(
661            this: ::core::option::Option<Self>,
662            encoder: &mut ___E,
663            out: &mut ::core::mem::MaybeUninit<
664                ::fidl_next::wire::Box<'static, crate::wire::WepCredentials<'static>>,
665            >,
666            _: (),
667        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
668            if let Some(inner) = this {
669                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
670                ::fidl_next::wire::Box::encode_present(out);
671            } else {
672                ::fidl_next::wire::Box::encode_absent(out);
673            }
674
675            Ok(())
676        }
677    }
678
679    unsafe impl<'a, ___E>
680        ::fidl_next::EncodeOption<
681            ::fidl_next::wire::Box<'static, crate::wire::WepCredentials<'static>>,
682            ___E,
683        > for &'a WepCredentials
684    where
685        ___E: ::fidl_next::Encoder + ?Sized,
686        &'a WepCredentials: ::fidl_next::Encode<crate::wire::WepCredentials<'static>, ___E>,
687    {
688        #[inline]
689        fn encode_option(
690            this: ::core::option::Option<Self>,
691            encoder: &mut ___E,
692            out: &mut ::core::mem::MaybeUninit<
693                ::fidl_next::wire::Box<'static, crate::wire::WepCredentials<'static>>,
694            >,
695            _: (),
696        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
697            if let Some(inner) = this {
698                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
699                ::fidl_next::wire::Box::encode_present(out);
700            } else {
701                ::fidl_next::wire::Box::encode_absent(out);
702            }
703
704            Ok(())
705        }
706    }
707
708    impl<'de> ::fidl_next::FromWire<crate::wire::WepCredentials<'de>> for WepCredentials {
709        #[inline]
710        fn from_wire(wire: crate::wire::WepCredentials<'de>) -> Self {
711            Self { key: ::fidl_next::FromWire::from_wire(wire.key) }
712        }
713    }
714
715    impl<'de> ::fidl_next::FromWireRef<crate::wire::WepCredentials<'de>> for WepCredentials {
716        #[inline]
717        fn from_wire_ref(wire: &crate::wire::WepCredentials<'de>) -> Self {
718            Self { key: ::fidl_next::FromWireRef::from_wire_ref(&wire.key) }
719        }
720    }
721
722    #[doc = " WPA credentials.\n"]
723    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
724    pub enum WpaCredentials {
725        Psk([u8; 32]),
726
727        Passphrase(::std::vec::Vec<u8>),
728
729        UnknownOrdinal_(u64),
730    }
731
732    impl WpaCredentials {
733        pub fn is_unknown(&self) -> bool {
734            #[allow(unreachable_patterns)]
735            match self {
736                Self::UnknownOrdinal_(_) => true,
737                _ => false,
738            }
739        }
740    }
741
742    unsafe impl<___E> ::fidl_next::Encode<crate::wire::WpaCredentials<'static>, ___E> for WpaCredentials
743    where
744        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
745        ___E: ::fidl_next::Encoder,
746    {
747        #[inline]
748        fn encode(
749            self,
750            encoder: &mut ___E,
751            out: &mut ::core::mem::MaybeUninit<crate::wire::WpaCredentials<'static>>,
752            _: (),
753        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
754            ::fidl_next::munge!(let crate::wire::WpaCredentials { raw, _phantom: _ } = out);
755
756            match self {
757                Self::Psk(value) => ::fidl_next::wire::Union::encode_as::<___E, [u8; 32]>(
758                    value,
759                    1,
760                    encoder,
761                    raw,
762                    (),
763                )?,
764
765                Self::Passphrase(value) => ::fidl_next::wire::Union::encode_as::<
766                    ___E,
767                    ::fidl_next::wire::Vector<'static, u8>,
768                >(value, 2, encoder, raw, (63, ()))?,
769
770                Self::UnknownOrdinal_(ordinal) => {
771                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
772                }
773            }
774
775            Ok(())
776        }
777    }
778
779    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WpaCredentials<'static>, ___E>
780        for &'a WpaCredentials
781    where
782        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
783        ___E: ::fidl_next::Encoder,
784    {
785        #[inline]
786        fn encode(
787            self,
788            encoder: &mut ___E,
789            out: &mut ::core::mem::MaybeUninit<crate::wire::WpaCredentials<'static>>,
790            _: (),
791        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
792            ::fidl_next::munge!(let crate::wire::WpaCredentials { raw, _phantom: _ } = out);
793
794            match self {
795                WpaCredentials::Psk(value) => {
796                    ::fidl_next::wire::Union::encode_as::<___E, [u8; 32]>(
797                        value,
798                        1,
799                        encoder,
800                        raw,
801                        (),
802                    )?
803                }
804
805                WpaCredentials::Passphrase(value) => {
806                    ::fidl_next::wire::Union::encode_as::<
807                        ___E,
808                        ::fidl_next::wire::Vector<'static, u8>,
809                    >(value, 2, encoder, raw, (63, ()))?
810                }
811
812                WpaCredentials::UnknownOrdinal_(ordinal) => {
813                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
814                }
815            }
816
817            Ok(())
818        }
819    }
820
821    unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::WpaCredentials<'static>, ___E>
822        for WpaCredentials
823    where
824        ___E: ?Sized,
825        WpaCredentials: ::fidl_next::Encode<crate::wire::WpaCredentials<'static>, ___E>,
826    {
827        #[inline]
828        fn encode_option(
829            this: ::core::option::Option<Self>,
830            encoder: &mut ___E,
831            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::WpaCredentials<'static>>,
832            _: (),
833        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
834            ::fidl_next::munge!(let crate::wire_optional::WpaCredentials { raw, _phantom: _ } = &mut *out);
835
836            if let Some(inner) = this {
837                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
838                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
839            } else {
840                ::fidl_next::wire::Union::encode_absent(raw);
841            }
842
843            Ok(())
844        }
845    }
846
847    unsafe impl<'a, ___E>
848        ::fidl_next::EncodeOption<crate::wire_optional::WpaCredentials<'static>, ___E>
849        for &'a WpaCredentials
850    where
851        ___E: ?Sized,
852        &'a WpaCredentials: ::fidl_next::Encode<crate::wire::WpaCredentials<'static>, ___E>,
853    {
854        #[inline]
855        fn encode_option(
856            this: ::core::option::Option<Self>,
857            encoder: &mut ___E,
858            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::WpaCredentials<'static>>,
859            _: (),
860        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
861            ::fidl_next::munge!(let crate::wire_optional::WpaCredentials { raw, _phantom: _ } = &mut *out);
862
863            if let Some(inner) = this {
864                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
865                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
866            } else {
867                ::fidl_next::wire::Union::encode_absent(raw);
868            }
869
870            Ok(())
871        }
872    }
873
874    impl<'de> ::fidl_next::FromWire<crate::wire::WpaCredentials<'de>> for WpaCredentials {
875        #[inline]
876        fn from_wire(wire: crate::wire::WpaCredentials<'de>) -> Self {
877            let wire = ::core::mem::ManuallyDrop::new(wire);
878            match wire.raw.ordinal() {
879                1 => Self::Psk(::fidl_next::FromWire::from_wire(unsafe {
880                    wire.raw.get().read_unchecked::<[u8; 32]>()
881                })),
882
883                2 => Self::Passphrase(::fidl_next::FromWire::from_wire(unsafe {
884                    wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
885                })),
886
887                ord => return Self::UnknownOrdinal_(ord as u64),
888            }
889        }
890    }
891
892    impl<'de> ::fidl_next::FromWireRef<crate::wire::WpaCredentials<'de>> for WpaCredentials {
893        #[inline]
894        fn from_wire_ref(wire: &crate::wire::WpaCredentials<'de>) -> Self {
895            match wire.raw.ordinal() {
896                1 => Self::Psk(::fidl_next::FromWireRef::from_wire_ref(unsafe {
897                    wire.raw.get().deref_unchecked::<[u8; 32]>()
898                })),
899
900                2 => Self::Passphrase(::fidl_next::FromWireRef::from_wire_ref(unsafe {
901                    wire.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
902                })),
903
904                ord => return Self::UnknownOrdinal_(ord as u64),
905            }
906        }
907    }
908
909    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::WpaCredentials<'de>>
910        for WpaCredentials
911    {
912        #[inline]
913        fn from_wire_option(
914            wire: crate::wire_optional::WpaCredentials<'de>,
915        ) -> ::core::option::Option<Self> {
916            if let Some(inner) = wire.into_option() {
917                Some(::fidl_next::FromWire::from_wire(inner))
918            } else {
919                None
920            }
921        }
922    }
923
924    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::WpaCredentials<'de>>
925        for Box<WpaCredentials>
926    {
927        #[inline]
928        fn from_wire_option(
929            wire: crate::wire_optional::WpaCredentials<'de>,
930        ) -> ::core::option::Option<Self> {
931            <WpaCredentials as ::fidl_next::FromWireOption<
932                crate::wire_optional::WpaCredentials<'de>,
933            >>::from_wire_option(wire)
934            .map(Box::new)
935        }
936    }
937
938    impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::WpaCredentials<'de>>
939        for Box<WpaCredentials>
940    {
941        #[inline]
942        fn from_wire_option_ref(
943            wire: &crate::wire_optional::WpaCredentials<'de>,
944        ) -> ::core::option::Option<Self> {
945            if let Some(inner) = wire.as_ref() {
946                Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
947            } else {
948                None
949            }
950        }
951    }
952
953    #[doc = " Credentials used to authenticate with a WLAN.\n\n The variants of this union describe the credentials supported by a protocol\n or protocol suite (i.e., WEP and WPA).\n"]
954    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
955    pub enum Credentials {
956        Wep(crate::natural::WepCredentials),
957
958        Wpa(crate::natural::WpaCredentials),
959
960        UnknownOrdinal_(u64),
961    }
962
963    impl Credentials {
964        pub fn is_unknown(&self) -> bool {
965            #[allow(unreachable_patterns)]
966            match self {
967                Self::UnknownOrdinal_(_) => true,
968                _ => false,
969            }
970        }
971    }
972
973    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Credentials<'static>, ___E> for Credentials
974    where
975        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
976        ___E: ::fidl_next::Encoder,
977    {
978        #[inline]
979        fn encode(
980            self,
981            encoder: &mut ___E,
982            out: &mut ::core::mem::MaybeUninit<crate::wire::Credentials<'static>>,
983            _: (),
984        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
985            ::fidl_next::munge!(let crate::wire::Credentials { raw, _phantom: _ } = out);
986
987            match self {
988                Self::Wep(value) => ::fidl_next::wire::Union::encode_as::<
989                    ___E,
990                    crate::wire::WepCredentials<'static>,
991                >(value, 1, encoder, raw, ())?,
992
993                Self::Wpa(value) => ::fidl_next::wire::Union::encode_as::<
994                    ___E,
995                    crate::wire::WpaCredentials<'static>,
996                >(value, 2, encoder, raw, ())?,
997
998                Self::UnknownOrdinal_(ordinal) => {
999                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1000                }
1001            }
1002
1003            Ok(())
1004        }
1005    }
1006
1007    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Credentials<'static>, ___E>
1008        for &'a Credentials
1009    where
1010        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1011        ___E: ::fidl_next::Encoder,
1012    {
1013        #[inline]
1014        fn encode(
1015            self,
1016            encoder: &mut ___E,
1017            out: &mut ::core::mem::MaybeUninit<crate::wire::Credentials<'static>>,
1018            _: (),
1019        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1020            ::fidl_next::munge!(let crate::wire::Credentials { raw, _phantom: _ } = out);
1021
1022            match self {
1023                Credentials::Wep(value) => ::fidl_next::wire::Union::encode_as::<
1024                    ___E,
1025                    crate::wire::WepCredentials<'static>,
1026                >(value, 1, encoder, raw, ())?,
1027
1028                Credentials::Wpa(value) => ::fidl_next::wire::Union::encode_as::<
1029                    ___E,
1030                    crate::wire::WpaCredentials<'static>,
1031                >(value, 2, encoder, raw, ())?,
1032
1033                Credentials::UnknownOrdinal_(ordinal) => {
1034                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
1035                }
1036            }
1037
1038            Ok(())
1039        }
1040    }
1041
1042    unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::Credentials<'static>, ___E>
1043        for Credentials
1044    where
1045        ___E: ?Sized,
1046        Credentials: ::fidl_next::Encode<crate::wire::Credentials<'static>, ___E>,
1047    {
1048        #[inline]
1049        fn encode_option(
1050            this: ::core::option::Option<Self>,
1051            encoder: &mut ___E,
1052            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Credentials<'static>>,
1053            _: (),
1054        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1055            ::fidl_next::munge!(let crate::wire_optional::Credentials { raw, _phantom: _ } = &mut *out);
1056
1057            if let Some(inner) = this {
1058                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1059                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1060            } else {
1061                ::fidl_next::wire::Union::encode_absent(raw);
1062            }
1063
1064            Ok(())
1065        }
1066    }
1067
1068    unsafe impl<'a, ___E>
1069        ::fidl_next::EncodeOption<crate::wire_optional::Credentials<'static>, ___E>
1070        for &'a Credentials
1071    where
1072        ___E: ?Sized,
1073        &'a Credentials: ::fidl_next::Encode<crate::wire::Credentials<'static>, ___E>,
1074    {
1075        #[inline]
1076        fn encode_option(
1077            this: ::core::option::Option<Self>,
1078            encoder: &mut ___E,
1079            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Credentials<'static>>,
1080            _: (),
1081        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1082            ::fidl_next::munge!(let crate::wire_optional::Credentials { raw, _phantom: _ } = &mut *out);
1083
1084            if let Some(inner) = this {
1085                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1086                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1087            } else {
1088                ::fidl_next::wire::Union::encode_absent(raw);
1089            }
1090
1091            Ok(())
1092        }
1093    }
1094
1095    impl<'de> ::fidl_next::FromWire<crate::wire::Credentials<'de>> for Credentials {
1096        #[inline]
1097        fn from_wire(wire: crate::wire::Credentials<'de>) -> Self {
1098            let wire = ::core::mem::ManuallyDrop::new(wire);
1099            match wire.raw.ordinal() {
1100                1 => Self::Wep(::fidl_next::FromWire::from_wire(unsafe {
1101                    wire.raw.get().read_unchecked::<crate::wire::WepCredentials<'de>>()
1102                })),
1103
1104                2 => Self::Wpa(::fidl_next::FromWire::from_wire(unsafe {
1105                    wire.raw.get().read_unchecked::<crate::wire::WpaCredentials<'de>>()
1106                })),
1107
1108                ord => return Self::UnknownOrdinal_(ord as u64),
1109            }
1110        }
1111    }
1112
1113    impl<'de> ::fidl_next::FromWireRef<crate::wire::Credentials<'de>> for Credentials {
1114        #[inline]
1115        fn from_wire_ref(wire: &crate::wire::Credentials<'de>) -> Self {
1116            match wire.raw.ordinal() {
1117                1 => Self::Wep(::fidl_next::FromWireRef::from_wire_ref(unsafe {
1118                    wire.raw.get().deref_unchecked::<crate::wire::WepCredentials<'de>>()
1119                })),
1120
1121                2 => Self::Wpa(::fidl_next::FromWireRef::from_wire_ref(unsafe {
1122                    wire.raw.get().deref_unchecked::<crate::wire::WpaCredentials<'de>>()
1123                })),
1124
1125                ord => return Self::UnknownOrdinal_(ord as u64),
1126            }
1127        }
1128    }
1129
1130    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Credentials<'de>> for Credentials {
1131        #[inline]
1132        fn from_wire_option(
1133            wire: crate::wire_optional::Credentials<'de>,
1134        ) -> ::core::option::Option<Self> {
1135            if let Some(inner) = wire.into_option() {
1136                Some(::fidl_next::FromWire::from_wire(inner))
1137            } else {
1138                None
1139            }
1140        }
1141    }
1142
1143    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Credentials<'de>> for Box<Credentials> {
1144        #[inline]
1145        fn from_wire_option(
1146            wire: crate::wire_optional::Credentials<'de>,
1147        ) -> ::core::option::Option<Self> {
1148            <
1149            Credentials as ::fidl_next::FromWireOption<crate::wire_optional::Credentials<'de>>
1150        >::from_wire_option(wire).map(Box::new)
1151        }
1152    }
1153
1154    impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::Credentials<'de>>
1155        for Box<Credentials>
1156    {
1157        #[inline]
1158        fn from_wire_option_ref(
1159            wire: &crate::wire_optional::Credentials<'de>,
1160        ) -> ::core::option::Option<Self> {
1161            if let Some(inner) = wire.as_ref() {
1162                Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
1163            } else {
1164                None
1165            }
1166        }
1167    }
1168
1169    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1170    #[repr(u8)]
1171    pub enum CriticalErrorReason {
1172        FwCrash = 1,
1173    }
1174    impl ::core::convert::TryFrom<u8> for CriticalErrorReason {
1175        type Error = ::fidl_next::UnknownStrictEnumMemberError;
1176        fn try_from(
1177            value: u8,
1178        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
1179            match value {
1180                1 => Ok(Self::FwCrash),
1181
1182                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
1183            }
1184        }
1185    }
1186
1187    impl ::std::convert::From<CriticalErrorReason> for u8 {
1188        fn from(value: CriticalErrorReason) -> Self {
1189            match value {
1190                CriticalErrorReason::FwCrash => 1,
1191            }
1192        }
1193    }
1194
1195    unsafe impl<___E> ::fidl_next::Encode<crate::wire::CriticalErrorReason, ___E>
1196        for CriticalErrorReason
1197    where
1198        ___E: ?Sized,
1199    {
1200        #[inline]
1201        fn encode(
1202            self,
1203            encoder: &mut ___E,
1204            out: &mut ::core::mem::MaybeUninit<crate::wire::CriticalErrorReason>,
1205            _: (),
1206        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1207            ::fidl_next::Encode::encode(&self, encoder, out, ())
1208        }
1209    }
1210
1211    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::CriticalErrorReason, ___E>
1212        for &'a CriticalErrorReason
1213    where
1214        ___E: ?Sized,
1215    {
1216        #[inline]
1217        fn encode(
1218            self,
1219            encoder: &mut ___E,
1220            out: &mut ::core::mem::MaybeUninit<crate::wire::CriticalErrorReason>,
1221            _: (),
1222        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1223            ::fidl_next::munge!(let crate::wire::CriticalErrorReason { value } = out);
1224            let _ = value.write(u8::from(match *self {
1225                CriticalErrorReason::FwCrash => 1,
1226            }));
1227
1228            Ok(())
1229        }
1230    }
1231
1232    impl ::core::convert::From<crate::wire::CriticalErrorReason> for CriticalErrorReason {
1233        fn from(wire: crate::wire::CriticalErrorReason) -> Self {
1234            match u8::from(wire.value) {
1235                1 => Self::FwCrash,
1236
1237                _ => unsafe { ::core::hint::unreachable_unchecked() },
1238            }
1239        }
1240    }
1241
1242    impl ::fidl_next::FromWire<crate::wire::CriticalErrorReason> for CriticalErrorReason {
1243        #[inline]
1244        fn from_wire(wire: crate::wire::CriticalErrorReason) -> Self {
1245            Self::from(wire)
1246        }
1247    }
1248
1249    impl ::fidl_next::FromWireRef<crate::wire::CriticalErrorReason> for CriticalErrorReason {
1250        #[inline]
1251        fn from_wire_ref(wire: &crate::wire::CriticalErrorReason) -> Self {
1252            Self::from(*wire)
1253        }
1254    }
1255
1256    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1257    pub struct OwePublicKey {
1258        pub group: u16,
1259
1260        pub key: ::std::vec::Vec<u8>,
1261    }
1262
1263    unsafe impl<___E> ::fidl_next::Encode<crate::wire::OwePublicKey<'static>, ___E> for OwePublicKey
1264    where
1265        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1266        ___E: ::fidl_next::Encoder,
1267    {
1268        #[inline]
1269        fn encode(
1270            self,
1271            encoder_: &mut ___E,
1272            out_: &mut ::core::mem::MaybeUninit<crate::wire::OwePublicKey<'static>>,
1273            _: (),
1274        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1275            ::fidl_next::munge! {
1276                let crate::wire::OwePublicKey {
1277                    group,
1278                    key,
1279
1280                } = out_;
1281            }
1282
1283            ::fidl_next::Encode::encode(self.group, encoder_, group, ())?;
1284
1285            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(group.as_mut_ptr()) };
1286
1287            ::fidl_next::Encode::encode(self.key, encoder_, key, (4294967295, ()))?;
1288
1289            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
1290            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1291
1292            Ok(())
1293        }
1294    }
1295
1296    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::OwePublicKey<'static>, ___E>
1297        for &'a OwePublicKey
1298    where
1299        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1300        ___E: ::fidl_next::Encoder,
1301    {
1302        #[inline]
1303        fn encode(
1304            self,
1305            encoder_: &mut ___E,
1306            out_: &mut ::core::mem::MaybeUninit<crate::wire::OwePublicKey<'static>>,
1307            _: (),
1308        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1309            ::fidl_next::munge! {
1310                let crate::wire::OwePublicKey {
1311                    group,
1312                    key,
1313
1314                } = out_;
1315            }
1316
1317            ::fidl_next::Encode::encode(&self.group, encoder_, group, ())?;
1318
1319            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(group.as_mut_ptr()) };
1320
1321            ::fidl_next::Encode::encode(&self.key, encoder_, key, (4294967295, ()))?;
1322
1323            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
1324            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1325
1326            Ok(())
1327        }
1328    }
1329
1330    unsafe impl<___E>
1331        ::fidl_next::EncodeOption<
1332            ::fidl_next::wire::Box<'static, crate::wire::OwePublicKey<'static>>,
1333            ___E,
1334        > for OwePublicKey
1335    where
1336        ___E: ::fidl_next::Encoder + ?Sized,
1337        OwePublicKey: ::fidl_next::Encode<crate::wire::OwePublicKey<'static>, ___E>,
1338    {
1339        #[inline]
1340        fn encode_option(
1341            this: ::core::option::Option<Self>,
1342            encoder: &mut ___E,
1343            out: &mut ::core::mem::MaybeUninit<
1344                ::fidl_next::wire::Box<'static, crate::wire::OwePublicKey<'static>>,
1345            >,
1346            _: (),
1347        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1348            if let Some(inner) = this {
1349                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1350                ::fidl_next::wire::Box::encode_present(out);
1351            } else {
1352                ::fidl_next::wire::Box::encode_absent(out);
1353            }
1354
1355            Ok(())
1356        }
1357    }
1358
1359    unsafe impl<'a, ___E>
1360        ::fidl_next::EncodeOption<
1361            ::fidl_next::wire::Box<'static, crate::wire::OwePublicKey<'static>>,
1362            ___E,
1363        > for &'a OwePublicKey
1364    where
1365        ___E: ::fidl_next::Encoder + ?Sized,
1366        &'a OwePublicKey: ::fidl_next::Encode<crate::wire::OwePublicKey<'static>, ___E>,
1367    {
1368        #[inline]
1369        fn encode_option(
1370            this: ::core::option::Option<Self>,
1371            encoder: &mut ___E,
1372            out: &mut ::core::mem::MaybeUninit<
1373                ::fidl_next::wire::Box<'static, crate::wire::OwePublicKey<'static>>,
1374            >,
1375            _: (),
1376        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1377            if let Some(inner) = this {
1378                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1379                ::fidl_next::wire::Box::encode_present(out);
1380            } else {
1381                ::fidl_next::wire::Box::encode_absent(out);
1382            }
1383
1384            Ok(())
1385        }
1386    }
1387
1388    impl<'de> ::fidl_next::FromWire<crate::wire::OwePublicKey<'de>> for OwePublicKey {
1389        #[inline]
1390        fn from_wire(wire: crate::wire::OwePublicKey<'de>) -> Self {
1391            Self {
1392                group: ::fidl_next::FromWire::from_wire(wire.group),
1393
1394                key: ::fidl_next::FromWire::from_wire(wire.key),
1395            }
1396        }
1397    }
1398
1399    impl<'de> ::fidl_next::FromWireRef<crate::wire::OwePublicKey<'de>> for OwePublicKey {
1400        #[inline]
1401        fn from_wire_ref(wire: &crate::wire::OwePublicKey<'de>) -> Self {
1402            Self {
1403                group: ::fidl_next::FromWireRef::from_wire_ref(&wire.group),
1404
1405                key: ::fidl_next::FromWireRef::from_wire_ref(&wire.key),
1406            }
1407        }
1408    }
1409
1410    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1411    pub struct SignalReportIndication {
1412        pub rssi_dbm: i8,
1413
1414        pub snr_db: i8,
1415
1416        pub tx_rate_500kbps: u32,
1417    }
1418
1419    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SignalReportIndication, ___E>
1420        for SignalReportIndication
1421    where
1422        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1423    {
1424        #[inline]
1425        fn encode(
1426            self,
1427            encoder_: &mut ___E,
1428            out_: &mut ::core::mem::MaybeUninit<crate::wire::SignalReportIndication>,
1429            _: (),
1430        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1431            ::fidl_next::munge! {
1432                let crate::wire::SignalReportIndication {
1433                    rssi_dbm,
1434                    snr_db,
1435                    tx_rate_500kbps,
1436
1437                } = out_;
1438            }
1439
1440            ::fidl_next::Encode::encode(self.rssi_dbm, encoder_, rssi_dbm, ())?;
1441
1442            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rssi_dbm.as_mut_ptr()) };
1443
1444            ::fidl_next::Encode::encode(self.snr_db, encoder_, snr_db, ())?;
1445
1446            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(snr_db.as_mut_ptr()) };
1447
1448            ::fidl_next::Encode::encode(self.tx_rate_500kbps, encoder_, tx_rate_500kbps, ())?;
1449
1450            let mut _field =
1451                unsafe { ::fidl_next::Slot::new_unchecked(tx_rate_500kbps.as_mut_ptr()) };
1452
1453            Ok(())
1454        }
1455    }
1456
1457    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SignalReportIndication, ___E>
1458        for &'a SignalReportIndication
1459    where
1460        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1461    {
1462        #[inline]
1463        fn encode(
1464            self,
1465            encoder_: &mut ___E,
1466            out_: &mut ::core::mem::MaybeUninit<crate::wire::SignalReportIndication>,
1467            _: (),
1468        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1469            ::fidl_next::munge! {
1470                let crate::wire::SignalReportIndication {
1471                    rssi_dbm,
1472                    snr_db,
1473                    tx_rate_500kbps,
1474
1475                } = out_;
1476            }
1477
1478            ::fidl_next::Encode::encode(&self.rssi_dbm, encoder_, rssi_dbm, ())?;
1479
1480            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rssi_dbm.as_mut_ptr()) };
1481
1482            ::fidl_next::Encode::encode(&self.snr_db, encoder_, snr_db, ())?;
1483
1484            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(snr_db.as_mut_ptr()) };
1485
1486            ::fidl_next::Encode::encode(&self.tx_rate_500kbps, encoder_, tx_rate_500kbps, ())?;
1487
1488            let mut _field =
1489                unsafe { ::fidl_next::Slot::new_unchecked(tx_rate_500kbps.as_mut_ptr()) };
1490
1491            Ok(())
1492        }
1493    }
1494
1495    unsafe impl<___E>
1496        ::fidl_next::EncodeOption<
1497            ::fidl_next::wire::Box<'static, crate::wire::SignalReportIndication>,
1498            ___E,
1499        > for SignalReportIndication
1500    where
1501        ___E: ::fidl_next::Encoder + ?Sized,
1502        SignalReportIndication: ::fidl_next::Encode<crate::wire::SignalReportIndication, ___E>,
1503    {
1504        #[inline]
1505        fn encode_option(
1506            this: ::core::option::Option<Self>,
1507            encoder: &mut ___E,
1508            out: &mut ::core::mem::MaybeUninit<
1509                ::fidl_next::wire::Box<'static, crate::wire::SignalReportIndication>,
1510            >,
1511            _: (),
1512        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1513            if let Some(inner) = this {
1514                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1515                ::fidl_next::wire::Box::encode_present(out);
1516            } else {
1517                ::fidl_next::wire::Box::encode_absent(out);
1518            }
1519
1520            Ok(())
1521        }
1522    }
1523
1524    unsafe impl<'a, ___E>
1525        ::fidl_next::EncodeOption<
1526            ::fidl_next::wire::Box<'static, crate::wire::SignalReportIndication>,
1527            ___E,
1528        > for &'a SignalReportIndication
1529    where
1530        ___E: ::fidl_next::Encoder + ?Sized,
1531        &'a SignalReportIndication: ::fidl_next::Encode<crate::wire::SignalReportIndication, ___E>,
1532    {
1533        #[inline]
1534        fn encode_option(
1535            this: ::core::option::Option<Self>,
1536            encoder: &mut ___E,
1537            out: &mut ::core::mem::MaybeUninit<
1538                ::fidl_next::wire::Box<'static, crate::wire::SignalReportIndication>,
1539            >,
1540            _: (),
1541        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1542            if let Some(inner) = this {
1543                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1544                ::fidl_next::wire::Box::encode_present(out);
1545            } else {
1546                ::fidl_next::wire::Box::encode_absent(out);
1547            }
1548
1549            Ok(())
1550        }
1551    }
1552
1553    impl ::fidl_next::FromWire<crate::wire::SignalReportIndication> for SignalReportIndication {
1554        #[inline]
1555        fn from_wire(wire: crate::wire::SignalReportIndication) -> Self {
1556            Self {
1557                rssi_dbm: ::fidl_next::FromWire::from_wire(wire.rssi_dbm),
1558
1559                snr_db: ::fidl_next::FromWire::from_wire(wire.snr_db),
1560
1561                tx_rate_500kbps: ::fidl_next::FromWire::from_wire(wire.tx_rate_500kbps),
1562            }
1563        }
1564    }
1565
1566    impl ::fidl_next::FromWireRef<crate::wire::SignalReportIndication> for SignalReportIndication {
1567        #[inline]
1568        fn from_wire_ref(wire: &crate::wire::SignalReportIndication) -> Self {
1569            Self {
1570                rssi_dbm: ::fidl_next::FromWireRef::from_wire_ref(&wire.rssi_dbm),
1571
1572                snr_db: ::fidl_next::FromWireRef::from_wire_ref(&wire.snr_db),
1573
1574                tx_rate_500kbps: ::fidl_next::FromWireRef::from_wire_ref(&wire.tx_rate_500kbps),
1575            }
1576        }
1577    }
1578
1579    #[doc = " Specific absorption rate scenarios that can be applied to WLAN PHY devices.\n"]
1580    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1581    #[repr(u32)]
1582    pub enum TxPowerScenario {
1583        Default = 0,
1584        VoiceCall = 1,
1585        HeadCellOff = 2,
1586        HeadCellOn = 3,
1587        BodyCellOff = 4,
1588        BodyCellOn = 5,
1589        BodyBtActive = 6,
1590        UnknownOrdinal_(u32) = 7,
1591    }
1592    impl ::std::convert::From<u32> for TxPowerScenario {
1593        fn from(value: u32) -> Self {
1594            match value {
1595                0 => Self::Default,
1596                1 => Self::VoiceCall,
1597                2 => Self::HeadCellOff,
1598                3 => Self::HeadCellOn,
1599                4 => Self::BodyCellOff,
1600                5 => Self::BodyCellOn,
1601                6 => Self::BodyBtActive,
1602
1603                _ => Self::UnknownOrdinal_(value),
1604            }
1605        }
1606    }
1607
1608    impl ::std::convert::From<TxPowerScenario> for u32 {
1609        fn from(value: TxPowerScenario) -> Self {
1610            match value {
1611                TxPowerScenario::Default => 0,
1612                TxPowerScenario::VoiceCall => 1,
1613                TxPowerScenario::HeadCellOff => 2,
1614                TxPowerScenario::HeadCellOn => 3,
1615                TxPowerScenario::BodyCellOff => 4,
1616                TxPowerScenario::BodyCellOn => 5,
1617                TxPowerScenario::BodyBtActive => 6,
1618
1619                TxPowerScenario::UnknownOrdinal_(value) => value,
1620            }
1621        }
1622    }
1623
1624    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TxPowerScenario, ___E> for TxPowerScenario
1625    where
1626        ___E: ?Sized,
1627    {
1628        #[inline]
1629        fn encode(
1630            self,
1631            encoder: &mut ___E,
1632            out: &mut ::core::mem::MaybeUninit<crate::wire::TxPowerScenario>,
1633            _: (),
1634        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1635            ::fidl_next::Encode::encode(&self, encoder, out, ())
1636        }
1637    }
1638
1639    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TxPowerScenario, ___E>
1640        for &'a TxPowerScenario
1641    where
1642        ___E: ?Sized,
1643    {
1644        #[inline]
1645        fn encode(
1646            self,
1647            encoder: &mut ___E,
1648            out: &mut ::core::mem::MaybeUninit<crate::wire::TxPowerScenario>,
1649            _: (),
1650        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1651            ::fidl_next::munge!(let crate::wire::TxPowerScenario { value } = out);
1652            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
1653                TxPowerScenario::Default => 0,
1654
1655                TxPowerScenario::VoiceCall => 1,
1656
1657                TxPowerScenario::HeadCellOff => 2,
1658
1659                TxPowerScenario::HeadCellOn => 3,
1660
1661                TxPowerScenario::BodyCellOff => 4,
1662
1663                TxPowerScenario::BodyCellOn => 5,
1664
1665                TxPowerScenario::BodyBtActive => 6,
1666
1667                TxPowerScenario::UnknownOrdinal_(value) => value,
1668            }));
1669
1670            Ok(())
1671        }
1672    }
1673
1674    impl ::core::convert::From<crate::wire::TxPowerScenario> for TxPowerScenario {
1675        fn from(wire: crate::wire::TxPowerScenario) -> Self {
1676            match u32::from(wire.value) {
1677                0 => Self::Default,
1678
1679                1 => Self::VoiceCall,
1680
1681                2 => Self::HeadCellOff,
1682
1683                3 => Self::HeadCellOn,
1684
1685                4 => Self::BodyCellOff,
1686
1687                5 => Self::BodyCellOn,
1688
1689                6 => Self::BodyBtActive,
1690
1691                value => Self::UnknownOrdinal_(value),
1692            }
1693        }
1694    }
1695
1696    impl ::fidl_next::FromWire<crate::wire::TxPowerScenario> for TxPowerScenario {
1697        #[inline]
1698        fn from_wire(wire: crate::wire::TxPowerScenario) -> Self {
1699            Self::from(wire)
1700        }
1701    }
1702
1703    impl ::fidl_next::FromWireRef<crate::wire::TxPowerScenario> for TxPowerScenario {
1704        #[inline]
1705        fn from_wire_ref(wire: &crate::wire::TxPowerScenario) -> Self {
1706            Self::from(*wire)
1707        }
1708    }
1709
1710    #[doc = " WFA WMM v1.2, 2.2.2\n"]
1711    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1712    pub struct WmmAcParams {
1713        pub ecw_min: u8,
1714
1715        pub ecw_max: u8,
1716
1717        pub aifsn: u8,
1718
1719        pub txop_limit: u16,
1720
1721        pub acm: bool,
1722    }
1723
1724    unsafe impl<___E> ::fidl_next::Encode<crate::wire::WmmAcParams, ___E> for WmmAcParams
1725    where
1726        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1727    {
1728        #[inline]
1729        fn encode(
1730            self,
1731            encoder_: &mut ___E,
1732            out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmAcParams>,
1733            _: (),
1734        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1735            ::fidl_next::munge! {
1736                let crate::wire::WmmAcParams {
1737                    ecw_min,
1738                    ecw_max,
1739                    aifsn,
1740                    txop_limit,
1741                    acm,
1742
1743                } = out_;
1744            }
1745
1746            ::fidl_next::Encode::encode(self.ecw_min, encoder_, ecw_min, ())?;
1747
1748            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_min.as_mut_ptr()) };
1749
1750            ::fidl_next::Encode::encode(self.ecw_max, encoder_, ecw_max, ())?;
1751
1752            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_max.as_mut_ptr()) };
1753
1754            ::fidl_next::Encode::encode(self.aifsn, encoder_, aifsn, ())?;
1755
1756            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(aifsn.as_mut_ptr()) };
1757
1758            ::fidl_next::Encode::encode(self.txop_limit, encoder_, txop_limit, ())?;
1759
1760            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(txop_limit.as_mut_ptr()) };
1761
1762            ::fidl_next::Encode::encode(self.acm, encoder_, acm, ())?;
1763
1764            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(acm.as_mut_ptr()) };
1765
1766            Ok(())
1767        }
1768    }
1769
1770    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WmmAcParams, ___E> for &'a WmmAcParams
1771    where
1772        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1773    {
1774        #[inline]
1775        fn encode(
1776            self,
1777            encoder_: &mut ___E,
1778            out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmAcParams>,
1779            _: (),
1780        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1781            ::fidl_next::munge! {
1782                let crate::wire::WmmAcParams {
1783                    ecw_min,
1784                    ecw_max,
1785                    aifsn,
1786                    txop_limit,
1787                    acm,
1788
1789                } = out_;
1790            }
1791
1792            ::fidl_next::Encode::encode(&self.ecw_min, encoder_, ecw_min, ())?;
1793
1794            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_min.as_mut_ptr()) };
1795
1796            ::fidl_next::Encode::encode(&self.ecw_max, encoder_, ecw_max, ())?;
1797
1798            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_max.as_mut_ptr()) };
1799
1800            ::fidl_next::Encode::encode(&self.aifsn, encoder_, aifsn, ())?;
1801
1802            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(aifsn.as_mut_ptr()) };
1803
1804            ::fidl_next::Encode::encode(&self.txop_limit, encoder_, txop_limit, ())?;
1805
1806            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(txop_limit.as_mut_ptr()) };
1807
1808            ::fidl_next::Encode::encode(&self.acm, encoder_, acm, ())?;
1809
1810            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(acm.as_mut_ptr()) };
1811
1812            Ok(())
1813        }
1814    }
1815
1816    unsafe impl<___E>
1817        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::WmmAcParams>, ___E>
1818        for WmmAcParams
1819    where
1820        ___E: ::fidl_next::Encoder + ?Sized,
1821        WmmAcParams: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
1822    {
1823        #[inline]
1824        fn encode_option(
1825            this: ::core::option::Option<Self>,
1826            encoder: &mut ___E,
1827            out: &mut ::core::mem::MaybeUninit<
1828                ::fidl_next::wire::Box<'static, crate::wire::WmmAcParams>,
1829            >,
1830            _: (),
1831        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1832            if let Some(inner) = this {
1833                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1834                ::fidl_next::wire::Box::encode_present(out);
1835            } else {
1836                ::fidl_next::wire::Box::encode_absent(out);
1837            }
1838
1839            Ok(())
1840        }
1841    }
1842
1843    unsafe impl<'a, ___E>
1844        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::WmmAcParams>, ___E>
1845        for &'a WmmAcParams
1846    where
1847        ___E: ::fidl_next::Encoder + ?Sized,
1848        &'a WmmAcParams: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
1849    {
1850        #[inline]
1851        fn encode_option(
1852            this: ::core::option::Option<Self>,
1853            encoder: &mut ___E,
1854            out: &mut ::core::mem::MaybeUninit<
1855                ::fidl_next::wire::Box<'static, crate::wire::WmmAcParams>,
1856            >,
1857            _: (),
1858        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1859            if let Some(inner) = this {
1860                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1861                ::fidl_next::wire::Box::encode_present(out);
1862            } else {
1863                ::fidl_next::wire::Box::encode_absent(out);
1864            }
1865
1866            Ok(())
1867        }
1868    }
1869
1870    impl ::fidl_next::FromWire<crate::wire::WmmAcParams> for WmmAcParams {
1871        #[inline]
1872        fn from_wire(wire: crate::wire::WmmAcParams) -> Self {
1873            Self {
1874                ecw_min: ::fidl_next::FromWire::from_wire(wire.ecw_min),
1875
1876                ecw_max: ::fidl_next::FromWire::from_wire(wire.ecw_max),
1877
1878                aifsn: ::fidl_next::FromWire::from_wire(wire.aifsn),
1879
1880                txop_limit: ::fidl_next::FromWire::from_wire(wire.txop_limit),
1881
1882                acm: ::fidl_next::FromWire::from_wire(wire.acm),
1883            }
1884        }
1885    }
1886
1887    impl ::fidl_next::FromWireRef<crate::wire::WmmAcParams> for WmmAcParams {
1888        #[inline]
1889        fn from_wire_ref(wire: &crate::wire::WmmAcParams) -> Self {
1890            Self {
1891                ecw_min: ::fidl_next::FromWireRef::from_wire_ref(&wire.ecw_min),
1892
1893                ecw_max: ::fidl_next::FromWireRef::from_wire_ref(&wire.ecw_max),
1894
1895                aifsn: ::fidl_next::FromWireRef::from_wire_ref(&wire.aifsn),
1896
1897                txop_limit: ::fidl_next::FromWireRef::from_wire_ref(&wire.txop_limit),
1898
1899                acm: ::fidl_next::FromWireRef::from_wire_ref(&wire.acm),
1900            }
1901        }
1902    }
1903
1904    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1905    pub struct WmmStatusResponse {
1906        pub apsd: bool,
1907
1908        pub ac_be_params: crate::natural::WmmAcParams,
1909
1910        pub ac_bk_params: crate::natural::WmmAcParams,
1911
1912        pub ac_vi_params: crate::natural::WmmAcParams,
1913
1914        pub ac_vo_params: crate::natural::WmmAcParams,
1915    }
1916
1917    unsafe impl<___E> ::fidl_next::Encode<crate::wire::WmmStatusResponse, ___E> for WmmStatusResponse
1918    where
1919        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1920    {
1921        #[inline]
1922        fn encode(
1923            self,
1924            encoder_: &mut ___E,
1925            out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmStatusResponse>,
1926            _: (),
1927        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1928            ::fidl_next::munge! {
1929                let crate::wire::WmmStatusResponse {
1930                    apsd,
1931                    ac_be_params,
1932                    ac_bk_params,
1933                    ac_vi_params,
1934                    ac_vo_params,
1935
1936                } = out_;
1937            }
1938
1939            ::fidl_next::Encode::encode(self.apsd, encoder_, apsd, ())?;
1940
1941            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(apsd.as_mut_ptr()) };
1942
1943            ::fidl_next::Encode::encode(self.ac_be_params, encoder_, ac_be_params, ())?;
1944
1945            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_be_params.as_mut_ptr()) };
1946
1947            ::fidl_next::Encode::encode(self.ac_bk_params, encoder_, ac_bk_params, ())?;
1948
1949            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_bk_params.as_mut_ptr()) };
1950
1951            ::fidl_next::Encode::encode(self.ac_vi_params, encoder_, ac_vi_params, ())?;
1952
1953            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vi_params.as_mut_ptr()) };
1954
1955            ::fidl_next::Encode::encode(self.ac_vo_params, encoder_, ac_vo_params, ())?;
1956
1957            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vo_params.as_mut_ptr()) };
1958
1959            Ok(())
1960        }
1961    }
1962
1963    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WmmStatusResponse, ___E>
1964        for &'a WmmStatusResponse
1965    where
1966        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1967    {
1968        #[inline]
1969        fn encode(
1970            self,
1971            encoder_: &mut ___E,
1972            out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmStatusResponse>,
1973            _: (),
1974        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1975            ::fidl_next::munge! {
1976                let crate::wire::WmmStatusResponse {
1977                    apsd,
1978                    ac_be_params,
1979                    ac_bk_params,
1980                    ac_vi_params,
1981                    ac_vo_params,
1982
1983                } = out_;
1984            }
1985
1986            ::fidl_next::Encode::encode(&self.apsd, encoder_, apsd, ())?;
1987
1988            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(apsd.as_mut_ptr()) };
1989
1990            ::fidl_next::Encode::encode(&self.ac_be_params, encoder_, ac_be_params, ())?;
1991
1992            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_be_params.as_mut_ptr()) };
1993
1994            ::fidl_next::Encode::encode(&self.ac_bk_params, encoder_, ac_bk_params, ())?;
1995
1996            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_bk_params.as_mut_ptr()) };
1997
1998            ::fidl_next::Encode::encode(&self.ac_vi_params, encoder_, ac_vi_params, ())?;
1999
2000            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vi_params.as_mut_ptr()) };
2001
2002            ::fidl_next::Encode::encode(&self.ac_vo_params, encoder_, ac_vo_params, ())?;
2003
2004            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vo_params.as_mut_ptr()) };
2005
2006            Ok(())
2007        }
2008    }
2009
2010    unsafe impl<___E>
2011        ::fidl_next::EncodeOption<
2012            ::fidl_next::wire::Box<'static, crate::wire::WmmStatusResponse>,
2013            ___E,
2014        > for WmmStatusResponse
2015    where
2016        ___E: ::fidl_next::Encoder + ?Sized,
2017        WmmStatusResponse: ::fidl_next::Encode<crate::wire::WmmStatusResponse, ___E>,
2018    {
2019        #[inline]
2020        fn encode_option(
2021            this: ::core::option::Option<Self>,
2022            encoder: &mut ___E,
2023            out: &mut ::core::mem::MaybeUninit<
2024                ::fidl_next::wire::Box<'static, crate::wire::WmmStatusResponse>,
2025            >,
2026            _: (),
2027        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2028            if let Some(inner) = this {
2029                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2030                ::fidl_next::wire::Box::encode_present(out);
2031            } else {
2032                ::fidl_next::wire::Box::encode_absent(out);
2033            }
2034
2035            Ok(())
2036        }
2037    }
2038
2039    unsafe impl<'a, ___E>
2040        ::fidl_next::EncodeOption<
2041            ::fidl_next::wire::Box<'static, crate::wire::WmmStatusResponse>,
2042            ___E,
2043        > for &'a WmmStatusResponse
2044    where
2045        ___E: ::fidl_next::Encoder + ?Sized,
2046        &'a WmmStatusResponse: ::fidl_next::Encode<crate::wire::WmmStatusResponse, ___E>,
2047    {
2048        #[inline]
2049        fn encode_option(
2050            this: ::core::option::Option<Self>,
2051            encoder: &mut ___E,
2052            out: &mut ::core::mem::MaybeUninit<
2053                ::fidl_next::wire::Box<'static, crate::wire::WmmStatusResponse>,
2054            >,
2055            _: (),
2056        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2057            if let Some(inner) = this {
2058                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2059                ::fidl_next::wire::Box::encode_present(out);
2060            } else {
2061                ::fidl_next::wire::Box::encode_absent(out);
2062            }
2063
2064            Ok(())
2065        }
2066    }
2067
2068    impl ::fidl_next::FromWire<crate::wire::WmmStatusResponse> for WmmStatusResponse {
2069        #[inline]
2070        fn from_wire(wire: crate::wire::WmmStatusResponse) -> Self {
2071            Self {
2072                apsd: ::fidl_next::FromWire::from_wire(wire.apsd),
2073
2074                ac_be_params: ::fidl_next::FromWire::from_wire(wire.ac_be_params),
2075
2076                ac_bk_params: ::fidl_next::FromWire::from_wire(wire.ac_bk_params),
2077
2078                ac_vi_params: ::fidl_next::FromWire::from_wire(wire.ac_vi_params),
2079
2080                ac_vo_params: ::fidl_next::FromWire::from_wire(wire.ac_vo_params),
2081            }
2082        }
2083    }
2084
2085    impl ::fidl_next::FromWireRef<crate::wire::WmmStatusResponse> for WmmStatusResponse {
2086        #[inline]
2087        fn from_wire_ref(wire: &crate::wire::WmmStatusResponse) -> Self {
2088            Self {
2089                apsd: ::fidl_next::FromWireRef::from_wire_ref(&wire.apsd),
2090
2091                ac_be_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_be_params),
2092
2093                ac_bk_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_bk_params),
2094
2095                ac_vi_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_vi_params),
2096
2097                ac_vo_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_vo_params),
2098            }
2099        }
2100    }
2101}
2102
2103pub mod wire {
2104
2105    /// The wire type corresponding to [`Protocol`].
2106    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
2107    #[repr(transparent)]
2108    pub struct Protocol {
2109        pub(crate) value: ::fidl_next::wire::Uint32,
2110    }
2111
2112    impl ::fidl_next::Constrained for Protocol {
2113        type Constraint = ();
2114
2115        fn validate(
2116            _: ::fidl_next::Slot<'_, Self>,
2117            _: Self::Constraint,
2118        ) -> Result<(), ::fidl_next::ValidationError> {
2119            Ok(())
2120        }
2121    }
2122
2123    unsafe impl ::fidl_next::Wire for Protocol {
2124        type Narrowed<'de> = Self;
2125
2126        #[inline]
2127        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2128            // Wire enums have no padding
2129        }
2130    }
2131
2132    impl Protocol {
2133        pub const OPEN: Protocol = Protocol { value: ::fidl_next::wire::Uint32(1) };
2134
2135        pub const WEP: Protocol = Protocol { value: ::fidl_next::wire::Uint32(2) };
2136
2137        pub const WPA1: Protocol = Protocol { value: ::fidl_next::wire::Uint32(3) };
2138
2139        pub const WPA2_PERSONAL: Protocol = Protocol { value: ::fidl_next::wire::Uint32(4) };
2140
2141        pub const WPA2_ENTERPRISE: Protocol = Protocol { value: ::fidl_next::wire::Uint32(5) };
2142
2143        pub const WPA3_PERSONAL: Protocol = Protocol { value: ::fidl_next::wire::Uint32(6) };
2144
2145        pub const WPA3_ENTERPRISE: Protocol = Protocol { value: ::fidl_next::wire::Uint32(7) };
2146
2147        pub const OWE: Protocol = Protocol { value: ::fidl_next::wire::Uint32(8) };
2148    }
2149
2150    unsafe impl<___D> ::fidl_next::Decode<___D> for Protocol
2151    where
2152        ___D: ?Sized,
2153    {
2154        fn decode(
2155            slot: ::fidl_next::Slot<'_, Self>,
2156            _: &mut ___D,
2157            _: (),
2158        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2159            Ok(())
2160        }
2161    }
2162
2163    impl ::core::convert::From<crate::natural::Protocol> for Protocol {
2164        fn from(natural: crate::natural::Protocol) -> Self {
2165            match natural {
2166                crate::natural::Protocol::Open => Protocol::OPEN,
2167
2168                crate::natural::Protocol::Wep => Protocol::WEP,
2169
2170                crate::natural::Protocol::Wpa1 => Protocol::WPA1,
2171
2172                crate::natural::Protocol::Wpa2Personal => Protocol::WPA2_PERSONAL,
2173
2174                crate::natural::Protocol::Wpa2Enterprise => Protocol::WPA2_ENTERPRISE,
2175
2176                crate::natural::Protocol::Wpa3Personal => Protocol::WPA3_PERSONAL,
2177
2178                crate::natural::Protocol::Wpa3Enterprise => Protocol::WPA3_ENTERPRISE,
2179
2180                crate::natural::Protocol::Owe => Protocol::OWE,
2181
2182                crate::natural::Protocol::UnknownOrdinal_(value) => {
2183                    Protocol { value: ::fidl_next::wire::Uint32::from(value) }
2184                }
2185            }
2186        }
2187    }
2188
2189    impl ::fidl_next::IntoNatural for Protocol {
2190        type Natural = crate::natural::Protocol;
2191    }
2192
2193    /// The wire type corresponding to [`Authentication`].
2194    #[derive(Debug)]
2195    #[repr(C)]
2196    pub struct Authentication<'de> {
2197        pub protocol: crate::wire::Protocol,
2198
2199        pub credentials: crate::wire_optional::Credentials<'de>,
2200    }
2201
2202    static_assertions::const_assert_eq!(std::mem::size_of::<Authentication<'_>>(), 24);
2203    static_assertions::const_assert_eq!(std::mem::align_of::<Authentication<'_>>(), 8);
2204
2205    static_assertions::const_assert_eq!(std::mem::offset_of!(Authentication<'_>, protocol), 0);
2206
2207    static_assertions::const_assert_eq!(std::mem::offset_of!(Authentication<'_>, credentials), 8);
2208
2209    impl ::fidl_next::Constrained for Authentication<'_> {
2210        type Constraint = ();
2211
2212        fn validate(
2213            _: ::fidl_next::Slot<'_, Self>,
2214            _: Self::Constraint,
2215        ) -> Result<(), ::fidl_next::ValidationError> {
2216            Ok(())
2217        }
2218    }
2219
2220    unsafe impl ::fidl_next::Wire for Authentication<'static> {
2221        type Narrowed<'de> = Authentication<'de>;
2222
2223        #[inline]
2224        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2225            ::fidl_next::munge! {
2226                let Self {
2227                    protocol,
2228                    credentials,
2229
2230                } = &mut *out_;
2231            }
2232
2233            ::fidl_next::Wire::zero_padding(protocol);
2234
2235            ::fidl_next::Wire::zero_padding(credentials);
2236
2237            unsafe {
2238                out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
2239            }
2240        }
2241    }
2242
2243    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Authentication<'de>
2244    where
2245        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2246        ___D: ::fidl_next::Decoder<'de>,
2247    {
2248        fn decode(
2249            slot_: ::fidl_next::Slot<'_, Self>,
2250            decoder_: &mut ___D,
2251            _: (),
2252        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2253            if slot_.as_bytes()[4..8] != [0u8; 4] {
2254                return Err(::fidl_next::DecodeError::InvalidPadding);
2255            }
2256
2257            ::fidl_next::munge! {
2258                let Self {
2259                    mut protocol,
2260                    mut credentials,
2261
2262                } = slot_;
2263            }
2264
2265            let _field = protocol.as_mut();
2266
2267            ::fidl_next::Decode::decode(protocol.as_mut(), decoder_, ())?;
2268
2269            let _field = credentials.as_mut();
2270
2271            ::fidl_next::Decode::decode(credentials.as_mut(), decoder_, ())?;
2272
2273            Ok(())
2274        }
2275    }
2276
2277    impl<'de> ::fidl_next::IntoNatural for Authentication<'de> {
2278        type Natural = crate::natural::Authentication;
2279    }
2280
2281    /// The wire type corresponding to [`BtCoexistenceMode`].
2282    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
2283    #[repr(transparent)]
2284    pub struct BtCoexistenceMode {
2285        pub(crate) value: ::fidl_next::wire::Uint32,
2286    }
2287
2288    impl ::fidl_next::Constrained for BtCoexistenceMode {
2289        type Constraint = ();
2290
2291        fn validate(
2292            _: ::fidl_next::Slot<'_, Self>,
2293            _: Self::Constraint,
2294        ) -> Result<(), ::fidl_next::ValidationError> {
2295            Ok(())
2296        }
2297    }
2298
2299    unsafe impl ::fidl_next::Wire for BtCoexistenceMode {
2300        type Narrowed<'de> = Self;
2301
2302        #[inline]
2303        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2304            // Wire enums have no padding
2305        }
2306    }
2307
2308    impl BtCoexistenceMode {
2309        pub const MODE_AUTO: BtCoexistenceMode =
2310            BtCoexistenceMode { value: ::fidl_next::wire::Uint32(1) };
2311
2312        pub const MODE_OFF: BtCoexistenceMode =
2313            BtCoexistenceMode { value: ::fidl_next::wire::Uint32(2) };
2314    }
2315
2316    unsafe impl<___D> ::fidl_next::Decode<___D> for BtCoexistenceMode
2317    where
2318        ___D: ?Sized,
2319    {
2320        fn decode(
2321            slot: ::fidl_next::Slot<'_, Self>,
2322            _: &mut ___D,
2323            _: (),
2324        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2325            ::fidl_next::munge!(let Self { value } = slot);
2326
2327            match u32::from(*value) {
2328                1 | 2 => (),
2329                unknown => {
2330                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
2331                }
2332            }
2333
2334            Ok(())
2335        }
2336    }
2337
2338    impl ::core::convert::From<crate::natural::BtCoexistenceMode> for BtCoexistenceMode {
2339        fn from(natural: crate::natural::BtCoexistenceMode) -> Self {
2340            match natural {
2341                crate::natural::BtCoexistenceMode::ModeAuto => BtCoexistenceMode::MODE_AUTO,
2342
2343                crate::natural::BtCoexistenceMode::ModeOff => BtCoexistenceMode::MODE_OFF,
2344            }
2345        }
2346    }
2347
2348    impl ::fidl_next::IntoNatural for BtCoexistenceMode {
2349        type Natural = crate::natural::BtCoexistenceMode;
2350    }
2351
2352    /// The wire type corresponding to [`ChannelSwitchInfo`].
2353    #[derive(Clone, Debug)]
2354    #[repr(C)]
2355    pub struct ChannelSwitchInfo {
2356        pub new_primary_channel: ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelNumber,
2357
2358        pub bandwidth: ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelBandwidth,
2359
2360        pub vht_secondary_80_channel:
2361            ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelNumber,
2362    }
2363
2364    static_assertions::const_assert_eq!(std::mem::size_of::<ChannelSwitchInfo>(), 12);
2365    static_assertions::const_assert_eq!(std::mem::align_of::<ChannelSwitchInfo>(), 4);
2366
2367    static_assertions::const_assert_eq!(
2368        std::mem::offset_of!(ChannelSwitchInfo, new_primary_channel),
2369        0
2370    );
2371
2372    static_assertions::const_assert_eq!(std::mem::offset_of!(ChannelSwitchInfo, bandwidth), 4);
2373
2374    static_assertions::const_assert_eq!(
2375        std::mem::offset_of!(ChannelSwitchInfo, vht_secondary_80_channel),
2376        8
2377    );
2378
2379    impl ::fidl_next::Constrained for ChannelSwitchInfo {
2380        type Constraint = ();
2381
2382        fn validate(
2383            _: ::fidl_next::Slot<'_, Self>,
2384            _: Self::Constraint,
2385        ) -> Result<(), ::fidl_next::ValidationError> {
2386            Ok(())
2387        }
2388    }
2389
2390    unsafe impl ::fidl_next::Wire for ChannelSwitchInfo {
2391        type Narrowed<'de> = ChannelSwitchInfo;
2392
2393        #[inline]
2394        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2395            ::fidl_next::munge! {
2396                let Self {
2397                    new_primary_channel,
2398                    bandwidth,
2399                    vht_secondary_80_channel,
2400
2401                } = &mut *out_;
2402            }
2403
2404            ::fidl_next::Wire::zero_padding(new_primary_channel);
2405
2406            ::fidl_next::Wire::zero_padding(bandwidth);
2407
2408            ::fidl_next::Wire::zero_padding(vht_secondary_80_channel);
2409
2410            unsafe {
2411                out_.as_mut_ptr().cast::<u8>().add(10).write_bytes(0, 2);
2412            }
2413
2414            unsafe {
2415                out_.as_mut_ptr().cast::<u8>().add(2).write_bytes(0, 2);
2416            }
2417        }
2418    }
2419
2420    unsafe impl<___D> ::fidl_next::Decode<___D> for ChannelSwitchInfo
2421    where
2422        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2423    {
2424        fn decode(
2425            slot_: ::fidl_next::Slot<'_, Self>,
2426            decoder_: &mut ___D,
2427            _: (),
2428        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2429            if slot_.as_bytes()[10..12] != [0u8; 2] {
2430                return Err(::fidl_next::DecodeError::InvalidPadding);
2431            }
2432
2433            if slot_.as_bytes()[2..4] != [0u8; 2] {
2434                return Err(::fidl_next::DecodeError::InvalidPadding);
2435            }
2436
2437            ::fidl_next::munge! {
2438                let Self {
2439                    mut new_primary_channel,
2440                    mut bandwidth,
2441                    mut vht_secondary_80_channel,
2442
2443                } = slot_;
2444            }
2445
2446            let _field = new_primary_channel.as_mut();
2447
2448            ::fidl_next::Decode::decode(new_primary_channel.as_mut(), decoder_, ())?;
2449
2450            let _field = bandwidth.as_mut();
2451
2452            ::fidl_next::Decode::decode(bandwidth.as_mut(), decoder_, ())?;
2453
2454            let _field = vht_secondary_80_channel.as_mut();
2455
2456            ::fidl_next::Decode::decode(vht_secondary_80_channel.as_mut(), decoder_, ())?;
2457
2458            Ok(())
2459        }
2460    }
2461
2462    impl ::fidl_next::IntoNatural for ChannelSwitchInfo {
2463        type Natural = crate::natural::ChannelSwitchInfo;
2464    }
2465
2466    /// The wire type corresponding to [`WepCredentials`].
2467    #[derive(Debug)]
2468    #[repr(C)]
2469    pub struct WepCredentials<'de> {
2470        pub key: ::fidl_next::wire::Vector<'de, u8>,
2471    }
2472
2473    static_assertions::const_assert_eq!(std::mem::size_of::<WepCredentials<'_>>(), 16);
2474    static_assertions::const_assert_eq!(std::mem::align_of::<WepCredentials<'_>>(), 8);
2475
2476    static_assertions::const_assert_eq!(std::mem::offset_of!(WepCredentials<'_>, key), 0);
2477
2478    impl ::fidl_next::Constrained for WepCredentials<'_> {
2479        type Constraint = ();
2480
2481        fn validate(
2482            _: ::fidl_next::Slot<'_, Self>,
2483            _: Self::Constraint,
2484        ) -> Result<(), ::fidl_next::ValidationError> {
2485            Ok(())
2486        }
2487    }
2488
2489    unsafe impl ::fidl_next::Wire for WepCredentials<'static> {
2490        type Narrowed<'de> = WepCredentials<'de>;
2491
2492        #[inline]
2493        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2494            ::fidl_next::munge! {
2495                let Self {
2496                    key,
2497
2498                } = &mut *out_;
2499            }
2500
2501            ::fidl_next::Wire::zero_padding(key);
2502        }
2503    }
2504
2505    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WepCredentials<'de>
2506    where
2507        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2508        ___D: ::fidl_next::Decoder<'de>,
2509    {
2510        fn decode(
2511            slot_: ::fidl_next::Slot<'_, Self>,
2512            decoder_: &mut ___D,
2513            _: (),
2514        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2515            ::fidl_next::munge! {
2516                let Self {
2517                    mut key,
2518
2519                } = slot_;
2520            }
2521
2522            let _field = key.as_mut();
2523            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2524            ::fidl_next::Decode::decode(key.as_mut(), decoder_, (4294967295, ()))?;
2525
2526            Ok(())
2527        }
2528    }
2529
2530    impl<'de> ::fidl_next::IntoNatural for WepCredentials<'de> {
2531        type Natural = crate::natural::WepCredentials;
2532    }
2533
2534    /// The wire type corresponding to [`WpaCredentials`].
2535    #[repr(transparent)]
2536    pub struct WpaCredentials<'de> {
2537        pub(crate) raw: ::fidl_next::wire::Union,
2538        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2539    }
2540
2541    impl<'de> Drop for WpaCredentials<'de> {
2542        fn drop(&mut self) {
2543            match self.raw.ordinal() {
2544                1 => {
2545                    let _ = unsafe { self.raw.get().read_unchecked::<[u8; 32]>() };
2546                }
2547
2548                2 => {
2549                    let _ = unsafe {
2550                        self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2551                    };
2552                }
2553
2554                _ => (),
2555            }
2556        }
2557    }
2558
2559    impl ::fidl_next::Constrained for WpaCredentials<'_> {
2560        type Constraint = ();
2561
2562        fn validate(
2563            _: ::fidl_next::Slot<'_, Self>,
2564            _: Self::Constraint,
2565        ) -> Result<(), ::fidl_next::ValidationError> {
2566            Ok(())
2567        }
2568    }
2569
2570    unsafe impl ::fidl_next::Wire for WpaCredentials<'static> {
2571        type Narrowed<'de> = WpaCredentials<'de>;
2572
2573        #[inline]
2574        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2575            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2576            ::fidl_next::wire::Union::zero_padding(raw);
2577        }
2578    }
2579
2580    pub mod wpa_credentials {
2581        pub enum Ref<'de> {
2582            Psk(&'de [u8; 32]),
2583
2584            Passphrase(&'de ::fidl_next::wire::Vector<'de, u8>),
2585
2586            UnknownOrdinal_(u64),
2587        }
2588
2589        pub enum Value<'de> {
2590            Psk([u8; 32]),
2591
2592            Passphrase(::fidl_next::wire::Vector<'de, u8>),
2593
2594            UnknownOrdinal_(u64),
2595        }
2596    }
2597
2598    impl<'de> WpaCredentials<'de> {
2599        pub fn as_ref(&self) -> crate::wire::wpa_credentials::Ref<'_> {
2600            match self.raw.ordinal() {
2601                1 => crate::wire::wpa_credentials::Ref::Psk(unsafe {
2602                    self.raw.get().deref_unchecked::<[u8; 32]>()
2603                }),
2604
2605                2 => crate::wire::wpa_credentials::Ref::Passphrase(unsafe {
2606                    self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
2607                }),
2608
2609                unknown => crate::wire::wpa_credentials::Ref::UnknownOrdinal_(unknown),
2610            }
2611        }
2612
2613        pub fn into_inner(self) -> crate::wire::wpa_credentials::Value<'de> {
2614            let this = ::core::mem::ManuallyDrop::new(self);
2615
2616            match this.raw.ordinal() {
2617                1 => crate::wire::wpa_credentials::Value::Psk(unsafe {
2618                    this.raw.get().read_unchecked::<[u8; 32]>()
2619                }),
2620
2621                2 => crate::wire::wpa_credentials::Value::Passphrase(unsafe {
2622                    this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2623                }),
2624
2625                unknown => crate::wire::wpa_credentials::Value::UnknownOrdinal_(unknown),
2626            }
2627        }
2628    }
2629
2630    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WpaCredentials<'de>
2631    where
2632        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2633        ___D: ::fidl_next::Decoder<'de>,
2634    {
2635        fn decode(
2636            mut slot: ::fidl_next::Slot<'_, Self>,
2637            decoder: &mut ___D,
2638            _: (),
2639        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2640            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
2641            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
2642                1 => ::fidl_next::wire::Union::decode_as::<___D, [u8; 32]>(raw, decoder, ())?,
2643
2644                2 => {
2645                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
2646                        raw,
2647                        decoder,
2648                        (63, ()),
2649                    )?
2650                }
2651
2652                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
2653            }
2654
2655            Ok(())
2656        }
2657    }
2658
2659    impl<'de> ::core::fmt::Debug for WpaCredentials<'de> {
2660        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2661            match self.raw.ordinal() {
2662                1 => unsafe { self.raw.get().deref_unchecked::<[u8; 32]>().fmt(f) },
2663                2 => unsafe {
2664                    self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
2665                },
2666                _ => unsafe { ::core::hint::unreachable_unchecked() },
2667            }
2668        }
2669    }
2670
2671    impl<'de> ::fidl_next::IntoNatural for WpaCredentials<'de> {
2672        type Natural = crate::natural::WpaCredentials;
2673    }
2674
2675    /// The wire type corresponding to [`Credentials`].
2676    #[repr(transparent)]
2677    pub struct Credentials<'de> {
2678        pub(crate) raw: ::fidl_next::wire::Union,
2679        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2680    }
2681
2682    impl<'de> Drop for Credentials<'de> {
2683        fn drop(&mut self) {
2684            match self.raw.ordinal() {
2685                1 => {
2686                    let _ = unsafe {
2687                        self.raw.get().read_unchecked::<crate::wire::WepCredentials<'de>>()
2688                    };
2689                }
2690
2691                2 => {
2692                    let _ = unsafe {
2693                        self.raw.get().read_unchecked::<crate::wire::WpaCredentials<'de>>()
2694                    };
2695                }
2696
2697                _ => (),
2698            }
2699        }
2700    }
2701
2702    impl ::fidl_next::Constrained for Credentials<'_> {
2703        type Constraint = ();
2704
2705        fn validate(
2706            _: ::fidl_next::Slot<'_, Self>,
2707            _: Self::Constraint,
2708        ) -> Result<(), ::fidl_next::ValidationError> {
2709            Ok(())
2710        }
2711    }
2712
2713    unsafe impl ::fidl_next::Wire for Credentials<'static> {
2714        type Narrowed<'de> = Credentials<'de>;
2715
2716        #[inline]
2717        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2718            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2719            ::fidl_next::wire::Union::zero_padding(raw);
2720        }
2721    }
2722
2723    pub mod credentials {
2724        pub enum Ref<'de> {
2725            Wep(&'de crate::wire::WepCredentials<'de>),
2726
2727            Wpa(&'de crate::wire::WpaCredentials<'de>),
2728
2729            UnknownOrdinal_(u64),
2730        }
2731
2732        pub enum Value<'de> {
2733            Wep(crate::wire::WepCredentials<'de>),
2734
2735            Wpa(crate::wire::WpaCredentials<'de>),
2736
2737            UnknownOrdinal_(u64),
2738        }
2739    }
2740
2741    impl<'de> Credentials<'de> {
2742        pub fn as_ref(&self) -> crate::wire::credentials::Ref<'_> {
2743            match self.raw.ordinal() {
2744                1 => crate::wire::credentials::Ref::Wep(unsafe {
2745                    self.raw.get().deref_unchecked::<crate::wire::WepCredentials<'_>>()
2746                }),
2747
2748                2 => crate::wire::credentials::Ref::Wpa(unsafe {
2749                    self.raw.get().deref_unchecked::<crate::wire::WpaCredentials<'_>>()
2750                }),
2751
2752                unknown => crate::wire::credentials::Ref::UnknownOrdinal_(unknown),
2753            }
2754        }
2755
2756        pub fn into_inner(self) -> crate::wire::credentials::Value<'de> {
2757            let this = ::core::mem::ManuallyDrop::new(self);
2758
2759            match this.raw.ordinal() {
2760                1 => crate::wire::credentials::Value::Wep(unsafe {
2761                    this.raw.get().read_unchecked::<crate::wire::WepCredentials<'de>>()
2762                }),
2763
2764                2 => crate::wire::credentials::Value::Wpa(unsafe {
2765                    this.raw.get().read_unchecked::<crate::wire::WpaCredentials<'de>>()
2766                }),
2767
2768                unknown => crate::wire::credentials::Value::UnknownOrdinal_(unknown),
2769            }
2770        }
2771    }
2772
2773    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Credentials<'de>
2774    where
2775        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2776        ___D: ::fidl_next::Decoder<'de>,
2777    {
2778        fn decode(
2779            mut slot: ::fidl_next::Slot<'_, Self>,
2780            decoder: &mut ___D,
2781            _: (),
2782        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2783            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
2784            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
2785                1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::WepCredentials<'de>>(
2786                    raw,
2787                    decoder,
2788                    (),
2789                )?,
2790
2791                2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::WpaCredentials<'de>>(
2792                    raw,
2793                    decoder,
2794                    (),
2795                )?,
2796
2797                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
2798            }
2799
2800            Ok(())
2801        }
2802    }
2803
2804    impl<'de> ::core::fmt::Debug for Credentials<'de> {
2805        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2806            match self.raw.ordinal() {
2807                1 => unsafe {
2808                    self.raw.get().deref_unchecked::<crate::wire::WepCredentials<'_>>().fmt(f)
2809                },
2810                2 => unsafe {
2811                    self.raw.get().deref_unchecked::<crate::wire::WpaCredentials<'_>>().fmt(f)
2812                },
2813                _ => unsafe { ::core::hint::unreachable_unchecked() },
2814            }
2815        }
2816    }
2817
2818    impl<'de> ::fidl_next::IntoNatural for Credentials<'de> {
2819        type Natural = crate::natural::Credentials;
2820    }
2821
2822    /// The wire type corresponding to [`CriticalErrorReason`].
2823    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
2824    #[repr(transparent)]
2825    pub struct CriticalErrorReason {
2826        pub(crate) value: u8,
2827    }
2828
2829    impl ::fidl_next::Constrained for CriticalErrorReason {
2830        type Constraint = ();
2831
2832        fn validate(
2833            _: ::fidl_next::Slot<'_, Self>,
2834            _: Self::Constraint,
2835        ) -> Result<(), ::fidl_next::ValidationError> {
2836            Ok(())
2837        }
2838    }
2839
2840    unsafe impl ::fidl_next::Wire for CriticalErrorReason {
2841        type Narrowed<'de> = Self;
2842
2843        #[inline]
2844        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2845            // Wire enums have no padding
2846        }
2847    }
2848
2849    impl CriticalErrorReason {
2850        pub const FW_CRASH: CriticalErrorReason = CriticalErrorReason { value: 1 };
2851    }
2852
2853    unsafe impl<___D> ::fidl_next::Decode<___D> for CriticalErrorReason
2854    where
2855        ___D: ?Sized,
2856    {
2857        fn decode(
2858            slot: ::fidl_next::Slot<'_, Self>,
2859            _: &mut ___D,
2860            _: (),
2861        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2862            ::fidl_next::munge!(let Self { value } = slot);
2863
2864            match u8::from(*value) {
2865                1 => (),
2866                unknown => {
2867                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
2868                }
2869            }
2870
2871            Ok(())
2872        }
2873    }
2874
2875    impl ::core::convert::From<crate::natural::CriticalErrorReason> for CriticalErrorReason {
2876        fn from(natural: crate::natural::CriticalErrorReason) -> Self {
2877            match natural {
2878                crate::natural::CriticalErrorReason::FwCrash => CriticalErrorReason::FW_CRASH,
2879            }
2880        }
2881    }
2882
2883    impl ::fidl_next::IntoNatural for CriticalErrorReason {
2884        type Natural = crate::natural::CriticalErrorReason;
2885    }
2886
2887    /// The wire type corresponding to [`OwePublicKey`].
2888    #[derive(Debug)]
2889    #[repr(C)]
2890    pub struct OwePublicKey<'de> {
2891        pub group: ::fidl_next::wire::Uint16,
2892
2893        pub key: ::fidl_next::wire::Vector<'de, u8>,
2894    }
2895
2896    static_assertions::const_assert_eq!(std::mem::size_of::<OwePublicKey<'_>>(), 24);
2897    static_assertions::const_assert_eq!(std::mem::align_of::<OwePublicKey<'_>>(), 8);
2898
2899    static_assertions::const_assert_eq!(std::mem::offset_of!(OwePublicKey<'_>, group), 0);
2900
2901    static_assertions::const_assert_eq!(std::mem::offset_of!(OwePublicKey<'_>, key), 8);
2902
2903    impl ::fidl_next::Constrained for OwePublicKey<'_> {
2904        type Constraint = ();
2905
2906        fn validate(
2907            _: ::fidl_next::Slot<'_, Self>,
2908            _: Self::Constraint,
2909        ) -> Result<(), ::fidl_next::ValidationError> {
2910            Ok(())
2911        }
2912    }
2913
2914    unsafe impl ::fidl_next::Wire for OwePublicKey<'static> {
2915        type Narrowed<'de> = OwePublicKey<'de>;
2916
2917        #[inline]
2918        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2919            ::fidl_next::munge! {
2920                let Self {
2921                    group,
2922                    key,
2923
2924                } = &mut *out_;
2925            }
2926
2927            ::fidl_next::Wire::zero_padding(group);
2928
2929            ::fidl_next::Wire::zero_padding(key);
2930
2931            unsafe {
2932                out_.as_mut_ptr().cast::<u8>().add(2).write_bytes(0, 6);
2933            }
2934        }
2935    }
2936
2937    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for OwePublicKey<'de>
2938    where
2939        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2940        ___D: ::fidl_next::Decoder<'de>,
2941    {
2942        fn decode(
2943            slot_: ::fidl_next::Slot<'_, Self>,
2944            decoder_: &mut ___D,
2945            _: (),
2946        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2947            if slot_.as_bytes()[2..8] != [0u8; 6] {
2948                return Err(::fidl_next::DecodeError::InvalidPadding);
2949            }
2950
2951            ::fidl_next::munge! {
2952                let Self {
2953                    mut group,
2954                    mut key,
2955
2956                } = slot_;
2957            }
2958
2959            let _field = group.as_mut();
2960
2961            ::fidl_next::Decode::decode(group.as_mut(), decoder_, ())?;
2962
2963            let _field = key.as_mut();
2964            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2965            ::fidl_next::Decode::decode(key.as_mut(), decoder_, (4294967295, ()))?;
2966
2967            Ok(())
2968        }
2969    }
2970
2971    impl<'de> ::fidl_next::IntoNatural for OwePublicKey<'de> {
2972        type Natural = crate::natural::OwePublicKey;
2973    }
2974
2975    /// The wire type corresponding to [`SignalReportIndication`].
2976    #[derive(Clone, Debug)]
2977    #[repr(C)]
2978    pub struct SignalReportIndication {
2979        pub rssi_dbm: i8,
2980
2981        pub snr_db: i8,
2982
2983        pub tx_rate_500kbps: ::fidl_next::wire::Uint32,
2984    }
2985
2986    static_assertions::const_assert_eq!(std::mem::size_of::<SignalReportIndication>(), 8);
2987    static_assertions::const_assert_eq!(std::mem::align_of::<SignalReportIndication>(), 4);
2988
2989    static_assertions::const_assert_eq!(std::mem::offset_of!(SignalReportIndication, rssi_dbm), 0);
2990
2991    static_assertions::const_assert_eq!(std::mem::offset_of!(SignalReportIndication, snr_db), 1);
2992
2993    static_assertions::const_assert_eq!(
2994        std::mem::offset_of!(SignalReportIndication, tx_rate_500kbps),
2995        4
2996    );
2997
2998    impl ::fidl_next::Constrained for SignalReportIndication {
2999        type Constraint = ();
3000
3001        fn validate(
3002            _: ::fidl_next::Slot<'_, Self>,
3003            _: Self::Constraint,
3004        ) -> Result<(), ::fidl_next::ValidationError> {
3005            Ok(())
3006        }
3007    }
3008
3009    unsafe impl ::fidl_next::Wire for SignalReportIndication {
3010        type Narrowed<'de> = SignalReportIndication;
3011
3012        #[inline]
3013        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3014            ::fidl_next::munge! {
3015                let Self {
3016                    rssi_dbm,
3017                    snr_db,
3018                    tx_rate_500kbps,
3019
3020                } = &mut *out_;
3021            }
3022
3023            ::fidl_next::Wire::zero_padding(rssi_dbm);
3024
3025            ::fidl_next::Wire::zero_padding(snr_db);
3026
3027            ::fidl_next::Wire::zero_padding(tx_rate_500kbps);
3028
3029            unsafe {
3030                out_.as_mut_ptr().cast::<u8>().add(2).write_bytes(0, 2);
3031            }
3032        }
3033    }
3034
3035    unsafe impl<___D> ::fidl_next::Decode<___D> for SignalReportIndication
3036    where
3037        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3038    {
3039        fn decode(
3040            slot_: ::fidl_next::Slot<'_, Self>,
3041            decoder_: &mut ___D,
3042            _: (),
3043        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3044            if slot_.as_bytes()[2..4] != [0u8; 2] {
3045                return Err(::fidl_next::DecodeError::InvalidPadding);
3046            }
3047
3048            ::fidl_next::munge! {
3049                let Self {
3050                    mut rssi_dbm,
3051                    mut snr_db,
3052                    mut tx_rate_500kbps,
3053
3054                } = slot_;
3055            }
3056
3057            let _field = rssi_dbm.as_mut();
3058
3059            ::fidl_next::Decode::decode(rssi_dbm.as_mut(), decoder_, ())?;
3060
3061            let _field = snr_db.as_mut();
3062
3063            ::fidl_next::Decode::decode(snr_db.as_mut(), decoder_, ())?;
3064
3065            let _field = tx_rate_500kbps.as_mut();
3066
3067            ::fidl_next::Decode::decode(tx_rate_500kbps.as_mut(), decoder_, ())?;
3068
3069            Ok(())
3070        }
3071    }
3072
3073    impl ::fidl_next::IntoNatural for SignalReportIndication {
3074        type Natural = crate::natural::SignalReportIndication;
3075    }
3076
3077    /// The wire type corresponding to [`TxPowerScenario`].
3078    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
3079    #[repr(transparent)]
3080    pub struct TxPowerScenario {
3081        pub(crate) value: ::fidl_next::wire::Uint32,
3082    }
3083
3084    impl ::fidl_next::Constrained for TxPowerScenario {
3085        type Constraint = ();
3086
3087        fn validate(
3088            _: ::fidl_next::Slot<'_, Self>,
3089            _: Self::Constraint,
3090        ) -> Result<(), ::fidl_next::ValidationError> {
3091            Ok(())
3092        }
3093    }
3094
3095    unsafe impl ::fidl_next::Wire for TxPowerScenario {
3096        type Narrowed<'de> = Self;
3097
3098        #[inline]
3099        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
3100            // Wire enums have no padding
3101        }
3102    }
3103
3104    impl TxPowerScenario {
3105        pub const DEFAULT: TxPowerScenario =
3106            TxPowerScenario { value: ::fidl_next::wire::Uint32(0) };
3107
3108        pub const VOICE_CALL: TxPowerScenario =
3109            TxPowerScenario { value: ::fidl_next::wire::Uint32(1) };
3110
3111        pub const HEAD_CELL_OFF: TxPowerScenario =
3112            TxPowerScenario { value: ::fidl_next::wire::Uint32(2) };
3113
3114        pub const HEAD_CELL_ON: TxPowerScenario =
3115            TxPowerScenario { value: ::fidl_next::wire::Uint32(3) };
3116
3117        pub const BODY_CELL_OFF: TxPowerScenario =
3118            TxPowerScenario { value: ::fidl_next::wire::Uint32(4) };
3119
3120        pub const BODY_CELL_ON: TxPowerScenario =
3121            TxPowerScenario { value: ::fidl_next::wire::Uint32(5) };
3122
3123        pub const BODY_BT_ACTIVE: TxPowerScenario =
3124            TxPowerScenario { value: ::fidl_next::wire::Uint32(6) };
3125    }
3126
3127    unsafe impl<___D> ::fidl_next::Decode<___D> for TxPowerScenario
3128    where
3129        ___D: ?Sized,
3130    {
3131        fn decode(
3132            slot: ::fidl_next::Slot<'_, Self>,
3133            _: &mut ___D,
3134            _: (),
3135        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3136            Ok(())
3137        }
3138    }
3139
3140    impl ::core::convert::From<crate::natural::TxPowerScenario> for TxPowerScenario {
3141        fn from(natural: crate::natural::TxPowerScenario) -> Self {
3142            match natural {
3143                crate::natural::TxPowerScenario::Default => TxPowerScenario::DEFAULT,
3144
3145                crate::natural::TxPowerScenario::VoiceCall => TxPowerScenario::VOICE_CALL,
3146
3147                crate::natural::TxPowerScenario::HeadCellOff => TxPowerScenario::HEAD_CELL_OFF,
3148
3149                crate::natural::TxPowerScenario::HeadCellOn => TxPowerScenario::HEAD_CELL_ON,
3150
3151                crate::natural::TxPowerScenario::BodyCellOff => TxPowerScenario::BODY_CELL_OFF,
3152
3153                crate::natural::TxPowerScenario::BodyCellOn => TxPowerScenario::BODY_CELL_ON,
3154
3155                crate::natural::TxPowerScenario::BodyBtActive => TxPowerScenario::BODY_BT_ACTIVE,
3156
3157                crate::natural::TxPowerScenario::UnknownOrdinal_(value) => {
3158                    TxPowerScenario { value: ::fidl_next::wire::Uint32::from(value) }
3159                }
3160            }
3161        }
3162    }
3163
3164    impl ::fidl_next::IntoNatural for TxPowerScenario {
3165        type Natural = crate::natural::TxPowerScenario;
3166    }
3167
3168    /// The wire type corresponding to [`WmmAcParams`].
3169    #[derive(Clone, Debug)]
3170    #[repr(C)]
3171    pub struct WmmAcParams {
3172        pub ecw_min: u8,
3173
3174        pub ecw_max: u8,
3175
3176        pub aifsn: u8,
3177
3178        pub txop_limit: ::fidl_next::wire::Uint16,
3179
3180        pub acm: bool,
3181    }
3182
3183    static_assertions::const_assert_eq!(std::mem::size_of::<WmmAcParams>(), 8);
3184    static_assertions::const_assert_eq!(std::mem::align_of::<WmmAcParams>(), 2);
3185
3186    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmAcParams, ecw_min), 0);
3187
3188    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmAcParams, ecw_max), 1);
3189
3190    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmAcParams, aifsn), 2);
3191
3192    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmAcParams, txop_limit), 4);
3193
3194    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmAcParams, acm), 6);
3195
3196    impl ::fidl_next::Constrained for WmmAcParams {
3197        type Constraint = ();
3198
3199        fn validate(
3200            _: ::fidl_next::Slot<'_, Self>,
3201            _: Self::Constraint,
3202        ) -> Result<(), ::fidl_next::ValidationError> {
3203            Ok(())
3204        }
3205    }
3206
3207    unsafe impl ::fidl_next::Wire for WmmAcParams {
3208        type Narrowed<'de> = WmmAcParams;
3209
3210        #[inline]
3211        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3212            ::fidl_next::munge! {
3213                let Self {
3214                    ecw_min,
3215                    ecw_max,
3216                    aifsn,
3217                    txop_limit,
3218                    acm,
3219
3220                } = &mut *out_;
3221            }
3222
3223            ::fidl_next::Wire::zero_padding(ecw_min);
3224
3225            ::fidl_next::Wire::zero_padding(ecw_max);
3226
3227            ::fidl_next::Wire::zero_padding(aifsn);
3228
3229            ::fidl_next::Wire::zero_padding(txop_limit);
3230
3231            ::fidl_next::Wire::zero_padding(acm);
3232
3233            unsafe {
3234                out_.as_mut_ptr().cast::<u8>().add(7).write_bytes(0, 1);
3235            }
3236
3237            unsafe {
3238                out_.as_mut_ptr().cast::<u8>().add(3).write_bytes(0, 1);
3239            }
3240        }
3241    }
3242
3243    unsafe impl<___D> ::fidl_next::Decode<___D> for WmmAcParams
3244    where
3245        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3246    {
3247        fn decode(
3248            slot_: ::fidl_next::Slot<'_, Self>,
3249            decoder_: &mut ___D,
3250            _: (),
3251        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3252            if slot_.as_bytes()[7..8] != [0u8; 1] {
3253                return Err(::fidl_next::DecodeError::InvalidPadding);
3254            }
3255
3256            if slot_.as_bytes()[3..4] != [0u8; 1] {
3257                return Err(::fidl_next::DecodeError::InvalidPadding);
3258            }
3259
3260            ::fidl_next::munge! {
3261                let Self {
3262                    mut ecw_min,
3263                    mut ecw_max,
3264                    mut aifsn,
3265                    mut txop_limit,
3266                    mut acm,
3267
3268                } = slot_;
3269            }
3270
3271            let _field = ecw_min.as_mut();
3272
3273            ::fidl_next::Decode::decode(ecw_min.as_mut(), decoder_, ())?;
3274
3275            let _field = ecw_max.as_mut();
3276
3277            ::fidl_next::Decode::decode(ecw_max.as_mut(), decoder_, ())?;
3278
3279            let _field = aifsn.as_mut();
3280
3281            ::fidl_next::Decode::decode(aifsn.as_mut(), decoder_, ())?;
3282
3283            let _field = txop_limit.as_mut();
3284
3285            ::fidl_next::Decode::decode(txop_limit.as_mut(), decoder_, ())?;
3286
3287            let _field = acm.as_mut();
3288
3289            ::fidl_next::Decode::decode(acm.as_mut(), decoder_, ())?;
3290
3291            Ok(())
3292        }
3293    }
3294
3295    impl ::fidl_next::IntoNatural for WmmAcParams {
3296        type Natural = crate::natural::WmmAcParams;
3297    }
3298
3299    /// The wire type corresponding to [`WmmStatusResponse`].
3300    #[derive(Clone, Debug)]
3301    #[repr(C)]
3302    pub struct WmmStatusResponse {
3303        pub apsd: bool,
3304
3305        pub ac_be_params: crate::wire::WmmAcParams,
3306
3307        pub ac_bk_params: crate::wire::WmmAcParams,
3308
3309        pub ac_vi_params: crate::wire::WmmAcParams,
3310
3311        pub ac_vo_params: crate::wire::WmmAcParams,
3312    }
3313
3314    static_assertions::const_assert_eq!(std::mem::size_of::<WmmStatusResponse>(), 34);
3315    static_assertions::const_assert_eq!(std::mem::align_of::<WmmStatusResponse>(), 2);
3316
3317    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmStatusResponse, apsd), 0);
3318
3319    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmStatusResponse, ac_be_params), 2);
3320
3321    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmStatusResponse, ac_bk_params), 10);
3322
3323    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmStatusResponse, ac_vi_params), 18);
3324
3325    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmStatusResponse, ac_vo_params), 26);
3326
3327    impl ::fidl_next::Constrained for WmmStatusResponse {
3328        type Constraint = ();
3329
3330        fn validate(
3331            _: ::fidl_next::Slot<'_, Self>,
3332            _: Self::Constraint,
3333        ) -> Result<(), ::fidl_next::ValidationError> {
3334            Ok(())
3335        }
3336    }
3337
3338    unsafe impl ::fidl_next::Wire for WmmStatusResponse {
3339        type Narrowed<'de> = WmmStatusResponse;
3340
3341        #[inline]
3342        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3343            ::fidl_next::munge! {
3344                let Self {
3345                    apsd,
3346                    ac_be_params,
3347                    ac_bk_params,
3348                    ac_vi_params,
3349                    ac_vo_params,
3350
3351                } = &mut *out_;
3352            }
3353
3354            ::fidl_next::Wire::zero_padding(apsd);
3355
3356            ::fidl_next::Wire::zero_padding(ac_be_params);
3357
3358            ::fidl_next::Wire::zero_padding(ac_bk_params);
3359
3360            ::fidl_next::Wire::zero_padding(ac_vi_params);
3361
3362            ::fidl_next::Wire::zero_padding(ac_vo_params);
3363
3364            unsafe {
3365                out_.as_mut_ptr().cast::<u8>().add(1).write_bytes(0, 1);
3366            }
3367        }
3368    }
3369
3370    unsafe impl<___D> ::fidl_next::Decode<___D> for WmmStatusResponse
3371    where
3372        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3373    {
3374        fn decode(
3375            slot_: ::fidl_next::Slot<'_, Self>,
3376            decoder_: &mut ___D,
3377            _: (),
3378        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3379            if slot_.as_bytes()[1..2] != [0u8; 1] {
3380                return Err(::fidl_next::DecodeError::InvalidPadding);
3381            }
3382
3383            ::fidl_next::munge! {
3384                let Self {
3385                    mut apsd,
3386                    mut ac_be_params,
3387                    mut ac_bk_params,
3388                    mut ac_vi_params,
3389                    mut ac_vo_params,
3390
3391                } = slot_;
3392            }
3393
3394            let _field = apsd.as_mut();
3395
3396            ::fidl_next::Decode::decode(apsd.as_mut(), decoder_, ())?;
3397
3398            let _field = ac_be_params.as_mut();
3399
3400            ::fidl_next::Decode::decode(ac_be_params.as_mut(), decoder_, ())?;
3401
3402            let _field = ac_bk_params.as_mut();
3403
3404            ::fidl_next::Decode::decode(ac_bk_params.as_mut(), decoder_, ())?;
3405
3406            let _field = ac_vi_params.as_mut();
3407
3408            ::fidl_next::Decode::decode(ac_vi_params.as_mut(), decoder_, ())?;
3409
3410            let _field = ac_vo_params.as_mut();
3411
3412            ::fidl_next::Decode::decode(ac_vo_params.as_mut(), decoder_, ())?;
3413
3414            Ok(())
3415        }
3416    }
3417
3418    impl ::fidl_next::IntoNatural for WmmStatusResponse {
3419        type Natural = crate::natural::WmmStatusResponse;
3420    }
3421}
3422
3423pub mod wire_optional {
3424
3425    #[repr(transparent)]
3426    pub struct WpaCredentials<'de> {
3427        pub(crate) raw: ::fidl_next::wire::Union,
3428        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3429    }
3430
3431    impl ::fidl_next::Constrained for WpaCredentials<'_> {
3432        type Constraint = ();
3433
3434        fn validate(
3435            _: ::fidl_next::Slot<'_, Self>,
3436            _: Self::Constraint,
3437        ) -> Result<(), ::fidl_next::ValidationError> {
3438            Ok(())
3439        }
3440    }
3441
3442    unsafe impl ::fidl_next::Wire for WpaCredentials<'static> {
3443        type Narrowed<'de> = WpaCredentials<'de>;
3444
3445        #[inline]
3446        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3447            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3448            ::fidl_next::wire::Union::zero_padding(raw);
3449        }
3450    }
3451
3452    impl<'de> WpaCredentials<'de> {
3453        pub fn is_some(&self) -> bool {
3454            self.raw.is_some()
3455        }
3456
3457        pub fn is_none(&self) -> bool {
3458            self.raw.is_none()
3459        }
3460
3461        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::WpaCredentials<'de>> {
3462            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
3463        }
3464
3465        pub fn into_option(self) -> ::core::option::Option<crate::wire::WpaCredentials<'de>> {
3466            if self.is_some() {
3467                Some(crate::wire::WpaCredentials {
3468                    raw: self.raw,
3469                    _phantom: ::core::marker::PhantomData,
3470                })
3471            } else {
3472                None
3473            }
3474        }
3475    }
3476
3477    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WpaCredentials<'de>
3478    where
3479        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3480        ___D: ::fidl_next::Decoder<'de>,
3481    {
3482        fn decode(
3483            mut slot: ::fidl_next::Slot<'_, Self>,
3484            decoder: &mut ___D,
3485            _: (),
3486        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3487            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3488            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3489                1 => ::fidl_next::wire::Union::decode_as::<___D, [u8; 32]>(raw, decoder, ())?,
3490
3491                2 => {
3492                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
3493                        raw,
3494                        decoder,
3495                        (63, ()),
3496                    )?
3497                }
3498
3499                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
3500                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3501            }
3502
3503            Ok(())
3504        }
3505    }
3506
3507    impl<'de> ::core::fmt::Debug for WpaCredentials<'de> {
3508        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3509            self.as_ref().fmt(f)
3510        }
3511    }
3512
3513    impl<'de> ::fidl_next::IntoNatural for WpaCredentials<'de> {
3514        type Natural = ::core::option::Option<crate::natural::WpaCredentials>;
3515    }
3516
3517    #[repr(transparent)]
3518    pub struct Credentials<'de> {
3519        pub(crate) raw: ::fidl_next::wire::Union,
3520        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3521    }
3522
3523    impl ::fidl_next::Constrained for Credentials<'_> {
3524        type Constraint = ();
3525
3526        fn validate(
3527            _: ::fidl_next::Slot<'_, Self>,
3528            _: Self::Constraint,
3529        ) -> Result<(), ::fidl_next::ValidationError> {
3530            Ok(())
3531        }
3532    }
3533
3534    unsafe impl ::fidl_next::Wire for Credentials<'static> {
3535        type Narrowed<'de> = Credentials<'de>;
3536
3537        #[inline]
3538        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3539            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3540            ::fidl_next::wire::Union::zero_padding(raw);
3541        }
3542    }
3543
3544    impl<'de> Credentials<'de> {
3545        pub fn is_some(&self) -> bool {
3546            self.raw.is_some()
3547        }
3548
3549        pub fn is_none(&self) -> bool {
3550            self.raw.is_none()
3551        }
3552
3553        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Credentials<'de>> {
3554            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
3555        }
3556
3557        pub fn into_option(self) -> ::core::option::Option<crate::wire::Credentials<'de>> {
3558            if self.is_some() {
3559                Some(crate::wire::Credentials {
3560                    raw: self.raw,
3561                    _phantom: ::core::marker::PhantomData,
3562                })
3563            } else {
3564                None
3565            }
3566        }
3567    }
3568
3569    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Credentials<'de>
3570    where
3571        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3572        ___D: ::fidl_next::Decoder<'de>,
3573    {
3574        fn decode(
3575            mut slot: ::fidl_next::Slot<'_, Self>,
3576            decoder: &mut ___D,
3577            _: (),
3578        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3579            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3580            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3581                1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::WepCredentials<'de>>(
3582                    raw,
3583                    decoder,
3584                    (),
3585                )?,
3586
3587                2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::WpaCredentials<'de>>(
3588                    raw,
3589                    decoder,
3590                    (),
3591                )?,
3592
3593                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
3594                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3595            }
3596
3597            Ok(())
3598        }
3599    }
3600
3601    impl<'de> ::core::fmt::Debug for Credentials<'de> {
3602        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3603            self.as_ref().fmt(f)
3604        }
3605    }
3606
3607    impl<'de> ::fidl_next::IntoNatural for Credentials<'de> {
3608        type Natural = ::core::option::Option<crate::natural::Credentials>;
3609    }
3610}
3611
3612pub mod generic {
3613
3614    /// The generic type corresponding to [`Authentication`].
3615    pub struct Authentication<T0, T1> {
3616        pub protocol: T0,
3617
3618        pub credentials: T1,
3619    }
3620
3621    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Authentication<'static>, ___E>
3622        for Authentication<T0, T1>
3623    where
3624        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3625        ___E: ::fidl_next::Encoder,
3626        T0: ::fidl_next::Encode<crate::wire::Protocol, ___E>,
3627        T1: ::fidl_next::Encode<crate::wire_optional::Credentials<'static>, ___E>,
3628    {
3629        #[inline]
3630        fn encode(
3631            self,
3632            encoder_: &mut ___E,
3633            out_: &mut ::core::mem::MaybeUninit<crate::wire::Authentication<'static>>,
3634            _: (),
3635        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3636            ::fidl_next::munge! {
3637                let crate::wire::Authentication {
3638                    protocol,
3639                    credentials,
3640
3641                } = out_;
3642            }
3643
3644            ::fidl_next::Encode::encode(self.protocol, encoder_, protocol, ())?;
3645
3646            ::fidl_next::Encode::encode(self.credentials, encoder_, credentials, ())?;
3647
3648            Ok(())
3649        }
3650    }
3651
3652    /// The generic type corresponding to [`ChannelSwitchInfo`].
3653    pub struct ChannelSwitchInfo<T0, T1, T2> {
3654        pub new_primary_channel: T0,
3655
3656        pub bandwidth: T1,
3657
3658        pub vht_secondary_80_channel: T2,
3659    }
3660
3661    unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::ChannelSwitchInfo, ___E>
3662        for ChannelSwitchInfo<T0, T1, T2>
3663    where
3664        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3665        T0: ::fidl_next::Encode<
3666                ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelNumber,
3667                ___E,
3668            >,
3669        T1: ::fidl_next::Encode<
3670                ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelBandwidth,
3671                ___E,
3672            >,
3673        T2: ::fidl_next::Encode<
3674                ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelNumber,
3675                ___E,
3676            >,
3677    {
3678        #[inline]
3679        fn encode(
3680            self,
3681            encoder_: &mut ___E,
3682            out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSwitchInfo>,
3683            _: (),
3684        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3685            ::fidl_next::munge! {
3686                let crate::wire::ChannelSwitchInfo {
3687                    new_primary_channel,
3688                    bandwidth,
3689                    vht_secondary_80_channel,
3690
3691                } = out_;
3692            }
3693
3694            ::fidl_next::Encode::encode(
3695                self.new_primary_channel,
3696                encoder_,
3697                new_primary_channel,
3698                (),
3699            )?;
3700
3701            ::fidl_next::Encode::encode(self.bandwidth, encoder_, bandwidth, ())?;
3702
3703            ::fidl_next::Encode::encode(
3704                self.vht_secondary_80_channel,
3705                encoder_,
3706                vht_secondary_80_channel,
3707                (),
3708            )?;
3709
3710            Ok(())
3711        }
3712    }
3713
3714    /// The generic type corresponding to [`WepCredentials`].
3715    pub struct WepCredentials<T0> {
3716        pub key: T0,
3717    }
3718
3719    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WepCredentials<'static>, ___E>
3720        for WepCredentials<T0>
3721    where
3722        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3723        ___E: ::fidl_next::Encoder,
3724        T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
3725    {
3726        #[inline]
3727        fn encode(
3728            self,
3729            encoder_: &mut ___E,
3730            out_: &mut ::core::mem::MaybeUninit<crate::wire::WepCredentials<'static>>,
3731            _: (),
3732        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3733            ::fidl_next::munge! {
3734                let crate::wire::WepCredentials {
3735                    key,
3736
3737                } = out_;
3738            }
3739
3740            ::fidl_next::Encode::encode(self.key, encoder_, key, (4294967295, ()))?;
3741
3742            Ok(())
3743        }
3744    }
3745
3746    /// The generic type corresponding to [`OwePublicKey`].
3747    pub struct OwePublicKey<T0, T1> {
3748        pub group: T0,
3749
3750        pub key: T1,
3751    }
3752
3753    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::OwePublicKey<'static>, ___E>
3754        for OwePublicKey<T0, T1>
3755    where
3756        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3757        ___E: ::fidl_next::Encoder,
3758        T0: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
3759        T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
3760    {
3761        #[inline]
3762        fn encode(
3763            self,
3764            encoder_: &mut ___E,
3765            out_: &mut ::core::mem::MaybeUninit<crate::wire::OwePublicKey<'static>>,
3766            _: (),
3767        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3768            ::fidl_next::munge! {
3769                let crate::wire::OwePublicKey {
3770                    group,
3771                    key,
3772
3773                } = out_;
3774            }
3775
3776            ::fidl_next::Encode::encode(self.group, encoder_, group, ())?;
3777
3778            ::fidl_next::Encode::encode(self.key, encoder_, key, (4294967295, ()))?;
3779
3780            Ok(())
3781        }
3782    }
3783
3784    /// The generic type corresponding to [`SignalReportIndication`].
3785    pub struct SignalReportIndication<T0, T1, T2> {
3786        pub rssi_dbm: T0,
3787
3788        pub snr_db: T1,
3789
3790        pub tx_rate_500kbps: T2,
3791    }
3792
3793    unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::SignalReportIndication, ___E>
3794        for SignalReportIndication<T0, T1, T2>
3795    where
3796        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3797        T0: ::fidl_next::Encode<i8, ___E>,
3798        T1: ::fidl_next::Encode<i8, ___E>,
3799        T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3800    {
3801        #[inline]
3802        fn encode(
3803            self,
3804            encoder_: &mut ___E,
3805            out_: &mut ::core::mem::MaybeUninit<crate::wire::SignalReportIndication>,
3806            _: (),
3807        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3808            ::fidl_next::munge! {
3809                let crate::wire::SignalReportIndication {
3810                    rssi_dbm,
3811                    snr_db,
3812                    tx_rate_500kbps,
3813
3814                } = out_;
3815            }
3816
3817            ::fidl_next::Encode::encode(self.rssi_dbm, encoder_, rssi_dbm, ())?;
3818
3819            ::fidl_next::Encode::encode(self.snr_db, encoder_, snr_db, ())?;
3820
3821            ::fidl_next::Encode::encode(self.tx_rate_500kbps, encoder_, tx_rate_500kbps, ())?;
3822
3823            Ok(())
3824        }
3825    }
3826
3827    /// The generic type corresponding to [`WmmAcParams`].
3828    pub struct WmmAcParams<T0, T1, T2, T3, T4> {
3829        pub ecw_min: T0,
3830
3831        pub ecw_max: T1,
3832
3833        pub aifsn: T2,
3834
3835        pub txop_limit: T3,
3836
3837        pub acm: T4,
3838    }
3839
3840    unsafe impl<___E, T0, T1, T2, T3, T4> ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>
3841        for WmmAcParams<T0, T1, T2, T3, T4>
3842    where
3843        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3844        T0: ::fidl_next::Encode<u8, ___E>,
3845        T1: ::fidl_next::Encode<u8, ___E>,
3846        T2: ::fidl_next::Encode<u8, ___E>,
3847        T3: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
3848        T4: ::fidl_next::Encode<bool, ___E>,
3849    {
3850        #[inline]
3851        fn encode(
3852            self,
3853            encoder_: &mut ___E,
3854            out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmAcParams>,
3855            _: (),
3856        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3857            ::fidl_next::munge! {
3858                let crate::wire::WmmAcParams {
3859                    ecw_min,
3860                    ecw_max,
3861                    aifsn,
3862                    txop_limit,
3863                    acm,
3864
3865                } = out_;
3866            }
3867
3868            ::fidl_next::Encode::encode(self.ecw_min, encoder_, ecw_min, ())?;
3869
3870            ::fidl_next::Encode::encode(self.ecw_max, encoder_, ecw_max, ())?;
3871
3872            ::fidl_next::Encode::encode(self.aifsn, encoder_, aifsn, ())?;
3873
3874            ::fidl_next::Encode::encode(self.txop_limit, encoder_, txop_limit, ())?;
3875
3876            ::fidl_next::Encode::encode(self.acm, encoder_, acm, ())?;
3877
3878            Ok(())
3879        }
3880    }
3881
3882    /// The generic type corresponding to [`WmmStatusResponse`].
3883    pub struct WmmStatusResponse<T0, T1, T2, T3, T4> {
3884        pub apsd: T0,
3885
3886        pub ac_be_params: T1,
3887
3888        pub ac_bk_params: T2,
3889
3890        pub ac_vi_params: T3,
3891
3892        pub ac_vo_params: T4,
3893    }
3894
3895    unsafe impl<___E, T0, T1, T2, T3, T4> ::fidl_next::Encode<crate::wire::WmmStatusResponse, ___E>
3896        for WmmStatusResponse<T0, T1, T2, T3, T4>
3897    where
3898        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3899        T0: ::fidl_next::Encode<bool, ___E>,
3900        T1: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
3901        T2: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
3902        T3: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
3903        T4: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
3904    {
3905        #[inline]
3906        fn encode(
3907            self,
3908            encoder_: &mut ___E,
3909            out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmStatusResponse>,
3910            _: (),
3911        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3912            ::fidl_next::munge! {
3913                let crate::wire::WmmStatusResponse {
3914                    apsd,
3915                    ac_be_params,
3916                    ac_bk_params,
3917                    ac_vi_params,
3918                    ac_vo_params,
3919
3920                } = out_;
3921            }
3922
3923            ::fidl_next::Encode::encode(self.apsd, encoder_, apsd, ())?;
3924
3925            ::fidl_next::Encode::encode(self.ac_be_params, encoder_, ac_be_params, ())?;
3926
3927            ::fidl_next::Encode::encode(self.ac_bk_params, encoder_, ac_bk_params, ())?;
3928
3929            ::fidl_next::Encode::encode(self.ac_vi_params, encoder_, ac_vi_params, ())?;
3930
3931            ::fidl_next::Encode::encode(self.ac_vo_params, encoder_, ac_vo_params, ())?;
3932
3933            Ok(())
3934        }
3935    }
3936}
3937
3938pub use self::natural::*;
3939
3940pub const COUNTRY_CODE_LEN: u32 = 2 as u32;
3941
3942pub const MAX_ASSOC_BASIC_RATES: u8 = 14 as u8;