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::WlanPhyPowerDownResponse;
811
812        pub use crate::natural::WlanPhyPowerUpResponse;
813
814        pub use crate::natural::WlanPhyResetTxPowerScenarioResponse;
815
816        pub use crate::natural::WlanPhyResetResponse;
817
818        pub use crate::natural::WlanPhySetBtCoexistenceModeResponse;
819
820        pub use crate::natural::WlanPhySetCountryResponse;
821
822        pub use crate::natural::WlanPhySetPowerSaveModeResponse;
823
824        pub use crate::natural::WlanPhySetTxPowerScenarioResponse;
825    }
826
827    pub struct Init;
828
829    impl ::fidl_next::Method for Init {
830        const ORDINAL: u64 = 4152290172424220659;
831        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
832            ::fidl_next::protocol::Flexibility::Flexible;
833
834        type Protocol = crate::WlanPhy;
835
836        type Request = crate::wire::WlanPhyInitRequest<'static>;
837    }
838
839    impl ::fidl_next::TwoWayMethod for Init {
840        type Response = ::fidl_next::wire::Result<
841            'static,
842            crate::wire::WlanPhyInitResponse<'static>,
843            ::fidl_next::wire::fuchsia::StatusResult,
844        >;
845    }
846
847    impl<___R> ::fidl_next::Respond<___R> for Init {
848        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
849
850        fn respond(response: ___R) -> Self::Output {
851            ::core::result::Result::Ok(response)
852        }
853    }
854
855    impl<___R> ::fidl_next::RespondErr<___R> for Init {
856        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
857
858        fn respond_err(response: ___R) -> Self::Output {
859            ::core::result::Result::Err(response)
860        }
861    }
862
863    pub struct GetSupportedMacRoles;
864
865    impl ::fidl_next::Method for GetSupportedMacRoles {
866        const ORDINAL: u64 = 3929702727467848522;
867        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
868            ::fidl_next::protocol::Flexibility::Flexible;
869
870        type Protocol = crate::WlanPhy;
871
872        type Request = ::fidl_next::wire::EmptyMessageBody;
873    }
874
875    impl ::fidl_next::TwoWayMethod for GetSupportedMacRoles {
876        type Response = ::fidl_next::wire::Result<
877            'static,
878            crate::wire::WlanPhyGetSupportedMacRolesResponse<'static>,
879            ::fidl_next::wire::fuchsia::StatusResult,
880        >;
881    }
882
883    impl<___R> ::fidl_next::Respond<___R> for GetSupportedMacRoles {
884        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
885
886        fn respond(response: ___R) -> Self::Output {
887            ::core::result::Result::Ok(response)
888        }
889    }
890
891    impl<___R> ::fidl_next::RespondErr<___R> for GetSupportedMacRoles {
892        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
893
894        fn respond_err(response: ___R) -> Self::Output {
895            ::core::result::Result::Err(response)
896        }
897    }
898
899    pub struct CreateIface;
900
901    impl ::fidl_next::Method for CreateIface {
902        const ORDINAL: u64 = 5530435827689044878;
903        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
904            ::fidl_next::protocol::Flexibility::Flexible;
905
906        type Protocol = crate::WlanPhy;
907
908        type Request = crate::wire::WlanPhyCreateIfaceRequest<'static>;
909    }
910
911    impl ::fidl_next::TwoWayMethod for CreateIface {
912        type Response = ::fidl_next::wire::Result<
913            'static,
914            crate::wire::WlanPhyCreateIfaceResponse<'static>,
915            ::fidl_next::wire::fuchsia::StatusResult,
916        >;
917    }
918
919    impl<___R> ::fidl_next::Respond<___R> for CreateIface {
920        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
921
922        fn respond(response: ___R) -> Self::Output {
923            ::core::result::Result::Ok(response)
924        }
925    }
926
927    impl<___R> ::fidl_next::RespondErr<___R> for CreateIface {
928        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
929
930        fn respond_err(response: ___R) -> Self::Output {
931            ::core::result::Result::Err(response)
932        }
933    }
934
935    pub struct DestroyIface;
936
937    impl ::fidl_next::Method for DestroyIface {
938        const ORDINAL: u64 = 1127035624611379388;
939        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
940            ::fidl_next::protocol::Flexibility::Flexible;
941
942        type Protocol = crate::WlanPhy;
943
944        type Request = crate::wire::WlanPhyDestroyIfaceRequest<'static>;
945    }
946
947    impl ::fidl_next::TwoWayMethod for DestroyIface {
948        type Response = ::fidl_next::wire::Result<
949            'static,
950            crate::wire::WlanPhyDestroyIfaceResponse,
951            ::fidl_next::wire::fuchsia::StatusResult,
952        >;
953    }
954
955    impl<___R> ::fidl_next::Respond<___R> for DestroyIface {
956        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
957
958        fn respond(response: ___R) -> Self::Output {
959            ::core::result::Result::Ok(response)
960        }
961    }
962
963    impl<___R> ::fidl_next::RespondErr<___R> for DestroyIface {
964        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
965
966        fn respond_err(response: ___R) -> Self::Output {
967            ::core::result::Result::Err(response)
968        }
969    }
970
971    pub struct SetCountry;
972
973    impl ::fidl_next::Method for SetCountry {
974        const ORDINAL: u64 = 7859442075277675023;
975        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
976            ::fidl_next::protocol::Flexibility::Flexible;
977
978        type Protocol = crate::WlanPhy;
979
980        type Request = crate::wire::WlanPhySetCountryRequest;
981    }
982
983    impl ::fidl_next::TwoWayMethod for SetCountry {
984        type Response = ::fidl_next::wire::Result<
985            'static,
986            crate::wire::WlanPhySetCountryResponse,
987            ::fidl_next::wire::fuchsia::StatusResult,
988        >;
989    }
990
991    impl<___R> ::fidl_next::Respond<___R> for SetCountry {
992        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
993
994        fn respond(response: ___R) -> Self::Output {
995            ::core::result::Result::Ok(response)
996        }
997    }
998
999    impl<___R> ::fidl_next::RespondErr<___R> for SetCountry {
1000        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1001
1002        fn respond_err(response: ___R) -> Self::Output {
1003            ::core::result::Result::Err(response)
1004        }
1005    }
1006
1007    pub struct ClearCountry;
1008
1009    impl ::fidl_next::Method for ClearCountry {
1010        const ORDINAL: u64 = 8355078711339303759;
1011        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1012            ::fidl_next::protocol::Flexibility::Flexible;
1013
1014        type Protocol = crate::WlanPhy;
1015
1016        type Request = ::fidl_next::wire::EmptyMessageBody;
1017    }
1018
1019    impl ::fidl_next::TwoWayMethod for ClearCountry {
1020        type Response = ::fidl_next::wire::Result<
1021            'static,
1022            crate::wire::WlanPhyClearCountryResponse,
1023            ::fidl_next::wire::fuchsia::StatusResult,
1024        >;
1025    }
1026
1027    impl<___R> ::fidl_next::Respond<___R> for ClearCountry {
1028        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1029
1030        fn respond(response: ___R) -> Self::Output {
1031            ::core::result::Result::Ok(response)
1032        }
1033    }
1034
1035    impl<___R> ::fidl_next::RespondErr<___R> for ClearCountry {
1036        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1037
1038        fn respond_err(response: ___R) -> Self::Output {
1039            ::core::result::Result::Err(response)
1040        }
1041    }
1042
1043    pub struct GetCountry;
1044
1045    impl ::fidl_next::Method for GetCountry {
1046        const ORDINAL: u64 = 1436134059072311418;
1047        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1048            ::fidl_next::protocol::Flexibility::Flexible;
1049
1050        type Protocol = crate::WlanPhy;
1051
1052        type Request = ::fidl_next::wire::EmptyMessageBody;
1053    }
1054
1055    impl ::fidl_next::TwoWayMethod for GetCountry {
1056        type Response = ::fidl_next::wire::Result<
1057            'static,
1058            crate::wire::WlanPhyGetCountryResponse,
1059            ::fidl_next::wire::fuchsia::StatusResult,
1060        >;
1061    }
1062
1063    impl<___R> ::fidl_next::Respond<___R> for GetCountry {
1064        type Output = ::core::result::Result<
1065            crate::generic::WlanPhyGetCountryResponse<___R>,
1066            ::fidl_next::never::Never,
1067        >;
1068
1069        fn respond(response: ___R) -> Self::Output {
1070            ::core::result::Result::Ok(crate::generic::WlanPhyGetCountryResponse {
1071                country: response,
1072            })
1073        }
1074    }
1075
1076    impl<___R> ::fidl_next::RespondErr<___R> for GetCountry {
1077        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1078
1079        fn respond_err(response: ___R) -> Self::Output {
1080            ::core::result::Result::Err(response)
1081        }
1082    }
1083
1084    pub struct SetPowerSaveMode;
1085
1086    impl ::fidl_next::Method for SetPowerSaveMode {
1087        const ORDINAL: u64 = 5626768781239879949;
1088        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1089            ::fidl_next::protocol::Flexibility::Flexible;
1090
1091        type Protocol = crate::WlanPhy;
1092
1093        type Request = crate::wire::WlanPhySetPowerSaveModeRequest<'static>;
1094    }
1095
1096    impl ::fidl_next::TwoWayMethod for SetPowerSaveMode {
1097        type Response = ::fidl_next::wire::Result<
1098            'static,
1099            crate::wire::WlanPhySetPowerSaveModeResponse,
1100            ::fidl_next::wire::fuchsia::StatusResult,
1101        >;
1102    }
1103
1104    impl<___R> ::fidl_next::Respond<___R> for SetPowerSaveMode {
1105        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1106
1107        fn respond(response: ___R) -> Self::Output {
1108            ::core::result::Result::Ok(response)
1109        }
1110    }
1111
1112    impl<___R> ::fidl_next::RespondErr<___R> for SetPowerSaveMode {
1113        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1114
1115        fn respond_err(response: ___R) -> Self::Output {
1116            ::core::result::Result::Err(response)
1117        }
1118    }
1119
1120    pub struct GetPowerSaveMode;
1121
1122    impl ::fidl_next::Method for GetPowerSaveMode {
1123        const ORDINAL: u64 = 2070868099982362662;
1124        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1125            ::fidl_next::protocol::Flexibility::Flexible;
1126
1127        type Protocol = crate::WlanPhy;
1128
1129        type Request = ::fidl_next::wire::EmptyMessageBody;
1130    }
1131
1132    impl ::fidl_next::TwoWayMethod for GetPowerSaveMode {
1133        type Response = ::fidl_next::wire::Result<
1134            'static,
1135            crate::wire::WlanPhyGetPowerSaveModeResponse<'static>,
1136            ::fidl_next::wire::fuchsia::StatusResult,
1137        >;
1138    }
1139
1140    impl<___R> ::fidl_next::Respond<___R> for GetPowerSaveMode {
1141        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1142
1143        fn respond(response: ___R) -> Self::Output {
1144            ::core::result::Result::Ok(response)
1145        }
1146    }
1147
1148    impl<___R> ::fidl_next::RespondErr<___R> for GetPowerSaveMode {
1149        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1150
1151        fn respond_err(response: ___R) -> Self::Output {
1152            ::core::result::Result::Err(response)
1153        }
1154    }
1155
1156    pub struct PowerDown;
1157
1158    impl ::fidl_next::Method for PowerDown {
1159        const ORDINAL: u64 = 8789636981017894154;
1160        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1161            ::fidl_next::protocol::Flexibility::Flexible;
1162
1163        type Protocol = crate::WlanPhy;
1164
1165        type Request = ::fidl_next::wire::EmptyMessageBody;
1166    }
1167
1168    impl ::fidl_next::TwoWayMethod for PowerDown {
1169        type Response = ::fidl_next::wire::Result<
1170            'static,
1171            crate::wire::WlanPhyPowerDownResponse,
1172            ::fidl_next::wire::fuchsia::StatusResult,
1173        >;
1174    }
1175
1176    impl<___R> ::fidl_next::Respond<___R> for PowerDown {
1177        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1178
1179        fn respond(response: ___R) -> Self::Output {
1180            ::core::result::Result::Ok(response)
1181        }
1182    }
1183
1184    impl<___R> ::fidl_next::RespondErr<___R> for PowerDown {
1185        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1186
1187        fn respond_err(response: ___R) -> Self::Output {
1188            ::core::result::Result::Err(response)
1189        }
1190    }
1191
1192    pub struct PowerUp;
1193
1194    impl ::fidl_next::Method for PowerUp {
1195        const ORDINAL: u64 = 7912237011574232306;
1196        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1197            ::fidl_next::protocol::Flexibility::Flexible;
1198
1199        type Protocol = crate::WlanPhy;
1200
1201        type Request = ::fidl_next::wire::EmptyMessageBody;
1202    }
1203
1204    impl ::fidl_next::TwoWayMethod for PowerUp {
1205        type Response = ::fidl_next::wire::Result<
1206            'static,
1207            crate::wire::WlanPhyPowerUpResponse,
1208            ::fidl_next::wire::fuchsia::StatusResult,
1209        >;
1210    }
1211
1212    impl<___R> ::fidl_next::Respond<___R> for PowerUp {
1213        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1214
1215        fn respond(response: ___R) -> Self::Output {
1216            ::core::result::Result::Ok(response)
1217        }
1218    }
1219
1220    impl<___R> ::fidl_next::RespondErr<___R> for PowerUp {
1221        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1222
1223        fn respond_err(response: ___R) -> Self::Output {
1224            ::core::result::Result::Err(response)
1225        }
1226    }
1227
1228    pub struct Reset;
1229
1230    impl ::fidl_next::Method for Reset {
1231        const ORDINAL: u64 = 3390961545241598095;
1232        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1233            ::fidl_next::protocol::Flexibility::Flexible;
1234
1235        type Protocol = crate::WlanPhy;
1236
1237        type Request = ::fidl_next::wire::EmptyMessageBody;
1238    }
1239
1240    impl ::fidl_next::TwoWayMethod for Reset {
1241        type Response = ::fidl_next::wire::Result<
1242            'static,
1243            crate::wire::WlanPhyResetResponse,
1244            ::fidl_next::wire::fuchsia::StatusResult,
1245        >;
1246    }
1247
1248    impl<___R> ::fidl_next::Respond<___R> for Reset {
1249        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1250
1251        fn respond(response: ___R) -> Self::Output {
1252            ::core::result::Result::Ok(response)
1253        }
1254    }
1255
1256    impl<___R> ::fidl_next::RespondErr<___R> for Reset {
1257        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1258
1259        fn respond_err(response: ___R) -> Self::Output {
1260            ::core::result::Result::Err(response)
1261        }
1262    }
1263
1264    pub struct GetPowerState;
1265
1266    impl ::fidl_next::Method for GetPowerState {
1267        const ORDINAL: u64 = 5060306441717482177;
1268        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1269            ::fidl_next::protocol::Flexibility::Flexible;
1270
1271        type Protocol = crate::WlanPhy;
1272
1273        type Request = ::fidl_next::wire::EmptyMessageBody;
1274    }
1275
1276    impl ::fidl_next::TwoWayMethod for GetPowerState {
1277        type Response = ::fidl_next::wire::Result<
1278            'static,
1279            crate::wire::WlanPhyGetPowerStateResponse<'static>,
1280            ::fidl_next::wire::fuchsia::StatusResult,
1281        >;
1282    }
1283
1284    impl<___R> ::fidl_next::Respond<___R> for GetPowerState {
1285        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1286
1287        fn respond(response: ___R) -> Self::Output {
1288            ::core::result::Result::Ok(response)
1289        }
1290    }
1291
1292    impl<___R> ::fidl_next::RespondErr<___R> for GetPowerState {
1293        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1294
1295        fn respond_err(response: ___R) -> Self::Output {
1296            ::core::result::Result::Err(response)
1297        }
1298    }
1299
1300    pub struct SetBtCoexistenceMode;
1301
1302    impl ::fidl_next::Method for SetBtCoexistenceMode {
1303        const ORDINAL: u64 = 6541090488596605957;
1304        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1305            ::fidl_next::protocol::Flexibility::Flexible;
1306
1307        type Protocol = crate::WlanPhy;
1308
1309        type Request = crate::wire::WlanPhySetBtCoexistenceModeRequest<'static>;
1310    }
1311
1312    impl ::fidl_next::TwoWayMethod for SetBtCoexistenceMode {
1313        type Response = ::fidl_next::wire::Result<
1314            'static,
1315            crate::wire::WlanPhySetBtCoexistenceModeResponse,
1316            ::fidl_next::wire::fuchsia::StatusResult,
1317        >;
1318    }
1319
1320    impl<___R> ::fidl_next::Respond<___R> for SetBtCoexistenceMode {
1321        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1322
1323        fn respond(response: ___R) -> Self::Output {
1324            ::core::result::Result::Ok(response)
1325        }
1326    }
1327
1328    impl<___R> ::fidl_next::RespondErr<___R> for SetBtCoexistenceMode {
1329        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1330
1331        fn respond_err(response: ___R) -> Self::Output {
1332            ::core::result::Result::Err(response)
1333        }
1334    }
1335
1336    pub struct SetTxPowerScenario;
1337
1338    impl ::fidl_next::Method for SetTxPowerScenario {
1339        const ORDINAL: u64 = 8278971081947748572;
1340        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1341            ::fidl_next::protocol::Flexibility::Flexible;
1342
1343        type Protocol = crate::WlanPhy;
1344
1345        type Request = crate::wire::WlanPhySetTxPowerScenarioRequest<'static>;
1346    }
1347
1348    impl ::fidl_next::TwoWayMethod for SetTxPowerScenario {
1349        type Response = ::fidl_next::wire::Result<
1350            'static,
1351            crate::wire::WlanPhySetTxPowerScenarioResponse,
1352            ::fidl_next::wire::fuchsia::StatusResult,
1353        >;
1354    }
1355
1356    impl<___R> ::fidl_next::Respond<___R> for SetTxPowerScenario {
1357        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1358
1359        fn respond(response: ___R) -> Self::Output {
1360            ::core::result::Result::Ok(response)
1361        }
1362    }
1363
1364    impl<___R> ::fidl_next::RespondErr<___R> for SetTxPowerScenario {
1365        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1366
1367        fn respond_err(response: ___R) -> Self::Output {
1368            ::core::result::Result::Err(response)
1369        }
1370    }
1371
1372    pub struct ResetTxPowerScenario;
1373
1374    impl ::fidl_next::Method for ResetTxPowerScenario {
1375        const ORDINAL: u64 = 8702006880668202770;
1376        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1377            ::fidl_next::protocol::Flexibility::Flexible;
1378
1379        type Protocol = crate::WlanPhy;
1380
1381        type Request = ::fidl_next::wire::EmptyMessageBody;
1382    }
1383
1384    impl ::fidl_next::TwoWayMethod for ResetTxPowerScenario {
1385        type Response = ::fidl_next::wire::Result<
1386            'static,
1387            crate::wire::WlanPhyResetTxPowerScenarioResponse,
1388            ::fidl_next::wire::fuchsia::StatusResult,
1389        >;
1390    }
1391
1392    impl<___R> ::fidl_next::Respond<___R> for ResetTxPowerScenario {
1393        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
1394
1395        fn respond(response: ___R) -> Self::Output {
1396            ::core::result::Result::Ok(response)
1397        }
1398    }
1399
1400    impl<___R> ::fidl_next::RespondErr<___R> for ResetTxPowerScenario {
1401        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1402
1403        fn respond_err(response: ___R) -> Self::Output {
1404            ::core::result::Result::Err(response)
1405        }
1406    }
1407
1408    pub struct GetTxPowerScenario;
1409
1410    impl ::fidl_next::Method for GetTxPowerScenario {
1411        const ORDINAL: u64 = 7131856269124254862;
1412        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1413            ::fidl_next::protocol::Flexibility::Flexible;
1414
1415        type Protocol = crate::WlanPhy;
1416
1417        type Request = ::fidl_next::wire::EmptyMessageBody;
1418    }
1419
1420    impl ::fidl_next::TwoWayMethod for GetTxPowerScenario {
1421        type Response = ::fidl_next::wire::Result<
1422            'static,
1423            crate::wire::WlanPhyGetTxPowerScenarioResponse,
1424            ::fidl_next::wire::fuchsia::StatusResult,
1425        >;
1426    }
1427
1428    impl<___R> ::fidl_next::Respond<___R> for GetTxPowerScenario {
1429        type Output = ::core::result::Result<
1430            crate::generic::WlanPhyGetTxPowerScenarioResponse<___R>,
1431            ::fidl_next::never::Never,
1432        >;
1433
1434        fn respond(response: ___R) -> Self::Output {
1435            ::core::result::Result::Ok(crate::generic::WlanPhyGetTxPowerScenarioResponse {
1436                scenario: response,
1437            })
1438        }
1439    }
1440
1441    impl<___R> ::fidl_next::RespondErr<___R> for GetTxPowerScenario {
1442        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1443
1444        fn respond_err(response: ___R) -> Self::Output {
1445            ::core::result::Result::Err(response)
1446        }
1447    }
1448
1449    mod ___detail {
1450        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::WlanPhy
1451        where
1452            ___T: ::fidl_next::Transport,
1453        {
1454            type Client = WlanPhyClient<___T>;
1455            type Server = WlanPhyServer<___T>;
1456        }
1457
1458        /// The client for the `WlanPhy` protocol.
1459        #[repr(transparent)]
1460        pub struct WlanPhyClient<___T: ::fidl_next::Transport> {
1461            #[allow(dead_code)]
1462            client: ::fidl_next::protocol::Client<___T>,
1463        }
1464
1465        impl<___T> WlanPhyClient<___T>
1466        where
1467            ___T: ::fidl_next::Transport,
1468        {
1469            #[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"]
1470            pub fn init_with<___R>(
1471                &self,
1472                request: ___R,
1473            ) -> ::fidl_next::TwoWayFuture<'_, super::Init, ___T>
1474            where
1475                ___R: ::fidl_next::Encode<
1476                        crate::wire::WlanPhyInitRequest<'static>,
1477                        <___T as ::fidl_next::Transport>::SendBuffer,
1478                    >,
1479            {
1480                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1481                    4152290172424220659,
1482                    <super::Init as ::fidl_next::Method>::FLEXIBILITY,
1483                    request,
1484                ))
1485            }
1486
1487            #[doc = " MAC roles supported for ifaces on the physical device.\n"]
1488            pub fn get_supported_mac_roles(
1489                &self,
1490            ) -> ::fidl_next::TwoWayFuture<'_, super::GetSupportedMacRoles, ___T> {
1491                ::fidl_next::TwoWayFuture::from_untyped(
1492                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1493                        3929702727467848522,
1494                        <super::GetSupportedMacRoles as ::fidl_next::Method>::FLEXIBILITY,
1495                        (),
1496                    ),
1497                )
1498            }
1499
1500            #[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"]
1501            pub fn create_iface_with<___R>(
1502                &self,
1503                request: ___R,
1504            ) -> ::fidl_next::TwoWayFuture<'_, super::CreateIface, ___T>
1505            where
1506                ___R: ::fidl_next::Encode<
1507                        crate::wire::WlanPhyCreateIfaceRequest<'static>,
1508                        <___T as ::fidl_next::Transport>::SendBuffer,
1509                    >,
1510            {
1511                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1512                    5530435827689044878,
1513                    <super::CreateIface as ::fidl_next::Method>::FLEXIBILITY,
1514                    request,
1515                ))
1516            }
1517
1518            #[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"]
1519            pub fn destroy_iface_with<___R>(
1520                &self,
1521                request: ___R,
1522            ) -> ::fidl_next::TwoWayFuture<'_, super::DestroyIface, ___T>
1523            where
1524                ___R: ::fidl_next::Encode<
1525                        crate::wire::WlanPhyDestroyIfaceRequest<'static>,
1526                        <___T as ::fidl_next::Transport>::SendBuffer,
1527                    >,
1528            {
1529                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1530                    1127035624611379388,
1531                    <super::DestroyIface as ::fidl_next::Method>::FLEXIBILITY,
1532                    request,
1533                ))
1534            }
1535
1536            #[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"]
1537            pub fn set_country(
1538                &self,
1539
1540                country: impl ::fidl_next::Encode<[u8; 2], <___T as ::fidl_next::Transport>::SendBuffer>,
1541            ) -> ::fidl_next::TwoWayFuture<'_, super::SetCountry, ___T>
1542            where
1543                <___T as ::fidl_next::Transport>::SendBuffer:
1544                    ::fidl_next::encoder::InternalHandleEncoder,
1545            {
1546                self.set_country_with(crate::generic::WlanPhySetCountryRequest { country })
1547            }
1548
1549            #[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"]
1550            pub fn set_country_with<___R>(
1551                &self,
1552                request: ___R,
1553            ) -> ::fidl_next::TwoWayFuture<'_, super::SetCountry, ___T>
1554            where
1555                ___R: ::fidl_next::Encode<
1556                        crate::wire::WlanPhySetCountryRequest,
1557                        <___T as ::fidl_next::Transport>::SendBuffer,
1558                    >,
1559            {
1560                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1561                    7859442075277675023,
1562                    <super::SetCountry as ::fidl_next::Method>::FLEXIBILITY,
1563                    request,
1564                ))
1565            }
1566
1567            #[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"]
1568            pub fn clear_country(
1569                &self,
1570            ) -> ::fidl_next::TwoWayFuture<'_, super::ClearCountry, ___T> {
1571                ::fidl_next::TwoWayFuture::from_untyped(
1572                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1573                        8355078711339303759,
1574                        <super::ClearCountry as ::fidl_next::Method>::FLEXIBILITY,
1575                        (),
1576                    ),
1577                )
1578            }
1579
1580            #[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"]
1581            pub fn get_country(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetCountry, ___T> {
1582                ::fidl_next::TwoWayFuture::from_untyped(
1583                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1584                        1436134059072311418,
1585                        <super::GetCountry as ::fidl_next::Method>::FLEXIBILITY,
1586                        (),
1587                    ),
1588                )
1589            }
1590
1591            #[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"]
1592            pub fn set_power_save_mode_with<___R>(
1593                &self,
1594                request: ___R,
1595            ) -> ::fidl_next::TwoWayFuture<'_, super::SetPowerSaveMode, ___T>
1596            where
1597                ___R: ::fidl_next::Encode<
1598                        crate::wire::WlanPhySetPowerSaveModeRequest<'static>,
1599                        <___T as ::fidl_next::Transport>::SendBuffer,
1600                    >,
1601            {
1602                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1603                    5626768781239879949,
1604                    <super::SetPowerSaveMode as ::fidl_next::Method>::FLEXIBILITY,
1605                    request,
1606                ))
1607            }
1608
1609            #[doc = " Get current Power Save mode from device. In most implementation this\n likely to be retrieved from Firmware.\n"]
1610            pub fn get_power_save_mode(
1611                &self,
1612            ) -> ::fidl_next::TwoWayFuture<'_, super::GetPowerSaveMode, ___T> {
1613                ::fidl_next::TwoWayFuture::from_untyped(
1614                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1615                        2070868099982362662,
1616                        <super::GetPowerSaveMode as ::fidl_next::Method>::FLEXIBILITY,
1617                        (),
1618                    ),
1619                )
1620            }
1621
1622            #[doc = " Power up/down/reset the wlan chip.\n If supported, PowerDown will power down the wlan chip if it is currently powered on.\n Any existing interfaces should have already been deleted before making this call or else the\n driver will fail the call with error code ZX_ERR_INTERNAL.\n Other 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"]
1623            pub fn power_down(&self) -> ::fidl_next::TwoWayFuture<'_, super::PowerDown, ___T> {
1624                ::fidl_next::TwoWayFuture::from_untyped(
1625                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1626                        8789636981017894154,
1627                        <super::PowerDown as ::fidl_next::Method>::FLEXIBILITY,
1628                        (),
1629                    ),
1630                )
1631            }
1632
1633            #[doc = " If supported, PowerUp will power up the wlan chip if it is currently powered down.\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 up.\n"]
1634            pub fn power_up(&self) -> ::fidl_next::TwoWayFuture<'_, super::PowerUp, ___T> {
1635                ::fidl_next::TwoWayFuture::from_untyped(
1636                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1637                        7912237011574232306,
1638                        <super::PowerUp as ::fidl_next::Method>::FLEXIBILITY,
1639                        (),
1640                    ),
1641                )
1642            }
1643
1644            #[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"]
1645            pub fn reset(&self) -> ::fidl_next::TwoWayFuture<'_, super::Reset, ___T> {
1646                ::fidl_next::TwoWayFuture::from_untyped(
1647                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1648                        3390961545241598095,
1649                        <super::Reset as ::fidl_next::Method>::FLEXIBILITY,
1650                        (),
1651                    ),
1652                )
1653            }
1654
1655            #[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"]
1656            pub fn get_power_state(
1657                &self,
1658            ) -> ::fidl_next::TwoWayFuture<'_, super::GetPowerState, ___T> {
1659                ::fidl_next::TwoWayFuture::from_untyped(
1660                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1661                        5060306441717482177,
1662                        <super::GetPowerState as ::fidl_next::Method>::FLEXIBILITY,
1663                        (),
1664                    ),
1665                )
1666            }
1667
1668            #[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"]
1669            pub fn set_bt_coexistence_mode_with<___R>(
1670                &self,
1671                request: ___R,
1672            ) -> ::fidl_next::TwoWayFuture<'_, super::SetBtCoexistenceMode, ___T>
1673            where
1674                ___R: ::fidl_next::Encode<
1675                        crate::wire::WlanPhySetBtCoexistenceModeRequest<'static>,
1676                        <___T as ::fidl_next::Transport>::SendBuffer,
1677                    >,
1678            {
1679                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1680                    6541090488596605957,
1681                    <super::SetBtCoexistenceMode as ::fidl_next::Method>::FLEXIBILITY,
1682                    request,
1683                ))
1684            }
1685
1686            pub fn set_tx_power_scenario_with<___R>(
1687                &self,
1688                request: ___R,
1689            ) -> ::fidl_next::TwoWayFuture<'_, super::SetTxPowerScenario, ___T>
1690            where
1691                ___R: ::fidl_next::Encode<
1692                        crate::wire::WlanPhySetTxPowerScenarioRequest<'static>,
1693                        <___T as ::fidl_next::Transport>::SendBuffer,
1694                    >,
1695            {
1696                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1697                    8278971081947748572,
1698                    <super::SetTxPowerScenario as ::fidl_next::Method>::FLEXIBILITY,
1699                    request,
1700                ))
1701            }
1702
1703            pub fn reset_tx_power_scenario(
1704                &self,
1705            ) -> ::fidl_next::TwoWayFuture<'_, super::ResetTxPowerScenario, ___T> {
1706                ::fidl_next::TwoWayFuture::from_untyped(
1707                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1708                        8702006880668202770,
1709                        <super::ResetTxPowerScenario as ::fidl_next::Method>::FLEXIBILITY,
1710                        (),
1711                    ),
1712                )
1713            }
1714
1715            pub fn get_tx_power_scenario(
1716                &self,
1717            ) -> ::fidl_next::TwoWayFuture<'_, super::GetTxPowerScenario, ___T> {
1718                ::fidl_next::TwoWayFuture::from_untyped(
1719                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1720                        7131856269124254862,
1721                        <super::GetTxPowerScenario as ::fidl_next::Method>::FLEXIBILITY,
1722                        (),
1723                    ),
1724                )
1725            }
1726        }
1727
1728        /// The server for the `WlanPhy` protocol.
1729        #[repr(transparent)]
1730        pub struct WlanPhyServer<___T: ::fidl_next::Transport> {
1731            server: ::fidl_next::protocol::Server<___T>,
1732        }
1733
1734        impl<___T> WlanPhyServer<___T> where ___T: ::fidl_next::Transport {}
1735    }
1736}
1737
1738#[diagnostic::on_unimplemented(
1739    note = "If {Self} implements the non-local WlanPhyClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
1740)]
1741
1742/// A client handler for the WlanPhy protocol.
1743///
1744/// See [`WlanPhy`] for more details.
1745pub trait WlanPhyLocalClientHandler<
1746    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1747    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1748>
1749{
1750    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1751        ::core::future::ready(())
1752    }
1753}
1754
1755impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for WlanPhy
1756where
1757    ___H: WlanPhyLocalClientHandler<___T>,
1758    ___T: ::fidl_next::Transport,
1759{
1760    async fn on_event(
1761        handler: &mut ___H,
1762        mut message: ::fidl_next::Message<___T>,
1763    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1764        match *message.header().ordinal {
1765            ordinal => {
1766                handler.on_unknown_interaction(ordinal).await;
1767                if ::core::matches!(
1768                    message.header().flexibility(),
1769                    ::fidl_next::protocol::Flexibility::Strict
1770                ) {
1771                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1772                } else {
1773                    Ok(())
1774                }
1775            }
1776        }
1777    }
1778}
1779
1780#[diagnostic::on_unimplemented(
1781    note = "If {Self} implements the non-local WlanPhyServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
1782)]
1783
1784/// A server handler for the WlanPhy protocol.
1785///
1786/// See [`WlanPhy`] for more details.
1787pub trait WlanPhyLocalServerHandler<
1788    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1789    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1790>
1791{
1792    #[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"]
1793    fn init(
1794        &mut self,
1795
1796        request: ::fidl_next::Request<wlan_phy::Init, ___T>,
1797
1798        responder: ::fidl_next::Responder<wlan_phy::Init, ___T>,
1799    ) -> impl ::core::future::Future<Output = ()>;
1800
1801    #[doc = " MAC roles supported for ifaces on the physical device.\n"]
1802    fn get_supported_mac_roles(
1803        &mut self,
1804
1805        responder: ::fidl_next::Responder<wlan_phy::GetSupportedMacRoles, ___T>,
1806    ) -> impl ::core::future::Future<Output = ()>;
1807
1808    #[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"]
1809    fn create_iface(
1810        &mut self,
1811
1812        request: ::fidl_next::Request<wlan_phy::CreateIface, ___T>,
1813
1814        responder: ::fidl_next::Responder<wlan_phy::CreateIface, ___T>,
1815    ) -> impl ::core::future::Future<Output = ()>;
1816
1817    #[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"]
1818    fn destroy_iface(
1819        &mut self,
1820
1821        request: ::fidl_next::Request<wlan_phy::DestroyIface, ___T>,
1822
1823        responder: ::fidl_next::Responder<wlan_phy::DestroyIface, ___T>,
1824    ) -> impl ::core::future::Future<Output = ()>;
1825
1826    #[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"]
1827    fn set_country(
1828        &mut self,
1829
1830        request: ::fidl_next::Request<wlan_phy::SetCountry, ___T>,
1831
1832        responder: ::fidl_next::Responder<wlan_phy::SetCountry, ___T>,
1833    ) -> impl ::core::future::Future<Output = ()>;
1834
1835    #[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"]
1836    fn clear_country(
1837        &mut self,
1838
1839        responder: ::fidl_next::Responder<wlan_phy::ClearCountry, ___T>,
1840    ) -> impl ::core::future::Future<Output = ()>;
1841
1842    #[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"]
1843    fn get_country(
1844        &mut self,
1845
1846        responder: ::fidl_next::Responder<wlan_phy::GetCountry, ___T>,
1847    ) -> impl ::core::future::Future<Output = ()>;
1848
1849    #[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"]
1850    fn set_power_save_mode(
1851        &mut self,
1852
1853        request: ::fidl_next::Request<wlan_phy::SetPowerSaveMode, ___T>,
1854
1855        responder: ::fidl_next::Responder<wlan_phy::SetPowerSaveMode, ___T>,
1856    ) -> impl ::core::future::Future<Output = ()>;
1857
1858    #[doc = " Get current Power Save mode from device. In most implementation this\n likely to be retrieved from Firmware.\n"]
1859    fn get_power_save_mode(
1860        &mut self,
1861
1862        responder: ::fidl_next::Responder<wlan_phy::GetPowerSaveMode, ___T>,
1863    ) -> impl ::core::future::Future<Output = ()>;
1864
1865    #[doc = " Power up/down/reset the wlan chip.\n If supported, PowerDown will power down the wlan chip if it is currently powered on.\n Any existing interfaces should have already been deleted before making this call or else the\n driver will fail the call with error code ZX_ERR_INTERNAL.\n Other 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"]
1866    fn power_down(
1867        &mut self,
1868
1869        responder: ::fidl_next::Responder<wlan_phy::PowerDown, ___T>,
1870    ) -> impl ::core::future::Future<Output = ()>;
1871
1872    #[doc = " If supported, PowerUp will power up the wlan chip if it is currently powered down.\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 up.\n"]
1873    fn power_up(
1874        &mut self,
1875
1876        responder: ::fidl_next::Responder<wlan_phy::PowerUp, ___T>,
1877    ) -> impl ::core::future::Future<Output = ()>;
1878
1879    #[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"]
1880    fn reset(
1881        &mut self,
1882
1883        responder: ::fidl_next::Responder<wlan_phy::Reset, ___T>,
1884    ) -> impl ::core::future::Future<Output = ()>;
1885
1886    #[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"]
1887    fn get_power_state(
1888        &mut self,
1889
1890        responder: ::fidl_next::Responder<wlan_phy::GetPowerState, ___T>,
1891    ) -> impl ::core::future::Future<Output = ()>;
1892
1893    #[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"]
1894    fn set_bt_coexistence_mode(
1895        &mut self,
1896
1897        request: ::fidl_next::Request<wlan_phy::SetBtCoexistenceMode, ___T>,
1898
1899        responder: ::fidl_next::Responder<wlan_phy::SetBtCoexistenceMode, ___T>,
1900    ) -> impl ::core::future::Future<Output = ()>;
1901
1902    fn set_tx_power_scenario(
1903        &mut self,
1904
1905        request: ::fidl_next::Request<wlan_phy::SetTxPowerScenario, ___T>,
1906
1907        responder: ::fidl_next::Responder<wlan_phy::SetTxPowerScenario, ___T>,
1908    ) -> impl ::core::future::Future<Output = ()>;
1909
1910    fn reset_tx_power_scenario(
1911        &mut self,
1912
1913        responder: ::fidl_next::Responder<wlan_phy::ResetTxPowerScenario, ___T>,
1914    ) -> impl ::core::future::Future<Output = ()>;
1915
1916    fn get_tx_power_scenario(
1917        &mut self,
1918
1919        responder: ::fidl_next::Responder<wlan_phy::GetTxPowerScenario, ___T>,
1920    ) -> impl ::core::future::Future<Output = ()>;
1921
1922    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1923        ::core::future::ready(())
1924    }
1925}
1926
1927impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for WlanPhy
1928where
1929    ___H: WlanPhyLocalServerHandler<___T>,
1930    ___T: ::fidl_next::Transport,
1931    for<'de> crate::wire::WlanPhyInitRequest<'de>: ::fidl_next::Decode<
1932            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1933            Constraint = (),
1934        >,
1935    for<'de> crate::wire::WlanPhyCreateIfaceRequest<'de>: ::fidl_next::Decode<
1936            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1937            Constraint = (),
1938        >,
1939    for<'de> crate::wire::WlanPhyDestroyIfaceRequest<'de>: ::fidl_next::Decode<
1940            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1941            Constraint = (),
1942        >,
1943    for<'de> crate::wire::WlanPhySetCountryRequest: ::fidl_next::Decode<
1944            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1945            Constraint = (),
1946        >,
1947    for<'de> crate::wire::WlanPhySetPowerSaveModeRequest<'de>: ::fidl_next::Decode<
1948            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1949            Constraint = (),
1950        >,
1951    for<'de> crate::wire::WlanPhySetBtCoexistenceModeRequest<'de>: ::fidl_next::Decode<
1952            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1953            Constraint = (),
1954        >,
1955    for<'de> crate::wire::WlanPhySetTxPowerScenarioRequest<'de>: ::fidl_next::Decode<
1956            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1957            Constraint = (),
1958        >,
1959{
1960    async fn on_one_way(
1961        handler: &mut ___H,
1962        mut message: ::fidl_next::Message<___T>,
1963    ) -> ::core::result::Result<
1964        (),
1965        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1966    > {
1967        match *message.header().ordinal {
1968            ordinal => {
1969                handler.on_unknown_interaction(ordinal).await;
1970                if ::core::matches!(
1971                    message.header().flexibility(),
1972                    ::fidl_next::protocol::Flexibility::Strict
1973                ) {
1974                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1975                } else {
1976                    Ok(())
1977                }
1978            }
1979        }
1980    }
1981
1982    async fn on_two_way(
1983        handler: &mut ___H,
1984        mut message: ::fidl_next::Message<___T>,
1985        responder: ::fidl_next::protocol::Responder<___T>,
1986    ) -> ::core::result::Result<
1987        (),
1988        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1989    > {
1990        match *message.header().ordinal {
1991            4152290172424220659 => {
1992                let responder = ::fidl_next::Responder::from_untyped(responder);
1993
1994                match ::fidl_next::AsDecoderExt::into_decoded(message) {
1995                    Ok(decoded) => {
1996                        handler.init(::fidl_next::Request::from_decoded(decoded), responder).await;
1997                        Ok(())
1998                    }
1999                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2000                        ordinal: 4152290172424220659,
2001                        error,
2002                    }),
2003                }
2004            }
2005
2006            3929702727467848522 => {
2007                let responder = ::fidl_next::Responder::from_untyped(responder);
2008
2009                handler.get_supported_mac_roles(responder).await;
2010                Ok(())
2011            }
2012
2013            5530435827689044878 => {
2014                let responder = ::fidl_next::Responder::from_untyped(responder);
2015
2016                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2017                    Ok(decoded) => {
2018                        handler
2019                            .create_iface(::fidl_next::Request::from_decoded(decoded), responder)
2020                            .await;
2021                        Ok(())
2022                    }
2023                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2024                        ordinal: 5530435827689044878,
2025                        error,
2026                    }),
2027                }
2028            }
2029
2030            1127035624611379388 => {
2031                let responder = ::fidl_next::Responder::from_untyped(responder);
2032
2033                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2034                    Ok(decoded) => {
2035                        handler
2036                            .destroy_iface(::fidl_next::Request::from_decoded(decoded), responder)
2037                            .await;
2038                        Ok(())
2039                    }
2040                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2041                        ordinal: 1127035624611379388,
2042                        error,
2043                    }),
2044                }
2045            }
2046
2047            7859442075277675023 => {
2048                let responder = ::fidl_next::Responder::from_untyped(responder);
2049
2050                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2051                    Ok(decoded) => {
2052                        handler
2053                            .set_country(::fidl_next::Request::from_decoded(decoded), responder)
2054                            .await;
2055                        Ok(())
2056                    }
2057                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2058                        ordinal: 7859442075277675023,
2059                        error,
2060                    }),
2061                }
2062            }
2063
2064            8355078711339303759 => {
2065                let responder = ::fidl_next::Responder::from_untyped(responder);
2066
2067                handler.clear_country(responder).await;
2068                Ok(())
2069            }
2070
2071            1436134059072311418 => {
2072                let responder = ::fidl_next::Responder::from_untyped(responder);
2073
2074                handler.get_country(responder).await;
2075                Ok(())
2076            }
2077
2078            5626768781239879949 => {
2079                let responder = ::fidl_next::Responder::from_untyped(responder);
2080
2081                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2082                    Ok(decoded) => {
2083                        handler
2084                            .set_power_save_mode(
2085                                ::fidl_next::Request::from_decoded(decoded),
2086                                responder,
2087                            )
2088                            .await;
2089                        Ok(())
2090                    }
2091                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2092                        ordinal: 5626768781239879949,
2093                        error,
2094                    }),
2095                }
2096            }
2097
2098            2070868099982362662 => {
2099                let responder = ::fidl_next::Responder::from_untyped(responder);
2100
2101                handler.get_power_save_mode(responder).await;
2102                Ok(())
2103            }
2104
2105            8789636981017894154 => {
2106                let responder = ::fidl_next::Responder::from_untyped(responder);
2107
2108                handler.power_down(responder).await;
2109                Ok(())
2110            }
2111
2112            7912237011574232306 => {
2113                let responder = ::fidl_next::Responder::from_untyped(responder);
2114
2115                handler.power_up(responder).await;
2116                Ok(())
2117            }
2118
2119            3390961545241598095 => {
2120                let responder = ::fidl_next::Responder::from_untyped(responder);
2121
2122                handler.reset(responder).await;
2123                Ok(())
2124            }
2125
2126            5060306441717482177 => {
2127                let responder = ::fidl_next::Responder::from_untyped(responder);
2128
2129                handler.get_power_state(responder).await;
2130                Ok(())
2131            }
2132
2133            6541090488596605957 => {
2134                let responder = ::fidl_next::Responder::from_untyped(responder);
2135
2136                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2137                    Ok(decoded) => {
2138                        handler
2139                            .set_bt_coexistence_mode(
2140                                ::fidl_next::Request::from_decoded(decoded),
2141                                responder,
2142                            )
2143                            .await;
2144                        Ok(())
2145                    }
2146                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2147                        ordinal: 6541090488596605957,
2148                        error,
2149                    }),
2150                }
2151            }
2152
2153            8278971081947748572 => {
2154                let responder = ::fidl_next::Responder::from_untyped(responder);
2155
2156                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2157                    Ok(decoded) => {
2158                        handler
2159                            .set_tx_power_scenario(
2160                                ::fidl_next::Request::from_decoded(decoded),
2161                                responder,
2162                            )
2163                            .await;
2164                        Ok(())
2165                    }
2166                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2167                        ordinal: 8278971081947748572,
2168                        error,
2169                    }),
2170                }
2171            }
2172
2173            8702006880668202770 => {
2174                let responder = ::fidl_next::Responder::from_untyped(responder);
2175
2176                handler.reset_tx_power_scenario(responder).await;
2177                Ok(())
2178            }
2179
2180            7131856269124254862 => {
2181                let responder = ::fidl_next::Responder::from_untyped(responder);
2182
2183                handler.get_tx_power_scenario(responder).await;
2184                Ok(())
2185            }
2186
2187            ordinal => {
2188                handler.on_unknown_interaction(ordinal).await;
2189                if ::core::matches!(
2190                    message.header().flexibility(),
2191                    ::fidl_next::protocol::Flexibility::Strict
2192                ) {
2193                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2194                } else {
2195                    responder
2196                        .respond_framework_error(
2197                            ordinal,
2198                            ::fidl_next::FrameworkError::UnknownMethod,
2199                        )
2200                        .expect("encoding a framework error should never fail")
2201                        .await?;
2202                    Ok(())
2203                }
2204            }
2205        }
2206    }
2207}
2208
2209/// A client handler for the WlanPhy protocol.
2210///
2211/// See [`WlanPhy`] for more details.
2212pub trait WlanPhyClientHandler<
2213    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2214    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2215>
2216{
2217    fn on_unknown_interaction(
2218        &mut self,
2219        ordinal: u64,
2220    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2221        ::core::future::ready(())
2222    }
2223}
2224
2225impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for WlanPhy
2226where
2227    ___H: WlanPhyClientHandler<___T> + ::core::marker::Send,
2228    ___T: ::fidl_next::Transport,
2229{
2230    async fn on_event(
2231        handler: &mut ___H,
2232        mut message: ::fidl_next::Message<___T>,
2233    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2234        match *message.header().ordinal {
2235            ordinal => {
2236                handler.on_unknown_interaction(ordinal).await;
2237                if ::core::matches!(
2238                    message.header().flexibility(),
2239                    ::fidl_next::protocol::Flexibility::Strict
2240                ) {
2241                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2242                } else {
2243                    Ok(())
2244                }
2245            }
2246        }
2247    }
2248}
2249
2250/// A server handler for the WlanPhy protocol.
2251///
2252/// See [`WlanPhy`] for more details.
2253pub trait WlanPhyServerHandler<
2254    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2255    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2256>
2257{
2258    #[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"]
2259    fn init(
2260        &mut self,
2261
2262        request: ::fidl_next::Request<wlan_phy::Init, ___T>,
2263
2264        responder: ::fidl_next::Responder<wlan_phy::Init, ___T>,
2265    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2266
2267    #[doc = " MAC roles supported for ifaces on the physical device.\n"]
2268    fn get_supported_mac_roles(
2269        &mut self,
2270
2271        responder: ::fidl_next::Responder<wlan_phy::GetSupportedMacRoles, ___T>,
2272    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2273
2274    #[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"]
2275    fn create_iface(
2276        &mut self,
2277
2278        request: ::fidl_next::Request<wlan_phy::CreateIface, ___T>,
2279
2280        responder: ::fidl_next::Responder<wlan_phy::CreateIface, ___T>,
2281    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2282
2283    #[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"]
2284    fn destroy_iface(
2285        &mut self,
2286
2287        request: ::fidl_next::Request<wlan_phy::DestroyIface, ___T>,
2288
2289        responder: ::fidl_next::Responder<wlan_phy::DestroyIface, ___T>,
2290    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2291
2292    #[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"]
2293    fn set_country(
2294        &mut self,
2295
2296        request: ::fidl_next::Request<wlan_phy::SetCountry, ___T>,
2297
2298        responder: ::fidl_next::Responder<wlan_phy::SetCountry, ___T>,
2299    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2300
2301    #[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"]
2302    fn clear_country(
2303        &mut self,
2304
2305        responder: ::fidl_next::Responder<wlan_phy::ClearCountry, ___T>,
2306    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2307
2308    #[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"]
2309    fn get_country(
2310        &mut self,
2311
2312        responder: ::fidl_next::Responder<wlan_phy::GetCountry, ___T>,
2313    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2314
2315    #[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"]
2316    fn set_power_save_mode(
2317        &mut self,
2318
2319        request: ::fidl_next::Request<wlan_phy::SetPowerSaveMode, ___T>,
2320
2321        responder: ::fidl_next::Responder<wlan_phy::SetPowerSaveMode, ___T>,
2322    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2323
2324    #[doc = " Get current Power Save mode from device. In most implementation this\n likely to be retrieved from Firmware.\n"]
2325    fn get_power_save_mode(
2326        &mut self,
2327
2328        responder: ::fidl_next::Responder<wlan_phy::GetPowerSaveMode, ___T>,
2329    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2330
2331    #[doc = " Power up/down/reset the wlan chip.\n If supported, PowerDown will power down the wlan chip if it is currently powered on.\n Any existing interfaces should have already been deleted before making this call or else the\n driver will fail the call with error code ZX_ERR_INTERNAL.\n Other 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"]
2332    fn power_down(
2333        &mut self,
2334
2335        responder: ::fidl_next::Responder<wlan_phy::PowerDown, ___T>,
2336    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2337
2338    #[doc = " If supported, PowerUp will power up the wlan chip if it is currently powered down.\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 up.\n"]
2339    fn power_up(
2340        &mut self,
2341
2342        responder: ::fidl_next::Responder<wlan_phy::PowerUp, ___T>,
2343    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2344
2345    #[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"]
2346    fn reset(
2347        &mut self,
2348
2349        responder: ::fidl_next::Responder<wlan_phy::Reset, ___T>,
2350    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2351
2352    #[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"]
2353    fn get_power_state(
2354        &mut self,
2355
2356        responder: ::fidl_next::Responder<wlan_phy::GetPowerState, ___T>,
2357    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2358
2359    #[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"]
2360    fn set_bt_coexistence_mode(
2361        &mut self,
2362
2363        request: ::fidl_next::Request<wlan_phy::SetBtCoexistenceMode, ___T>,
2364
2365        responder: ::fidl_next::Responder<wlan_phy::SetBtCoexistenceMode, ___T>,
2366    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2367
2368    fn set_tx_power_scenario(
2369        &mut self,
2370
2371        request: ::fidl_next::Request<wlan_phy::SetTxPowerScenario, ___T>,
2372
2373        responder: ::fidl_next::Responder<wlan_phy::SetTxPowerScenario, ___T>,
2374    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2375
2376    fn reset_tx_power_scenario(
2377        &mut self,
2378
2379        responder: ::fidl_next::Responder<wlan_phy::ResetTxPowerScenario, ___T>,
2380    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2381
2382    fn get_tx_power_scenario(
2383        &mut self,
2384
2385        responder: ::fidl_next::Responder<wlan_phy::GetTxPowerScenario, ___T>,
2386    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2387
2388    fn on_unknown_interaction(
2389        &mut self,
2390        ordinal: u64,
2391    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2392        ::core::future::ready(())
2393    }
2394}
2395
2396impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for WlanPhy
2397where
2398    ___H: WlanPhyServerHandler<___T> + ::core::marker::Send,
2399    ___T: ::fidl_next::Transport,
2400    for<'de> crate::wire::WlanPhyInitRequest<'de>: ::fidl_next::Decode<
2401            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2402            Constraint = (),
2403        >,
2404    for<'de> crate::wire::WlanPhyCreateIfaceRequest<'de>: ::fidl_next::Decode<
2405            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2406            Constraint = (),
2407        >,
2408    for<'de> crate::wire::WlanPhyDestroyIfaceRequest<'de>: ::fidl_next::Decode<
2409            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2410            Constraint = (),
2411        >,
2412    for<'de> crate::wire::WlanPhySetCountryRequest: ::fidl_next::Decode<
2413            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2414            Constraint = (),
2415        >,
2416    for<'de> crate::wire::WlanPhySetPowerSaveModeRequest<'de>: ::fidl_next::Decode<
2417            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2418            Constraint = (),
2419        >,
2420    for<'de> crate::wire::WlanPhySetBtCoexistenceModeRequest<'de>: ::fidl_next::Decode<
2421            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2422            Constraint = (),
2423        >,
2424    for<'de> crate::wire::WlanPhySetTxPowerScenarioRequest<'de>: ::fidl_next::Decode<
2425            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2426            Constraint = (),
2427        >,
2428{
2429    async fn on_one_way(
2430        handler: &mut ___H,
2431        mut message: ::fidl_next::Message<___T>,
2432    ) -> ::core::result::Result<
2433        (),
2434        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2435    > {
2436        match *message.header().ordinal {
2437            ordinal => {
2438                handler.on_unknown_interaction(ordinal).await;
2439                if ::core::matches!(
2440                    message.header().flexibility(),
2441                    ::fidl_next::protocol::Flexibility::Strict
2442                ) {
2443                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2444                } else {
2445                    Ok(())
2446                }
2447            }
2448        }
2449    }
2450
2451    async fn on_two_way(
2452        handler: &mut ___H,
2453        mut message: ::fidl_next::Message<___T>,
2454        responder: ::fidl_next::protocol::Responder<___T>,
2455    ) -> ::core::result::Result<
2456        (),
2457        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2458    > {
2459        match *message.header().ordinal {
2460            4152290172424220659 => {
2461                let responder = ::fidl_next::Responder::from_untyped(responder);
2462
2463                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2464                    Ok(decoded) => {
2465                        handler.init(::fidl_next::Request::from_decoded(decoded), responder).await;
2466                        Ok(())
2467                    }
2468                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2469                        ordinal: 4152290172424220659,
2470                        error,
2471                    }),
2472                }
2473            }
2474
2475            3929702727467848522 => {
2476                let responder = ::fidl_next::Responder::from_untyped(responder);
2477
2478                handler.get_supported_mac_roles(responder).await;
2479                Ok(())
2480            }
2481
2482            5530435827689044878 => {
2483                let responder = ::fidl_next::Responder::from_untyped(responder);
2484
2485                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2486                    Ok(decoded) => {
2487                        handler
2488                            .create_iface(::fidl_next::Request::from_decoded(decoded), responder)
2489                            .await;
2490                        Ok(())
2491                    }
2492                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2493                        ordinal: 5530435827689044878,
2494                        error,
2495                    }),
2496                }
2497            }
2498
2499            1127035624611379388 => {
2500                let responder = ::fidl_next::Responder::from_untyped(responder);
2501
2502                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2503                    Ok(decoded) => {
2504                        handler
2505                            .destroy_iface(::fidl_next::Request::from_decoded(decoded), responder)
2506                            .await;
2507                        Ok(())
2508                    }
2509                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2510                        ordinal: 1127035624611379388,
2511                        error,
2512                    }),
2513                }
2514            }
2515
2516            7859442075277675023 => {
2517                let responder = ::fidl_next::Responder::from_untyped(responder);
2518
2519                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2520                    Ok(decoded) => {
2521                        handler
2522                            .set_country(::fidl_next::Request::from_decoded(decoded), responder)
2523                            .await;
2524                        Ok(())
2525                    }
2526                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2527                        ordinal: 7859442075277675023,
2528                        error,
2529                    }),
2530                }
2531            }
2532
2533            8355078711339303759 => {
2534                let responder = ::fidl_next::Responder::from_untyped(responder);
2535
2536                handler.clear_country(responder).await;
2537                Ok(())
2538            }
2539
2540            1436134059072311418 => {
2541                let responder = ::fidl_next::Responder::from_untyped(responder);
2542
2543                handler.get_country(responder).await;
2544                Ok(())
2545            }
2546
2547            5626768781239879949 => {
2548                let responder = ::fidl_next::Responder::from_untyped(responder);
2549
2550                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2551                    Ok(decoded) => {
2552                        handler
2553                            .set_power_save_mode(
2554                                ::fidl_next::Request::from_decoded(decoded),
2555                                responder,
2556                            )
2557                            .await;
2558                        Ok(())
2559                    }
2560                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2561                        ordinal: 5626768781239879949,
2562                        error,
2563                    }),
2564                }
2565            }
2566
2567            2070868099982362662 => {
2568                let responder = ::fidl_next::Responder::from_untyped(responder);
2569
2570                handler.get_power_save_mode(responder).await;
2571                Ok(())
2572            }
2573
2574            8789636981017894154 => {
2575                let responder = ::fidl_next::Responder::from_untyped(responder);
2576
2577                handler.power_down(responder).await;
2578                Ok(())
2579            }
2580
2581            7912237011574232306 => {
2582                let responder = ::fidl_next::Responder::from_untyped(responder);
2583
2584                handler.power_up(responder).await;
2585                Ok(())
2586            }
2587
2588            3390961545241598095 => {
2589                let responder = ::fidl_next::Responder::from_untyped(responder);
2590
2591                handler.reset(responder).await;
2592                Ok(())
2593            }
2594
2595            5060306441717482177 => {
2596                let responder = ::fidl_next::Responder::from_untyped(responder);
2597
2598                handler.get_power_state(responder).await;
2599                Ok(())
2600            }
2601
2602            6541090488596605957 => {
2603                let responder = ::fidl_next::Responder::from_untyped(responder);
2604
2605                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2606                    Ok(decoded) => {
2607                        handler
2608                            .set_bt_coexistence_mode(
2609                                ::fidl_next::Request::from_decoded(decoded),
2610                                responder,
2611                            )
2612                            .await;
2613                        Ok(())
2614                    }
2615                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2616                        ordinal: 6541090488596605957,
2617                        error,
2618                    }),
2619                }
2620            }
2621
2622            8278971081947748572 => {
2623                let responder = ::fidl_next::Responder::from_untyped(responder);
2624
2625                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2626                    Ok(decoded) => {
2627                        handler
2628                            .set_tx_power_scenario(
2629                                ::fidl_next::Request::from_decoded(decoded),
2630                                responder,
2631                            )
2632                            .await;
2633                        Ok(())
2634                    }
2635                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2636                        ordinal: 8278971081947748572,
2637                        error,
2638                    }),
2639                }
2640            }
2641
2642            8702006880668202770 => {
2643                let responder = ::fidl_next::Responder::from_untyped(responder);
2644
2645                handler.reset_tx_power_scenario(responder).await;
2646                Ok(())
2647            }
2648
2649            7131856269124254862 => {
2650                let responder = ::fidl_next::Responder::from_untyped(responder);
2651
2652                handler.get_tx_power_scenario(responder).await;
2653                Ok(())
2654            }
2655
2656            ordinal => {
2657                handler.on_unknown_interaction(ordinal).await;
2658                if ::core::matches!(
2659                    message.header().flexibility(),
2660                    ::fidl_next::protocol::Flexibility::Strict
2661                ) {
2662                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
2663                } else {
2664                    responder
2665                        .respond_framework_error(
2666                            ordinal,
2667                            ::fidl_next::FrameworkError::UnknownMethod,
2668                        )
2669                        .expect("encoding a framework error should never fail")
2670                        .await?;
2671                    Ok(())
2672                }
2673            }
2674        }
2675    }
2676}
2677
2678impl<___T> WlanPhyClientHandler<___T> for ::fidl_next::IgnoreEvents
2679where
2680    ___T: ::fidl_next::Transport,
2681{
2682    async fn on_unknown_interaction(&mut self, _: u64) {}
2683}
2684
2685impl<___H, ___T> WlanPhyLocalClientHandler<___T> for ::fidl_next::Local<___H>
2686where
2687    ___H: WlanPhyClientHandler<___T>,
2688    ___T: ::fidl_next::Transport,
2689{
2690    async fn on_unknown_interaction(&mut self, ordinal: u64) {
2691        ___H::on_unknown_interaction(&mut self.0, ordinal).await
2692    }
2693}
2694
2695impl<___H, ___T> WlanPhyLocalServerHandler<___T> for ::fidl_next::Local<___H>
2696where
2697    ___H: WlanPhyServerHandler<___T>,
2698    ___T: ::fidl_next::Transport,
2699{
2700    async fn init(
2701        &mut self,
2702
2703        request: ::fidl_next::Request<wlan_phy::Init, ___T>,
2704
2705        responder: ::fidl_next::Responder<wlan_phy::Init, ___T>,
2706    ) {
2707        ___H::init(&mut self.0, request, responder).await
2708    }
2709
2710    async fn get_supported_mac_roles(
2711        &mut self,
2712
2713        responder: ::fidl_next::Responder<wlan_phy::GetSupportedMacRoles, ___T>,
2714    ) {
2715        ___H::get_supported_mac_roles(&mut self.0, responder).await
2716    }
2717
2718    async fn create_iface(
2719        &mut self,
2720
2721        request: ::fidl_next::Request<wlan_phy::CreateIface, ___T>,
2722
2723        responder: ::fidl_next::Responder<wlan_phy::CreateIface, ___T>,
2724    ) {
2725        ___H::create_iface(&mut self.0, request, responder).await
2726    }
2727
2728    async fn destroy_iface(
2729        &mut self,
2730
2731        request: ::fidl_next::Request<wlan_phy::DestroyIface, ___T>,
2732
2733        responder: ::fidl_next::Responder<wlan_phy::DestroyIface, ___T>,
2734    ) {
2735        ___H::destroy_iface(&mut self.0, request, responder).await
2736    }
2737
2738    async fn set_country(
2739        &mut self,
2740
2741        request: ::fidl_next::Request<wlan_phy::SetCountry, ___T>,
2742
2743        responder: ::fidl_next::Responder<wlan_phy::SetCountry, ___T>,
2744    ) {
2745        ___H::set_country(&mut self.0, request, responder).await
2746    }
2747
2748    async fn clear_country(
2749        &mut self,
2750
2751        responder: ::fidl_next::Responder<wlan_phy::ClearCountry, ___T>,
2752    ) {
2753        ___H::clear_country(&mut self.0, responder).await
2754    }
2755
2756    async fn get_country(&mut self, responder: ::fidl_next::Responder<wlan_phy::GetCountry, ___T>) {
2757        ___H::get_country(&mut self.0, responder).await
2758    }
2759
2760    async fn set_power_save_mode(
2761        &mut self,
2762
2763        request: ::fidl_next::Request<wlan_phy::SetPowerSaveMode, ___T>,
2764
2765        responder: ::fidl_next::Responder<wlan_phy::SetPowerSaveMode, ___T>,
2766    ) {
2767        ___H::set_power_save_mode(&mut self.0, request, responder).await
2768    }
2769
2770    async fn get_power_save_mode(
2771        &mut self,
2772
2773        responder: ::fidl_next::Responder<wlan_phy::GetPowerSaveMode, ___T>,
2774    ) {
2775        ___H::get_power_save_mode(&mut self.0, responder).await
2776    }
2777
2778    async fn power_down(&mut self, responder: ::fidl_next::Responder<wlan_phy::PowerDown, ___T>) {
2779        ___H::power_down(&mut self.0, responder).await
2780    }
2781
2782    async fn power_up(&mut self, responder: ::fidl_next::Responder<wlan_phy::PowerUp, ___T>) {
2783        ___H::power_up(&mut self.0, responder).await
2784    }
2785
2786    async fn reset(&mut self, responder: ::fidl_next::Responder<wlan_phy::Reset, ___T>) {
2787        ___H::reset(&mut self.0, responder).await
2788    }
2789
2790    async fn get_power_state(
2791        &mut self,
2792
2793        responder: ::fidl_next::Responder<wlan_phy::GetPowerState, ___T>,
2794    ) {
2795        ___H::get_power_state(&mut self.0, responder).await
2796    }
2797
2798    async fn set_bt_coexistence_mode(
2799        &mut self,
2800
2801        request: ::fidl_next::Request<wlan_phy::SetBtCoexistenceMode, ___T>,
2802
2803        responder: ::fidl_next::Responder<wlan_phy::SetBtCoexistenceMode, ___T>,
2804    ) {
2805        ___H::set_bt_coexistence_mode(&mut self.0, request, responder).await
2806    }
2807
2808    async fn set_tx_power_scenario(
2809        &mut self,
2810
2811        request: ::fidl_next::Request<wlan_phy::SetTxPowerScenario, ___T>,
2812
2813        responder: ::fidl_next::Responder<wlan_phy::SetTxPowerScenario, ___T>,
2814    ) {
2815        ___H::set_tx_power_scenario(&mut self.0, request, responder).await
2816    }
2817
2818    async fn reset_tx_power_scenario(
2819        &mut self,
2820
2821        responder: ::fidl_next::Responder<wlan_phy::ResetTxPowerScenario, ___T>,
2822    ) {
2823        ___H::reset_tx_power_scenario(&mut self.0, responder).await
2824    }
2825
2826    async fn get_tx_power_scenario(
2827        &mut self,
2828
2829        responder: ::fidl_next::Responder<wlan_phy::GetTxPowerScenario, ___T>,
2830    ) {
2831        ___H::get_tx_power_scenario(&mut self.0, responder).await
2832    }
2833
2834    async fn on_unknown_interaction(&mut self, ordinal: u64) {
2835        ___H::on_unknown_interaction(&mut self.0, ordinal).await
2836    }
2837}
2838
2839pub use fidl_next_common_fuchsia_wlan_phy::*;