Skip to main content

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