Skip to main content

fidl_next_fuchsia_wlan_phy/
fidl_next_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    pub use fidl_next_common_fuchsia_wlan_phy::natural::*;
8
9    #[derive(Debug, Default, PartialEq)]
10    pub struct WlanPhyInitRequest {
11        pub notify_client: ::core::option::Option<
12            ::fidl_next::ClientEnd<crate::WlanPhyNotify, ::fidl_next::fuchsia::zx::Channel>,
13        >,
14    }
15
16    impl WlanPhyInitRequest {
17        fn __max_ordinal(&self) -> usize {
18            if self.notify_client.is_some() {
19                return 1;
20            }
21
22            0
23        }
24    }
25
26    unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanPhyInitRequest<'static>, ___E>
27        for WlanPhyInitRequest
28    where
29        ___E: ::fidl_next::Encoder + ?Sized,
30        ___E: ::fidl_next::fuchsia::HandleEncoder,
31    {
32        #[inline]
33        fn encode(
34            mut self,
35            encoder: &mut ___E,
36            out: &mut ::core::mem::MaybeUninit<crate::wire::WlanPhyInitRequest<'static>>,
37            _: (),
38        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
39            ::fidl_next::munge!(let crate::wire::WlanPhyInitRequest { 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.notify_client.take() {
54                            ::fidl_next::wire::Envelope::encode_value::<
55                                ::fidl_next::ClientEnd<
56                                    crate::WlanPhyNotify,
57                                    ::fidl_next::wire::fuchsia::Channel,
58                                >,
59                                ___E,
60                            >(
61                                value, preallocated.encoder, &mut out, ()
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    impl<'de> ::fidl_next::FromWire<crate::wire::WlanPhyInitRequest<'de>> for WlanPhyInitRequest {
82        #[inline]
83        fn from_wire(wire_: crate::wire::WlanPhyInitRequest<'de>) -> Self {
84            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
85
86            let notify_client = wire_.table.get(1);
87
88            Self {
89                notify_client: notify_client.map(|envelope| {
90                    ::fidl_next::FromWire::from_wire(unsafe {
91                        envelope.read_unchecked::<::fidl_next::ClientEnd<
92                            crate::WlanPhyNotify,
93                            ::fidl_next::wire::fuchsia::Channel,
94                        >>()
95                    })
96                }),
97            }
98        }
99    }
100
101    #[derive(Debug, Default, PartialEq)]
102    pub struct WlanPhyInitResponse {
103        pub power_dependency_token: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
104    }
105
106    impl WlanPhyInitResponse {
107        fn __max_ordinal(&self) -> usize {
108            if self.power_dependency_token.is_some() {
109                return 1;
110            }
111
112            0
113        }
114    }
115
116    unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanPhyInitResponse<'static>, ___E>
117        for WlanPhyInitResponse
118    where
119        ___E: ::fidl_next::Encoder + ?Sized,
120        ___E: ::fidl_next::fuchsia::HandleEncoder,
121    {
122        #[inline]
123        fn encode(
124            mut self,
125            encoder: &mut ___E,
126            out: &mut ::core::mem::MaybeUninit<crate::wire::WlanPhyInitResponse<'static>>,
127            _: (),
128        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
129            ::fidl_next::munge!(let crate::wire::WlanPhyInitResponse { table } = out);
130
131            let max_ord = self.__max_ordinal();
132
133            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
134            ::fidl_next::Wire::zero_padding(&mut out);
135
136            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
137                ::fidl_next::wire::Envelope,
138            >(encoder, max_ord);
139
140            for i in 1..=max_ord {
141                match i {
142                    1 => {
143                        if let Some(value) = self.power_dependency_token.take() {
144                            ::fidl_next::wire::Envelope::encode_value::<
145                                ::fidl_next::wire::fuchsia::Event,
146                                ___E,
147                            >(
148                                value, preallocated.encoder, &mut out, ()
149                            )?;
150                        } else {
151                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
152                        }
153                    }
154
155                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
156                }
157                unsafe {
158                    preallocated.write_next(out.assume_init_ref());
159                }
160            }
161
162            ::fidl_next::wire::Table::encode_len(table, max_ord);
163
164            Ok(())
165        }
166    }
167
168    impl<'de> ::fidl_next::FromWire<crate::wire::WlanPhyInitResponse<'de>> for WlanPhyInitResponse {
169        #[inline]
170        fn from_wire(wire_: crate::wire::WlanPhyInitResponse<'de>) -> Self {
171            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
172
173            let power_dependency_token = wire_.table.get(1);
174
175            Self {
176                power_dependency_token: power_dependency_token.map(|envelope| {
177                    ::fidl_next::FromWire::from_wire(unsafe {
178                        envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
179                    })
180                }),
181            }
182        }
183    }
184
185    #[derive(Debug, Default, PartialEq)]
186    pub struct WlanPhyCreateIfaceRequest {
187        pub role: ::core::option::Option<::fidl_next_fuchsia_wlan_common::natural::WlanMacRole>,
188
189        pub mlme_channel: ::core::option::Option<::fidl_next::fuchsia::zx::Channel>,
190
191        pub init_sta_addr: ::core::option::Option<[u8; 6]>,
192    }
193
194    impl WlanPhyCreateIfaceRequest {
195        fn __max_ordinal(&self) -> usize {
196            if self.init_sta_addr.is_some() {
197                return 3;
198            }
199
200            if self.mlme_channel.is_some() {
201                return 2;
202            }
203
204            if self.role.is_some() {
205                return 1;
206            }
207
208            0
209        }
210    }
211
212    unsafe impl<___E> ::fidl_next::Encode<crate::wire::WlanPhyCreateIfaceRequest<'static>, ___E>
213        for WlanPhyCreateIfaceRequest
214    where
215        ___E: ::fidl_next::Encoder + ?Sized,
216        ___E: ::fidl_next::fuchsia::HandleEncoder,
217    {
218        #[inline]
219        fn encode(
220            mut self,
221            encoder: &mut ___E,
222            out: &mut ::core::mem::MaybeUninit<crate::wire::WlanPhyCreateIfaceRequest<'static>>,
223            _: (),
224        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
225            ::fidl_next::munge!(let crate::wire::WlanPhyCreateIfaceRequest { table } = out);
226
227            let max_ord = self.__max_ordinal();
228
229            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
230            ::fidl_next::Wire::zero_padding(&mut out);
231
232            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
233                ::fidl_next::wire::Envelope,
234            >(encoder, max_ord);
235
236            for i in 1..=max_ord {
237                match i {
238                    3 => {
239                        if let Some(value) = self.init_sta_addr.take() {
240                            ::fidl_next::wire::Envelope::encode_value::<[u8; 6], ___E>(
241                                value,
242                                preallocated.encoder,
243                                &mut out,
244                                (),
245                            )?;
246                        } else {
247                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
248                        }
249                    }
250
251                    2 => {
252                        if let Some(value) = self.mlme_channel.take() {
253                            ::fidl_next::wire::Envelope::encode_value::<
254                                ::fidl_next::wire::fuchsia::Channel,
255                                ___E,
256                            >(
257                                value, preallocated.encoder, &mut out, ()
258                            )?;
259                        } else {
260                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
261                        }
262                    }
263
264                    1 => {
265                        if let Some(value) = self.role.take() {
266                            ::fidl_next::wire::Envelope::encode_value::<
267                                ::fidl_next_fuchsia_wlan_common::wire::WlanMacRole,
268                                ___E,
269                            >(
270                                value, preallocated.encoder, &mut out, ()
271                            )?;
272                        } else {
273                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
274                        }
275                    }
276
277                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
278                }
279                unsafe {
280                    preallocated.write_next(out.assume_init_ref());
281                }
282            }
283
284            ::fidl_next::wire::Table::encode_len(table, max_ord);
285
286            Ok(())
287        }
288    }
289
290    impl<'de> ::fidl_next::FromWire<crate::wire::WlanPhyCreateIfaceRequest<'de>>
291        for WlanPhyCreateIfaceRequest
292    {
293        #[inline]
294        fn from_wire(wire_: crate::wire::WlanPhyCreateIfaceRequest<'de>) -> Self {
295            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
296
297            let role = wire_.table.get(1);
298
299            let mlme_channel = wire_.table.get(2);
300
301            let init_sta_addr = wire_.table.get(3);
302
303            Self {
304                role: role.map(|envelope| {
305                    ::fidl_next::FromWire::from_wire(unsafe {
306                        envelope
307                            .read_unchecked::<::fidl_next_fuchsia_wlan_common::wire::WlanMacRole>()
308                    })
309                }),
310
311                mlme_channel: mlme_channel.map(|envelope| {
312                    ::fidl_next::FromWire::from_wire(unsafe {
313                        envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
314                    })
315                }),
316
317                init_sta_addr: init_sta_addr.map(|envelope| {
318                    ::fidl_next::FromWire::from_wire(unsafe {
319                        envelope.read_unchecked::<[u8; 6]>()
320                    })
321                }),
322            }
323        }
324    }
325}
326
327pub mod wire {
328
329    pub use fidl_next_common_fuchsia_wlan_phy::wire::*;
330
331    /// The wire type corresponding to [`WlanPhyInitRequest`].
332    #[repr(C)]
333    pub struct WlanPhyInitRequest<'de> {
334        pub(crate) table: ::fidl_next::wire::Table<'de>,
335    }
336
337    impl<'de> Drop for WlanPhyInitRequest<'de> {
338        fn drop(&mut self) {
339            let _ = self.table.get(1).map(|envelope| unsafe {
340                envelope.read_unchecked::<::fidl_next::ClientEnd<
341                    crate::WlanPhyNotify,
342                    ::fidl_next::wire::fuchsia::Channel,
343                >>()
344            });
345        }
346    }
347
348    impl ::fidl_next::Constrained for WlanPhyInitRequest<'_> {
349        type Constraint = ();
350
351        fn validate(
352            _: ::fidl_next::Slot<'_, Self>,
353            _: Self::Constraint,
354        ) -> Result<(), ::fidl_next::ValidationError> {
355            Ok(())
356        }
357    }
358
359    unsafe impl ::fidl_next::Wire for WlanPhyInitRequest<'static> {
360        type Narrowed<'de> = WlanPhyInitRequest<'de>;
361
362        #[inline]
363        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
364            ::fidl_next::munge!(let Self { table } = out);
365            ::fidl_next::wire::Table::zero_padding(table);
366        }
367    }
368
369    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WlanPhyInitRequest<'de>
370    where
371        ___D: ::fidl_next::Decoder<'de> + ?Sized,
372        ___D: ::fidl_next::fuchsia::HandleDecoder,
373    {
374        fn decode(
375            slot: ::fidl_next::Slot<'_, Self>,
376            decoder: &mut ___D,
377            _: (),
378        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
379            ::fidl_next::munge!(let Self { table } = slot);
380
381            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
382                match ordinal {
383                    0 => unsafe { ::core::hint::unreachable_unchecked() },
384
385                    1 => {
386                        ::fidl_next::wire::Envelope::decode_as::<
387                            ___D,
388                            ::fidl_next::ClientEnd<
389                                crate::WlanPhyNotify,
390                                ::fidl_next::wire::fuchsia::Channel,
391                            >,
392                        >(slot.as_mut(), decoder, ())?;
393
394                        Ok(())
395                    }
396
397                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
398                }
399            })
400        }
401    }
402
403    impl<'de> WlanPhyInitRequest<'de> {
404        pub fn notify_client(
405            &self,
406        ) -> ::core::option::Option<
407            &::fidl_next::ClientEnd<crate::WlanPhyNotify, ::fidl_next::wire::fuchsia::Channel>,
408        > {
409            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
410        }
411
412        pub fn take_notify_client(
413            &mut self,
414        ) -> ::core::option::Option<
415            ::fidl_next::ClientEnd<crate::WlanPhyNotify, ::fidl_next::wire::fuchsia::Channel>,
416        > {
417            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
418        }
419    }
420
421    impl<'de> ::core::fmt::Debug for WlanPhyInitRequest<'de> {
422        fn fmt(
423            &self,
424            f: &mut ::core::fmt::Formatter<'_>,
425        ) -> ::core::result::Result<(), ::core::fmt::Error> {
426            f.debug_struct("WlanPhyInitRequest")
427                .field("notify_client", &self.notify_client())
428                .finish()
429        }
430    }
431
432    impl<'de> ::fidl_next::IntoNatural for WlanPhyInitRequest<'de> {
433        type Natural = crate::natural::WlanPhyInitRequest;
434    }
435
436    /// The wire type corresponding to [`WlanPhyInitResponse`].
437    #[repr(C)]
438    pub struct WlanPhyInitResponse<'de> {
439        pub(crate) table: ::fidl_next::wire::Table<'de>,
440    }
441
442    impl<'de> Drop for WlanPhyInitResponse<'de> {
443        fn drop(&mut self) {
444            let _ = self.table.get(1).map(|envelope| unsafe {
445                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
446            });
447        }
448    }
449
450    impl ::fidl_next::Constrained for WlanPhyInitResponse<'_> {
451        type Constraint = ();
452
453        fn validate(
454            _: ::fidl_next::Slot<'_, Self>,
455            _: Self::Constraint,
456        ) -> Result<(), ::fidl_next::ValidationError> {
457            Ok(())
458        }
459    }
460
461    unsafe impl ::fidl_next::Wire for WlanPhyInitResponse<'static> {
462        type Narrowed<'de> = WlanPhyInitResponse<'de>;
463
464        #[inline]
465        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
466            ::fidl_next::munge!(let Self { table } = out);
467            ::fidl_next::wire::Table::zero_padding(table);
468        }
469    }
470
471    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WlanPhyInitResponse<'de>
472    where
473        ___D: ::fidl_next::Decoder<'de> + ?Sized,
474        ___D: ::fidl_next::fuchsia::HandleDecoder,
475    {
476        fn decode(
477            slot: ::fidl_next::Slot<'_, Self>,
478            decoder: &mut ___D,
479            _: (),
480        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
481            ::fidl_next::munge!(let Self { table } = slot);
482
483            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
484                match ordinal {
485                    0 => unsafe { ::core::hint::unreachable_unchecked() },
486
487                    1 => {
488                        ::fidl_next::wire::Envelope::decode_as::<
489                            ___D,
490                            ::fidl_next::wire::fuchsia::Event,
491                        >(slot.as_mut(), decoder, ())?;
492
493                        Ok(())
494                    }
495
496                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
497                }
498            })
499        }
500    }
501
502    impl<'de> WlanPhyInitResponse<'de> {
503        pub fn power_dependency_token(
504            &self,
505        ) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
506            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
507        }
508
509        pub fn take_power_dependency_token(
510            &mut self,
511        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
512            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
513        }
514    }
515
516    impl<'de> ::core::fmt::Debug for WlanPhyInitResponse<'de> {
517        fn fmt(
518            &self,
519            f: &mut ::core::fmt::Formatter<'_>,
520        ) -> ::core::result::Result<(), ::core::fmt::Error> {
521            f.debug_struct("WlanPhyInitResponse")
522                .field("power_dependency_token", &self.power_dependency_token())
523                .finish()
524        }
525    }
526
527    impl<'de> ::fidl_next::IntoNatural for WlanPhyInitResponse<'de> {
528        type Natural = crate::natural::WlanPhyInitResponse;
529    }
530
531    /// The wire type corresponding to [`WlanPhyCreateIfaceRequest`].
532    #[repr(C)]
533    pub struct WlanPhyCreateIfaceRequest<'de> {
534        pub(crate) table: ::fidl_next::wire::Table<'de>,
535    }
536
537    impl<'de> Drop for WlanPhyCreateIfaceRequest<'de> {
538        fn drop(&mut self) {
539            let _ = self.table.get(1).map(|envelope| unsafe {
540                envelope.read_unchecked::<::fidl_next_fuchsia_wlan_common::wire::WlanMacRole>()
541            });
542
543            let _ = self.table.get(2).map(|envelope| unsafe {
544                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Channel>()
545            });
546
547            let _ =
548                self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<[u8; 6]>() });
549        }
550    }
551
552    impl ::fidl_next::Constrained for WlanPhyCreateIfaceRequest<'_> {
553        type Constraint = ();
554
555        fn validate(
556            _: ::fidl_next::Slot<'_, Self>,
557            _: Self::Constraint,
558        ) -> Result<(), ::fidl_next::ValidationError> {
559            Ok(())
560        }
561    }
562
563    unsafe impl ::fidl_next::Wire for WlanPhyCreateIfaceRequest<'static> {
564        type Narrowed<'de> = WlanPhyCreateIfaceRequest<'de>;
565
566        #[inline]
567        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
568            ::fidl_next::munge!(let Self { table } = out);
569            ::fidl_next::wire::Table::zero_padding(table);
570        }
571    }
572
573    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WlanPhyCreateIfaceRequest<'de>
574    where
575        ___D: ::fidl_next::Decoder<'de> + ?Sized,
576        ___D: ::fidl_next::fuchsia::HandleDecoder,
577    {
578        fn decode(
579            slot: ::fidl_next::Slot<'_, Self>,
580            decoder: &mut ___D,
581            _: (),
582        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
583            ::fidl_next::munge!(let Self { table } = slot);
584
585            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
586                match ordinal {
587                    0 => unsafe { ::core::hint::unreachable_unchecked() },
588
589                    1 => {
590                        ::fidl_next::wire::Envelope::decode_as::<
591                            ___D,
592                            ::fidl_next_fuchsia_wlan_common::wire::WlanMacRole,
593                        >(slot.as_mut(), decoder, ())?;
594
595                        Ok(())
596                    }
597
598                    2 => {
599                        ::fidl_next::wire::Envelope::decode_as::<
600                            ___D,
601                            ::fidl_next::wire::fuchsia::Channel,
602                        >(slot.as_mut(), decoder, ())?;
603
604                        Ok(())
605                    }
606
607                    3 => {
608                        ::fidl_next::wire::Envelope::decode_as::<___D, [u8; 6]>(
609                            slot.as_mut(),
610                            decoder,
611                            (),
612                        )?;
613
614                        Ok(())
615                    }
616
617                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
618                }
619            })
620        }
621    }
622
623    impl<'de> WlanPhyCreateIfaceRequest<'de> {
624        pub fn role(
625            &self,
626        ) -> ::core::option::Option<&::fidl_next_fuchsia_wlan_common::wire::WlanMacRole> {
627            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
628        }
629
630        pub fn take_role(
631            &mut self,
632        ) -> ::core::option::Option<::fidl_next_fuchsia_wlan_common::wire::WlanMacRole> {
633            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
634        }
635
636        pub fn mlme_channel(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Channel> {
637            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
638        }
639
640        pub fn take_mlme_channel(
641            &mut self,
642        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Channel> {
643            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
644        }
645
646        pub fn init_sta_addr(&self) -> ::core::option::Option<&[u8; 6]> {
647            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
648        }
649
650        pub fn take_init_sta_addr(&mut self) -> ::core::option::Option<[u8; 6]> {
651            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
652        }
653    }
654
655    impl<'de> ::core::fmt::Debug for WlanPhyCreateIfaceRequest<'de> {
656        fn fmt(
657            &self,
658            f: &mut ::core::fmt::Formatter<'_>,
659        ) -> ::core::result::Result<(), ::core::fmt::Error> {
660            f.debug_struct("WlanPhyCreateIfaceRequest")
661                .field("role", &self.role())
662                .field("mlme_channel", &self.mlme_channel())
663                .field("init_sta_addr", &self.init_sta_addr())
664                .finish()
665        }
666    }
667
668    impl<'de> ::fidl_next::IntoNatural for WlanPhyCreateIfaceRequest<'de> {
669        type Natural = crate::natural::WlanPhyCreateIfaceRequest;
670    }
671}
672
673pub mod wire_optional {
674
675    pub use fidl_next_common_fuchsia_wlan_phy::wire_optional::*;
676}
677
678pub mod generic {
679
680    pub use fidl_next_common_fuchsia_wlan_phy::generic::*;
681}
682
683pub use self::natural::*;
684
685/// The type corresponding to the Service service.
686#[derive(Debug)]
687pub struct Service;
688
689impl ::fidl_next::DiscoverableService for Service {
690    const SERVICE_NAME: &'static str = "fuchsia.wlan.phy.Service";
691    const MEMBER_NAMES: &'static [&'static str] = &["device"];
692}
693
694impl ::fidl_next::HasServiceRequest<::fidl_next::fuchsia::zx::Channel> for Service {}
695
696impl<___C> ::fidl_next::Service<___C> for Service
697where
698    ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
699{
700    type Connector = ServiceConnector<___C>;
701}
702
703/// A strongly-typed service connector for the `Service` service.
704#[repr(transparent)]
705pub struct ServiceConnector<___C> {
706    #[allow(dead_code)]
707    connector: ___C,
708}
709
710impl<___C> ServiceConnector<___C>
711where
712    ___C: ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>,
713{
714    /// Attempts to connect to the `device` service member.
715    pub fn device(
716        &self,
717        server_end: ::fidl_next::ServerEnd<crate::WlanPhy, ::fidl_next::fuchsia::zx::Channel>,
718    ) -> ::core::result::Result<
719        (),
720        <___C as ::fidl_next::protocol::ServiceConnector<::fidl_next::fuchsia::zx::Channel>>::Error,
721    > {
722        ::fidl_next::protocol::ServiceConnector::<
723                ::fidl_next::fuchsia::zx::Channel
724            >::connect_to_member(
725                &self.connector,
726                "device",
727                server_end.into_untyped(),
728            )
729    }
730}
731
732/// A service handler for the `Service` service.
733pub trait ServiceHandler {
734    /// Handles an attempt to connect to the `device` member.
735    fn device(
736        &self,
737        server_end: ::fidl_next::ServerEnd<crate::WlanPhy, ::fidl_next::fuchsia::zx::Channel>,
738    );
739}
740
741impl<___H, ___T> ::fidl_next::DispatchServiceHandler<___H, ___T> for Service
742where
743    ___H: ServiceHandler,
744    ::fidl_next::fuchsia::zx::Channel: ::fidl_next::InstanceFromServiceTransport<___T>,
745{
746    fn on_connection(handler: &___H, member: &str, server_end: ___T) {
747        use ::fidl_next::InstanceFromServiceTransport;
748        match member {
749            "device" => handler.device(::fidl_next::ServerEnd::from_untyped(
750                ::fidl_next::fuchsia::zx::Channel::from_service_transport(server_end),
751            )),
752
753            _ => unreachable!(),
754        }
755    }
756}
757
758/// The type corresponding to the WlanPhy protocol.
759#[derive(PartialEq, Debug)]
760pub struct WlanPhy;
761
762impl ::fidl_next::Discoverable for WlanPhy {
763    const PROTOCOL_NAME: &'static str = "fuchsia.wlan.phy.WlanPhy";
764}
765
766#[cfg(target_os = "fuchsia")]
767impl ::fidl_next::HasTransport for WlanPhy {
768    type Transport = ::fidl_next::fuchsia::zx::Channel;
769}
770
771pub mod wlan_phy {
772    pub mod prelude {
773        pub use crate::{
774            WlanPhy, WlanPhyClientHandler, WlanPhyLocalClientHandler, WlanPhyLocalServerHandler,
775            WlanPhyServerHandler, wlan_phy,
776        };
777
778        pub use crate::natural::WlanPhyCreateIfaceRequest;
779
780        pub use crate::natural::WlanPhyDestroyIfaceRequest;
781
782        pub use crate::natural::WlanPhyInitRequest;
783
784        pub use crate::natural::WlanPhySetBtCoexistenceModeRequest;
785
786        pub use crate::natural::WlanPhySetCountryRequest;
787
788        pub use crate::natural::WlanPhySetPowerSaveModeRequest;
789
790        pub use crate::natural::WlanPhySetTxPowerScenarioRequest;
791
792        pub use crate::natural::WlanPhyClearCountryResponse;
793
794        pub use crate::natural::WlanPhyCreateIfaceResponse;
795
796        pub use crate::natural::WlanPhyDestroyIfaceResponse;
797
798        pub use crate::natural::WlanPhyGetCountryResponse;
799
800        pub use crate::natural::WlanPhyGetPowerSaveModeResponse;
801
802        pub use crate::natural::WlanPhyGetPowerStateResponse;
803
804        pub use crate::natural::WlanPhyGetSupportedMacRolesResponse;
805
806        pub use crate::natural::WlanPhyGetTxPowerScenarioResponse;
807
808        pub use crate::natural::WlanPhyInitResponse;
809
810        pub use crate::natural::WlanPhyResetTxPowerScenarioResponse;
811
812        pub use crate::natural::WlanPhyResetResponse;
813
814        pub use crate::natural::WlanPhySetBtCoexistenceModeResponse;
815
816        pub use crate::natural::WlanPhySetCountryResponse;
817
818        pub use crate::natural::WlanPhySetPowerSaveModeResponse;
819
820        pub use crate::natural::WlanPhySetTxPowerScenarioResponse;
821    }
822
823    pub struct Init;
824
825    impl ::fidl_next::Method for Init {
826        const ORDINAL: u64 = 4152290172424220659;
827        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
828            ::fidl_next::protocol::Flexibility::Flexible;
829
830        type Protocol = crate::WlanPhy;
831
832        type Request = crate::wire::WlanPhyInitRequest<'static>;
833    }
834
835    impl ::fidl_next::TwoWayMethod for Init {
836        type Response = ::fidl_next::wire::Result<
837            'static,
838            crate::wire::WlanPhyInitResponse<'static>,
839            ::fidl_next::wire::fuchsia::Status,
840        >;
841    }
842
843    impl<___R> ::fidl_next::Respond<___R> for Init {
844        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
845
846        fn respond(response: ___R) -> Self::Output {
847            ::core::result::Result::Ok(response)
848        }
849    }
850
851    impl<___R> ::fidl_next::RespondErr<___R> for Init {
852        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
853
854        fn respond_err(response: ___R) -> Self::Output {
855            ::core::result::Result::Err(response)
856        }
857    }
858
859    pub struct GetSupportedMacRoles;
860
861    impl ::fidl_next::Method for GetSupportedMacRoles {
862        const ORDINAL: u64 = 3929702727467848522;
863        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
864            ::fidl_next::protocol::Flexibility::Flexible;
865
866        type Protocol = crate::WlanPhy;
867
868        type Request = ::fidl_next::wire::EmptyMessageBody;
869    }
870
871    impl ::fidl_next::TwoWayMethod for GetSupportedMacRoles {
872        type Response = ::fidl_next::wire::Result<
873            'static,
874            crate::wire::WlanPhyGetSupportedMacRolesResponse<'static>,
875            ::fidl_next::wire::fuchsia::Status,
876        >;
877    }
878
879    impl<___R> ::fidl_next::Respond<___R> for GetSupportedMacRoles {
880        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
881
882        fn respond(response: ___R) -> Self::Output {
883            ::core::result::Result::Ok(response)
884        }
885    }
886
887    impl<___R> ::fidl_next::RespondErr<___R> for GetSupportedMacRoles {
888        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
889
890        fn respond_err(response: ___R) -> Self::Output {
891            ::core::result::Result::Err(response)
892        }
893    }
894
895    pub struct CreateIface;
896
897    impl ::fidl_next::Method for CreateIface {
898        const ORDINAL: u64 = 5530435827689044878;
899        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
900            ::fidl_next::protocol::Flexibility::Flexible;
901
902        type Protocol = crate::WlanPhy;
903
904        type Request = crate::wire::WlanPhyCreateIfaceRequest<'static>;
905    }
906
907    impl ::fidl_next::TwoWayMethod for CreateIface {
908        type Response = ::fidl_next::wire::Result<
909            'static,
910            crate::wire::WlanPhyCreateIfaceResponse<'static>,
911            ::fidl_next::wire::fuchsia::Status,
912        >;
913    }
914
915    impl<___R> ::fidl_next::Respond<___R> for CreateIface {
916        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
917
918        fn respond(response: ___R) -> Self::Output {
919            ::core::result::Result::Ok(response)
920        }
921    }
922
923    impl<___R> ::fidl_next::RespondErr<___R> for CreateIface {
924        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
925
926        fn respond_err(response: ___R) -> Self::Output {
927            ::core::result::Result::Err(response)
928        }
929    }
930
931    pub struct DestroyIface;
932
933    impl ::fidl_next::Method for DestroyIface {
934        const ORDINAL: u64 = 1127035624611379388;
935        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
936            ::fidl_next::protocol::Flexibility::Flexible;
937
938        type Protocol = crate::WlanPhy;
939
940        type Request = crate::wire::WlanPhyDestroyIfaceRequest<'static>;
941    }
942
943    impl ::fidl_next::TwoWayMethod for DestroyIface {
944        type Response = ::fidl_next::wire::Result<
945            'static,
946            crate::wire::WlanPhyDestroyIfaceResponse,
947            ::fidl_next::wire::fuchsia::Status,
948        >;
949    }
950
951    impl<___R> ::fidl_next::Respond<___R> for DestroyIface {
952        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
953
954        fn respond(response: ___R) -> Self::Output {
955            ::core::result::Result::Ok(response)
956        }
957    }
958
959    impl<___R> ::fidl_next::RespondErr<___R> for DestroyIface {
960        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
961
962        fn respond_err(response: ___R) -> Self::Output {
963            ::core::result::Result::Err(response)
964        }
965    }
966
967    pub struct SetCountry;
968
969    impl ::fidl_next::Method for SetCountry {
970        const ORDINAL: u64 = 7859442075277675023;
971        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
972            ::fidl_next::protocol::Flexibility::Flexible;
973
974        type Protocol = crate::WlanPhy;
975
976        type Request = crate::wire::WlanPhySetCountryRequest;
977    }
978
979    impl ::fidl_next::TwoWayMethod for SetCountry {
980        type Response = ::fidl_next::wire::Result<
981            'static,
982            crate::wire::WlanPhySetCountryResponse,
983            ::fidl_next::wire::fuchsia::Status,
984        >;
985    }
986
987    impl<___R> ::fidl_next::Respond<___R> for SetCountry {
988        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
989
990        fn respond(response: ___R) -> Self::Output {
991            ::core::result::Result::Ok(response)
992        }
993    }
994
995    impl<___R> ::fidl_next::RespondErr<___R> for SetCountry {
996        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
997
998        fn respond_err(response: ___R) -> Self::Output {
999            ::core::result::Result::Err(response)
1000        }
1001    }
1002
1003    pub struct ClearCountry;
1004
1005    impl ::fidl_next::Method for ClearCountry {
1006        const ORDINAL: u64 = 8355078711339303759;
1007        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1008            ::fidl_next::protocol::Flexibility::Flexible;
1009
1010        type Protocol = crate::WlanPhy;
1011
1012        type Request = ::fidl_next::wire::EmptyMessageBody;
1013    }
1014
1015    impl ::fidl_next::TwoWayMethod for ClearCountry {
1016        type Response = ::fidl_next::wire::Result<
1017            'static,
1018            crate::wire::WlanPhyClearCountryResponse,
1019            ::fidl_next::wire::fuchsia::Status,
1020        >;
1021    }
1022
1023    impl<___R> ::fidl_next::Respond<___R> for ClearCountry {
1024        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1025
1026        fn respond(response: ___R) -> Self::Output {
1027            ::core::result::Result::Ok(response)
1028        }
1029    }
1030
1031    impl<___R> ::fidl_next::RespondErr<___R> for ClearCountry {
1032        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1033
1034        fn respond_err(response: ___R) -> Self::Output {
1035            ::core::result::Result::Err(response)
1036        }
1037    }
1038
1039    pub struct GetCountry;
1040
1041    impl ::fidl_next::Method for GetCountry {
1042        const ORDINAL: u64 = 1436134059072311418;
1043        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1044            ::fidl_next::protocol::Flexibility::Flexible;
1045
1046        type Protocol = crate::WlanPhy;
1047
1048        type Request = ::fidl_next::wire::EmptyMessageBody;
1049    }
1050
1051    impl ::fidl_next::TwoWayMethod for GetCountry {
1052        type Response = ::fidl_next::wire::Result<
1053            'static,
1054            crate::wire::WlanPhyGetCountryResponse,
1055            ::fidl_next::wire::fuchsia::Status,
1056        >;
1057    }
1058
1059    impl<___R> ::fidl_next::Respond<___R> for GetCountry {
1060        type Output = ::core::result::Result<
1061            crate::generic::WlanPhyGetCountryResponse<___R>,
1062            ::fidl_next::never::Never,
1063        >;
1064
1065        fn respond(response: ___R) -> Self::Output {
1066            ::core::result::Result::Ok(crate::generic::WlanPhyGetCountryResponse {
1067                country: response,
1068            })
1069        }
1070    }
1071
1072    impl<___R> ::fidl_next::RespondErr<___R> for GetCountry {
1073        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1074
1075        fn respond_err(response: ___R) -> Self::Output {
1076            ::core::result::Result::Err(response)
1077        }
1078    }
1079
1080    pub struct SetPowerSaveMode;
1081
1082    impl ::fidl_next::Method for SetPowerSaveMode {
1083        const ORDINAL: u64 = 5626768781239879949;
1084        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1085            ::fidl_next::protocol::Flexibility::Flexible;
1086
1087        type Protocol = crate::WlanPhy;
1088
1089        type Request = crate::wire::WlanPhySetPowerSaveModeRequest<'static>;
1090    }
1091
1092    impl ::fidl_next::TwoWayMethod for SetPowerSaveMode {
1093        type Response = ::fidl_next::wire::Result<
1094            'static,
1095            crate::wire::WlanPhySetPowerSaveModeResponse,
1096            ::fidl_next::wire::fuchsia::Status,
1097        >;
1098    }
1099
1100    impl<___R> ::fidl_next::Respond<___R> for SetPowerSaveMode {
1101        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1102
1103        fn respond(response: ___R) -> Self::Output {
1104            ::core::result::Result::Ok(response)
1105        }
1106    }
1107
1108    impl<___R> ::fidl_next::RespondErr<___R> for SetPowerSaveMode {
1109        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1110
1111        fn respond_err(response: ___R) -> Self::Output {
1112            ::core::result::Result::Err(response)
1113        }
1114    }
1115
1116    pub struct GetPowerSaveMode;
1117
1118    impl ::fidl_next::Method for GetPowerSaveMode {
1119        const ORDINAL: u64 = 2070868099982362662;
1120        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1121            ::fidl_next::protocol::Flexibility::Flexible;
1122
1123        type Protocol = crate::WlanPhy;
1124
1125        type Request = ::fidl_next::wire::EmptyMessageBody;
1126    }
1127
1128    impl ::fidl_next::TwoWayMethod for GetPowerSaveMode {
1129        type Response = ::fidl_next::wire::Result<
1130            'static,
1131            crate::wire::WlanPhyGetPowerSaveModeResponse<'static>,
1132            ::fidl_next::wire::fuchsia::Status,
1133        >;
1134    }
1135
1136    impl<___R> ::fidl_next::Respond<___R> for GetPowerSaveMode {
1137        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1138
1139        fn respond(response: ___R) -> Self::Output {
1140            ::core::result::Result::Ok(response)
1141        }
1142    }
1143
1144    impl<___R> ::fidl_next::RespondErr<___R> for GetPowerSaveMode {
1145        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1146
1147        fn respond_err(response: ___R) -> Self::Output {
1148            ::core::result::Result::Err(response)
1149        }
1150    }
1151
1152    pub struct Reset;
1153
1154    impl ::fidl_next::Method for Reset {
1155        const ORDINAL: u64 = 3390961545241598095;
1156        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1157            ::fidl_next::protocol::Flexibility::Flexible;
1158
1159        type Protocol = crate::WlanPhy;
1160
1161        type Request = ::fidl_next::wire::EmptyMessageBody;
1162    }
1163
1164    impl ::fidl_next::TwoWayMethod for Reset {
1165        type Response = ::fidl_next::wire::Result<
1166            'static,
1167            crate::wire::WlanPhyResetResponse,
1168            ::fidl_next::wire::fuchsia::Status,
1169        >;
1170    }
1171
1172    impl<___R> ::fidl_next::Respond<___R> for Reset {
1173        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1174
1175        fn respond(response: ___R) -> Self::Output {
1176            ::core::result::Result::Ok(response)
1177        }
1178    }
1179
1180    impl<___R> ::fidl_next::RespondErr<___R> for Reset {
1181        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1182
1183        fn respond_err(response: ___R) -> Self::Output {
1184            ::core::result::Result::Err(response)
1185        }
1186    }
1187
1188    pub struct GetPowerState;
1189
1190    impl ::fidl_next::Method for GetPowerState {
1191        const ORDINAL: u64 = 5060306441717482177;
1192        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1193            ::fidl_next::protocol::Flexibility::Flexible;
1194
1195        type Protocol = crate::WlanPhy;
1196
1197        type Request = ::fidl_next::wire::EmptyMessageBody;
1198    }
1199
1200    impl ::fidl_next::TwoWayMethod for GetPowerState {
1201        type Response = ::fidl_next::wire::Result<
1202            'static,
1203            crate::wire::WlanPhyGetPowerStateResponse<'static>,
1204            ::fidl_next::wire::fuchsia::Status,
1205        >;
1206    }
1207
1208    impl<___R> ::fidl_next::Respond<___R> for GetPowerState {
1209        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1210
1211        fn respond(response: ___R) -> Self::Output {
1212            ::core::result::Result::Ok(response)
1213        }
1214    }
1215
1216    impl<___R> ::fidl_next::RespondErr<___R> for GetPowerState {
1217        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1218
1219        fn respond_err(response: ___R) -> Self::Output {
1220            ::core::result::Result::Err(response)
1221        }
1222    }
1223
1224    pub struct SetBtCoexistenceMode;
1225
1226    impl ::fidl_next::Method for SetBtCoexistenceMode {
1227        const ORDINAL: u64 = 6541090488596605957;
1228        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1229            ::fidl_next::protocol::Flexibility::Flexible;
1230
1231        type Protocol = crate::WlanPhy;
1232
1233        type Request = crate::wire::WlanPhySetBtCoexistenceModeRequest<'static>;
1234    }
1235
1236    impl ::fidl_next::TwoWayMethod for SetBtCoexistenceMode {
1237        type Response = ::fidl_next::wire::Result<
1238            'static,
1239            crate::wire::WlanPhySetBtCoexistenceModeResponse,
1240            ::fidl_next::wire::fuchsia::Status,
1241        >;
1242    }
1243
1244    impl<___R> ::fidl_next::Respond<___R> for SetBtCoexistenceMode {
1245        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1246
1247        fn respond(response: ___R) -> Self::Output {
1248            ::core::result::Result::Ok(response)
1249        }
1250    }
1251
1252    impl<___R> ::fidl_next::RespondErr<___R> for SetBtCoexistenceMode {
1253        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1254
1255        fn respond_err(response: ___R) -> Self::Output {
1256            ::core::result::Result::Err(response)
1257        }
1258    }
1259
1260    pub struct SetTxPowerScenario;
1261
1262    impl ::fidl_next::Method for SetTxPowerScenario {
1263        const ORDINAL: u64 = 8278971081947748572;
1264        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1265            ::fidl_next::protocol::Flexibility::Flexible;
1266
1267        type Protocol = crate::WlanPhy;
1268
1269        type Request = crate::wire::WlanPhySetTxPowerScenarioRequest<'static>;
1270    }
1271
1272    impl ::fidl_next::TwoWayMethod for SetTxPowerScenario {
1273        type Response = ::fidl_next::wire::Result<
1274            'static,
1275            crate::wire::WlanPhySetTxPowerScenarioResponse,
1276            ::fidl_next::wire::fuchsia::Status,
1277        >;
1278    }
1279
1280    impl<___R> ::fidl_next::Respond<___R> for SetTxPowerScenario {
1281        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1282
1283        fn respond(response: ___R) -> Self::Output {
1284            ::core::result::Result::Ok(response)
1285        }
1286    }
1287
1288    impl<___R> ::fidl_next::RespondErr<___R> for SetTxPowerScenario {
1289        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1290
1291        fn respond_err(response: ___R) -> Self::Output {
1292            ::core::result::Result::Err(response)
1293        }
1294    }
1295
1296    pub struct ResetTxPowerScenario;
1297
1298    impl ::fidl_next::Method for ResetTxPowerScenario {
1299        const ORDINAL: u64 = 8702006880668202770;
1300        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1301            ::fidl_next::protocol::Flexibility::Flexible;
1302
1303        type Protocol = crate::WlanPhy;
1304
1305        type Request = ::fidl_next::wire::EmptyMessageBody;
1306    }
1307
1308    impl ::fidl_next::TwoWayMethod for ResetTxPowerScenario {
1309        type Response = ::fidl_next::wire::Result<
1310            'static,
1311            crate::wire::WlanPhyResetTxPowerScenarioResponse,
1312            ::fidl_next::wire::fuchsia::Status,
1313        >;
1314    }
1315
1316    impl<___R> ::fidl_next::Respond<___R> for ResetTxPowerScenario {
1317        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1318
1319        fn respond(response: ___R) -> Self::Output {
1320            ::core::result::Result::Ok(response)
1321        }
1322    }
1323
1324    impl<___R> ::fidl_next::RespondErr<___R> for ResetTxPowerScenario {
1325        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1326
1327        fn respond_err(response: ___R) -> Self::Output {
1328            ::core::result::Result::Err(response)
1329        }
1330    }
1331
1332    pub struct GetTxPowerScenario;
1333
1334    impl ::fidl_next::Method for GetTxPowerScenario {
1335        const ORDINAL: u64 = 7131856269124254862;
1336        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1337            ::fidl_next::protocol::Flexibility::Flexible;
1338
1339        type Protocol = crate::WlanPhy;
1340
1341        type Request = ::fidl_next::wire::EmptyMessageBody;
1342    }
1343
1344    impl ::fidl_next::TwoWayMethod for GetTxPowerScenario {
1345        type Response = ::fidl_next::wire::Result<
1346            'static,
1347            crate::wire::WlanPhyGetTxPowerScenarioResponse,
1348            ::fidl_next::wire::fuchsia::Status,
1349        >;
1350    }
1351
1352    impl<___R> ::fidl_next::Respond<___R> for GetTxPowerScenario {
1353        type Output = ::core::result::Result<
1354            crate::generic::WlanPhyGetTxPowerScenarioResponse<___R>,
1355            ::fidl_next::never::Never,
1356        >;
1357
1358        fn respond(response: ___R) -> Self::Output {
1359            ::core::result::Result::Ok(crate::generic::WlanPhyGetTxPowerScenarioResponse {
1360                scenario: response,
1361            })
1362        }
1363    }
1364
1365    impl<___R> ::fidl_next::RespondErr<___R> for GetTxPowerScenario {
1366        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1367
1368        fn respond_err(response: ___R) -> Self::Output {
1369            ::core::result::Result::Err(response)
1370        }
1371    }
1372
1373    mod ___detail {
1374        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::WlanPhy
1375        where
1376            ___T: ::fidl_next::Transport,
1377        {
1378            type Client = WlanPhyClient<___T>;
1379            type Server = WlanPhyServer<___T>;
1380        }
1381
1382        /// The client for the `WlanPhy` protocol.
1383        #[repr(transparent)]
1384        pub struct WlanPhyClient<___T: ::fidl_next::Transport> {
1385            #[allow(dead_code)]
1386            client: ::fidl_next::protocol::Client<___T>,
1387        }
1388
1389        impl<___T> WlanPhyClient<___T>
1390        where
1391            ___T: ::fidl_next::Transport,
1392        {
1393            #[doc = " This method can be used by the WlanPhy client to send the client end of the\n WlanPhyNotify endpoint for the WlanPhy server to use. If the WlanPhy client\n never invokes this method that is an indirect implication that the WlanPhyNotify is not\n supported. Some possible error codes are:\n ZX_ERR_NOT_SUPPORTED: The WlanPhy server does not support the WlanPhyNotify protocol.\n"]
1394            pub fn init_with<___R>(
1395                &self,
1396                request: ___R,
1397            ) -> ::fidl_next::TwoWayFuture<'_, super::Init, ___T>
1398            where
1399                ___R: ::fidl_next::Encode<
1400                        crate::wire::WlanPhyInitRequest<'static>,
1401                        <___T as ::fidl_next::Transport>::SendBuffer,
1402                    >,
1403            {
1404                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1405                    4152290172424220659,
1406                    <super::Init as ::fidl_next::Method>::FLEXIBILITY,
1407                    request,
1408                ))
1409            }
1410
1411            #[doc = " MAC roles supported for ifaces on the physical device.\n"]
1412            pub fn get_supported_mac_roles(
1413                &self,
1414            ) -> ::fidl_next::TwoWayFuture<'_, super::GetSupportedMacRoles, ___T> {
1415                ::fidl_next::TwoWayFuture::from_untyped(
1416                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1417                        3929702727467848522,
1418                        <super::GetSupportedMacRoles as ::fidl_next::Method>::FLEXIBILITY,
1419                        (),
1420                    ),
1421                )
1422            }
1423
1424            #[doc = " Create a new interface with the specified role, returning the interface id. \\\n Some common error codes are: \\\n ZX_ERR_NO_RESOURCES: maximum number of interfaces have already been created. \\\n ZX_ERR_NOT_SUPPORTED: device does not support the specified role.\n"]
1425            pub fn create_iface_with<___R>(
1426                &self,
1427                request: ___R,
1428            ) -> ::fidl_next::TwoWayFuture<'_, super::CreateIface, ___T>
1429            where
1430                ___R: ::fidl_next::Encode<
1431                        crate::wire::WlanPhyCreateIfaceRequest<'static>,
1432                        <___T as ::fidl_next::Transport>::SendBuffer,
1433                    >,
1434            {
1435                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1436                    5530435827689044878,
1437                    <super::CreateIface as ::fidl_next::Method>::FLEXIBILITY,
1438                    request,
1439                ))
1440            }
1441
1442            #[doc = " Destroy the interface with the matching id. \\\n Some common error codes are: \\\n ZX_ERR_NOT_FOUND: Specified iface does not exist or has already been removed. \\\n ZX_ERR_SHOULD_WAIT: Device is busy and cannot be removed, try again later.\n"]
1443            pub fn destroy_iface_with<___R>(
1444                &self,
1445                request: ___R,
1446            ) -> ::fidl_next::TwoWayFuture<'_, super::DestroyIface, ___T>
1447            where
1448                ___R: ::fidl_next::Encode<
1449                        crate::wire::WlanPhyDestroyIfaceRequest<'static>,
1450                        <___T as ::fidl_next::Transport>::SendBuffer,
1451                    >,
1452            {
1453                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1454                    1127035624611379388,
1455                    <super::DestroyIface as ::fidl_next::Method>::FLEXIBILITY,
1456                    request,
1457                ))
1458            }
1459
1460            #[doc = " Set country with a 2-byte country code. \\\n Some common error codes are: \\\n ZX_ERR_NOT_FOUND: Specified country code not supported. PHY state is left unchanged.\n"]
1461            pub fn set_country(
1462                &self,
1463
1464                country: impl ::fidl_next::Encode<[u8; 2], <___T as ::fidl_next::Transport>::SendBuffer>,
1465            ) -> ::fidl_next::TwoWayFuture<'_, super::SetCountry, ___T>
1466            where
1467                <___T as ::fidl_next::Transport>::SendBuffer:
1468                    ::fidl_next::encoder::InternalHandleEncoder,
1469            {
1470                self.set_country_with(crate::generic::WlanPhySetCountryRequest { country })
1471            }
1472
1473            #[doc = " Set country with a 2-byte country code. \\\n Some common error codes are: \\\n ZX_ERR_NOT_FOUND: Specified country code not supported. PHY state is left unchanged.\n"]
1474            pub fn set_country_with<___R>(
1475                &self,
1476                request: ___R,
1477            ) -> ::fidl_next::TwoWayFuture<'_, super::SetCountry, ___T>
1478            where
1479                ___R: ::fidl_next::Encode<
1480                        crate::wire::WlanPhySetCountryRequest,
1481                        <___T as ::fidl_next::Transport>::SendBuffer,
1482                    >,
1483            {
1484                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1485                    7859442075277675023,
1486                    <super::SetCountry as ::fidl_next::Method>::FLEXIBILITY,
1487                    request,
1488                ))
1489            }
1490
1491            #[doc = " Set device to a world-safe country, i.e. a mode that conforms to all\n regulatory constraints globally. \\\n Generally expected to succeed if the device is in a functional state.\n"]
1492            pub fn clear_country(
1493                &self,
1494            ) -> ::fidl_next::TwoWayFuture<'_, super::ClearCountry, ___T> {
1495                ::fidl_next::TwoWayFuture::from_untyped(
1496                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1497                        8355078711339303759,
1498                        <super::ClearCountry as ::fidl_next::Method>::FLEXIBILITY,
1499                        (),
1500                    ),
1501                )
1502            }
1503
1504            #[doc = " Read currently configured country. Implementations are advised to read the\n country directly from the firmware, where possible. \\\n Generally expected to succeed if the device is in a functional state.\n"]
1505            pub fn get_country(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetCountry, ___T> {
1506                ::fidl_next::TwoWayFuture::from_untyped(
1507                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1508                        1436134059072311418,
1509                        <super::GetCountry as ::fidl_next::Method>::FLEXIBILITY,
1510                        (),
1511                    ),
1512                )
1513            }
1514
1515            #[doc = " Set Power Save mode on device. In most implementations this\n likely to be set in Firmware. \\\n Some common error codes are: \\\n ZX_ERR_NOT_SUPPORTED: Specified Power Save mode not supported.\n"]
1516            pub fn set_power_save_mode_with<___R>(
1517                &self,
1518                request: ___R,
1519            ) -> ::fidl_next::TwoWayFuture<'_, super::SetPowerSaveMode, ___T>
1520            where
1521                ___R: ::fidl_next::Encode<
1522                        crate::wire::WlanPhySetPowerSaveModeRequest<'static>,
1523                        <___T as ::fidl_next::Transport>::SendBuffer,
1524                    >,
1525            {
1526                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1527                    5626768781239879949,
1528                    <super::SetPowerSaveMode as ::fidl_next::Method>::FLEXIBILITY,
1529                    request,
1530                ))
1531            }
1532
1533            #[doc = " Get current Power Save mode from device. In most implementation this\n likely to be retrieved from Firmware.\n"]
1534            pub fn get_power_save_mode(
1535                &self,
1536            ) -> ::fidl_next::TwoWayFuture<'_, super::GetPowerSaveMode, ___T> {
1537                ::fidl_next::TwoWayFuture::from_untyped(
1538                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1539                        2070868099982362662,
1540                        <super::GetPowerSaveMode as ::fidl_next::Method>::FLEXIBILITY,
1541                        (),
1542                    ),
1543                )
1544            }
1545
1546            #[doc = " If supported, Reset functionality implements PowerDown then PowerUp in an attempt to\n recover from an error state. For example, if an interface gets into a bad state or if\n firmware crashes, the firmware/chip may be unable to perform some actions and Reset\n may be able to clear the bad state.\n Possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: the feature is not supported by the driver.\n ZX_ERR_BAD_STATE: the wlan chip is already powered down.\n"]
1547            pub fn reset(&self) -> ::fidl_next::TwoWayFuture<'_, super::Reset, ___T> {
1548                ::fidl_next::TwoWayFuture::from_untyped(
1549                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1550                        3390961545241598095,
1551                        <super::Reset as ::fidl_next::Method>::FLEXIBILITY,
1552                        (),
1553                    ),
1554                )
1555            }
1556
1557            #[doc = " Returns the current power state of the wlan chip. After successful initialization\n of the wlan driver, the state is set to true (power on) by default. power_on set to\n true indicates that the wlan chip is powered on and false indicates the wlan chip\n is powered off.\n"]
1558            pub fn get_power_state(
1559                &self,
1560            ) -> ::fidl_next::TwoWayFuture<'_, super::GetPowerState, ___T> {
1561                ::fidl_next::TwoWayFuture::from_untyped(
1562                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1563                        5060306441717482177,
1564                        <super::GetPowerState as ::fidl_next::Method>::FLEXIBILITY,
1565                        (),
1566                    ),
1567                )
1568            }
1569
1570            #[doc = " Set the Bluetooth coexistence mode.\n Possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: device does not support the specified BT coexistence mode.\n"]
1571            pub fn set_bt_coexistence_mode_with<___R>(
1572                &self,
1573                request: ___R,
1574            ) -> ::fidl_next::TwoWayFuture<'_, super::SetBtCoexistenceMode, ___T>
1575            where
1576                ___R: ::fidl_next::Encode<
1577                        crate::wire::WlanPhySetBtCoexistenceModeRequest<'static>,
1578                        <___T as ::fidl_next::Transport>::SendBuffer,
1579                    >,
1580            {
1581                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1582                    6541090488596605957,
1583                    <super::SetBtCoexistenceMode as ::fidl_next::Method>::FLEXIBILITY,
1584                    request,
1585                ))
1586            }
1587
1588            pub fn set_tx_power_scenario_with<___R>(
1589                &self,
1590                request: ___R,
1591            ) -> ::fidl_next::TwoWayFuture<'_, super::SetTxPowerScenario, ___T>
1592            where
1593                ___R: ::fidl_next::Encode<
1594                        crate::wire::WlanPhySetTxPowerScenarioRequest<'static>,
1595                        <___T as ::fidl_next::Transport>::SendBuffer,
1596                    >,
1597            {
1598                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1599                    8278971081947748572,
1600                    <super::SetTxPowerScenario as ::fidl_next::Method>::FLEXIBILITY,
1601                    request,
1602                ))
1603            }
1604
1605            pub fn reset_tx_power_scenario(
1606                &self,
1607            ) -> ::fidl_next::TwoWayFuture<'_, super::ResetTxPowerScenario, ___T> {
1608                ::fidl_next::TwoWayFuture::from_untyped(
1609                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1610                        8702006880668202770,
1611                        <super::ResetTxPowerScenario as ::fidl_next::Method>::FLEXIBILITY,
1612                        (),
1613                    ),
1614                )
1615            }
1616
1617            pub fn get_tx_power_scenario(
1618                &self,
1619            ) -> ::fidl_next::TwoWayFuture<'_, super::GetTxPowerScenario, ___T> {
1620                ::fidl_next::TwoWayFuture::from_untyped(
1621                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1622                        7131856269124254862,
1623                        <super::GetTxPowerScenario as ::fidl_next::Method>::FLEXIBILITY,
1624                        (),
1625                    ),
1626                )
1627            }
1628        }
1629
1630        /// The server for the `WlanPhy` protocol.
1631        #[repr(transparent)]
1632        pub struct WlanPhyServer<___T: ::fidl_next::Transport> {
1633            server: ::fidl_next::protocol::Server<___T>,
1634        }
1635
1636        impl<___T> WlanPhyServer<___T> where ___T: ::fidl_next::Transport {}
1637    }
1638}
1639
1640#[diagnostic::on_unimplemented(
1641    note = "If {Self} implements the non-local WlanPhyClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
1642)]
1643
1644/// A client handler for the WlanPhy protocol.
1645///
1646/// See [`WlanPhy`] for more details.
1647pub trait WlanPhyLocalClientHandler<
1648    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1649    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1650>
1651{
1652    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1653        ::core::future::ready(())
1654    }
1655}
1656
1657impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for WlanPhy
1658where
1659    ___H: WlanPhyLocalClientHandler<___T>,
1660    ___T: ::fidl_next::Transport,
1661{
1662    async fn on_event(
1663        handler: &mut ___H,
1664        mut message: ::fidl_next::Message<___T>,
1665    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1666        match *message.header().ordinal {
1667            ordinal => {
1668                handler.on_unknown_interaction(ordinal).await;
1669                if ::core::matches!(
1670                    message.header().flexibility(),
1671                    ::fidl_next::protocol::Flexibility::Strict
1672                ) {
1673                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1674                } else {
1675                    Ok(())
1676                }
1677            }
1678        }
1679    }
1680}
1681
1682#[diagnostic::on_unimplemented(
1683    note = "If {Self} implements the non-local WlanPhyServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
1684)]
1685
1686/// A server handler for the WlanPhy protocol.
1687///
1688/// See [`WlanPhy`] for more details.
1689pub trait WlanPhyLocalServerHandler<
1690    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1691    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1692>
1693{
1694    #[doc = " This method can be used by the WlanPhy client to send the client end of the\n WlanPhyNotify endpoint for the WlanPhy server to use. If the WlanPhy client\n never invokes this method that is an indirect implication that the WlanPhyNotify is not\n supported. Some possible error codes are:\n ZX_ERR_NOT_SUPPORTED: The WlanPhy server does not support the WlanPhyNotify protocol.\n"]
1695    fn init(
1696        &mut self,
1697
1698        request: ::fidl_next::Request<wlan_phy::Init, ___T>,
1699
1700        responder: ::fidl_next::Responder<wlan_phy::Init, ___T>,
1701    ) -> impl ::core::future::Future<Output = ()>;
1702
1703    #[doc = " MAC roles supported for ifaces on the physical device.\n"]
1704    fn get_supported_mac_roles(
1705        &mut self,
1706
1707        responder: ::fidl_next::Responder<wlan_phy::GetSupportedMacRoles, ___T>,
1708    ) -> impl ::core::future::Future<Output = ()>;
1709
1710    #[doc = " Create a new interface with the specified role, returning the interface id. \\\n Some common error codes are: \\\n ZX_ERR_NO_RESOURCES: maximum number of interfaces have already been created. \\\n ZX_ERR_NOT_SUPPORTED: device does not support the specified role.\n"]
1711    fn create_iface(
1712        &mut self,
1713
1714        request: ::fidl_next::Request<wlan_phy::CreateIface, ___T>,
1715
1716        responder: ::fidl_next::Responder<wlan_phy::CreateIface, ___T>,
1717    ) -> impl ::core::future::Future<Output = ()>;
1718
1719    #[doc = " Destroy the interface with the matching id. \\\n Some common error codes are: \\\n ZX_ERR_NOT_FOUND: Specified iface does not exist or has already been removed. \\\n ZX_ERR_SHOULD_WAIT: Device is busy and cannot be removed, try again later.\n"]
1720    fn destroy_iface(
1721        &mut self,
1722
1723        request: ::fidl_next::Request<wlan_phy::DestroyIface, ___T>,
1724
1725        responder: ::fidl_next::Responder<wlan_phy::DestroyIface, ___T>,
1726    ) -> impl ::core::future::Future<Output = ()>;
1727
1728    #[doc = " Set country with a 2-byte country code. \\\n Some common error codes are: \\\n ZX_ERR_NOT_FOUND: Specified country code not supported. PHY state is left unchanged.\n"]
1729    fn set_country(
1730        &mut self,
1731
1732        request: ::fidl_next::Request<wlan_phy::SetCountry, ___T>,
1733
1734        responder: ::fidl_next::Responder<wlan_phy::SetCountry, ___T>,
1735    ) -> impl ::core::future::Future<Output = ()>;
1736
1737    #[doc = " Set device to a world-safe country, i.e. a mode that conforms to all\n regulatory constraints globally. \\\n Generally expected to succeed if the device is in a functional state.\n"]
1738    fn clear_country(
1739        &mut self,
1740
1741        responder: ::fidl_next::Responder<wlan_phy::ClearCountry, ___T>,
1742    ) -> impl ::core::future::Future<Output = ()>;
1743
1744    #[doc = " Read currently configured country. Implementations are advised to read the\n country directly from the firmware, where possible. \\\n Generally expected to succeed if the device is in a functional state.\n"]
1745    fn get_country(
1746        &mut self,
1747
1748        responder: ::fidl_next::Responder<wlan_phy::GetCountry, ___T>,
1749    ) -> impl ::core::future::Future<Output = ()>;
1750
1751    #[doc = " Set Power Save mode on device. In most implementations this\n likely to be set in Firmware. \\\n Some common error codes are: \\\n ZX_ERR_NOT_SUPPORTED: Specified Power Save mode not supported.\n"]
1752    fn set_power_save_mode(
1753        &mut self,
1754
1755        request: ::fidl_next::Request<wlan_phy::SetPowerSaveMode, ___T>,
1756
1757        responder: ::fidl_next::Responder<wlan_phy::SetPowerSaveMode, ___T>,
1758    ) -> impl ::core::future::Future<Output = ()>;
1759
1760    #[doc = " Get current Power Save mode from device. In most implementation this\n likely to be retrieved from Firmware.\n"]
1761    fn get_power_save_mode(
1762        &mut self,
1763
1764        responder: ::fidl_next::Responder<wlan_phy::GetPowerSaveMode, ___T>,
1765    ) -> impl ::core::future::Future<Output = ()>;
1766
1767    #[doc = " If supported, Reset functionality implements PowerDown then PowerUp in an attempt to\n recover from an error state. For example, if an interface gets into a bad state or if\n firmware crashes, the firmware/chip may be unable to perform some actions and Reset\n may be able to clear the bad state.\n Possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: the feature is not supported by the driver.\n ZX_ERR_BAD_STATE: the wlan chip is already powered down.\n"]
1768    fn reset(
1769        &mut self,
1770
1771        responder: ::fidl_next::Responder<wlan_phy::Reset, ___T>,
1772    ) -> impl ::core::future::Future<Output = ()>;
1773
1774    #[doc = " Returns the current power state of the wlan chip. After successful initialization\n of the wlan driver, the state is set to true (power on) by default. power_on set to\n true indicates that the wlan chip is powered on and false indicates the wlan chip\n is powered off.\n"]
1775    fn get_power_state(
1776        &mut self,
1777
1778        responder: ::fidl_next::Responder<wlan_phy::GetPowerState, ___T>,
1779    ) -> impl ::core::future::Future<Output = ()>;
1780
1781    #[doc = " Set the Bluetooth coexistence mode.\n Possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: device does not support the specified BT coexistence mode.\n"]
1782    fn set_bt_coexistence_mode(
1783        &mut self,
1784
1785        request: ::fidl_next::Request<wlan_phy::SetBtCoexistenceMode, ___T>,
1786
1787        responder: ::fidl_next::Responder<wlan_phy::SetBtCoexistenceMode, ___T>,
1788    ) -> impl ::core::future::Future<Output = ()>;
1789
1790    fn set_tx_power_scenario(
1791        &mut self,
1792
1793        request: ::fidl_next::Request<wlan_phy::SetTxPowerScenario, ___T>,
1794
1795        responder: ::fidl_next::Responder<wlan_phy::SetTxPowerScenario, ___T>,
1796    ) -> impl ::core::future::Future<Output = ()>;
1797
1798    fn reset_tx_power_scenario(
1799        &mut self,
1800
1801        responder: ::fidl_next::Responder<wlan_phy::ResetTxPowerScenario, ___T>,
1802    ) -> impl ::core::future::Future<Output = ()>;
1803
1804    fn get_tx_power_scenario(
1805        &mut self,
1806
1807        responder: ::fidl_next::Responder<wlan_phy::GetTxPowerScenario, ___T>,
1808    ) -> impl ::core::future::Future<Output = ()>;
1809
1810    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1811        ::core::future::ready(())
1812    }
1813}
1814
1815impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for WlanPhy
1816where
1817    ___H: WlanPhyLocalServerHandler<___T>,
1818    ___T: ::fidl_next::Transport,
1819    for<'de> crate::wire::WlanPhyInitRequest<'de>: ::fidl_next::Decode<
1820            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1821            Constraint = (),
1822        >,
1823    for<'de> crate::wire::WlanPhyCreateIfaceRequest<'de>: ::fidl_next::Decode<
1824            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1825            Constraint = (),
1826        >,
1827    for<'de> crate::wire::WlanPhyDestroyIfaceRequest<'de>: ::fidl_next::Decode<
1828            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1829            Constraint = (),
1830        >,
1831    for<'de> crate::wire::WlanPhySetCountryRequest: ::fidl_next::Decode<
1832            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1833            Constraint = (),
1834        >,
1835    for<'de> crate::wire::WlanPhySetPowerSaveModeRequest<'de>: ::fidl_next::Decode<
1836            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1837            Constraint = (),
1838        >,
1839    for<'de> crate::wire::WlanPhySetBtCoexistenceModeRequest<'de>: ::fidl_next::Decode<
1840            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1841            Constraint = (),
1842        >,
1843    for<'de> crate::wire::WlanPhySetTxPowerScenarioRequest<'de>: ::fidl_next::Decode<
1844            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1845            Constraint = (),
1846        >,
1847{
1848    async fn on_one_way(
1849        handler: &mut ___H,
1850        mut message: ::fidl_next::Message<___T>,
1851    ) -> ::core::result::Result<
1852        (),
1853        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1854    > {
1855        match *message.header().ordinal {
1856            ordinal => {
1857                handler.on_unknown_interaction(ordinal).await;
1858                if ::core::matches!(
1859                    message.header().flexibility(),
1860                    ::fidl_next::protocol::Flexibility::Strict
1861                ) {
1862                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1863                } else {
1864                    Ok(())
1865                }
1866            }
1867        }
1868    }
1869
1870    async fn on_two_way(
1871        handler: &mut ___H,
1872        mut message: ::fidl_next::Message<___T>,
1873        responder: ::fidl_next::protocol::Responder<___T>,
1874    ) -> ::core::result::Result<
1875        (),
1876        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1877    > {
1878        match *message.header().ordinal {
1879            4152290172424220659 => {
1880                let responder = ::fidl_next::Responder::from_untyped(responder);
1881
1882                match ::fidl_next::AsDecoderExt::into_decoded(message) {
1883                    Ok(decoded) => {
1884                        handler.init(::fidl_next::Request::from_decoded(decoded), responder).await;
1885                        Ok(())
1886                    }
1887                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1888                        ordinal: 4152290172424220659,
1889                        error,
1890                    }),
1891                }
1892            }
1893
1894            3929702727467848522 => {
1895                let responder = ::fidl_next::Responder::from_untyped(responder);
1896
1897                handler.get_supported_mac_roles(responder).await;
1898                Ok(())
1899            }
1900
1901            5530435827689044878 => {
1902                let responder = ::fidl_next::Responder::from_untyped(responder);
1903
1904                match ::fidl_next::AsDecoderExt::into_decoded(message) {
1905                    Ok(decoded) => {
1906                        handler
1907                            .create_iface(::fidl_next::Request::from_decoded(decoded), responder)
1908                            .await;
1909                        Ok(())
1910                    }
1911                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1912                        ordinal: 5530435827689044878,
1913                        error,
1914                    }),
1915                }
1916            }
1917
1918            1127035624611379388 => {
1919                let responder = ::fidl_next::Responder::from_untyped(responder);
1920
1921                match ::fidl_next::AsDecoderExt::into_decoded(message) {
1922                    Ok(decoded) => {
1923                        handler
1924                            .destroy_iface(::fidl_next::Request::from_decoded(decoded), responder)
1925                            .await;
1926                        Ok(())
1927                    }
1928                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1929                        ordinal: 1127035624611379388,
1930                        error,
1931                    }),
1932                }
1933            }
1934
1935            7859442075277675023 => {
1936                let responder = ::fidl_next::Responder::from_untyped(responder);
1937
1938                match ::fidl_next::AsDecoderExt::into_decoded(message) {
1939                    Ok(decoded) => {
1940                        handler
1941                            .set_country(::fidl_next::Request::from_decoded(decoded), responder)
1942                            .await;
1943                        Ok(())
1944                    }
1945                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1946                        ordinal: 7859442075277675023,
1947                        error,
1948                    }),
1949                }
1950            }
1951
1952            8355078711339303759 => {
1953                let responder = ::fidl_next::Responder::from_untyped(responder);
1954
1955                handler.clear_country(responder).await;
1956                Ok(())
1957            }
1958
1959            1436134059072311418 => {
1960                let responder = ::fidl_next::Responder::from_untyped(responder);
1961
1962                handler.get_country(responder).await;
1963                Ok(())
1964            }
1965
1966            5626768781239879949 => {
1967                let responder = ::fidl_next::Responder::from_untyped(responder);
1968
1969                match ::fidl_next::AsDecoderExt::into_decoded(message) {
1970                    Ok(decoded) => {
1971                        handler
1972                            .set_power_save_mode(
1973                                ::fidl_next::Request::from_decoded(decoded),
1974                                responder,
1975                            )
1976                            .await;
1977                        Ok(())
1978                    }
1979                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1980                        ordinal: 5626768781239879949,
1981                        error,
1982                    }),
1983                }
1984            }
1985
1986            2070868099982362662 => {
1987                let responder = ::fidl_next::Responder::from_untyped(responder);
1988
1989                handler.get_power_save_mode(responder).await;
1990                Ok(())
1991            }
1992
1993            3390961545241598095 => {
1994                let responder = ::fidl_next::Responder::from_untyped(responder);
1995
1996                handler.reset(responder).await;
1997                Ok(())
1998            }
1999
2000            5060306441717482177 => {
2001                let responder = ::fidl_next::Responder::from_untyped(responder);
2002
2003                handler.get_power_state(responder).await;
2004                Ok(())
2005            }
2006
2007            6541090488596605957 => {
2008                let responder = ::fidl_next::Responder::from_untyped(responder);
2009
2010                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2011                    Ok(decoded) => {
2012                        handler
2013                            .set_bt_coexistence_mode(
2014                                ::fidl_next::Request::from_decoded(decoded),
2015                                responder,
2016                            )
2017                            .await;
2018                        Ok(())
2019                    }
2020                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2021                        ordinal: 6541090488596605957,
2022                        error,
2023                    }),
2024                }
2025            }
2026
2027            8278971081947748572 => {
2028                let responder = ::fidl_next::Responder::from_untyped(responder);
2029
2030                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2031                    Ok(decoded) => {
2032                        handler
2033                            .set_tx_power_scenario(
2034                                ::fidl_next::Request::from_decoded(decoded),
2035                                responder,
2036                            )
2037                            .await;
2038                        Ok(())
2039                    }
2040                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2041                        ordinal: 8278971081947748572,
2042                        error,
2043                    }),
2044                }
2045            }
2046
2047            8702006880668202770 => {
2048                let responder = ::fidl_next::Responder::from_untyped(responder);
2049
2050                handler.reset_tx_power_scenario(responder).await;
2051                Ok(())
2052            }
2053
2054            7131856269124254862 => {
2055                let responder = ::fidl_next::Responder::from_untyped(responder);
2056
2057                handler.get_tx_power_scenario(responder).await;
2058                Ok(())
2059            }
2060
2061            ordinal => {
2062                handler.on_unknown_interaction(ordinal).await;
2063                if ::core::matches!(
2064                    message.header().flexibility(),
2065                    ::fidl_next::protocol::Flexibility::Strict
2066                ) {
2067                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2068                } else {
2069                    responder
2070                        .respond_framework_error(
2071                            ordinal,
2072                            ::fidl_next::FrameworkError::UnknownMethod,
2073                        )
2074                        .expect("encoding a framework error should never fail")
2075                        .await?;
2076                    Ok(())
2077                }
2078            }
2079        }
2080    }
2081}
2082
2083/// A client handler for the WlanPhy protocol.
2084///
2085/// See [`WlanPhy`] for more details.
2086pub trait WlanPhyClientHandler<
2087    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2088    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2089>
2090{
2091    fn on_unknown_interaction(
2092        &mut self,
2093        ordinal: u64,
2094    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2095        ::core::future::ready(())
2096    }
2097}
2098
2099impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for WlanPhy
2100where
2101    ___H: WlanPhyClientHandler<___T> + ::core::marker::Send,
2102    ___T: ::fidl_next::Transport,
2103{
2104    async fn on_event(
2105        handler: &mut ___H,
2106        mut message: ::fidl_next::Message<___T>,
2107    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2108        match *message.header().ordinal {
2109            ordinal => {
2110                handler.on_unknown_interaction(ordinal).await;
2111                if ::core::matches!(
2112                    message.header().flexibility(),
2113                    ::fidl_next::protocol::Flexibility::Strict
2114                ) {
2115                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2116                } else {
2117                    Ok(())
2118                }
2119            }
2120        }
2121    }
2122}
2123
2124/// A server handler for the WlanPhy protocol.
2125///
2126/// See [`WlanPhy`] for more details.
2127pub trait WlanPhyServerHandler<
2128    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2129    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2130>
2131{
2132    #[doc = " This method can be used by the WlanPhy client to send the client end of the\n WlanPhyNotify endpoint for the WlanPhy server to use. If the WlanPhy client\n never invokes this method that is an indirect implication that the WlanPhyNotify is not\n supported. Some possible error codes are:\n ZX_ERR_NOT_SUPPORTED: The WlanPhy server does not support the WlanPhyNotify protocol.\n"]
2133    fn init(
2134        &mut self,
2135
2136        request: ::fidl_next::Request<wlan_phy::Init, ___T>,
2137
2138        responder: ::fidl_next::Responder<wlan_phy::Init, ___T>,
2139    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2140
2141    #[doc = " MAC roles supported for ifaces on the physical device.\n"]
2142    fn get_supported_mac_roles(
2143        &mut self,
2144
2145        responder: ::fidl_next::Responder<wlan_phy::GetSupportedMacRoles, ___T>,
2146    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2147
2148    #[doc = " Create a new interface with the specified role, returning the interface id. \\\n Some common error codes are: \\\n ZX_ERR_NO_RESOURCES: maximum number of interfaces have already been created. \\\n ZX_ERR_NOT_SUPPORTED: device does not support the specified role.\n"]
2149    fn create_iface(
2150        &mut self,
2151
2152        request: ::fidl_next::Request<wlan_phy::CreateIface, ___T>,
2153
2154        responder: ::fidl_next::Responder<wlan_phy::CreateIface, ___T>,
2155    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2156
2157    #[doc = " Destroy the interface with the matching id. \\\n Some common error codes are: \\\n ZX_ERR_NOT_FOUND: Specified iface does not exist or has already been removed. \\\n ZX_ERR_SHOULD_WAIT: Device is busy and cannot be removed, try again later.\n"]
2158    fn destroy_iface(
2159        &mut self,
2160
2161        request: ::fidl_next::Request<wlan_phy::DestroyIface, ___T>,
2162
2163        responder: ::fidl_next::Responder<wlan_phy::DestroyIface, ___T>,
2164    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2165
2166    #[doc = " Set country with a 2-byte country code. \\\n Some common error codes are: \\\n ZX_ERR_NOT_FOUND: Specified country code not supported. PHY state is left unchanged.\n"]
2167    fn set_country(
2168        &mut self,
2169
2170        request: ::fidl_next::Request<wlan_phy::SetCountry, ___T>,
2171
2172        responder: ::fidl_next::Responder<wlan_phy::SetCountry, ___T>,
2173    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2174
2175    #[doc = " Set device to a world-safe country, i.e. a mode that conforms to all\n regulatory constraints globally. \\\n Generally expected to succeed if the device is in a functional state.\n"]
2176    fn clear_country(
2177        &mut self,
2178
2179        responder: ::fidl_next::Responder<wlan_phy::ClearCountry, ___T>,
2180    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2181
2182    #[doc = " Read currently configured country. Implementations are advised to read the\n country directly from the firmware, where possible. \\\n Generally expected to succeed if the device is in a functional state.\n"]
2183    fn get_country(
2184        &mut self,
2185
2186        responder: ::fidl_next::Responder<wlan_phy::GetCountry, ___T>,
2187    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2188
2189    #[doc = " Set Power Save mode on device. In most implementations this\n likely to be set in Firmware. \\\n Some common error codes are: \\\n ZX_ERR_NOT_SUPPORTED: Specified Power Save mode not supported.\n"]
2190    fn set_power_save_mode(
2191        &mut self,
2192
2193        request: ::fidl_next::Request<wlan_phy::SetPowerSaveMode, ___T>,
2194
2195        responder: ::fidl_next::Responder<wlan_phy::SetPowerSaveMode, ___T>,
2196    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2197
2198    #[doc = " Get current Power Save mode from device. In most implementation this\n likely to be retrieved from Firmware.\n"]
2199    fn get_power_save_mode(
2200        &mut self,
2201
2202        responder: ::fidl_next::Responder<wlan_phy::GetPowerSaveMode, ___T>,
2203    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2204
2205    #[doc = " If supported, Reset functionality implements PowerDown then PowerUp in an attempt to\n recover from an error state. For example, if an interface gets into a bad state or if\n firmware crashes, the firmware/chip may be unable to perform some actions and Reset\n may be able to clear the bad state.\n Possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: the feature is not supported by the driver.\n ZX_ERR_BAD_STATE: the wlan chip is already powered down.\n"]
2206    fn reset(
2207        &mut self,
2208
2209        responder: ::fidl_next::Responder<wlan_phy::Reset, ___T>,
2210    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2211
2212    #[doc = " Returns the current power state of the wlan chip. After successful initialization\n of the wlan driver, the state is set to true (power on) by default. power_on set to\n true indicates that the wlan chip is powered on and false indicates the wlan chip\n is powered off.\n"]
2213    fn get_power_state(
2214        &mut self,
2215
2216        responder: ::fidl_next::Responder<wlan_phy::GetPowerState, ___T>,
2217    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2218
2219    #[doc = " Set the Bluetooth coexistence mode.\n Possible error codes are: \\\n ZX_ERR_NOT_SUPPORTED: device does not support the specified BT coexistence mode.\n"]
2220    fn set_bt_coexistence_mode(
2221        &mut self,
2222
2223        request: ::fidl_next::Request<wlan_phy::SetBtCoexistenceMode, ___T>,
2224
2225        responder: ::fidl_next::Responder<wlan_phy::SetBtCoexistenceMode, ___T>,
2226    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2227
2228    fn set_tx_power_scenario(
2229        &mut self,
2230
2231        request: ::fidl_next::Request<wlan_phy::SetTxPowerScenario, ___T>,
2232
2233        responder: ::fidl_next::Responder<wlan_phy::SetTxPowerScenario, ___T>,
2234    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2235
2236    fn reset_tx_power_scenario(
2237        &mut self,
2238
2239        responder: ::fidl_next::Responder<wlan_phy::ResetTxPowerScenario, ___T>,
2240    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2241
2242    fn get_tx_power_scenario(
2243        &mut self,
2244
2245        responder: ::fidl_next::Responder<wlan_phy::GetTxPowerScenario, ___T>,
2246    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2247
2248    fn on_unknown_interaction(
2249        &mut self,
2250        ordinal: u64,
2251    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2252        ::core::future::ready(())
2253    }
2254}
2255
2256impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for WlanPhy
2257where
2258    ___H: WlanPhyServerHandler<___T> + ::core::marker::Send,
2259    ___T: ::fidl_next::Transport,
2260    for<'de> crate::wire::WlanPhyInitRequest<'de>: ::fidl_next::Decode<
2261            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2262            Constraint = (),
2263        >,
2264    for<'de> crate::wire::WlanPhyCreateIfaceRequest<'de>: ::fidl_next::Decode<
2265            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2266            Constraint = (),
2267        >,
2268    for<'de> crate::wire::WlanPhyDestroyIfaceRequest<'de>: ::fidl_next::Decode<
2269            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2270            Constraint = (),
2271        >,
2272    for<'de> crate::wire::WlanPhySetCountryRequest: ::fidl_next::Decode<
2273            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2274            Constraint = (),
2275        >,
2276    for<'de> crate::wire::WlanPhySetPowerSaveModeRequest<'de>: ::fidl_next::Decode<
2277            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2278            Constraint = (),
2279        >,
2280    for<'de> crate::wire::WlanPhySetBtCoexistenceModeRequest<'de>: ::fidl_next::Decode<
2281            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2282            Constraint = (),
2283        >,
2284    for<'de> crate::wire::WlanPhySetTxPowerScenarioRequest<'de>: ::fidl_next::Decode<
2285            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2286            Constraint = (),
2287        >,
2288{
2289    async fn on_one_way(
2290        handler: &mut ___H,
2291        mut message: ::fidl_next::Message<___T>,
2292    ) -> ::core::result::Result<
2293        (),
2294        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2295    > {
2296        match *message.header().ordinal {
2297            ordinal => {
2298                handler.on_unknown_interaction(ordinal).await;
2299                if ::core::matches!(
2300                    message.header().flexibility(),
2301                    ::fidl_next::protocol::Flexibility::Strict
2302                ) {
2303                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2304                } else {
2305                    Ok(())
2306                }
2307            }
2308        }
2309    }
2310
2311    async fn on_two_way(
2312        handler: &mut ___H,
2313        mut message: ::fidl_next::Message<___T>,
2314        responder: ::fidl_next::protocol::Responder<___T>,
2315    ) -> ::core::result::Result<
2316        (),
2317        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2318    > {
2319        match *message.header().ordinal {
2320            4152290172424220659 => {
2321                let responder = ::fidl_next::Responder::from_untyped(responder);
2322
2323                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2324                    Ok(decoded) => {
2325                        handler.init(::fidl_next::Request::from_decoded(decoded), responder).await;
2326                        Ok(())
2327                    }
2328                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2329                        ordinal: 4152290172424220659,
2330                        error,
2331                    }),
2332                }
2333            }
2334
2335            3929702727467848522 => {
2336                let responder = ::fidl_next::Responder::from_untyped(responder);
2337
2338                handler.get_supported_mac_roles(responder).await;
2339                Ok(())
2340            }
2341
2342            5530435827689044878 => {
2343                let responder = ::fidl_next::Responder::from_untyped(responder);
2344
2345                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2346                    Ok(decoded) => {
2347                        handler
2348                            .create_iface(::fidl_next::Request::from_decoded(decoded), responder)
2349                            .await;
2350                        Ok(())
2351                    }
2352                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2353                        ordinal: 5530435827689044878,
2354                        error,
2355                    }),
2356                }
2357            }
2358
2359            1127035624611379388 => {
2360                let responder = ::fidl_next::Responder::from_untyped(responder);
2361
2362                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2363                    Ok(decoded) => {
2364                        handler
2365                            .destroy_iface(::fidl_next::Request::from_decoded(decoded), responder)
2366                            .await;
2367                        Ok(())
2368                    }
2369                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2370                        ordinal: 1127035624611379388,
2371                        error,
2372                    }),
2373                }
2374            }
2375
2376            7859442075277675023 => {
2377                let responder = ::fidl_next::Responder::from_untyped(responder);
2378
2379                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2380                    Ok(decoded) => {
2381                        handler
2382                            .set_country(::fidl_next::Request::from_decoded(decoded), responder)
2383                            .await;
2384                        Ok(())
2385                    }
2386                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2387                        ordinal: 7859442075277675023,
2388                        error,
2389                    }),
2390                }
2391            }
2392
2393            8355078711339303759 => {
2394                let responder = ::fidl_next::Responder::from_untyped(responder);
2395
2396                handler.clear_country(responder).await;
2397                Ok(())
2398            }
2399
2400            1436134059072311418 => {
2401                let responder = ::fidl_next::Responder::from_untyped(responder);
2402
2403                handler.get_country(responder).await;
2404                Ok(())
2405            }
2406
2407            5626768781239879949 => {
2408                let responder = ::fidl_next::Responder::from_untyped(responder);
2409
2410                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2411                    Ok(decoded) => {
2412                        handler
2413                            .set_power_save_mode(
2414                                ::fidl_next::Request::from_decoded(decoded),
2415                                responder,
2416                            )
2417                            .await;
2418                        Ok(())
2419                    }
2420                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2421                        ordinal: 5626768781239879949,
2422                        error,
2423                    }),
2424                }
2425            }
2426
2427            2070868099982362662 => {
2428                let responder = ::fidl_next::Responder::from_untyped(responder);
2429
2430                handler.get_power_save_mode(responder).await;
2431                Ok(())
2432            }
2433
2434            3390961545241598095 => {
2435                let responder = ::fidl_next::Responder::from_untyped(responder);
2436
2437                handler.reset(responder).await;
2438                Ok(())
2439            }
2440
2441            5060306441717482177 => {
2442                let responder = ::fidl_next::Responder::from_untyped(responder);
2443
2444                handler.get_power_state(responder).await;
2445                Ok(())
2446            }
2447
2448            6541090488596605957 => {
2449                let responder = ::fidl_next::Responder::from_untyped(responder);
2450
2451                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2452                    Ok(decoded) => {
2453                        handler
2454                            .set_bt_coexistence_mode(
2455                                ::fidl_next::Request::from_decoded(decoded),
2456                                responder,
2457                            )
2458                            .await;
2459                        Ok(())
2460                    }
2461                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2462                        ordinal: 6541090488596605957,
2463                        error,
2464                    }),
2465                }
2466            }
2467
2468            8278971081947748572 => {
2469                let responder = ::fidl_next::Responder::from_untyped(responder);
2470
2471                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2472                    Ok(decoded) => {
2473                        handler
2474                            .set_tx_power_scenario(
2475                                ::fidl_next::Request::from_decoded(decoded),
2476                                responder,
2477                            )
2478                            .await;
2479                        Ok(())
2480                    }
2481                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2482                        ordinal: 8278971081947748572,
2483                        error,
2484                    }),
2485                }
2486            }
2487
2488            8702006880668202770 => {
2489                let responder = ::fidl_next::Responder::from_untyped(responder);
2490
2491                handler.reset_tx_power_scenario(responder).await;
2492                Ok(())
2493            }
2494
2495            7131856269124254862 => {
2496                let responder = ::fidl_next::Responder::from_untyped(responder);
2497
2498                handler.get_tx_power_scenario(responder).await;
2499                Ok(())
2500            }
2501
2502            ordinal => {
2503                handler.on_unknown_interaction(ordinal).await;
2504                if ::core::matches!(
2505                    message.header().flexibility(),
2506                    ::fidl_next::protocol::Flexibility::Strict
2507                ) {
2508                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2509                } else {
2510                    responder
2511                        .respond_framework_error(
2512                            ordinal,
2513                            ::fidl_next::FrameworkError::UnknownMethod,
2514                        )
2515                        .expect("encoding a framework error should never fail")
2516                        .await?;
2517                    Ok(())
2518                }
2519            }
2520        }
2521    }
2522}
2523
2524impl<___T> WlanPhyClientHandler<___T> for ::fidl_next::IgnoreEvents
2525where
2526    ___T: ::fidl_next::Transport,
2527{
2528    async fn on_unknown_interaction(&mut self, _: u64) {}
2529}
2530
2531impl<___H, ___T> WlanPhyLocalClientHandler<___T> for ::fidl_next::Local<___H>
2532where
2533    ___H: WlanPhyClientHandler<___T>,
2534    ___T: ::fidl_next::Transport,
2535{
2536    async fn on_unknown_interaction(&mut self, ordinal: u64) {
2537        ___H::on_unknown_interaction(&mut self.0, ordinal).await
2538    }
2539}
2540
2541impl<___H, ___T> WlanPhyLocalServerHandler<___T> for ::fidl_next::Local<___H>
2542where
2543    ___H: WlanPhyServerHandler<___T>,
2544    ___T: ::fidl_next::Transport,
2545{
2546    async fn init(
2547        &mut self,
2548
2549        request: ::fidl_next::Request<wlan_phy::Init, ___T>,
2550
2551        responder: ::fidl_next::Responder<wlan_phy::Init, ___T>,
2552    ) {
2553        ___H::init(&mut self.0, request, responder).await
2554    }
2555
2556    async fn get_supported_mac_roles(
2557        &mut self,
2558
2559        responder: ::fidl_next::Responder<wlan_phy::GetSupportedMacRoles, ___T>,
2560    ) {
2561        ___H::get_supported_mac_roles(&mut self.0, responder).await
2562    }
2563
2564    async fn create_iface(
2565        &mut self,
2566
2567        request: ::fidl_next::Request<wlan_phy::CreateIface, ___T>,
2568
2569        responder: ::fidl_next::Responder<wlan_phy::CreateIface, ___T>,
2570    ) {
2571        ___H::create_iface(&mut self.0, request, responder).await
2572    }
2573
2574    async fn destroy_iface(
2575        &mut self,
2576
2577        request: ::fidl_next::Request<wlan_phy::DestroyIface, ___T>,
2578
2579        responder: ::fidl_next::Responder<wlan_phy::DestroyIface, ___T>,
2580    ) {
2581        ___H::destroy_iface(&mut self.0, request, responder).await
2582    }
2583
2584    async fn set_country(
2585        &mut self,
2586
2587        request: ::fidl_next::Request<wlan_phy::SetCountry, ___T>,
2588
2589        responder: ::fidl_next::Responder<wlan_phy::SetCountry, ___T>,
2590    ) {
2591        ___H::set_country(&mut self.0, request, responder).await
2592    }
2593
2594    async fn clear_country(
2595        &mut self,
2596
2597        responder: ::fidl_next::Responder<wlan_phy::ClearCountry, ___T>,
2598    ) {
2599        ___H::clear_country(&mut self.0, responder).await
2600    }
2601
2602    async fn get_country(&mut self, responder: ::fidl_next::Responder<wlan_phy::GetCountry, ___T>) {
2603        ___H::get_country(&mut self.0, responder).await
2604    }
2605
2606    async fn set_power_save_mode(
2607        &mut self,
2608
2609        request: ::fidl_next::Request<wlan_phy::SetPowerSaveMode, ___T>,
2610
2611        responder: ::fidl_next::Responder<wlan_phy::SetPowerSaveMode, ___T>,
2612    ) {
2613        ___H::set_power_save_mode(&mut self.0, request, responder).await
2614    }
2615
2616    async fn get_power_save_mode(
2617        &mut self,
2618
2619        responder: ::fidl_next::Responder<wlan_phy::GetPowerSaveMode, ___T>,
2620    ) {
2621        ___H::get_power_save_mode(&mut self.0, responder).await
2622    }
2623
2624    async fn reset(&mut self, responder: ::fidl_next::Responder<wlan_phy::Reset, ___T>) {
2625        ___H::reset(&mut self.0, responder).await
2626    }
2627
2628    async fn get_power_state(
2629        &mut self,
2630
2631        responder: ::fidl_next::Responder<wlan_phy::GetPowerState, ___T>,
2632    ) {
2633        ___H::get_power_state(&mut self.0, responder).await
2634    }
2635
2636    async fn set_bt_coexistence_mode(
2637        &mut self,
2638
2639        request: ::fidl_next::Request<wlan_phy::SetBtCoexistenceMode, ___T>,
2640
2641        responder: ::fidl_next::Responder<wlan_phy::SetBtCoexistenceMode, ___T>,
2642    ) {
2643        ___H::set_bt_coexistence_mode(&mut self.0, request, responder).await
2644    }
2645
2646    async fn set_tx_power_scenario(
2647        &mut self,
2648
2649        request: ::fidl_next::Request<wlan_phy::SetTxPowerScenario, ___T>,
2650
2651        responder: ::fidl_next::Responder<wlan_phy::SetTxPowerScenario, ___T>,
2652    ) {
2653        ___H::set_tx_power_scenario(&mut self.0, request, responder).await
2654    }
2655
2656    async fn reset_tx_power_scenario(
2657        &mut self,
2658
2659        responder: ::fidl_next::Responder<wlan_phy::ResetTxPowerScenario, ___T>,
2660    ) {
2661        ___H::reset_tx_power_scenario(&mut self.0, responder).await
2662    }
2663
2664    async fn get_tx_power_scenario(
2665        &mut self,
2666
2667        responder: ::fidl_next::Responder<wlan_phy::GetTxPowerScenario, ___T>,
2668    ) {
2669        ___H::get_tx_power_scenario(&mut self.0, responder).await
2670    }
2671
2672    async fn on_unknown_interaction(&mut self, ordinal: u64) {
2673        ___H::on_unknown_interaction(&mut self.0, ordinal).await
2674    }
2675}
2676
2677pub use fidl_next_common_fuchsia_wlan_phy::*;