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    #[repr(C)]
1412    pub struct SignalReportIndication {
1413        pub rssi_dbm: i8,
1414
1415        pub snr_db: i8,
1416    }
1417
1418    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SignalReportIndication, ___E>
1419        for SignalReportIndication
1420    where
1421        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1422    {
1423        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1424            Self,
1425            crate::wire::SignalReportIndication,
1426        > = unsafe {
1427            ::fidl_next::CopyOptimization::enable_if(
1428                true && <i8 as ::fidl_next::Encode<i8, ___E>>::COPY_OPTIMIZATION.is_enabled()
1429                    && <i8 as ::fidl_next::Encode<i8, ___E>>::COPY_OPTIMIZATION.is_enabled(),
1430            )
1431        };
1432
1433        #[inline]
1434        fn encode(
1435            self,
1436            encoder_: &mut ___E,
1437            out_: &mut ::core::mem::MaybeUninit<crate::wire::SignalReportIndication>,
1438            _: (),
1439        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1440            ::fidl_next::munge! {
1441                let crate::wire::SignalReportIndication {
1442                    rssi_dbm,
1443                    snr_db,
1444
1445                } = out_;
1446            }
1447
1448            ::fidl_next::Encode::encode(self.rssi_dbm, encoder_, rssi_dbm, ())?;
1449
1450            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rssi_dbm.as_mut_ptr()) };
1451
1452            ::fidl_next::Encode::encode(self.snr_db, encoder_, snr_db, ())?;
1453
1454            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(snr_db.as_mut_ptr()) };
1455
1456            Ok(())
1457        }
1458    }
1459
1460    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SignalReportIndication, ___E>
1461        for &'a SignalReportIndication
1462    where
1463        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1464    {
1465        #[inline]
1466        fn encode(
1467            self,
1468            encoder_: &mut ___E,
1469            out_: &mut ::core::mem::MaybeUninit<crate::wire::SignalReportIndication>,
1470            _: (),
1471        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1472            ::fidl_next::munge! {
1473                let crate::wire::SignalReportIndication {
1474                    rssi_dbm,
1475                    snr_db,
1476
1477                } = out_;
1478            }
1479
1480            ::fidl_next::Encode::encode(&self.rssi_dbm, encoder_, rssi_dbm, ())?;
1481
1482            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(rssi_dbm.as_mut_ptr()) };
1483
1484            ::fidl_next::Encode::encode(&self.snr_db, encoder_, snr_db, ())?;
1485
1486            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(snr_db.as_mut_ptr()) };
1487
1488            Ok(())
1489        }
1490    }
1491
1492    unsafe impl<___E>
1493        ::fidl_next::EncodeOption<
1494            ::fidl_next::wire::Box<'static, crate::wire::SignalReportIndication>,
1495            ___E,
1496        > for SignalReportIndication
1497    where
1498        ___E: ::fidl_next::Encoder + ?Sized,
1499        SignalReportIndication: ::fidl_next::Encode<crate::wire::SignalReportIndication, ___E>,
1500    {
1501        #[inline]
1502        fn encode_option(
1503            this: ::core::option::Option<Self>,
1504            encoder: &mut ___E,
1505            out: &mut ::core::mem::MaybeUninit<
1506                ::fidl_next::wire::Box<'static, crate::wire::SignalReportIndication>,
1507            >,
1508            _: (),
1509        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1510            if let Some(inner) = this {
1511                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1512                ::fidl_next::wire::Box::encode_present(out);
1513            } else {
1514                ::fidl_next::wire::Box::encode_absent(out);
1515            }
1516
1517            Ok(())
1518        }
1519    }
1520
1521    unsafe impl<'a, ___E>
1522        ::fidl_next::EncodeOption<
1523            ::fidl_next::wire::Box<'static, crate::wire::SignalReportIndication>,
1524            ___E,
1525        > for &'a SignalReportIndication
1526    where
1527        ___E: ::fidl_next::Encoder + ?Sized,
1528        &'a SignalReportIndication: ::fidl_next::Encode<crate::wire::SignalReportIndication, ___E>,
1529    {
1530        #[inline]
1531        fn encode_option(
1532            this: ::core::option::Option<Self>,
1533            encoder: &mut ___E,
1534            out: &mut ::core::mem::MaybeUninit<
1535                ::fidl_next::wire::Box<'static, crate::wire::SignalReportIndication>,
1536            >,
1537            _: (),
1538        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1539            if let Some(inner) = this {
1540                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1541                ::fidl_next::wire::Box::encode_present(out);
1542            } else {
1543                ::fidl_next::wire::Box::encode_absent(out);
1544            }
1545
1546            Ok(())
1547        }
1548    }
1549
1550    impl ::fidl_next::FromWire<crate::wire::SignalReportIndication> for SignalReportIndication {
1551        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1552            crate::wire::SignalReportIndication,
1553            Self,
1554        > = unsafe {
1555            ::fidl_next::CopyOptimization::enable_if(
1556                true && <i8 as ::fidl_next::FromWire<i8>>::COPY_OPTIMIZATION.is_enabled()
1557                    && <i8 as ::fidl_next::FromWire<i8>>::COPY_OPTIMIZATION.is_enabled(),
1558            )
1559        };
1560
1561        #[inline]
1562        fn from_wire(wire: crate::wire::SignalReportIndication) -> Self {
1563            Self {
1564                rssi_dbm: ::fidl_next::FromWire::from_wire(wire.rssi_dbm),
1565
1566                snr_db: ::fidl_next::FromWire::from_wire(wire.snr_db),
1567            }
1568        }
1569    }
1570
1571    impl ::fidl_next::FromWireRef<crate::wire::SignalReportIndication> for SignalReportIndication {
1572        #[inline]
1573        fn from_wire_ref(wire: &crate::wire::SignalReportIndication) -> Self {
1574            Self {
1575                rssi_dbm: ::fidl_next::FromWireRef::from_wire_ref(&wire.rssi_dbm),
1576
1577                snr_db: ::fidl_next::FromWireRef::from_wire_ref(&wire.snr_db),
1578            }
1579        }
1580    }
1581
1582    #[doc = " Specific absorption rate scenarios that can be applied to WLAN PHY devices.\n"]
1583    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1584    #[repr(u32)]
1585    pub enum TxPowerScenario {
1586        Default = 0,
1587        VoiceCall = 1,
1588        HeadCellOff = 2,
1589        HeadCellOn = 3,
1590        BodyCellOff = 4,
1591        BodyCellOn = 5,
1592        BodyBtActive = 6,
1593        UnknownOrdinal_(u32) = 7,
1594    }
1595    impl ::std::convert::From<u32> for TxPowerScenario {
1596        fn from(value: u32) -> Self {
1597            match value {
1598                0 => Self::Default,
1599                1 => Self::VoiceCall,
1600                2 => Self::HeadCellOff,
1601                3 => Self::HeadCellOn,
1602                4 => Self::BodyCellOff,
1603                5 => Self::BodyCellOn,
1604                6 => Self::BodyBtActive,
1605
1606                _ => Self::UnknownOrdinal_(value),
1607            }
1608        }
1609    }
1610
1611    impl ::std::convert::From<TxPowerScenario> for u32 {
1612        fn from(value: TxPowerScenario) -> Self {
1613            match value {
1614                TxPowerScenario::Default => 0,
1615                TxPowerScenario::VoiceCall => 1,
1616                TxPowerScenario::HeadCellOff => 2,
1617                TxPowerScenario::HeadCellOn => 3,
1618                TxPowerScenario::BodyCellOff => 4,
1619                TxPowerScenario::BodyCellOn => 5,
1620                TxPowerScenario::BodyBtActive => 6,
1621
1622                TxPowerScenario::UnknownOrdinal_(value) => value,
1623            }
1624        }
1625    }
1626
1627    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TxPowerScenario, ___E> for TxPowerScenario
1628    where
1629        ___E: ?Sized,
1630    {
1631        #[inline]
1632        fn encode(
1633            self,
1634            encoder: &mut ___E,
1635            out: &mut ::core::mem::MaybeUninit<crate::wire::TxPowerScenario>,
1636            _: (),
1637        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1638            ::fidl_next::Encode::encode(&self, encoder, out, ())
1639        }
1640    }
1641
1642    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TxPowerScenario, ___E>
1643        for &'a TxPowerScenario
1644    where
1645        ___E: ?Sized,
1646    {
1647        #[inline]
1648        fn encode(
1649            self,
1650            encoder: &mut ___E,
1651            out: &mut ::core::mem::MaybeUninit<crate::wire::TxPowerScenario>,
1652            _: (),
1653        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1654            ::fidl_next::munge!(let crate::wire::TxPowerScenario { value } = out);
1655            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
1656                TxPowerScenario::Default => 0,
1657
1658                TxPowerScenario::VoiceCall => 1,
1659
1660                TxPowerScenario::HeadCellOff => 2,
1661
1662                TxPowerScenario::HeadCellOn => 3,
1663
1664                TxPowerScenario::BodyCellOff => 4,
1665
1666                TxPowerScenario::BodyCellOn => 5,
1667
1668                TxPowerScenario::BodyBtActive => 6,
1669
1670                TxPowerScenario::UnknownOrdinal_(value) => value,
1671            }));
1672
1673            Ok(())
1674        }
1675    }
1676
1677    impl ::core::convert::From<crate::wire::TxPowerScenario> for TxPowerScenario {
1678        fn from(wire: crate::wire::TxPowerScenario) -> Self {
1679            match u32::from(wire.value) {
1680                0 => Self::Default,
1681
1682                1 => Self::VoiceCall,
1683
1684                2 => Self::HeadCellOff,
1685
1686                3 => Self::HeadCellOn,
1687
1688                4 => Self::BodyCellOff,
1689
1690                5 => Self::BodyCellOn,
1691
1692                6 => Self::BodyBtActive,
1693
1694                value => Self::UnknownOrdinal_(value),
1695            }
1696        }
1697    }
1698
1699    impl ::fidl_next::FromWire<crate::wire::TxPowerScenario> for TxPowerScenario {
1700        #[inline]
1701        fn from_wire(wire: crate::wire::TxPowerScenario) -> Self {
1702            Self::from(wire)
1703        }
1704    }
1705
1706    impl ::fidl_next::FromWireRef<crate::wire::TxPowerScenario> for TxPowerScenario {
1707        #[inline]
1708        fn from_wire_ref(wire: &crate::wire::TxPowerScenario) -> Self {
1709            Self::from(*wire)
1710        }
1711    }
1712
1713    #[doc = " WFA WMM v1.2, 2.2.2\n"]
1714    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1715    pub struct WmmAcParams {
1716        pub ecw_min: u8,
1717
1718        pub ecw_max: u8,
1719
1720        pub aifsn: u8,
1721
1722        pub txop_limit: u16,
1723
1724        pub acm: bool,
1725    }
1726
1727    unsafe impl<___E> ::fidl_next::Encode<crate::wire::WmmAcParams, ___E> for WmmAcParams
1728    where
1729        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1730    {
1731        #[inline]
1732        fn encode(
1733            self,
1734            encoder_: &mut ___E,
1735            out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmAcParams>,
1736            _: (),
1737        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1738            ::fidl_next::munge! {
1739                let crate::wire::WmmAcParams {
1740                    ecw_min,
1741                    ecw_max,
1742                    aifsn,
1743                    txop_limit,
1744                    acm,
1745
1746                } = out_;
1747            }
1748
1749            ::fidl_next::Encode::encode(self.ecw_min, encoder_, ecw_min, ())?;
1750
1751            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_min.as_mut_ptr()) };
1752
1753            ::fidl_next::Encode::encode(self.ecw_max, encoder_, ecw_max, ())?;
1754
1755            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_max.as_mut_ptr()) };
1756
1757            ::fidl_next::Encode::encode(self.aifsn, encoder_, aifsn, ())?;
1758
1759            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(aifsn.as_mut_ptr()) };
1760
1761            ::fidl_next::Encode::encode(self.txop_limit, encoder_, txop_limit, ())?;
1762
1763            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(txop_limit.as_mut_ptr()) };
1764
1765            ::fidl_next::Encode::encode(self.acm, encoder_, acm, ())?;
1766
1767            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(acm.as_mut_ptr()) };
1768
1769            Ok(())
1770        }
1771    }
1772
1773    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WmmAcParams, ___E> for &'a WmmAcParams
1774    where
1775        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1776    {
1777        #[inline]
1778        fn encode(
1779            self,
1780            encoder_: &mut ___E,
1781            out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmAcParams>,
1782            _: (),
1783        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1784            ::fidl_next::munge! {
1785                let crate::wire::WmmAcParams {
1786                    ecw_min,
1787                    ecw_max,
1788                    aifsn,
1789                    txop_limit,
1790                    acm,
1791
1792                } = out_;
1793            }
1794
1795            ::fidl_next::Encode::encode(&self.ecw_min, encoder_, ecw_min, ())?;
1796
1797            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_min.as_mut_ptr()) };
1798
1799            ::fidl_next::Encode::encode(&self.ecw_max, encoder_, ecw_max, ())?;
1800
1801            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ecw_max.as_mut_ptr()) };
1802
1803            ::fidl_next::Encode::encode(&self.aifsn, encoder_, aifsn, ())?;
1804
1805            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(aifsn.as_mut_ptr()) };
1806
1807            ::fidl_next::Encode::encode(&self.txop_limit, encoder_, txop_limit, ())?;
1808
1809            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(txop_limit.as_mut_ptr()) };
1810
1811            ::fidl_next::Encode::encode(&self.acm, encoder_, acm, ())?;
1812
1813            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(acm.as_mut_ptr()) };
1814
1815            Ok(())
1816        }
1817    }
1818
1819    unsafe impl<___E>
1820        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::WmmAcParams>, ___E>
1821        for WmmAcParams
1822    where
1823        ___E: ::fidl_next::Encoder + ?Sized,
1824        WmmAcParams: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
1825    {
1826        #[inline]
1827        fn encode_option(
1828            this: ::core::option::Option<Self>,
1829            encoder: &mut ___E,
1830            out: &mut ::core::mem::MaybeUninit<
1831                ::fidl_next::wire::Box<'static, crate::wire::WmmAcParams>,
1832            >,
1833            _: (),
1834        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1835            if let Some(inner) = this {
1836                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1837                ::fidl_next::wire::Box::encode_present(out);
1838            } else {
1839                ::fidl_next::wire::Box::encode_absent(out);
1840            }
1841
1842            Ok(())
1843        }
1844    }
1845
1846    unsafe impl<'a, ___E>
1847        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::WmmAcParams>, ___E>
1848        for &'a WmmAcParams
1849    where
1850        ___E: ::fidl_next::Encoder + ?Sized,
1851        &'a WmmAcParams: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
1852    {
1853        #[inline]
1854        fn encode_option(
1855            this: ::core::option::Option<Self>,
1856            encoder: &mut ___E,
1857            out: &mut ::core::mem::MaybeUninit<
1858                ::fidl_next::wire::Box<'static, crate::wire::WmmAcParams>,
1859            >,
1860            _: (),
1861        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1862            if let Some(inner) = this {
1863                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1864                ::fidl_next::wire::Box::encode_present(out);
1865            } else {
1866                ::fidl_next::wire::Box::encode_absent(out);
1867            }
1868
1869            Ok(())
1870        }
1871    }
1872
1873    impl ::fidl_next::FromWire<crate::wire::WmmAcParams> for WmmAcParams {
1874        #[inline]
1875        fn from_wire(wire: crate::wire::WmmAcParams) -> Self {
1876            Self {
1877                ecw_min: ::fidl_next::FromWire::from_wire(wire.ecw_min),
1878
1879                ecw_max: ::fidl_next::FromWire::from_wire(wire.ecw_max),
1880
1881                aifsn: ::fidl_next::FromWire::from_wire(wire.aifsn),
1882
1883                txop_limit: ::fidl_next::FromWire::from_wire(wire.txop_limit),
1884
1885                acm: ::fidl_next::FromWire::from_wire(wire.acm),
1886            }
1887        }
1888    }
1889
1890    impl ::fidl_next::FromWireRef<crate::wire::WmmAcParams> for WmmAcParams {
1891        #[inline]
1892        fn from_wire_ref(wire: &crate::wire::WmmAcParams) -> Self {
1893            Self {
1894                ecw_min: ::fidl_next::FromWireRef::from_wire_ref(&wire.ecw_min),
1895
1896                ecw_max: ::fidl_next::FromWireRef::from_wire_ref(&wire.ecw_max),
1897
1898                aifsn: ::fidl_next::FromWireRef::from_wire_ref(&wire.aifsn),
1899
1900                txop_limit: ::fidl_next::FromWireRef::from_wire_ref(&wire.txop_limit),
1901
1902                acm: ::fidl_next::FromWireRef::from_wire_ref(&wire.acm),
1903            }
1904        }
1905    }
1906
1907    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1908    pub struct WmmStatusResponse {
1909        pub apsd: bool,
1910
1911        pub ac_be_params: crate::natural::WmmAcParams,
1912
1913        pub ac_bk_params: crate::natural::WmmAcParams,
1914
1915        pub ac_vi_params: crate::natural::WmmAcParams,
1916
1917        pub ac_vo_params: crate::natural::WmmAcParams,
1918    }
1919
1920    unsafe impl<___E> ::fidl_next::Encode<crate::wire::WmmStatusResponse, ___E> for WmmStatusResponse
1921    where
1922        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1923    {
1924        #[inline]
1925        fn encode(
1926            self,
1927            encoder_: &mut ___E,
1928            out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmStatusResponse>,
1929            _: (),
1930        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1931            ::fidl_next::munge! {
1932                let crate::wire::WmmStatusResponse {
1933                    apsd,
1934                    ac_be_params,
1935                    ac_bk_params,
1936                    ac_vi_params,
1937                    ac_vo_params,
1938
1939                } = out_;
1940            }
1941
1942            ::fidl_next::Encode::encode(self.apsd, encoder_, apsd, ())?;
1943
1944            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(apsd.as_mut_ptr()) };
1945
1946            ::fidl_next::Encode::encode(self.ac_be_params, encoder_, ac_be_params, ())?;
1947
1948            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_be_params.as_mut_ptr()) };
1949
1950            ::fidl_next::Encode::encode(self.ac_bk_params, encoder_, ac_bk_params, ())?;
1951
1952            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_bk_params.as_mut_ptr()) };
1953
1954            ::fidl_next::Encode::encode(self.ac_vi_params, encoder_, ac_vi_params, ())?;
1955
1956            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vi_params.as_mut_ptr()) };
1957
1958            ::fidl_next::Encode::encode(self.ac_vo_params, encoder_, ac_vo_params, ())?;
1959
1960            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vo_params.as_mut_ptr()) };
1961
1962            Ok(())
1963        }
1964    }
1965
1966    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WmmStatusResponse, ___E>
1967        for &'a WmmStatusResponse
1968    where
1969        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1970    {
1971        #[inline]
1972        fn encode(
1973            self,
1974            encoder_: &mut ___E,
1975            out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmStatusResponse>,
1976            _: (),
1977        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1978            ::fidl_next::munge! {
1979                let crate::wire::WmmStatusResponse {
1980                    apsd,
1981                    ac_be_params,
1982                    ac_bk_params,
1983                    ac_vi_params,
1984                    ac_vo_params,
1985
1986                } = out_;
1987            }
1988
1989            ::fidl_next::Encode::encode(&self.apsd, encoder_, apsd, ())?;
1990
1991            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(apsd.as_mut_ptr()) };
1992
1993            ::fidl_next::Encode::encode(&self.ac_be_params, encoder_, ac_be_params, ())?;
1994
1995            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_be_params.as_mut_ptr()) };
1996
1997            ::fidl_next::Encode::encode(&self.ac_bk_params, encoder_, ac_bk_params, ())?;
1998
1999            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_bk_params.as_mut_ptr()) };
2000
2001            ::fidl_next::Encode::encode(&self.ac_vi_params, encoder_, ac_vi_params, ())?;
2002
2003            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vi_params.as_mut_ptr()) };
2004
2005            ::fidl_next::Encode::encode(&self.ac_vo_params, encoder_, ac_vo_params, ())?;
2006
2007            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(ac_vo_params.as_mut_ptr()) };
2008
2009            Ok(())
2010        }
2011    }
2012
2013    unsafe impl<___E>
2014        ::fidl_next::EncodeOption<
2015            ::fidl_next::wire::Box<'static, crate::wire::WmmStatusResponse>,
2016            ___E,
2017        > for WmmStatusResponse
2018    where
2019        ___E: ::fidl_next::Encoder + ?Sized,
2020        WmmStatusResponse: ::fidl_next::Encode<crate::wire::WmmStatusResponse, ___E>,
2021    {
2022        #[inline]
2023        fn encode_option(
2024            this: ::core::option::Option<Self>,
2025            encoder: &mut ___E,
2026            out: &mut ::core::mem::MaybeUninit<
2027                ::fidl_next::wire::Box<'static, crate::wire::WmmStatusResponse>,
2028            >,
2029            _: (),
2030        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2031            if let Some(inner) = this {
2032                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2033                ::fidl_next::wire::Box::encode_present(out);
2034            } else {
2035                ::fidl_next::wire::Box::encode_absent(out);
2036            }
2037
2038            Ok(())
2039        }
2040    }
2041
2042    unsafe impl<'a, ___E>
2043        ::fidl_next::EncodeOption<
2044            ::fidl_next::wire::Box<'static, crate::wire::WmmStatusResponse>,
2045            ___E,
2046        > for &'a WmmStatusResponse
2047    where
2048        ___E: ::fidl_next::Encoder + ?Sized,
2049        &'a WmmStatusResponse: ::fidl_next::Encode<crate::wire::WmmStatusResponse, ___E>,
2050    {
2051        #[inline]
2052        fn encode_option(
2053            this: ::core::option::Option<Self>,
2054            encoder: &mut ___E,
2055            out: &mut ::core::mem::MaybeUninit<
2056                ::fidl_next::wire::Box<'static, crate::wire::WmmStatusResponse>,
2057            >,
2058            _: (),
2059        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2060            if let Some(inner) = this {
2061                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2062                ::fidl_next::wire::Box::encode_present(out);
2063            } else {
2064                ::fidl_next::wire::Box::encode_absent(out);
2065            }
2066
2067            Ok(())
2068        }
2069    }
2070
2071    impl ::fidl_next::FromWire<crate::wire::WmmStatusResponse> for WmmStatusResponse {
2072        #[inline]
2073        fn from_wire(wire: crate::wire::WmmStatusResponse) -> Self {
2074            Self {
2075                apsd: ::fidl_next::FromWire::from_wire(wire.apsd),
2076
2077                ac_be_params: ::fidl_next::FromWire::from_wire(wire.ac_be_params),
2078
2079                ac_bk_params: ::fidl_next::FromWire::from_wire(wire.ac_bk_params),
2080
2081                ac_vi_params: ::fidl_next::FromWire::from_wire(wire.ac_vi_params),
2082
2083                ac_vo_params: ::fidl_next::FromWire::from_wire(wire.ac_vo_params),
2084            }
2085        }
2086    }
2087
2088    impl ::fidl_next::FromWireRef<crate::wire::WmmStatusResponse> for WmmStatusResponse {
2089        #[inline]
2090        fn from_wire_ref(wire: &crate::wire::WmmStatusResponse) -> Self {
2091            Self {
2092                apsd: ::fidl_next::FromWireRef::from_wire_ref(&wire.apsd),
2093
2094                ac_be_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_be_params),
2095
2096                ac_bk_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_bk_params),
2097
2098                ac_vi_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_vi_params),
2099
2100                ac_vo_params: ::fidl_next::FromWireRef::from_wire_ref(&wire.ac_vo_params),
2101            }
2102        }
2103    }
2104}
2105
2106pub mod wire {
2107
2108    /// The wire type corresponding to [`Protocol`].
2109    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
2110    #[repr(transparent)]
2111    pub struct Protocol {
2112        pub(crate) value: ::fidl_next::wire::Uint32,
2113    }
2114
2115    impl ::fidl_next::Constrained for Protocol {
2116        type Constraint = ();
2117
2118        fn validate(
2119            _: ::fidl_next::Slot<'_, Self>,
2120            _: Self::Constraint,
2121        ) -> Result<(), ::fidl_next::ValidationError> {
2122            Ok(())
2123        }
2124    }
2125
2126    unsafe impl ::fidl_next::Wire for Protocol {
2127        type Narrowed<'de> = Self;
2128
2129        #[inline]
2130        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2131            // Wire enums have no padding
2132        }
2133    }
2134
2135    impl Protocol {
2136        pub const OPEN: Protocol = Protocol { value: ::fidl_next::wire::Uint32(1) };
2137
2138        pub const WEP: Protocol = Protocol { value: ::fidl_next::wire::Uint32(2) };
2139
2140        pub const WPA1: Protocol = Protocol { value: ::fidl_next::wire::Uint32(3) };
2141
2142        pub const WPA2_PERSONAL: Protocol = Protocol { value: ::fidl_next::wire::Uint32(4) };
2143
2144        pub const WPA2_ENTERPRISE: Protocol = Protocol { value: ::fidl_next::wire::Uint32(5) };
2145
2146        pub const WPA3_PERSONAL: Protocol = Protocol { value: ::fidl_next::wire::Uint32(6) };
2147
2148        pub const WPA3_ENTERPRISE: Protocol = Protocol { value: ::fidl_next::wire::Uint32(7) };
2149
2150        pub const OWE: Protocol = Protocol { value: ::fidl_next::wire::Uint32(8) };
2151    }
2152
2153    unsafe impl<___D> ::fidl_next::Decode<___D> for Protocol
2154    where
2155        ___D: ?Sized,
2156    {
2157        fn decode(
2158            slot: ::fidl_next::Slot<'_, Self>,
2159            _: &mut ___D,
2160            _: (),
2161        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2162            Ok(())
2163        }
2164    }
2165
2166    impl ::core::convert::From<crate::natural::Protocol> for Protocol {
2167        fn from(natural: crate::natural::Protocol) -> Self {
2168            match natural {
2169                crate::natural::Protocol::Open => Protocol::OPEN,
2170
2171                crate::natural::Protocol::Wep => Protocol::WEP,
2172
2173                crate::natural::Protocol::Wpa1 => Protocol::WPA1,
2174
2175                crate::natural::Protocol::Wpa2Personal => Protocol::WPA2_PERSONAL,
2176
2177                crate::natural::Protocol::Wpa2Enterprise => Protocol::WPA2_ENTERPRISE,
2178
2179                crate::natural::Protocol::Wpa3Personal => Protocol::WPA3_PERSONAL,
2180
2181                crate::natural::Protocol::Wpa3Enterprise => Protocol::WPA3_ENTERPRISE,
2182
2183                crate::natural::Protocol::Owe => Protocol::OWE,
2184
2185                crate::natural::Protocol::UnknownOrdinal_(value) => {
2186                    Protocol { value: ::fidl_next::wire::Uint32::from(value) }
2187                }
2188            }
2189        }
2190    }
2191
2192    impl ::fidl_next::IntoNatural for Protocol {
2193        type Natural = crate::natural::Protocol;
2194    }
2195
2196    /// The wire type corresponding to [`Authentication`].
2197    #[derive(Debug)]
2198    #[repr(C)]
2199    pub struct Authentication<'de> {
2200        pub protocol: crate::wire::Protocol,
2201
2202        pub credentials: crate::wire_optional::Credentials<'de>,
2203    }
2204
2205    static_assertions::const_assert_eq!(std::mem::size_of::<Authentication<'_>>(), 24);
2206    static_assertions::const_assert_eq!(std::mem::align_of::<Authentication<'_>>(), 8);
2207
2208    static_assertions::const_assert_eq!(std::mem::offset_of!(Authentication<'_>, protocol), 0);
2209
2210    static_assertions::const_assert_eq!(std::mem::offset_of!(Authentication<'_>, credentials), 8);
2211
2212    impl ::fidl_next::Constrained for Authentication<'_> {
2213        type Constraint = ();
2214
2215        fn validate(
2216            _: ::fidl_next::Slot<'_, Self>,
2217            _: Self::Constraint,
2218        ) -> Result<(), ::fidl_next::ValidationError> {
2219            Ok(())
2220        }
2221    }
2222
2223    unsafe impl ::fidl_next::Wire for Authentication<'static> {
2224        type Narrowed<'de> = Authentication<'de>;
2225
2226        #[inline]
2227        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2228            ::fidl_next::munge! {
2229                let Self {
2230                    protocol,
2231                    credentials,
2232
2233                } = &mut *out_;
2234            }
2235
2236            ::fidl_next::Wire::zero_padding(protocol);
2237
2238            ::fidl_next::Wire::zero_padding(credentials);
2239
2240            unsafe {
2241                out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
2242            }
2243        }
2244    }
2245
2246    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Authentication<'de>
2247    where
2248        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2249        ___D: ::fidl_next::Decoder<'de>,
2250    {
2251        fn decode(
2252            slot_: ::fidl_next::Slot<'_, Self>,
2253            decoder_: &mut ___D,
2254            _: (),
2255        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2256            if slot_.as_bytes()[4..8] != [0u8; 4] {
2257                return Err(::fidl_next::DecodeError::InvalidPadding);
2258            }
2259
2260            ::fidl_next::munge! {
2261                let Self {
2262                    mut protocol,
2263                    mut credentials,
2264
2265                } = slot_;
2266            }
2267
2268            let _field = protocol.as_mut();
2269
2270            ::fidl_next::Decode::decode(protocol.as_mut(), decoder_, ())?;
2271
2272            let _field = credentials.as_mut();
2273
2274            ::fidl_next::Decode::decode(credentials.as_mut(), decoder_, ())?;
2275
2276            Ok(())
2277        }
2278    }
2279
2280    impl<'de> ::fidl_next::IntoNatural for Authentication<'de> {
2281        type Natural = crate::natural::Authentication;
2282    }
2283
2284    /// The wire type corresponding to [`BtCoexistenceMode`].
2285    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
2286    #[repr(transparent)]
2287    pub struct BtCoexistenceMode {
2288        pub(crate) value: ::fidl_next::wire::Uint32,
2289    }
2290
2291    impl ::fidl_next::Constrained for BtCoexistenceMode {
2292        type Constraint = ();
2293
2294        fn validate(
2295            _: ::fidl_next::Slot<'_, Self>,
2296            _: Self::Constraint,
2297        ) -> Result<(), ::fidl_next::ValidationError> {
2298            Ok(())
2299        }
2300    }
2301
2302    unsafe impl ::fidl_next::Wire for BtCoexistenceMode {
2303        type Narrowed<'de> = Self;
2304
2305        #[inline]
2306        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2307            // Wire enums have no padding
2308        }
2309    }
2310
2311    impl BtCoexistenceMode {
2312        pub const MODE_AUTO: BtCoexistenceMode =
2313            BtCoexistenceMode { value: ::fidl_next::wire::Uint32(1) };
2314
2315        pub const MODE_OFF: BtCoexistenceMode =
2316            BtCoexistenceMode { value: ::fidl_next::wire::Uint32(2) };
2317    }
2318
2319    unsafe impl<___D> ::fidl_next::Decode<___D> for BtCoexistenceMode
2320    where
2321        ___D: ?Sized,
2322    {
2323        fn decode(
2324            slot: ::fidl_next::Slot<'_, Self>,
2325            _: &mut ___D,
2326            _: (),
2327        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2328            ::fidl_next::munge!(let Self { value } = slot);
2329
2330            match u32::from(*value) {
2331                1 | 2 => (),
2332                unknown => {
2333                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
2334                }
2335            }
2336
2337            Ok(())
2338        }
2339    }
2340
2341    impl ::core::convert::From<crate::natural::BtCoexistenceMode> for BtCoexistenceMode {
2342        fn from(natural: crate::natural::BtCoexistenceMode) -> Self {
2343            match natural {
2344                crate::natural::BtCoexistenceMode::ModeAuto => BtCoexistenceMode::MODE_AUTO,
2345
2346                crate::natural::BtCoexistenceMode::ModeOff => BtCoexistenceMode::MODE_OFF,
2347            }
2348        }
2349    }
2350
2351    impl ::fidl_next::IntoNatural for BtCoexistenceMode {
2352        type Natural = crate::natural::BtCoexistenceMode;
2353    }
2354
2355    /// The wire type corresponding to [`ChannelSwitchInfo`].
2356    #[derive(Clone, Debug)]
2357    #[repr(C)]
2358    pub struct ChannelSwitchInfo {
2359        pub new_primary_channel: ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelNumber,
2360
2361        pub bandwidth: ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelBandwidth,
2362
2363        pub vht_secondary_80_channel:
2364            ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelNumber,
2365    }
2366
2367    static_assertions::const_assert_eq!(std::mem::size_of::<ChannelSwitchInfo>(), 12);
2368    static_assertions::const_assert_eq!(std::mem::align_of::<ChannelSwitchInfo>(), 4);
2369
2370    static_assertions::const_assert_eq!(
2371        std::mem::offset_of!(ChannelSwitchInfo, new_primary_channel),
2372        0
2373    );
2374
2375    static_assertions::const_assert_eq!(std::mem::offset_of!(ChannelSwitchInfo, bandwidth), 4);
2376
2377    static_assertions::const_assert_eq!(
2378        std::mem::offset_of!(ChannelSwitchInfo, vht_secondary_80_channel),
2379        8
2380    );
2381
2382    impl ::fidl_next::Constrained for ChannelSwitchInfo {
2383        type Constraint = ();
2384
2385        fn validate(
2386            _: ::fidl_next::Slot<'_, Self>,
2387            _: Self::Constraint,
2388        ) -> Result<(), ::fidl_next::ValidationError> {
2389            Ok(())
2390        }
2391    }
2392
2393    unsafe impl ::fidl_next::Wire for ChannelSwitchInfo {
2394        type Narrowed<'de> = ChannelSwitchInfo;
2395
2396        #[inline]
2397        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2398            ::fidl_next::munge! {
2399                let Self {
2400                    new_primary_channel,
2401                    bandwidth,
2402                    vht_secondary_80_channel,
2403
2404                } = &mut *out_;
2405            }
2406
2407            ::fidl_next::Wire::zero_padding(new_primary_channel);
2408
2409            ::fidl_next::Wire::zero_padding(bandwidth);
2410
2411            ::fidl_next::Wire::zero_padding(vht_secondary_80_channel);
2412
2413            unsafe {
2414                out_.as_mut_ptr().cast::<u8>().add(10).write_bytes(0, 2);
2415            }
2416
2417            unsafe {
2418                out_.as_mut_ptr().cast::<u8>().add(2).write_bytes(0, 2);
2419            }
2420        }
2421    }
2422
2423    unsafe impl<___D> ::fidl_next::Decode<___D> for ChannelSwitchInfo
2424    where
2425        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2426    {
2427        fn decode(
2428            slot_: ::fidl_next::Slot<'_, Self>,
2429            decoder_: &mut ___D,
2430            _: (),
2431        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2432            if slot_.as_bytes()[10..12] != [0u8; 2] {
2433                return Err(::fidl_next::DecodeError::InvalidPadding);
2434            }
2435
2436            if slot_.as_bytes()[2..4] != [0u8; 2] {
2437                return Err(::fidl_next::DecodeError::InvalidPadding);
2438            }
2439
2440            ::fidl_next::munge! {
2441                let Self {
2442                    mut new_primary_channel,
2443                    mut bandwidth,
2444                    mut vht_secondary_80_channel,
2445
2446                } = slot_;
2447            }
2448
2449            let _field = new_primary_channel.as_mut();
2450
2451            ::fidl_next::Decode::decode(new_primary_channel.as_mut(), decoder_, ())?;
2452
2453            let _field = bandwidth.as_mut();
2454
2455            ::fidl_next::Decode::decode(bandwidth.as_mut(), decoder_, ())?;
2456
2457            let _field = vht_secondary_80_channel.as_mut();
2458
2459            ::fidl_next::Decode::decode(vht_secondary_80_channel.as_mut(), decoder_, ())?;
2460
2461            Ok(())
2462        }
2463    }
2464
2465    impl ::fidl_next::IntoNatural for ChannelSwitchInfo {
2466        type Natural = crate::natural::ChannelSwitchInfo;
2467    }
2468
2469    /// The wire type corresponding to [`WepCredentials`].
2470    #[derive(Debug)]
2471    #[repr(C)]
2472    pub struct WepCredentials<'de> {
2473        pub key: ::fidl_next::wire::Vector<'de, u8>,
2474    }
2475
2476    static_assertions::const_assert_eq!(std::mem::size_of::<WepCredentials<'_>>(), 16);
2477    static_assertions::const_assert_eq!(std::mem::align_of::<WepCredentials<'_>>(), 8);
2478
2479    static_assertions::const_assert_eq!(std::mem::offset_of!(WepCredentials<'_>, key), 0);
2480
2481    impl ::fidl_next::Constrained for WepCredentials<'_> {
2482        type Constraint = ();
2483
2484        fn validate(
2485            _: ::fidl_next::Slot<'_, Self>,
2486            _: Self::Constraint,
2487        ) -> Result<(), ::fidl_next::ValidationError> {
2488            Ok(())
2489        }
2490    }
2491
2492    unsafe impl ::fidl_next::Wire for WepCredentials<'static> {
2493        type Narrowed<'de> = WepCredentials<'de>;
2494
2495        #[inline]
2496        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2497            ::fidl_next::munge! {
2498                let Self {
2499                    key,
2500
2501                } = &mut *out_;
2502            }
2503
2504            ::fidl_next::Wire::zero_padding(key);
2505        }
2506    }
2507
2508    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WepCredentials<'de>
2509    where
2510        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2511        ___D: ::fidl_next::Decoder<'de>,
2512    {
2513        fn decode(
2514            slot_: ::fidl_next::Slot<'_, Self>,
2515            decoder_: &mut ___D,
2516            _: (),
2517        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2518            ::fidl_next::munge! {
2519                let Self {
2520                    mut key,
2521
2522                } = slot_;
2523            }
2524
2525            let _field = key.as_mut();
2526            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2527            ::fidl_next::Decode::decode(key.as_mut(), decoder_, (4294967295, ()))?;
2528
2529            Ok(())
2530        }
2531    }
2532
2533    impl<'de> ::fidl_next::IntoNatural for WepCredentials<'de> {
2534        type Natural = crate::natural::WepCredentials;
2535    }
2536
2537    /// The wire type corresponding to [`WpaCredentials`].
2538    #[repr(transparent)]
2539    pub struct WpaCredentials<'de> {
2540        pub(crate) raw: ::fidl_next::wire::Union,
2541        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2542    }
2543
2544    impl<'de> Drop for WpaCredentials<'de> {
2545        fn drop(&mut self) {
2546            match self.raw.ordinal() {
2547                1 => {
2548                    let _ = unsafe { self.raw.get().read_unchecked::<[u8; 32]>() };
2549                }
2550
2551                2 => {
2552                    let _ = unsafe {
2553                        self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2554                    };
2555                }
2556
2557                _ => (),
2558            }
2559        }
2560    }
2561
2562    impl ::fidl_next::Constrained for WpaCredentials<'_> {
2563        type Constraint = ();
2564
2565        fn validate(
2566            _: ::fidl_next::Slot<'_, Self>,
2567            _: Self::Constraint,
2568        ) -> Result<(), ::fidl_next::ValidationError> {
2569            Ok(())
2570        }
2571    }
2572
2573    unsafe impl ::fidl_next::Wire for WpaCredentials<'static> {
2574        type Narrowed<'de> = WpaCredentials<'de>;
2575
2576        #[inline]
2577        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2578            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2579            ::fidl_next::wire::Union::zero_padding(raw);
2580        }
2581    }
2582
2583    pub mod wpa_credentials {
2584        pub enum Ref<'de> {
2585            Psk(&'de [u8; 32]),
2586
2587            Passphrase(&'de ::fidl_next::wire::Vector<'de, u8>),
2588
2589            UnknownOrdinal_(u64),
2590        }
2591
2592        pub enum Value<'de> {
2593            Psk([u8; 32]),
2594
2595            Passphrase(::fidl_next::wire::Vector<'de, u8>),
2596
2597            UnknownOrdinal_(u64),
2598        }
2599    }
2600
2601    impl<'de> WpaCredentials<'de> {
2602        pub fn as_ref(&self) -> crate::wire::wpa_credentials::Ref<'_> {
2603            match self.raw.ordinal() {
2604                1 => crate::wire::wpa_credentials::Ref::Psk(unsafe {
2605                    self.raw.get().deref_unchecked::<[u8; 32]>()
2606                }),
2607
2608                2 => crate::wire::wpa_credentials::Ref::Passphrase(unsafe {
2609                    self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
2610                }),
2611
2612                unknown => crate::wire::wpa_credentials::Ref::UnknownOrdinal_(unknown),
2613            }
2614        }
2615
2616        pub fn into_inner(self) -> crate::wire::wpa_credentials::Value<'de> {
2617            let this = ::core::mem::ManuallyDrop::new(self);
2618
2619            match this.raw.ordinal() {
2620                1 => crate::wire::wpa_credentials::Value::Psk(unsafe {
2621                    this.raw.get().read_unchecked::<[u8; 32]>()
2622                }),
2623
2624                2 => crate::wire::wpa_credentials::Value::Passphrase(unsafe {
2625                    this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2626                }),
2627
2628                unknown => crate::wire::wpa_credentials::Value::UnknownOrdinal_(unknown),
2629            }
2630        }
2631    }
2632
2633    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WpaCredentials<'de>
2634    where
2635        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2636        ___D: ::fidl_next::Decoder<'de>,
2637    {
2638        fn decode(
2639            mut slot: ::fidl_next::Slot<'_, Self>,
2640            decoder: &mut ___D,
2641            _: (),
2642        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2643            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
2644            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
2645                1 => ::fidl_next::wire::Union::decode_as::<___D, [u8; 32]>(raw, decoder, ())?,
2646
2647                2 => {
2648                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
2649                        raw,
2650                        decoder,
2651                        (63, ()),
2652                    )?
2653                }
2654
2655                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
2656            }
2657
2658            Ok(())
2659        }
2660    }
2661
2662    impl<'de> ::core::fmt::Debug for WpaCredentials<'de> {
2663        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2664            match self.raw.ordinal() {
2665                1 => unsafe { self.raw.get().deref_unchecked::<[u8; 32]>().fmt(f) },
2666                2 => unsafe {
2667                    self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
2668                },
2669                _ => unsafe { ::core::hint::unreachable_unchecked() },
2670            }
2671        }
2672    }
2673
2674    impl<'de> ::fidl_next::IntoNatural for WpaCredentials<'de> {
2675        type Natural = crate::natural::WpaCredentials;
2676    }
2677
2678    /// The wire type corresponding to [`Credentials`].
2679    #[repr(transparent)]
2680    pub struct Credentials<'de> {
2681        pub(crate) raw: ::fidl_next::wire::Union,
2682        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2683    }
2684
2685    impl<'de> Drop for Credentials<'de> {
2686        fn drop(&mut self) {
2687            match self.raw.ordinal() {
2688                1 => {
2689                    let _ = unsafe {
2690                        self.raw.get().read_unchecked::<crate::wire::WepCredentials<'de>>()
2691                    };
2692                }
2693
2694                2 => {
2695                    let _ = unsafe {
2696                        self.raw.get().read_unchecked::<crate::wire::WpaCredentials<'de>>()
2697                    };
2698                }
2699
2700                _ => (),
2701            }
2702        }
2703    }
2704
2705    impl ::fidl_next::Constrained for Credentials<'_> {
2706        type Constraint = ();
2707
2708        fn validate(
2709            _: ::fidl_next::Slot<'_, Self>,
2710            _: Self::Constraint,
2711        ) -> Result<(), ::fidl_next::ValidationError> {
2712            Ok(())
2713        }
2714    }
2715
2716    unsafe impl ::fidl_next::Wire for Credentials<'static> {
2717        type Narrowed<'de> = Credentials<'de>;
2718
2719        #[inline]
2720        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2721            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2722            ::fidl_next::wire::Union::zero_padding(raw);
2723        }
2724    }
2725
2726    pub mod credentials {
2727        pub enum Ref<'de> {
2728            Wep(&'de crate::wire::WepCredentials<'de>),
2729
2730            Wpa(&'de crate::wire::WpaCredentials<'de>),
2731
2732            UnknownOrdinal_(u64),
2733        }
2734
2735        pub enum Value<'de> {
2736            Wep(crate::wire::WepCredentials<'de>),
2737
2738            Wpa(crate::wire::WpaCredentials<'de>),
2739
2740            UnknownOrdinal_(u64),
2741        }
2742    }
2743
2744    impl<'de> Credentials<'de> {
2745        pub fn as_ref(&self) -> crate::wire::credentials::Ref<'_> {
2746            match self.raw.ordinal() {
2747                1 => crate::wire::credentials::Ref::Wep(unsafe {
2748                    self.raw.get().deref_unchecked::<crate::wire::WepCredentials<'_>>()
2749                }),
2750
2751                2 => crate::wire::credentials::Ref::Wpa(unsafe {
2752                    self.raw.get().deref_unchecked::<crate::wire::WpaCredentials<'_>>()
2753                }),
2754
2755                unknown => crate::wire::credentials::Ref::UnknownOrdinal_(unknown),
2756            }
2757        }
2758
2759        pub fn into_inner(self) -> crate::wire::credentials::Value<'de> {
2760            let this = ::core::mem::ManuallyDrop::new(self);
2761
2762            match this.raw.ordinal() {
2763                1 => crate::wire::credentials::Value::Wep(unsafe {
2764                    this.raw.get().read_unchecked::<crate::wire::WepCredentials<'de>>()
2765                }),
2766
2767                2 => crate::wire::credentials::Value::Wpa(unsafe {
2768                    this.raw.get().read_unchecked::<crate::wire::WpaCredentials<'de>>()
2769                }),
2770
2771                unknown => crate::wire::credentials::Value::UnknownOrdinal_(unknown),
2772            }
2773        }
2774    }
2775
2776    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Credentials<'de>
2777    where
2778        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2779        ___D: ::fidl_next::Decoder<'de>,
2780    {
2781        fn decode(
2782            mut slot: ::fidl_next::Slot<'_, Self>,
2783            decoder: &mut ___D,
2784            _: (),
2785        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2786            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
2787            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
2788                1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::WepCredentials<'de>>(
2789                    raw,
2790                    decoder,
2791                    (),
2792                )?,
2793
2794                2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::WpaCredentials<'de>>(
2795                    raw,
2796                    decoder,
2797                    (),
2798                )?,
2799
2800                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
2801            }
2802
2803            Ok(())
2804        }
2805    }
2806
2807    impl<'de> ::core::fmt::Debug for Credentials<'de> {
2808        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2809            match self.raw.ordinal() {
2810                1 => unsafe {
2811                    self.raw.get().deref_unchecked::<crate::wire::WepCredentials<'_>>().fmt(f)
2812                },
2813                2 => unsafe {
2814                    self.raw.get().deref_unchecked::<crate::wire::WpaCredentials<'_>>().fmt(f)
2815                },
2816                _ => unsafe { ::core::hint::unreachable_unchecked() },
2817            }
2818        }
2819    }
2820
2821    impl<'de> ::fidl_next::IntoNatural for Credentials<'de> {
2822        type Natural = crate::natural::Credentials;
2823    }
2824
2825    /// The wire type corresponding to [`CriticalErrorReason`].
2826    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
2827    #[repr(transparent)]
2828    pub struct CriticalErrorReason {
2829        pub(crate) value: u8,
2830    }
2831
2832    impl ::fidl_next::Constrained for CriticalErrorReason {
2833        type Constraint = ();
2834
2835        fn validate(
2836            _: ::fidl_next::Slot<'_, Self>,
2837            _: Self::Constraint,
2838        ) -> Result<(), ::fidl_next::ValidationError> {
2839            Ok(())
2840        }
2841    }
2842
2843    unsafe impl ::fidl_next::Wire for CriticalErrorReason {
2844        type Narrowed<'de> = Self;
2845
2846        #[inline]
2847        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2848            // Wire enums have no padding
2849        }
2850    }
2851
2852    impl CriticalErrorReason {
2853        pub const FW_CRASH: CriticalErrorReason = CriticalErrorReason { value: 1 };
2854    }
2855
2856    unsafe impl<___D> ::fidl_next::Decode<___D> for CriticalErrorReason
2857    where
2858        ___D: ?Sized,
2859    {
2860        fn decode(
2861            slot: ::fidl_next::Slot<'_, Self>,
2862            _: &mut ___D,
2863            _: (),
2864        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2865            ::fidl_next::munge!(let Self { value } = slot);
2866
2867            match u8::from(*value) {
2868                1 => (),
2869                unknown => {
2870                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
2871                }
2872            }
2873
2874            Ok(())
2875        }
2876    }
2877
2878    impl ::core::convert::From<crate::natural::CriticalErrorReason> for CriticalErrorReason {
2879        fn from(natural: crate::natural::CriticalErrorReason) -> Self {
2880            match natural {
2881                crate::natural::CriticalErrorReason::FwCrash => CriticalErrorReason::FW_CRASH,
2882            }
2883        }
2884    }
2885
2886    impl ::fidl_next::IntoNatural for CriticalErrorReason {
2887        type Natural = crate::natural::CriticalErrorReason;
2888    }
2889
2890    /// The wire type corresponding to [`OwePublicKey`].
2891    #[derive(Debug)]
2892    #[repr(C)]
2893    pub struct OwePublicKey<'de> {
2894        pub group: ::fidl_next::wire::Uint16,
2895
2896        pub key: ::fidl_next::wire::Vector<'de, u8>,
2897    }
2898
2899    static_assertions::const_assert_eq!(std::mem::size_of::<OwePublicKey<'_>>(), 24);
2900    static_assertions::const_assert_eq!(std::mem::align_of::<OwePublicKey<'_>>(), 8);
2901
2902    static_assertions::const_assert_eq!(std::mem::offset_of!(OwePublicKey<'_>, group), 0);
2903
2904    static_assertions::const_assert_eq!(std::mem::offset_of!(OwePublicKey<'_>, key), 8);
2905
2906    impl ::fidl_next::Constrained for OwePublicKey<'_> {
2907        type Constraint = ();
2908
2909        fn validate(
2910            _: ::fidl_next::Slot<'_, Self>,
2911            _: Self::Constraint,
2912        ) -> Result<(), ::fidl_next::ValidationError> {
2913            Ok(())
2914        }
2915    }
2916
2917    unsafe impl ::fidl_next::Wire for OwePublicKey<'static> {
2918        type Narrowed<'de> = OwePublicKey<'de>;
2919
2920        #[inline]
2921        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2922            ::fidl_next::munge! {
2923                let Self {
2924                    group,
2925                    key,
2926
2927                } = &mut *out_;
2928            }
2929
2930            ::fidl_next::Wire::zero_padding(group);
2931
2932            ::fidl_next::Wire::zero_padding(key);
2933
2934            unsafe {
2935                out_.as_mut_ptr().cast::<u8>().add(2).write_bytes(0, 6);
2936            }
2937        }
2938    }
2939
2940    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for OwePublicKey<'de>
2941    where
2942        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2943        ___D: ::fidl_next::Decoder<'de>,
2944    {
2945        fn decode(
2946            slot_: ::fidl_next::Slot<'_, Self>,
2947            decoder_: &mut ___D,
2948            _: (),
2949        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2950            if slot_.as_bytes()[2..8] != [0u8; 6] {
2951                return Err(::fidl_next::DecodeError::InvalidPadding);
2952            }
2953
2954            ::fidl_next::munge! {
2955                let Self {
2956                    mut group,
2957                    mut key,
2958
2959                } = slot_;
2960            }
2961
2962            let _field = group.as_mut();
2963
2964            ::fidl_next::Decode::decode(group.as_mut(), decoder_, ())?;
2965
2966            let _field = key.as_mut();
2967            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2968            ::fidl_next::Decode::decode(key.as_mut(), decoder_, (4294967295, ()))?;
2969
2970            Ok(())
2971        }
2972    }
2973
2974    impl<'de> ::fidl_next::IntoNatural for OwePublicKey<'de> {
2975        type Natural = crate::natural::OwePublicKey;
2976    }
2977
2978    /// The wire type corresponding to [`SignalReportIndication`].
2979    #[derive(Clone, Debug)]
2980    #[repr(C)]
2981    pub struct SignalReportIndication {
2982        pub rssi_dbm: i8,
2983
2984        pub snr_db: i8,
2985    }
2986
2987    static_assertions::const_assert_eq!(std::mem::size_of::<SignalReportIndication>(), 2);
2988    static_assertions::const_assert_eq!(std::mem::align_of::<SignalReportIndication>(), 1);
2989
2990    static_assertions::const_assert_eq!(std::mem::offset_of!(SignalReportIndication, rssi_dbm), 0);
2991
2992    static_assertions::const_assert_eq!(std::mem::offset_of!(SignalReportIndication, snr_db), 1);
2993
2994    impl ::fidl_next::Constrained for SignalReportIndication {
2995        type Constraint = ();
2996
2997        fn validate(
2998            _: ::fidl_next::Slot<'_, Self>,
2999            _: Self::Constraint,
3000        ) -> Result<(), ::fidl_next::ValidationError> {
3001            Ok(())
3002        }
3003    }
3004
3005    unsafe impl ::fidl_next::Wire for SignalReportIndication {
3006        type Narrowed<'de> = SignalReportIndication;
3007
3008        #[inline]
3009        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3010            ::fidl_next::munge! {
3011                let Self {
3012                    rssi_dbm,
3013                    snr_db,
3014
3015                } = &mut *out_;
3016            }
3017
3018            ::fidl_next::Wire::zero_padding(rssi_dbm);
3019
3020            ::fidl_next::Wire::zero_padding(snr_db);
3021        }
3022    }
3023
3024    unsafe impl<___D> ::fidl_next::Decode<___D> for SignalReportIndication
3025    where
3026        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3027    {
3028        fn decode(
3029            slot_: ::fidl_next::Slot<'_, Self>,
3030            decoder_: &mut ___D,
3031            _: (),
3032        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3033            ::fidl_next::munge! {
3034                let Self {
3035                    mut rssi_dbm,
3036                    mut snr_db,
3037
3038                } = slot_;
3039            }
3040
3041            let _field = rssi_dbm.as_mut();
3042
3043            ::fidl_next::Decode::decode(rssi_dbm.as_mut(), decoder_, ())?;
3044
3045            let _field = snr_db.as_mut();
3046
3047            ::fidl_next::Decode::decode(snr_db.as_mut(), decoder_, ())?;
3048
3049            Ok(())
3050        }
3051    }
3052
3053    impl ::fidl_next::IntoNatural for SignalReportIndication {
3054        type Natural = crate::natural::SignalReportIndication;
3055    }
3056
3057    /// The wire type corresponding to [`TxPowerScenario`].
3058    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
3059    #[repr(transparent)]
3060    pub struct TxPowerScenario {
3061        pub(crate) value: ::fidl_next::wire::Uint32,
3062    }
3063
3064    impl ::fidl_next::Constrained for TxPowerScenario {
3065        type Constraint = ();
3066
3067        fn validate(
3068            _: ::fidl_next::Slot<'_, Self>,
3069            _: Self::Constraint,
3070        ) -> Result<(), ::fidl_next::ValidationError> {
3071            Ok(())
3072        }
3073    }
3074
3075    unsafe impl ::fidl_next::Wire for TxPowerScenario {
3076        type Narrowed<'de> = Self;
3077
3078        #[inline]
3079        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
3080            // Wire enums have no padding
3081        }
3082    }
3083
3084    impl TxPowerScenario {
3085        pub const DEFAULT: TxPowerScenario =
3086            TxPowerScenario { value: ::fidl_next::wire::Uint32(0) };
3087
3088        pub const VOICE_CALL: TxPowerScenario =
3089            TxPowerScenario { value: ::fidl_next::wire::Uint32(1) };
3090
3091        pub const HEAD_CELL_OFF: TxPowerScenario =
3092            TxPowerScenario { value: ::fidl_next::wire::Uint32(2) };
3093
3094        pub const HEAD_CELL_ON: TxPowerScenario =
3095            TxPowerScenario { value: ::fidl_next::wire::Uint32(3) };
3096
3097        pub const BODY_CELL_OFF: TxPowerScenario =
3098            TxPowerScenario { value: ::fidl_next::wire::Uint32(4) };
3099
3100        pub const BODY_CELL_ON: TxPowerScenario =
3101            TxPowerScenario { value: ::fidl_next::wire::Uint32(5) };
3102
3103        pub const BODY_BT_ACTIVE: TxPowerScenario =
3104            TxPowerScenario { value: ::fidl_next::wire::Uint32(6) };
3105    }
3106
3107    unsafe impl<___D> ::fidl_next::Decode<___D> for TxPowerScenario
3108    where
3109        ___D: ?Sized,
3110    {
3111        fn decode(
3112            slot: ::fidl_next::Slot<'_, Self>,
3113            _: &mut ___D,
3114            _: (),
3115        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3116            Ok(())
3117        }
3118    }
3119
3120    impl ::core::convert::From<crate::natural::TxPowerScenario> for TxPowerScenario {
3121        fn from(natural: crate::natural::TxPowerScenario) -> Self {
3122            match natural {
3123                crate::natural::TxPowerScenario::Default => TxPowerScenario::DEFAULT,
3124
3125                crate::natural::TxPowerScenario::VoiceCall => TxPowerScenario::VOICE_CALL,
3126
3127                crate::natural::TxPowerScenario::HeadCellOff => TxPowerScenario::HEAD_CELL_OFF,
3128
3129                crate::natural::TxPowerScenario::HeadCellOn => TxPowerScenario::HEAD_CELL_ON,
3130
3131                crate::natural::TxPowerScenario::BodyCellOff => TxPowerScenario::BODY_CELL_OFF,
3132
3133                crate::natural::TxPowerScenario::BodyCellOn => TxPowerScenario::BODY_CELL_ON,
3134
3135                crate::natural::TxPowerScenario::BodyBtActive => TxPowerScenario::BODY_BT_ACTIVE,
3136
3137                crate::natural::TxPowerScenario::UnknownOrdinal_(value) => {
3138                    TxPowerScenario { value: ::fidl_next::wire::Uint32::from(value) }
3139                }
3140            }
3141        }
3142    }
3143
3144    impl ::fidl_next::IntoNatural for TxPowerScenario {
3145        type Natural = crate::natural::TxPowerScenario;
3146    }
3147
3148    /// The wire type corresponding to [`WmmAcParams`].
3149    #[derive(Clone, Debug)]
3150    #[repr(C)]
3151    pub struct WmmAcParams {
3152        pub ecw_min: u8,
3153
3154        pub ecw_max: u8,
3155
3156        pub aifsn: u8,
3157
3158        pub txop_limit: ::fidl_next::wire::Uint16,
3159
3160        pub acm: bool,
3161    }
3162
3163    static_assertions::const_assert_eq!(std::mem::size_of::<WmmAcParams>(), 8);
3164    static_assertions::const_assert_eq!(std::mem::align_of::<WmmAcParams>(), 2);
3165
3166    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmAcParams, ecw_min), 0);
3167
3168    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmAcParams, ecw_max), 1);
3169
3170    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmAcParams, aifsn), 2);
3171
3172    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmAcParams, txop_limit), 4);
3173
3174    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmAcParams, acm), 6);
3175
3176    impl ::fidl_next::Constrained for WmmAcParams {
3177        type Constraint = ();
3178
3179        fn validate(
3180            _: ::fidl_next::Slot<'_, Self>,
3181            _: Self::Constraint,
3182        ) -> Result<(), ::fidl_next::ValidationError> {
3183            Ok(())
3184        }
3185    }
3186
3187    unsafe impl ::fidl_next::Wire for WmmAcParams {
3188        type Narrowed<'de> = WmmAcParams;
3189
3190        #[inline]
3191        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3192            ::fidl_next::munge! {
3193                let Self {
3194                    ecw_min,
3195                    ecw_max,
3196                    aifsn,
3197                    txop_limit,
3198                    acm,
3199
3200                } = &mut *out_;
3201            }
3202
3203            ::fidl_next::Wire::zero_padding(ecw_min);
3204
3205            ::fidl_next::Wire::zero_padding(ecw_max);
3206
3207            ::fidl_next::Wire::zero_padding(aifsn);
3208
3209            ::fidl_next::Wire::zero_padding(txop_limit);
3210
3211            ::fidl_next::Wire::zero_padding(acm);
3212
3213            unsafe {
3214                out_.as_mut_ptr().cast::<u8>().add(7).write_bytes(0, 1);
3215            }
3216
3217            unsafe {
3218                out_.as_mut_ptr().cast::<u8>().add(3).write_bytes(0, 1);
3219            }
3220        }
3221    }
3222
3223    unsafe impl<___D> ::fidl_next::Decode<___D> for WmmAcParams
3224    where
3225        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3226    {
3227        fn decode(
3228            slot_: ::fidl_next::Slot<'_, Self>,
3229            decoder_: &mut ___D,
3230            _: (),
3231        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3232            if slot_.as_bytes()[7..8] != [0u8; 1] {
3233                return Err(::fidl_next::DecodeError::InvalidPadding);
3234            }
3235
3236            if slot_.as_bytes()[3..4] != [0u8; 1] {
3237                return Err(::fidl_next::DecodeError::InvalidPadding);
3238            }
3239
3240            ::fidl_next::munge! {
3241                let Self {
3242                    mut ecw_min,
3243                    mut ecw_max,
3244                    mut aifsn,
3245                    mut txop_limit,
3246                    mut acm,
3247
3248                } = slot_;
3249            }
3250
3251            let _field = ecw_min.as_mut();
3252
3253            ::fidl_next::Decode::decode(ecw_min.as_mut(), decoder_, ())?;
3254
3255            let _field = ecw_max.as_mut();
3256
3257            ::fidl_next::Decode::decode(ecw_max.as_mut(), decoder_, ())?;
3258
3259            let _field = aifsn.as_mut();
3260
3261            ::fidl_next::Decode::decode(aifsn.as_mut(), decoder_, ())?;
3262
3263            let _field = txop_limit.as_mut();
3264
3265            ::fidl_next::Decode::decode(txop_limit.as_mut(), decoder_, ())?;
3266
3267            let _field = acm.as_mut();
3268
3269            ::fidl_next::Decode::decode(acm.as_mut(), decoder_, ())?;
3270
3271            Ok(())
3272        }
3273    }
3274
3275    impl ::fidl_next::IntoNatural for WmmAcParams {
3276        type Natural = crate::natural::WmmAcParams;
3277    }
3278
3279    /// The wire type corresponding to [`WmmStatusResponse`].
3280    #[derive(Clone, Debug)]
3281    #[repr(C)]
3282    pub struct WmmStatusResponse {
3283        pub apsd: bool,
3284
3285        pub ac_be_params: crate::wire::WmmAcParams,
3286
3287        pub ac_bk_params: crate::wire::WmmAcParams,
3288
3289        pub ac_vi_params: crate::wire::WmmAcParams,
3290
3291        pub ac_vo_params: crate::wire::WmmAcParams,
3292    }
3293
3294    static_assertions::const_assert_eq!(std::mem::size_of::<WmmStatusResponse>(), 34);
3295    static_assertions::const_assert_eq!(std::mem::align_of::<WmmStatusResponse>(), 2);
3296
3297    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmStatusResponse, apsd), 0);
3298
3299    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmStatusResponse, ac_be_params), 2);
3300
3301    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmStatusResponse, ac_bk_params), 10);
3302
3303    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmStatusResponse, ac_vi_params), 18);
3304
3305    static_assertions::const_assert_eq!(std::mem::offset_of!(WmmStatusResponse, ac_vo_params), 26);
3306
3307    impl ::fidl_next::Constrained for WmmStatusResponse {
3308        type Constraint = ();
3309
3310        fn validate(
3311            _: ::fidl_next::Slot<'_, Self>,
3312            _: Self::Constraint,
3313        ) -> Result<(), ::fidl_next::ValidationError> {
3314            Ok(())
3315        }
3316    }
3317
3318    unsafe impl ::fidl_next::Wire for WmmStatusResponse {
3319        type Narrowed<'de> = WmmStatusResponse;
3320
3321        #[inline]
3322        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3323            ::fidl_next::munge! {
3324                let Self {
3325                    apsd,
3326                    ac_be_params,
3327                    ac_bk_params,
3328                    ac_vi_params,
3329                    ac_vo_params,
3330
3331                } = &mut *out_;
3332            }
3333
3334            ::fidl_next::Wire::zero_padding(apsd);
3335
3336            ::fidl_next::Wire::zero_padding(ac_be_params);
3337
3338            ::fidl_next::Wire::zero_padding(ac_bk_params);
3339
3340            ::fidl_next::Wire::zero_padding(ac_vi_params);
3341
3342            ::fidl_next::Wire::zero_padding(ac_vo_params);
3343
3344            unsafe {
3345                out_.as_mut_ptr().cast::<u8>().add(1).write_bytes(0, 1);
3346            }
3347        }
3348    }
3349
3350    unsafe impl<___D> ::fidl_next::Decode<___D> for WmmStatusResponse
3351    where
3352        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3353    {
3354        fn decode(
3355            slot_: ::fidl_next::Slot<'_, Self>,
3356            decoder_: &mut ___D,
3357            _: (),
3358        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3359            if slot_.as_bytes()[1..2] != [0u8; 1] {
3360                return Err(::fidl_next::DecodeError::InvalidPadding);
3361            }
3362
3363            ::fidl_next::munge! {
3364                let Self {
3365                    mut apsd,
3366                    mut ac_be_params,
3367                    mut ac_bk_params,
3368                    mut ac_vi_params,
3369                    mut ac_vo_params,
3370
3371                } = slot_;
3372            }
3373
3374            let _field = apsd.as_mut();
3375
3376            ::fidl_next::Decode::decode(apsd.as_mut(), decoder_, ())?;
3377
3378            let _field = ac_be_params.as_mut();
3379
3380            ::fidl_next::Decode::decode(ac_be_params.as_mut(), decoder_, ())?;
3381
3382            let _field = ac_bk_params.as_mut();
3383
3384            ::fidl_next::Decode::decode(ac_bk_params.as_mut(), decoder_, ())?;
3385
3386            let _field = ac_vi_params.as_mut();
3387
3388            ::fidl_next::Decode::decode(ac_vi_params.as_mut(), decoder_, ())?;
3389
3390            let _field = ac_vo_params.as_mut();
3391
3392            ::fidl_next::Decode::decode(ac_vo_params.as_mut(), decoder_, ())?;
3393
3394            Ok(())
3395        }
3396    }
3397
3398    impl ::fidl_next::IntoNatural for WmmStatusResponse {
3399        type Natural = crate::natural::WmmStatusResponse;
3400    }
3401}
3402
3403pub mod wire_optional {
3404
3405    #[repr(transparent)]
3406    pub struct WpaCredentials<'de> {
3407        pub(crate) raw: ::fidl_next::wire::Union,
3408        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3409    }
3410
3411    impl ::fidl_next::Constrained for WpaCredentials<'_> {
3412        type Constraint = ();
3413
3414        fn validate(
3415            _: ::fidl_next::Slot<'_, Self>,
3416            _: Self::Constraint,
3417        ) -> Result<(), ::fidl_next::ValidationError> {
3418            Ok(())
3419        }
3420    }
3421
3422    unsafe impl ::fidl_next::Wire for WpaCredentials<'static> {
3423        type Narrowed<'de> = WpaCredentials<'de>;
3424
3425        #[inline]
3426        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3427            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3428            ::fidl_next::wire::Union::zero_padding(raw);
3429        }
3430    }
3431
3432    impl<'de> WpaCredentials<'de> {
3433        pub fn is_some(&self) -> bool {
3434            self.raw.is_some()
3435        }
3436
3437        pub fn is_none(&self) -> bool {
3438            self.raw.is_none()
3439        }
3440
3441        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::WpaCredentials<'de>> {
3442            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
3443        }
3444
3445        pub fn into_option(self) -> ::core::option::Option<crate::wire::WpaCredentials<'de>> {
3446            if self.is_some() {
3447                Some(crate::wire::WpaCredentials {
3448                    raw: self.raw,
3449                    _phantom: ::core::marker::PhantomData,
3450                })
3451            } else {
3452                None
3453            }
3454        }
3455    }
3456
3457    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WpaCredentials<'de>
3458    where
3459        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3460        ___D: ::fidl_next::Decoder<'de>,
3461    {
3462        fn decode(
3463            mut slot: ::fidl_next::Slot<'_, Self>,
3464            decoder: &mut ___D,
3465            _: (),
3466        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3467            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3468            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3469                1 => ::fidl_next::wire::Union::decode_as::<___D, [u8; 32]>(raw, decoder, ())?,
3470
3471                2 => {
3472                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
3473                        raw,
3474                        decoder,
3475                        (63, ()),
3476                    )?
3477                }
3478
3479                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
3480                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3481            }
3482
3483            Ok(())
3484        }
3485    }
3486
3487    impl<'de> ::core::fmt::Debug for WpaCredentials<'de> {
3488        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3489            self.as_ref().fmt(f)
3490        }
3491    }
3492
3493    impl<'de> ::fidl_next::IntoNatural for WpaCredentials<'de> {
3494        type Natural = ::core::option::Option<crate::natural::WpaCredentials>;
3495    }
3496
3497    #[repr(transparent)]
3498    pub struct Credentials<'de> {
3499        pub(crate) raw: ::fidl_next::wire::Union,
3500        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3501    }
3502
3503    impl ::fidl_next::Constrained for Credentials<'_> {
3504        type Constraint = ();
3505
3506        fn validate(
3507            _: ::fidl_next::Slot<'_, Self>,
3508            _: Self::Constraint,
3509        ) -> Result<(), ::fidl_next::ValidationError> {
3510            Ok(())
3511        }
3512    }
3513
3514    unsafe impl ::fidl_next::Wire for Credentials<'static> {
3515        type Narrowed<'de> = Credentials<'de>;
3516
3517        #[inline]
3518        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3519            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3520            ::fidl_next::wire::Union::zero_padding(raw);
3521        }
3522    }
3523
3524    impl<'de> Credentials<'de> {
3525        pub fn is_some(&self) -> bool {
3526            self.raw.is_some()
3527        }
3528
3529        pub fn is_none(&self) -> bool {
3530            self.raw.is_none()
3531        }
3532
3533        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Credentials<'de>> {
3534            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
3535        }
3536
3537        pub fn into_option(self) -> ::core::option::Option<crate::wire::Credentials<'de>> {
3538            if self.is_some() {
3539                Some(crate::wire::Credentials {
3540                    raw: self.raw,
3541                    _phantom: ::core::marker::PhantomData,
3542                })
3543            } else {
3544                None
3545            }
3546        }
3547    }
3548
3549    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Credentials<'de>
3550    where
3551        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3552        ___D: ::fidl_next::Decoder<'de>,
3553    {
3554        fn decode(
3555            mut slot: ::fidl_next::Slot<'_, Self>,
3556            decoder: &mut ___D,
3557            _: (),
3558        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3559            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3560            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3561                1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::WepCredentials<'de>>(
3562                    raw,
3563                    decoder,
3564                    (),
3565                )?,
3566
3567                2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::WpaCredentials<'de>>(
3568                    raw,
3569                    decoder,
3570                    (),
3571                )?,
3572
3573                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
3574                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3575            }
3576
3577            Ok(())
3578        }
3579    }
3580
3581    impl<'de> ::core::fmt::Debug for Credentials<'de> {
3582        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3583            self.as_ref().fmt(f)
3584        }
3585    }
3586
3587    impl<'de> ::fidl_next::IntoNatural for Credentials<'de> {
3588        type Natural = ::core::option::Option<crate::natural::Credentials>;
3589    }
3590}
3591
3592pub mod generic {
3593
3594    /// The generic type corresponding to [`Authentication`].
3595    pub struct Authentication<T0, T1> {
3596        pub protocol: T0,
3597
3598        pub credentials: T1,
3599    }
3600
3601    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::Authentication<'static>, ___E>
3602        for Authentication<T0, T1>
3603    where
3604        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3605        ___E: ::fidl_next::Encoder,
3606        T0: ::fidl_next::Encode<crate::wire::Protocol, ___E>,
3607        T1: ::fidl_next::Encode<crate::wire_optional::Credentials<'static>, ___E>,
3608    {
3609        #[inline]
3610        fn encode(
3611            self,
3612            encoder_: &mut ___E,
3613            out_: &mut ::core::mem::MaybeUninit<crate::wire::Authentication<'static>>,
3614            _: (),
3615        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3616            ::fidl_next::munge! {
3617                let crate::wire::Authentication {
3618                    protocol,
3619                    credentials,
3620
3621                } = out_;
3622            }
3623
3624            ::fidl_next::Encode::encode(self.protocol, encoder_, protocol, ())?;
3625
3626            ::fidl_next::Encode::encode(self.credentials, encoder_, credentials, ())?;
3627
3628            Ok(())
3629        }
3630    }
3631
3632    /// The generic type corresponding to [`ChannelSwitchInfo`].
3633    pub struct ChannelSwitchInfo<T0, T1, T2> {
3634        pub new_primary_channel: T0,
3635
3636        pub bandwidth: T1,
3637
3638        pub vht_secondary_80_channel: T2,
3639    }
3640
3641    unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::ChannelSwitchInfo, ___E>
3642        for ChannelSwitchInfo<T0, T1, T2>
3643    where
3644        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3645        T0: ::fidl_next::Encode<
3646                ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelNumber,
3647                ___E,
3648            >,
3649        T1: ::fidl_next::Encode<
3650                ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelBandwidth,
3651                ___E,
3652            >,
3653        T2: ::fidl_next::Encode<
3654                ::fidl_next_common_fuchsia_wlan_ieee80211::wire::ChannelNumber,
3655                ___E,
3656            >,
3657    {
3658        #[inline]
3659        fn encode(
3660            self,
3661            encoder_: &mut ___E,
3662            out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSwitchInfo>,
3663            _: (),
3664        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3665            ::fidl_next::munge! {
3666                let crate::wire::ChannelSwitchInfo {
3667                    new_primary_channel,
3668                    bandwidth,
3669                    vht_secondary_80_channel,
3670
3671                } = out_;
3672            }
3673
3674            ::fidl_next::Encode::encode(
3675                self.new_primary_channel,
3676                encoder_,
3677                new_primary_channel,
3678                (),
3679            )?;
3680
3681            ::fidl_next::Encode::encode(self.bandwidth, encoder_, bandwidth, ())?;
3682
3683            ::fidl_next::Encode::encode(
3684                self.vht_secondary_80_channel,
3685                encoder_,
3686                vht_secondary_80_channel,
3687                (),
3688            )?;
3689
3690            Ok(())
3691        }
3692    }
3693
3694    /// The generic type corresponding to [`WepCredentials`].
3695    pub struct WepCredentials<T0> {
3696        pub key: T0,
3697    }
3698
3699    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WepCredentials<'static>, ___E>
3700        for WepCredentials<T0>
3701    where
3702        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3703        ___E: ::fidl_next::Encoder,
3704        T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
3705    {
3706        #[inline]
3707        fn encode(
3708            self,
3709            encoder_: &mut ___E,
3710            out_: &mut ::core::mem::MaybeUninit<crate::wire::WepCredentials<'static>>,
3711            _: (),
3712        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3713            ::fidl_next::munge! {
3714                let crate::wire::WepCredentials {
3715                    key,
3716
3717                } = out_;
3718            }
3719
3720            ::fidl_next::Encode::encode(self.key, encoder_, key, (4294967295, ()))?;
3721
3722            Ok(())
3723        }
3724    }
3725
3726    /// The generic type corresponding to [`OwePublicKey`].
3727    pub struct OwePublicKey<T0, T1> {
3728        pub group: T0,
3729
3730        pub key: T1,
3731    }
3732
3733    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::OwePublicKey<'static>, ___E>
3734        for OwePublicKey<T0, T1>
3735    where
3736        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3737        ___E: ::fidl_next::Encoder,
3738        T0: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
3739        T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
3740    {
3741        #[inline]
3742        fn encode(
3743            self,
3744            encoder_: &mut ___E,
3745            out_: &mut ::core::mem::MaybeUninit<crate::wire::OwePublicKey<'static>>,
3746            _: (),
3747        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3748            ::fidl_next::munge! {
3749                let crate::wire::OwePublicKey {
3750                    group,
3751                    key,
3752
3753                } = out_;
3754            }
3755
3756            ::fidl_next::Encode::encode(self.group, encoder_, group, ())?;
3757
3758            ::fidl_next::Encode::encode(self.key, encoder_, key, (4294967295, ()))?;
3759
3760            Ok(())
3761        }
3762    }
3763
3764    /// The generic type corresponding to [`SignalReportIndication`].
3765    pub struct SignalReportIndication<T0, T1> {
3766        pub rssi_dbm: T0,
3767
3768        pub snr_db: T1,
3769    }
3770
3771    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::SignalReportIndication, ___E>
3772        for SignalReportIndication<T0, T1>
3773    where
3774        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3775        T0: ::fidl_next::Encode<i8, ___E>,
3776        T1: ::fidl_next::Encode<i8, ___E>,
3777    {
3778        #[inline]
3779        fn encode(
3780            self,
3781            encoder_: &mut ___E,
3782            out_: &mut ::core::mem::MaybeUninit<crate::wire::SignalReportIndication>,
3783            _: (),
3784        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3785            ::fidl_next::munge! {
3786                let crate::wire::SignalReportIndication {
3787                    rssi_dbm,
3788                    snr_db,
3789
3790                } = out_;
3791            }
3792
3793            ::fidl_next::Encode::encode(self.rssi_dbm, encoder_, rssi_dbm, ())?;
3794
3795            ::fidl_next::Encode::encode(self.snr_db, encoder_, snr_db, ())?;
3796
3797            Ok(())
3798        }
3799    }
3800
3801    /// The generic type corresponding to [`WmmAcParams`].
3802    pub struct WmmAcParams<T0, T1, T2, T3, T4> {
3803        pub ecw_min: T0,
3804
3805        pub ecw_max: T1,
3806
3807        pub aifsn: T2,
3808
3809        pub txop_limit: T3,
3810
3811        pub acm: T4,
3812    }
3813
3814    unsafe impl<___E, T0, T1, T2, T3, T4> ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>
3815        for WmmAcParams<T0, T1, T2, T3, T4>
3816    where
3817        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3818        T0: ::fidl_next::Encode<u8, ___E>,
3819        T1: ::fidl_next::Encode<u8, ___E>,
3820        T2: ::fidl_next::Encode<u8, ___E>,
3821        T3: ::fidl_next::Encode<::fidl_next::wire::Uint16, ___E>,
3822        T4: ::fidl_next::Encode<bool, ___E>,
3823    {
3824        #[inline]
3825        fn encode(
3826            self,
3827            encoder_: &mut ___E,
3828            out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmAcParams>,
3829            _: (),
3830        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3831            ::fidl_next::munge! {
3832                let crate::wire::WmmAcParams {
3833                    ecw_min,
3834                    ecw_max,
3835                    aifsn,
3836                    txop_limit,
3837                    acm,
3838
3839                } = out_;
3840            }
3841
3842            ::fidl_next::Encode::encode(self.ecw_min, encoder_, ecw_min, ())?;
3843
3844            ::fidl_next::Encode::encode(self.ecw_max, encoder_, ecw_max, ())?;
3845
3846            ::fidl_next::Encode::encode(self.aifsn, encoder_, aifsn, ())?;
3847
3848            ::fidl_next::Encode::encode(self.txop_limit, encoder_, txop_limit, ())?;
3849
3850            ::fidl_next::Encode::encode(self.acm, encoder_, acm, ())?;
3851
3852            Ok(())
3853        }
3854    }
3855
3856    /// The generic type corresponding to [`WmmStatusResponse`].
3857    pub struct WmmStatusResponse<T0, T1, T2, T3, T4> {
3858        pub apsd: T0,
3859
3860        pub ac_be_params: T1,
3861
3862        pub ac_bk_params: T2,
3863
3864        pub ac_vi_params: T3,
3865
3866        pub ac_vo_params: T4,
3867    }
3868
3869    unsafe impl<___E, T0, T1, T2, T3, T4> ::fidl_next::Encode<crate::wire::WmmStatusResponse, ___E>
3870        for WmmStatusResponse<T0, T1, T2, T3, T4>
3871    where
3872        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3873        T0: ::fidl_next::Encode<bool, ___E>,
3874        T1: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
3875        T2: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
3876        T3: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
3877        T4: ::fidl_next::Encode<crate::wire::WmmAcParams, ___E>,
3878    {
3879        #[inline]
3880        fn encode(
3881            self,
3882            encoder_: &mut ___E,
3883            out_: &mut ::core::mem::MaybeUninit<crate::wire::WmmStatusResponse>,
3884            _: (),
3885        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3886            ::fidl_next::munge! {
3887                let crate::wire::WmmStatusResponse {
3888                    apsd,
3889                    ac_be_params,
3890                    ac_bk_params,
3891                    ac_vi_params,
3892                    ac_vo_params,
3893
3894                } = out_;
3895            }
3896
3897            ::fidl_next::Encode::encode(self.apsd, encoder_, apsd, ())?;
3898
3899            ::fidl_next::Encode::encode(self.ac_be_params, encoder_, ac_be_params, ())?;
3900
3901            ::fidl_next::Encode::encode(self.ac_bk_params, encoder_, ac_bk_params, ())?;
3902
3903            ::fidl_next::Encode::encode(self.ac_vi_params, encoder_, ac_vi_params, ())?;
3904
3905            ::fidl_next::Encode::encode(self.ac_vo_params, encoder_, ac_vo_params, ())?;
3906
3907            Ok(())
3908        }
3909    }
3910}
3911
3912pub use self::natural::*;
3913
3914pub const COUNTRY_CODE_LEN: u32 = 2 as u32;
3915
3916pub const MAX_ASSOC_BASIC_RATES: u8 = 14 as u8;