Skip to main content

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