fidl_fuchsia_wlan_device_service__common/
fidl_fuchsia_wlan_device_service__common.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
12#[repr(u8)]
13pub enum CriticalErrorReason {
14    FwCrash = 1,
15}
16
17impl CriticalErrorReason {
18    #[inline]
19    pub fn from_primitive(prim: u8) -> Option<Self> {
20        match prim {
21            1 => Some(Self::FwCrash),
22            _ => None,
23        }
24    }
25
26    #[inline]
27    pub const fn into_primitive(self) -> u8 {
28        self as u8
29    }
30}
31
32#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
33pub enum DeviceMonitorError {
34    Internal,
35    #[doc(hidden)]
36    __SourceBreaking {
37        unknown_ordinal: u32,
38    },
39}
40
41/// Pattern that matches an unknown `DeviceMonitorError` member.
42#[macro_export]
43macro_rules! DeviceMonitorErrorUnknown {
44    () => {
45        _
46    };
47}
48
49impl DeviceMonitorError {
50    #[inline]
51    pub fn from_primitive(prim: u32) -> Option<Self> {
52        match prim {
53            1 => Some(Self::Internal),
54            _ => None,
55        }
56    }
57
58    #[inline]
59    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
60        match prim {
61            1 => Self::Internal,
62            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
63        }
64    }
65
66    #[inline]
67    pub fn unknown() -> Self {
68        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
69    }
70
71    #[inline]
72    pub const fn into_primitive(self) -> u32 {
73        match self {
74            Self::Internal => 1,
75            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
76        }
77    }
78
79    #[inline]
80    pub fn is_unknown(&self) -> bool {
81        match self {
82            Self::__SourceBreaking { unknown_ordinal: _ } => true,
83            _ => false,
84        }
85    }
86}
87
88#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
89#[repr(C)]
90pub struct ClearCountryRequest {
91    pub phy_id: u16,
92}
93
94impl fidl::Persistable for ClearCountryRequest {}
95
96#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
97#[repr(C)]
98pub struct DestroyIfaceRequest {
99    pub iface_id: u16,
100}
101
102impl fidl::Persistable for DestroyIfaceRequest {}
103
104#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
105#[repr(C)]
106pub struct DeviceMonitorClearCountryRequest {
107    pub req: ClearCountryRequest,
108}
109
110impl fidl::Persistable for DeviceMonitorClearCountryRequest {}
111
112#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
113#[repr(C)]
114pub struct DeviceMonitorClearCountryResponse {
115    pub status: i32,
116}
117
118impl fidl::Persistable for DeviceMonitorClearCountryResponse {}
119
120#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
121#[repr(C)]
122pub struct DeviceMonitorDestroyIfaceRequest {
123    pub req: DestroyIfaceRequest,
124}
125
126impl fidl::Persistable for DeviceMonitorDestroyIfaceRequest {}
127
128#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
129#[repr(C)]
130pub struct DeviceMonitorDestroyIfaceResponse {
131    pub status: i32,
132}
133
134impl fidl::Persistable for DeviceMonitorDestroyIfaceResponse {}
135
136#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
137#[repr(C)]
138pub struct DeviceMonitorGetCountryRequest {
139    pub phy_id: u16,
140}
141
142impl fidl::Persistable for DeviceMonitorGetCountryRequest {}
143
144#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
145#[repr(C)]
146pub struct DeviceMonitorGetDevPathRequest {
147    pub phy_id: u16,
148}
149
150impl fidl::Persistable for DeviceMonitorGetDevPathRequest {}
151
152#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
153pub struct DeviceMonitorGetDevPathResponse {
154    pub dev_path: Option<String>,
155}
156
157impl fidl::Persistable for DeviceMonitorGetDevPathResponse {}
158
159#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
160#[repr(C)]
161pub struct DeviceMonitorGetPowerSaveModeRequest {
162    pub phy_id: u16,
163}
164
165impl fidl::Persistable for DeviceMonitorGetPowerSaveModeRequest {}
166
167#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
168#[repr(C)]
169pub struct DeviceMonitorGetPowerStateRequest {
170    pub phy_id: u16,
171}
172
173impl fidl::Persistable for DeviceMonitorGetPowerStateRequest {}
174
175#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
176#[repr(C)]
177pub struct DeviceMonitorGetSupportedMacRolesRequest {
178    pub phy_id: u16,
179}
180
181impl fidl::Persistable for DeviceMonitorGetSupportedMacRolesRequest {}
182
183#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
184#[repr(C)]
185pub struct DeviceMonitorGetTxPowerScenarioRequest {
186    pub phy_id: u16,
187}
188
189impl fidl::Persistable for DeviceMonitorGetTxPowerScenarioRequest {}
190
191#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
192pub struct DeviceMonitorListIfacesResponse {
193    pub iface_list: Vec<u16>,
194}
195
196impl fidl::Persistable for DeviceMonitorListIfacesResponse {}
197
198#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
199pub struct DeviceMonitorListPhysResponse {
200    pub phy_list: Vec<u16>,
201}
202
203impl fidl::Persistable for DeviceMonitorListPhysResponse {}
204
205#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
206#[repr(C)]
207pub struct DeviceMonitorPowerDownRequest {
208    pub phy_id: u16,
209}
210
211impl fidl::Persistable for DeviceMonitorPowerDownRequest {}
212
213#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
214#[repr(C)]
215pub struct DeviceMonitorPowerUpRequest {
216    pub phy_id: u16,
217}
218
219impl fidl::Persistable for DeviceMonitorPowerUpRequest {}
220
221#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
222#[repr(C)]
223pub struct DeviceMonitorQueryIfaceRequest {
224    pub iface_id: u16,
225}
226
227impl fidl::Persistable for DeviceMonitorQueryIfaceRequest {}
228
229#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
230#[repr(C)]
231pub struct DeviceMonitorResetRequest {
232    pub phy_id: u16,
233}
234
235impl fidl::Persistable for DeviceMonitorResetRequest {}
236
237#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
238#[repr(C)]
239pub struct DeviceMonitorResetTxPowerScenarioRequest {
240    pub phy_id: u16,
241}
242
243impl fidl::Persistable for DeviceMonitorResetTxPowerScenarioRequest {}
244
245#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
246pub struct DeviceMonitorSetBtCoexistenceModeRequest {
247    pub phy_id: u16,
248    pub mode: fidl_fuchsia_wlan_internal__common::BtCoexistenceMode,
249}
250
251impl fidl::Persistable for DeviceMonitorSetBtCoexistenceModeRequest {}
252
253#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
254#[repr(C)]
255pub struct DeviceMonitorSetCountryRequest {
256    pub req: SetCountryRequest,
257}
258
259impl fidl::Persistable for DeviceMonitorSetCountryRequest {}
260
261#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
262#[repr(C)]
263pub struct DeviceMonitorSetCountryResponse {
264    pub status: i32,
265}
266
267impl fidl::Persistable for DeviceMonitorSetCountryResponse {}
268
269#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
270pub struct DeviceMonitorSetPowerSaveModeRequest {
271    pub req: SetPowerSaveModeRequest,
272}
273
274impl fidl::Persistable for DeviceMonitorSetPowerSaveModeRequest {}
275
276#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
277#[repr(C)]
278pub struct DeviceMonitorSetPowerSaveModeResponse {
279    pub status: i32,
280}
281
282impl fidl::Persistable for DeviceMonitorSetPowerSaveModeResponse {}
283
284#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
285pub struct DeviceMonitorSetTxPowerScenarioRequest {
286    pub phy_id: u16,
287    pub scenario: fidl_fuchsia_wlan_internal__common::TxPowerScenario,
288}
289
290impl fidl::Persistable for DeviceMonitorSetTxPowerScenarioRequest {}
291
292#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
293#[repr(C)]
294pub struct DeviceMonitorGetCountryResponse {
295    pub resp: GetCountryResponse,
296}
297
298impl fidl::Persistable for DeviceMonitorGetCountryResponse {}
299
300#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
301pub struct DeviceMonitorGetPowerSaveModeResponse {
302    pub resp: GetPowerSaveModeResponse,
303}
304
305impl fidl::Persistable for DeviceMonitorGetPowerSaveModeResponse {}
306
307#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
308pub struct DeviceMonitorGetPowerStateResponse {
309    pub power_on: bool,
310}
311
312impl fidl::Persistable for DeviceMonitorGetPowerStateResponse {}
313
314#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
315pub struct DeviceMonitorGetSupportedMacRolesResponse {
316    pub supported_mac_roles: Vec<fidl_fuchsia_wlan_common__common::WlanMacRole>,
317}
318
319impl fidl::Persistable for DeviceMonitorGetSupportedMacRolesResponse {}
320
321#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
322pub struct DeviceMonitorGetTxPowerScenarioResponse {
323    pub scenario: fidl_fuchsia_wlan_internal__common::TxPowerScenario,
324}
325
326impl fidl::Persistable for DeviceMonitorGetTxPowerScenarioResponse {}
327
328#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
329pub struct DeviceMonitorQueryIfaceResponse {
330    pub resp: QueryIfaceResponse,
331}
332
333impl fidl::Persistable for DeviceMonitorQueryIfaceResponse {}
334
335#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
336#[repr(C)]
337pub struct DeviceWatcherOnIfaceAddedRequest {
338    pub iface_id: u16,
339}
340
341impl fidl::Persistable for DeviceWatcherOnIfaceAddedRequest {}
342
343#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
344#[repr(C)]
345pub struct DeviceWatcherOnIfaceRemovedRequest {
346    pub iface_id: u16,
347}
348
349impl fidl::Persistable for DeviceWatcherOnIfaceRemovedRequest {}
350
351#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
352#[repr(C)]
353pub struct DeviceWatcherOnPhyAddedRequest {
354    pub phy_id: u16,
355}
356
357impl fidl::Persistable for DeviceWatcherOnPhyAddedRequest {}
358
359#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
360#[repr(C)]
361pub struct DeviceWatcherOnPhyRemovedRequest {
362    pub phy_id: u16,
363}
364
365impl fidl::Persistable for DeviceWatcherOnPhyRemovedRequest {}
366
367#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
368#[repr(C)]
369pub struct GetCountryResponse {
370    pub alpha2: [u8; 2],
371}
372
373impl fidl::Persistable for GetCountryResponse {}
374
375#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
376pub struct GetPowerSaveModeResponse {
377    /// Power Save Mode bit mask
378    pub ps_mode: fidl_fuchsia_wlan_common__common::PowerSaveType,
379}
380
381impl fidl::Persistable for GetPowerSaveModeResponse {}
382
383#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
384#[repr(C)]
385pub struct PhyEventWatcherOnCountryCodeChangeRequest {
386    pub phy_id: u16,
387    pub alpha2: [u8; 2],
388}
389
390impl fidl::Persistable for PhyEventWatcherOnCountryCodeChangeRequest {}
391
392#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
393pub struct PhyEventWatcherOnCriticalErrorRequest {
394    pub phy_id: u16,
395    pub reason_code: CriticalErrorReason,
396}
397
398impl fidl::Persistable for PhyEventWatcherOnCriticalErrorRequest {}
399
400#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
401pub struct QueryIfaceResponse {
402    /// The role the iface is currently operating in, e.g., client role.
403    pub role: fidl_fuchsia_wlan_common__common::WlanMacRole,
404    /// The iface's global ID.
405    pub id: u16,
406    /// Iface's PHY ID.
407    pub phy_id: u16,
408    /// Local ID assigned by this iface's PHY.
409    pub phy_assigned_id: u16,
410    /// The iface's current station MAC address.
411    pub sta_addr: [u8; 6],
412    /// MAC address assigned by the factory.
413    pub factory_addr: [u8; 6],
414}
415
416impl fidl::Persistable for QueryIfaceResponse {}
417
418#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
419#[repr(C)]
420pub struct SetCountryRequest {
421    pub phy_id: u16,
422    pub alpha2: [u8; 2],
423}
424
425impl fidl::Persistable for SetCountryRequest {}
426
427#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
428pub struct SetPowerSaveModeRequest {
429    /// Interface's PHY ID
430    pub phy_id: u16,
431    /// Power Save Mode bit mask
432    pub ps_mode: fidl_fuchsia_wlan_common__common::PowerSaveType,
433}
434
435impl fidl::Persistable for SetPowerSaveModeRequest {}
436
437#[derive(Clone, Debug, Default, PartialEq)]
438pub struct DeviceMonitorCreateIfaceRequest {
439    pub phy_id: Option<u16>,
440    pub role: Option<fidl_fuchsia_wlan_common__common::WlanMacRole>,
441    pub sta_address: Option<[u8; 6]>,
442    #[doc(hidden)]
443    pub __source_breaking: fidl::marker::SourceBreaking,
444}
445
446impl fidl::Persistable for DeviceMonitorCreateIfaceRequest {}
447
448#[derive(Clone, Debug, Default, PartialEq)]
449pub struct DeviceMonitorCreateIfaceResponse {
450    pub iface_id: Option<u16>,
451    #[doc(hidden)]
452    pub __source_breaking: fidl::marker::SourceBreaking,
453}
454
455impl fidl::Persistable for DeviceMonitorCreateIfaceResponse {}
456
457#[derive(Clone, Debug, PartialEq)]
458pub enum GetIfaceHistogramStatsResponse {
459    Stats(fidl_fuchsia_wlan_stats__common::IfaceHistogramStats),
460    ErrorStatus(i32),
461}
462
463impl GetIfaceHistogramStatsResponse {
464    #[inline]
465    pub fn ordinal(&self) -> u64 {
466        match *self {
467            Self::Stats(_) => 1,
468            Self::ErrorStatus(_) => 2,
469        }
470    }
471}
472
473impl fidl::Persistable for GetIfaceHistogramStatsResponse {}
474
475pub mod device_monitor_ordinals {
476    pub const LIST_PHYS: u64 = 0x3a08518874196aab;
477    pub const LIST_IFACES: u64 = 0x129e758fb8e0b113;
478    pub const GET_DEV_PATH: u64 = 0x4aa489b57113bccf;
479    pub const GET_SUPPORTED_MAC_ROLES: u64 = 0x172b3d2eabd5a14e;
480    pub const WATCH_DEVICES: u64 = 0x4615941e67e31b8e;
481    pub const WATCH_PHY_EVENTS: u64 = 0x2c5af9d064099745;
482    pub const GET_COUNTRY: u64 = 0x6f1040bd81bde90e;
483    pub const SET_COUNTRY: u64 = 0xdaa7b77a5a6e71b;
484    pub const CLEAR_COUNTRY: u64 = 0x66714d61103120e9;
485    pub const SET_POWER_SAVE_MODE: u64 = 0x62202b4d360533bc;
486    pub const GET_POWER_SAVE_MODE: u64 = 0x14304d406ada8693;
487    pub const POWER_DOWN: u64 = 0x374ad717fe8902e0;
488    pub const POWER_UP: u64 = 0xa2379b639869c17;
489    pub const RESET: u64 = 0x6def240c9f8c6867;
490    pub const SET_TX_POWER_SCENARIO: u64 = 0x7c51443a985934fd;
491    pub const RESET_TX_POWER_SCENARIO: u64 = 0x4790357c9cdddc4a;
492    pub const GET_TX_POWER_SCENARIO: u64 = 0x555fb197f90e9830;
493    pub const GET_POWER_STATE: u64 = 0x58cf95c5bbbe3f;
494    pub const SET_BT_COEXISTENCE_MODE: u64 = 0x97539596c9a79c7;
495    pub const CREATE_IFACE: u64 = 0x1e1d30c24c0ec144;
496    pub const QUERY_IFACE: u64 = 0x1a48c4a2b86259ef;
497    pub const DESTROY_IFACE: u64 = 0x4c77982c1616a3b0;
498    pub const GET_CLIENT_SME: u64 = 0x1b056c379ca98273;
499    pub const GET_AP_SME: u64 = 0x754de680c4318c52;
500    pub const GET_SME_TELEMETRY: u64 = 0x1baf42b003f7452a;
501}
502
503pub mod device_watcher_ordinals {
504    pub const ON_PHY_ADDED: u64 = 0x771c58e0bd059f86;
505    pub const ON_PHY_REMOVED: u64 = 0x4ad72b96ccb7cff6;
506    pub const ON_IFACE_ADDED: u64 = 0x6ee685e4aa1f31d8;
507    pub const ON_IFACE_REMOVED: u64 = 0x3b771b1fce38c291;
508}
509
510pub mod phy_event_watcher_ordinals {
511    pub const ON_CRITICAL_ERROR: u64 = 0x609a325d54f9e6ac;
512    pub const ON_COUNTRY_CODE_CHANGE: u64 = 0x781d791772be33ed;
513}
514
515mod internal {
516    use super::*;
517    unsafe impl fidl::encoding::TypeMarker for CriticalErrorReason {
518        type Owned = Self;
519
520        #[inline(always)]
521        fn inline_align(_context: fidl::encoding::Context) -> usize {
522            std::mem::align_of::<u8>()
523        }
524
525        #[inline(always)]
526        fn inline_size(_context: fidl::encoding::Context) -> usize {
527            std::mem::size_of::<u8>()
528        }
529
530        #[inline(always)]
531        fn encode_is_copy() -> bool {
532            true
533        }
534
535        #[inline(always)]
536        fn decode_is_copy() -> bool {
537            false
538        }
539    }
540
541    impl fidl::encoding::ValueTypeMarker for CriticalErrorReason {
542        type Borrowed<'a> = Self;
543        #[inline(always)]
544        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
545            *value
546        }
547    }
548
549    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
550        for CriticalErrorReason
551    {
552        #[inline]
553        unsafe fn encode(
554            self,
555            encoder: &mut fidl::encoding::Encoder<'_, D>,
556            offset: usize,
557            _depth: fidl::encoding::Depth,
558        ) -> fidl::Result<()> {
559            encoder.debug_check_bounds::<Self>(offset);
560            encoder.write_num(self.into_primitive(), offset);
561            Ok(())
562        }
563    }
564
565    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CriticalErrorReason {
566        #[inline(always)]
567        fn new_empty() -> Self {
568            Self::FwCrash
569        }
570
571        #[inline]
572        unsafe fn decode(
573            &mut self,
574            decoder: &mut fidl::encoding::Decoder<'_, D>,
575            offset: usize,
576            _depth: fidl::encoding::Depth,
577        ) -> fidl::Result<()> {
578            decoder.debug_check_bounds::<Self>(offset);
579            let prim = decoder.read_num::<u8>(offset);
580
581            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
582            Ok(())
583        }
584    }
585    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorError {
586        type Owned = Self;
587
588        #[inline(always)]
589        fn inline_align(_context: fidl::encoding::Context) -> usize {
590            std::mem::align_of::<u32>()
591        }
592
593        #[inline(always)]
594        fn inline_size(_context: fidl::encoding::Context) -> usize {
595            std::mem::size_of::<u32>()
596        }
597
598        #[inline(always)]
599        fn encode_is_copy() -> bool {
600            false
601        }
602
603        #[inline(always)]
604        fn decode_is_copy() -> bool {
605            false
606        }
607    }
608
609    impl fidl::encoding::ValueTypeMarker for DeviceMonitorError {
610        type Borrowed<'a> = Self;
611        #[inline(always)]
612        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
613            *value
614        }
615    }
616
617    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
618        for DeviceMonitorError
619    {
620        #[inline]
621        unsafe fn encode(
622            self,
623            encoder: &mut fidl::encoding::Encoder<'_, D>,
624            offset: usize,
625            _depth: fidl::encoding::Depth,
626        ) -> fidl::Result<()> {
627            encoder.debug_check_bounds::<Self>(offset);
628            encoder.write_num(self.into_primitive(), offset);
629            Ok(())
630        }
631    }
632
633    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeviceMonitorError {
634        #[inline(always)]
635        fn new_empty() -> Self {
636            Self::unknown()
637        }
638
639        #[inline]
640        unsafe fn decode(
641            &mut self,
642            decoder: &mut fidl::encoding::Decoder<'_, D>,
643            offset: usize,
644            _depth: fidl::encoding::Depth,
645        ) -> fidl::Result<()> {
646            decoder.debug_check_bounds::<Self>(offset);
647            let prim = decoder.read_num::<u32>(offset);
648
649            *self = Self::from_primitive_allow_unknown(prim);
650            Ok(())
651        }
652    }
653
654    impl fidl::encoding::ValueTypeMarker for ClearCountryRequest {
655        type Borrowed<'a> = &'a Self;
656        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
657            value
658        }
659    }
660
661    unsafe impl fidl::encoding::TypeMarker for ClearCountryRequest {
662        type Owned = Self;
663
664        #[inline(always)]
665        fn inline_align(_context: fidl::encoding::Context) -> usize {
666            2
667        }
668
669        #[inline(always)]
670        fn inline_size(_context: fidl::encoding::Context) -> usize {
671            2
672        }
673        #[inline(always)]
674        fn encode_is_copy() -> bool {
675            true
676        }
677
678        #[inline(always)]
679        fn decode_is_copy() -> bool {
680            true
681        }
682    }
683
684    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ClearCountryRequest, D>
685        for &ClearCountryRequest
686    {
687        #[inline]
688        unsafe fn encode(
689            self,
690            encoder: &mut fidl::encoding::Encoder<'_, D>,
691            offset: usize,
692            _depth: fidl::encoding::Depth,
693        ) -> fidl::Result<()> {
694            encoder.debug_check_bounds::<ClearCountryRequest>(offset);
695            unsafe {
696                // Copy the object into the buffer.
697                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
698                (buf_ptr as *mut ClearCountryRequest)
699                    .write_unaligned((self as *const ClearCountryRequest).read());
700                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
701                // done second because the memcpy will write garbage to these bytes.
702            }
703            Ok(())
704        }
705    }
706    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
707        fidl::encoding::Encode<ClearCountryRequest, D> for (T0,)
708    {
709        #[inline]
710        unsafe fn encode(
711            self,
712            encoder: &mut fidl::encoding::Encoder<'_, D>,
713            offset: usize,
714            depth: fidl::encoding::Depth,
715        ) -> fidl::Result<()> {
716            encoder.debug_check_bounds::<ClearCountryRequest>(offset);
717            // Zero out padding regions. There's no need to apply masks
718            // because the unmasked parts will be overwritten by fields.
719            // Write the fields.
720            self.0.encode(encoder, offset + 0, depth)?;
721            Ok(())
722        }
723    }
724
725    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClearCountryRequest {
726        #[inline(always)]
727        fn new_empty() -> Self {
728            Self { phy_id: fidl::new_empty!(u16, D) }
729        }
730
731        #[inline]
732        unsafe fn decode(
733            &mut self,
734            decoder: &mut fidl::encoding::Decoder<'_, D>,
735            offset: usize,
736            _depth: fidl::encoding::Depth,
737        ) -> fidl::Result<()> {
738            decoder.debug_check_bounds::<Self>(offset);
739            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
740            // Verify that padding bytes are zero.
741            // Copy from the buffer into the object.
742            unsafe {
743                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
744            }
745            Ok(())
746        }
747    }
748
749    impl fidl::encoding::ValueTypeMarker for DestroyIfaceRequest {
750        type Borrowed<'a> = &'a Self;
751        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
752            value
753        }
754    }
755
756    unsafe impl fidl::encoding::TypeMarker for DestroyIfaceRequest {
757        type Owned = Self;
758
759        #[inline(always)]
760        fn inline_align(_context: fidl::encoding::Context) -> usize {
761            2
762        }
763
764        #[inline(always)]
765        fn inline_size(_context: fidl::encoding::Context) -> usize {
766            2
767        }
768        #[inline(always)]
769        fn encode_is_copy() -> bool {
770            true
771        }
772
773        #[inline(always)]
774        fn decode_is_copy() -> bool {
775            true
776        }
777    }
778
779    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DestroyIfaceRequest, D>
780        for &DestroyIfaceRequest
781    {
782        #[inline]
783        unsafe fn encode(
784            self,
785            encoder: &mut fidl::encoding::Encoder<'_, D>,
786            offset: usize,
787            _depth: fidl::encoding::Depth,
788        ) -> fidl::Result<()> {
789            encoder.debug_check_bounds::<DestroyIfaceRequest>(offset);
790            unsafe {
791                // Copy the object into the buffer.
792                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
793                (buf_ptr as *mut DestroyIfaceRequest)
794                    .write_unaligned((self as *const DestroyIfaceRequest).read());
795                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
796                // done second because the memcpy will write garbage to these bytes.
797            }
798            Ok(())
799        }
800    }
801    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
802        fidl::encoding::Encode<DestroyIfaceRequest, D> for (T0,)
803    {
804        #[inline]
805        unsafe fn encode(
806            self,
807            encoder: &mut fidl::encoding::Encoder<'_, D>,
808            offset: usize,
809            depth: fidl::encoding::Depth,
810        ) -> fidl::Result<()> {
811            encoder.debug_check_bounds::<DestroyIfaceRequest>(offset);
812            // Zero out padding regions. There's no need to apply masks
813            // because the unmasked parts will be overwritten by fields.
814            // Write the fields.
815            self.0.encode(encoder, offset + 0, depth)?;
816            Ok(())
817        }
818    }
819
820    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DestroyIfaceRequest {
821        #[inline(always)]
822        fn new_empty() -> Self {
823            Self { iface_id: fidl::new_empty!(u16, D) }
824        }
825
826        #[inline]
827        unsafe fn decode(
828            &mut self,
829            decoder: &mut fidl::encoding::Decoder<'_, D>,
830            offset: usize,
831            _depth: fidl::encoding::Depth,
832        ) -> fidl::Result<()> {
833            decoder.debug_check_bounds::<Self>(offset);
834            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
835            // Verify that padding bytes are zero.
836            // Copy from the buffer into the object.
837            unsafe {
838                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
839            }
840            Ok(())
841        }
842    }
843
844    impl fidl::encoding::ValueTypeMarker for DeviceMonitorClearCountryRequest {
845        type Borrowed<'a> = &'a Self;
846        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
847            value
848        }
849    }
850
851    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorClearCountryRequest {
852        type Owned = Self;
853
854        #[inline(always)]
855        fn inline_align(_context: fidl::encoding::Context) -> usize {
856            2
857        }
858
859        #[inline(always)]
860        fn inline_size(_context: fidl::encoding::Context) -> usize {
861            2
862        }
863        #[inline(always)]
864        fn encode_is_copy() -> bool {
865            true
866        }
867
868        #[inline(always)]
869        fn decode_is_copy() -> bool {
870            true
871        }
872    }
873
874    unsafe impl<D: fidl::encoding::ResourceDialect>
875        fidl::encoding::Encode<DeviceMonitorClearCountryRequest, D>
876        for &DeviceMonitorClearCountryRequest
877    {
878        #[inline]
879        unsafe fn encode(
880            self,
881            encoder: &mut fidl::encoding::Encoder<'_, D>,
882            offset: usize,
883            _depth: fidl::encoding::Depth,
884        ) -> fidl::Result<()> {
885            encoder.debug_check_bounds::<DeviceMonitorClearCountryRequest>(offset);
886            unsafe {
887                // Copy the object into the buffer.
888                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
889                (buf_ptr as *mut DeviceMonitorClearCountryRequest)
890                    .write_unaligned((self as *const DeviceMonitorClearCountryRequest).read());
891                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
892                // done second because the memcpy will write garbage to these bytes.
893            }
894            Ok(())
895        }
896    }
897    unsafe impl<
898        D: fidl::encoding::ResourceDialect,
899        T0: fidl::encoding::Encode<ClearCountryRequest, D>,
900    > fidl::encoding::Encode<DeviceMonitorClearCountryRequest, D> for (T0,)
901    {
902        #[inline]
903        unsafe fn encode(
904            self,
905            encoder: &mut fidl::encoding::Encoder<'_, D>,
906            offset: usize,
907            depth: fidl::encoding::Depth,
908        ) -> fidl::Result<()> {
909            encoder.debug_check_bounds::<DeviceMonitorClearCountryRequest>(offset);
910            // Zero out padding regions. There's no need to apply masks
911            // because the unmasked parts will be overwritten by fields.
912            // Write the fields.
913            self.0.encode(encoder, offset + 0, depth)?;
914            Ok(())
915        }
916    }
917
918    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
919        for DeviceMonitorClearCountryRequest
920    {
921        #[inline(always)]
922        fn new_empty() -> Self {
923            Self { req: fidl::new_empty!(ClearCountryRequest, D) }
924        }
925
926        #[inline]
927        unsafe fn decode(
928            &mut self,
929            decoder: &mut fidl::encoding::Decoder<'_, D>,
930            offset: usize,
931            _depth: fidl::encoding::Depth,
932        ) -> fidl::Result<()> {
933            decoder.debug_check_bounds::<Self>(offset);
934            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
935            // Verify that padding bytes are zero.
936            // Copy from the buffer into the object.
937            unsafe {
938                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
939            }
940            Ok(())
941        }
942    }
943
944    impl fidl::encoding::ValueTypeMarker for DeviceMonitorClearCountryResponse {
945        type Borrowed<'a> = &'a Self;
946        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
947            value
948        }
949    }
950
951    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorClearCountryResponse {
952        type Owned = Self;
953
954        #[inline(always)]
955        fn inline_align(_context: fidl::encoding::Context) -> usize {
956            4
957        }
958
959        #[inline(always)]
960        fn inline_size(_context: fidl::encoding::Context) -> usize {
961            4
962        }
963        #[inline(always)]
964        fn encode_is_copy() -> bool {
965            true
966        }
967
968        #[inline(always)]
969        fn decode_is_copy() -> bool {
970            true
971        }
972    }
973
974    unsafe impl<D: fidl::encoding::ResourceDialect>
975        fidl::encoding::Encode<DeviceMonitorClearCountryResponse, D>
976        for &DeviceMonitorClearCountryResponse
977    {
978        #[inline]
979        unsafe fn encode(
980            self,
981            encoder: &mut fidl::encoding::Encoder<'_, D>,
982            offset: usize,
983            _depth: fidl::encoding::Depth,
984        ) -> fidl::Result<()> {
985            encoder.debug_check_bounds::<DeviceMonitorClearCountryResponse>(offset);
986            unsafe {
987                // Copy the object into the buffer.
988                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
989                (buf_ptr as *mut DeviceMonitorClearCountryResponse)
990                    .write_unaligned((self as *const DeviceMonitorClearCountryResponse).read());
991                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
992                // done second because the memcpy will write garbage to these bytes.
993            }
994            Ok(())
995        }
996    }
997    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
998        fidl::encoding::Encode<DeviceMonitorClearCountryResponse, D> for (T0,)
999    {
1000        #[inline]
1001        unsafe fn encode(
1002            self,
1003            encoder: &mut fidl::encoding::Encoder<'_, D>,
1004            offset: usize,
1005            depth: fidl::encoding::Depth,
1006        ) -> fidl::Result<()> {
1007            encoder.debug_check_bounds::<DeviceMonitorClearCountryResponse>(offset);
1008            // Zero out padding regions. There's no need to apply masks
1009            // because the unmasked parts will be overwritten by fields.
1010            // Write the fields.
1011            self.0.encode(encoder, offset + 0, depth)?;
1012            Ok(())
1013        }
1014    }
1015
1016    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1017        for DeviceMonitorClearCountryResponse
1018    {
1019        #[inline(always)]
1020        fn new_empty() -> Self {
1021            Self { status: fidl::new_empty!(i32, D) }
1022        }
1023
1024        #[inline]
1025        unsafe fn decode(
1026            &mut self,
1027            decoder: &mut fidl::encoding::Decoder<'_, D>,
1028            offset: usize,
1029            _depth: fidl::encoding::Depth,
1030        ) -> fidl::Result<()> {
1031            decoder.debug_check_bounds::<Self>(offset);
1032            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1033            // Verify that padding bytes are zero.
1034            // Copy from the buffer into the object.
1035            unsafe {
1036                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1037            }
1038            Ok(())
1039        }
1040    }
1041
1042    impl fidl::encoding::ValueTypeMarker for DeviceMonitorDestroyIfaceRequest {
1043        type Borrowed<'a> = &'a Self;
1044        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1045            value
1046        }
1047    }
1048
1049    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorDestroyIfaceRequest {
1050        type Owned = Self;
1051
1052        #[inline(always)]
1053        fn inline_align(_context: fidl::encoding::Context) -> usize {
1054            2
1055        }
1056
1057        #[inline(always)]
1058        fn inline_size(_context: fidl::encoding::Context) -> usize {
1059            2
1060        }
1061        #[inline(always)]
1062        fn encode_is_copy() -> bool {
1063            true
1064        }
1065
1066        #[inline(always)]
1067        fn decode_is_copy() -> bool {
1068            true
1069        }
1070    }
1071
1072    unsafe impl<D: fidl::encoding::ResourceDialect>
1073        fidl::encoding::Encode<DeviceMonitorDestroyIfaceRequest, D>
1074        for &DeviceMonitorDestroyIfaceRequest
1075    {
1076        #[inline]
1077        unsafe fn encode(
1078            self,
1079            encoder: &mut fidl::encoding::Encoder<'_, D>,
1080            offset: usize,
1081            _depth: fidl::encoding::Depth,
1082        ) -> fidl::Result<()> {
1083            encoder.debug_check_bounds::<DeviceMonitorDestroyIfaceRequest>(offset);
1084            unsafe {
1085                // Copy the object into the buffer.
1086                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1087                (buf_ptr as *mut DeviceMonitorDestroyIfaceRequest)
1088                    .write_unaligned((self as *const DeviceMonitorDestroyIfaceRequest).read());
1089                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1090                // done second because the memcpy will write garbage to these bytes.
1091            }
1092            Ok(())
1093        }
1094    }
1095    unsafe impl<
1096        D: fidl::encoding::ResourceDialect,
1097        T0: fidl::encoding::Encode<DestroyIfaceRequest, D>,
1098    > fidl::encoding::Encode<DeviceMonitorDestroyIfaceRequest, D> for (T0,)
1099    {
1100        #[inline]
1101        unsafe fn encode(
1102            self,
1103            encoder: &mut fidl::encoding::Encoder<'_, D>,
1104            offset: usize,
1105            depth: fidl::encoding::Depth,
1106        ) -> fidl::Result<()> {
1107            encoder.debug_check_bounds::<DeviceMonitorDestroyIfaceRequest>(offset);
1108            // Zero out padding regions. There's no need to apply masks
1109            // because the unmasked parts will be overwritten by fields.
1110            // Write the fields.
1111            self.0.encode(encoder, offset + 0, depth)?;
1112            Ok(())
1113        }
1114    }
1115
1116    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1117        for DeviceMonitorDestroyIfaceRequest
1118    {
1119        #[inline(always)]
1120        fn new_empty() -> Self {
1121            Self { req: fidl::new_empty!(DestroyIfaceRequest, D) }
1122        }
1123
1124        #[inline]
1125        unsafe fn decode(
1126            &mut self,
1127            decoder: &mut fidl::encoding::Decoder<'_, D>,
1128            offset: usize,
1129            _depth: fidl::encoding::Depth,
1130        ) -> fidl::Result<()> {
1131            decoder.debug_check_bounds::<Self>(offset);
1132            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1133            // Verify that padding bytes are zero.
1134            // Copy from the buffer into the object.
1135            unsafe {
1136                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
1137            }
1138            Ok(())
1139        }
1140    }
1141
1142    impl fidl::encoding::ValueTypeMarker for DeviceMonitorDestroyIfaceResponse {
1143        type Borrowed<'a> = &'a Self;
1144        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1145            value
1146        }
1147    }
1148
1149    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorDestroyIfaceResponse {
1150        type Owned = Self;
1151
1152        #[inline(always)]
1153        fn inline_align(_context: fidl::encoding::Context) -> usize {
1154            4
1155        }
1156
1157        #[inline(always)]
1158        fn inline_size(_context: fidl::encoding::Context) -> usize {
1159            4
1160        }
1161        #[inline(always)]
1162        fn encode_is_copy() -> bool {
1163            true
1164        }
1165
1166        #[inline(always)]
1167        fn decode_is_copy() -> bool {
1168            true
1169        }
1170    }
1171
1172    unsafe impl<D: fidl::encoding::ResourceDialect>
1173        fidl::encoding::Encode<DeviceMonitorDestroyIfaceResponse, D>
1174        for &DeviceMonitorDestroyIfaceResponse
1175    {
1176        #[inline]
1177        unsafe fn encode(
1178            self,
1179            encoder: &mut fidl::encoding::Encoder<'_, D>,
1180            offset: usize,
1181            _depth: fidl::encoding::Depth,
1182        ) -> fidl::Result<()> {
1183            encoder.debug_check_bounds::<DeviceMonitorDestroyIfaceResponse>(offset);
1184            unsafe {
1185                // Copy the object into the buffer.
1186                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1187                (buf_ptr as *mut DeviceMonitorDestroyIfaceResponse)
1188                    .write_unaligned((self as *const DeviceMonitorDestroyIfaceResponse).read());
1189                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1190                // done second because the memcpy will write garbage to these bytes.
1191            }
1192            Ok(())
1193        }
1194    }
1195    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
1196        fidl::encoding::Encode<DeviceMonitorDestroyIfaceResponse, D> for (T0,)
1197    {
1198        #[inline]
1199        unsafe fn encode(
1200            self,
1201            encoder: &mut fidl::encoding::Encoder<'_, D>,
1202            offset: usize,
1203            depth: fidl::encoding::Depth,
1204        ) -> fidl::Result<()> {
1205            encoder.debug_check_bounds::<DeviceMonitorDestroyIfaceResponse>(offset);
1206            // Zero out padding regions. There's no need to apply masks
1207            // because the unmasked parts will be overwritten by fields.
1208            // Write the fields.
1209            self.0.encode(encoder, offset + 0, depth)?;
1210            Ok(())
1211        }
1212    }
1213
1214    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1215        for DeviceMonitorDestroyIfaceResponse
1216    {
1217        #[inline(always)]
1218        fn new_empty() -> Self {
1219            Self { status: fidl::new_empty!(i32, D) }
1220        }
1221
1222        #[inline]
1223        unsafe fn decode(
1224            &mut self,
1225            decoder: &mut fidl::encoding::Decoder<'_, D>,
1226            offset: usize,
1227            _depth: fidl::encoding::Depth,
1228        ) -> fidl::Result<()> {
1229            decoder.debug_check_bounds::<Self>(offset);
1230            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1231            // Verify that padding bytes are zero.
1232            // Copy from the buffer into the object.
1233            unsafe {
1234                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1235            }
1236            Ok(())
1237        }
1238    }
1239
1240    impl fidl::encoding::ValueTypeMarker for DeviceMonitorGetCountryRequest {
1241        type Borrowed<'a> = &'a Self;
1242        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1243            value
1244        }
1245    }
1246
1247    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorGetCountryRequest {
1248        type Owned = Self;
1249
1250        #[inline(always)]
1251        fn inline_align(_context: fidl::encoding::Context) -> usize {
1252            2
1253        }
1254
1255        #[inline(always)]
1256        fn inline_size(_context: fidl::encoding::Context) -> usize {
1257            2
1258        }
1259        #[inline(always)]
1260        fn encode_is_copy() -> bool {
1261            true
1262        }
1263
1264        #[inline(always)]
1265        fn decode_is_copy() -> bool {
1266            true
1267        }
1268    }
1269
1270    unsafe impl<D: fidl::encoding::ResourceDialect>
1271        fidl::encoding::Encode<DeviceMonitorGetCountryRequest, D>
1272        for &DeviceMonitorGetCountryRequest
1273    {
1274        #[inline]
1275        unsafe fn encode(
1276            self,
1277            encoder: &mut fidl::encoding::Encoder<'_, D>,
1278            offset: usize,
1279            _depth: fidl::encoding::Depth,
1280        ) -> fidl::Result<()> {
1281            encoder.debug_check_bounds::<DeviceMonitorGetCountryRequest>(offset);
1282            unsafe {
1283                // Copy the object into the buffer.
1284                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1285                (buf_ptr as *mut DeviceMonitorGetCountryRequest)
1286                    .write_unaligned((self as *const DeviceMonitorGetCountryRequest).read());
1287                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1288                // done second because the memcpy will write garbage to these bytes.
1289            }
1290            Ok(())
1291        }
1292    }
1293    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
1294        fidl::encoding::Encode<DeviceMonitorGetCountryRequest, D> for (T0,)
1295    {
1296        #[inline]
1297        unsafe fn encode(
1298            self,
1299            encoder: &mut fidl::encoding::Encoder<'_, D>,
1300            offset: usize,
1301            depth: fidl::encoding::Depth,
1302        ) -> fidl::Result<()> {
1303            encoder.debug_check_bounds::<DeviceMonitorGetCountryRequest>(offset);
1304            // Zero out padding regions. There's no need to apply masks
1305            // because the unmasked parts will be overwritten by fields.
1306            // Write the fields.
1307            self.0.encode(encoder, offset + 0, depth)?;
1308            Ok(())
1309        }
1310    }
1311
1312    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1313        for DeviceMonitorGetCountryRequest
1314    {
1315        #[inline(always)]
1316        fn new_empty() -> Self {
1317            Self { phy_id: fidl::new_empty!(u16, D) }
1318        }
1319
1320        #[inline]
1321        unsafe fn decode(
1322            &mut self,
1323            decoder: &mut fidl::encoding::Decoder<'_, D>,
1324            offset: usize,
1325            _depth: fidl::encoding::Depth,
1326        ) -> fidl::Result<()> {
1327            decoder.debug_check_bounds::<Self>(offset);
1328            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1329            // Verify that padding bytes are zero.
1330            // Copy from the buffer into the object.
1331            unsafe {
1332                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
1333            }
1334            Ok(())
1335        }
1336    }
1337
1338    impl fidl::encoding::ValueTypeMarker for DeviceMonitorGetDevPathRequest {
1339        type Borrowed<'a> = &'a Self;
1340        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1341            value
1342        }
1343    }
1344
1345    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorGetDevPathRequest {
1346        type Owned = Self;
1347
1348        #[inline(always)]
1349        fn inline_align(_context: fidl::encoding::Context) -> usize {
1350            2
1351        }
1352
1353        #[inline(always)]
1354        fn inline_size(_context: fidl::encoding::Context) -> usize {
1355            2
1356        }
1357        #[inline(always)]
1358        fn encode_is_copy() -> bool {
1359            true
1360        }
1361
1362        #[inline(always)]
1363        fn decode_is_copy() -> bool {
1364            true
1365        }
1366    }
1367
1368    unsafe impl<D: fidl::encoding::ResourceDialect>
1369        fidl::encoding::Encode<DeviceMonitorGetDevPathRequest, D>
1370        for &DeviceMonitorGetDevPathRequest
1371    {
1372        #[inline]
1373        unsafe fn encode(
1374            self,
1375            encoder: &mut fidl::encoding::Encoder<'_, D>,
1376            offset: usize,
1377            _depth: fidl::encoding::Depth,
1378        ) -> fidl::Result<()> {
1379            encoder.debug_check_bounds::<DeviceMonitorGetDevPathRequest>(offset);
1380            unsafe {
1381                // Copy the object into the buffer.
1382                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1383                (buf_ptr as *mut DeviceMonitorGetDevPathRequest)
1384                    .write_unaligned((self as *const DeviceMonitorGetDevPathRequest).read());
1385                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1386                // done second because the memcpy will write garbage to these bytes.
1387            }
1388            Ok(())
1389        }
1390    }
1391    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
1392        fidl::encoding::Encode<DeviceMonitorGetDevPathRequest, D> for (T0,)
1393    {
1394        #[inline]
1395        unsafe fn encode(
1396            self,
1397            encoder: &mut fidl::encoding::Encoder<'_, D>,
1398            offset: usize,
1399            depth: fidl::encoding::Depth,
1400        ) -> fidl::Result<()> {
1401            encoder.debug_check_bounds::<DeviceMonitorGetDevPathRequest>(offset);
1402            // Zero out padding regions. There's no need to apply masks
1403            // because the unmasked parts will be overwritten by fields.
1404            // Write the fields.
1405            self.0.encode(encoder, offset + 0, depth)?;
1406            Ok(())
1407        }
1408    }
1409
1410    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1411        for DeviceMonitorGetDevPathRequest
1412    {
1413        #[inline(always)]
1414        fn new_empty() -> Self {
1415            Self { phy_id: fidl::new_empty!(u16, D) }
1416        }
1417
1418        #[inline]
1419        unsafe fn decode(
1420            &mut self,
1421            decoder: &mut fidl::encoding::Decoder<'_, D>,
1422            offset: usize,
1423            _depth: fidl::encoding::Depth,
1424        ) -> fidl::Result<()> {
1425            decoder.debug_check_bounds::<Self>(offset);
1426            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1427            // Verify that padding bytes are zero.
1428            // Copy from the buffer into the object.
1429            unsafe {
1430                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
1431            }
1432            Ok(())
1433        }
1434    }
1435
1436    impl fidl::encoding::ValueTypeMarker for DeviceMonitorGetDevPathResponse {
1437        type Borrowed<'a> = &'a Self;
1438        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1439            value
1440        }
1441    }
1442
1443    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorGetDevPathResponse {
1444        type Owned = Self;
1445
1446        #[inline(always)]
1447        fn inline_align(_context: fidl::encoding::Context) -> usize {
1448            8
1449        }
1450
1451        #[inline(always)]
1452        fn inline_size(_context: fidl::encoding::Context) -> usize {
1453            16
1454        }
1455    }
1456
1457    unsafe impl<D: fidl::encoding::ResourceDialect>
1458        fidl::encoding::Encode<DeviceMonitorGetDevPathResponse, D>
1459        for &DeviceMonitorGetDevPathResponse
1460    {
1461        #[inline]
1462        unsafe fn encode(
1463            self,
1464            encoder: &mut fidl::encoding::Encoder<'_, D>,
1465            offset: usize,
1466            _depth: fidl::encoding::Depth,
1467        ) -> fidl::Result<()> {
1468            encoder.debug_check_bounds::<DeviceMonitorGetDevPathResponse>(offset);
1469            // Delegate to tuple encoding.
1470            fidl::encoding::Encode::<DeviceMonitorGetDevPathResponse, D>::encode(
1471                (
1472                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.dev_path),
1473                ),
1474                encoder, offset, _depth
1475            )
1476        }
1477    }
1478    unsafe impl<
1479        D: fidl::encoding::ResourceDialect,
1480        T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
1481    > fidl::encoding::Encode<DeviceMonitorGetDevPathResponse, D> for (T0,)
1482    {
1483        #[inline]
1484        unsafe fn encode(
1485            self,
1486            encoder: &mut fidl::encoding::Encoder<'_, D>,
1487            offset: usize,
1488            depth: fidl::encoding::Depth,
1489        ) -> fidl::Result<()> {
1490            encoder.debug_check_bounds::<DeviceMonitorGetDevPathResponse>(offset);
1491            // Zero out padding regions. There's no need to apply masks
1492            // because the unmasked parts will be overwritten by fields.
1493            // Write the fields.
1494            self.0.encode(encoder, offset + 0, depth)?;
1495            Ok(())
1496        }
1497    }
1498
1499    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1500        for DeviceMonitorGetDevPathResponse
1501    {
1502        #[inline(always)]
1503        fn new_empty() -> Self {
1504            Self {
1505                dev_path: fidl::new_empty!(
1506                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
1507                    D
1508                ),
1509            }
1510        }
1511
1512        #[inline]
1513        unsafe fn decode(
1514            &mut self,
1515            decoder: &mut fidl::encoding::Decoder<'_, D>,
1516            offset: usize,
1517            _depth: fidl::encoding::Depth,
1518        ) -> fidl::Result<()> {
1519            decoder.debug_check_bounds::<Self>(offset);
1520            // Verify that padding bytes are zero.
1521            fidl::decode!(
1522                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
1523                D,
1524                &mut self.dev_path,
1525                decoder,
1526                offset + 0,
1527                _depth
1528            )?;
1529            Ok(())
1530        }
1531    }
1532
1533    impl fidl::encoding::ValueTypeMarker for DeviceMonitorGetPowerSaveModeRequest {
1534        type Borrowed<'a> = &'a Self;
1535        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1536            value
1537        }
1538    }
1539
1540    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorGetPowerSaveModeRequest {
1541        type Owned = Self;
1542
1543        #[inline(always)]
1544        fn inline_align(_context: fidl::encoding::Context) -> usize {
1545            2
1546        }
1547
1548        #[inline(always)]
1549        fn inline_size(_context: fidl::encoding::Context) -> usize {
1550            2
1551        }
1552        #[inline(always)]
1553        fn encode_is_copy() -> bool {
1554            true
1555        }
1556
1557        #[inline(always)]
1558        fn decode_is_copy() -> bool {
1559            true
1560        }
1561    }
1562
1563    unsafe impl<D: fidl::encoding::ResourceDialect>
1564        fidl::encoding::Encode<DeviceMonitorGetPowerSaveModeRequest, D>
1565        for &DeviceMonitorGetPowerSaveModeRequest
1566    {
1567        #[inline]
1568        unsafe fn encode(
1569            self,
1570            encoder: &mut fidl::encoding::Encoder<'_, D>,
1571            offset: usize,
1572            _depth: fidl::encoding::Depth,
1573        ) -> fidl::Result<()> {
1574            encoder.debug_check_bounds::<DeviceMonitorGetPowerSaveModeRequest>(offset);
1575            unsafe {
1576                // Copy the object into the buffer.
1577                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1578                (buf_ptr as *mut DeviceMonitorGetPowerSaveModeRequest)
1579                    .write_unaligned((self as *const DeviceMonitorGetPowerSaveModeRequest).read());
1580                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1581                // done second because the memcpy will write garbage to these bytes.
1582            }
1583            Ok(())
1584        }
1585    }
1586    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
1587        fidl::encoding::Encode<DeviceMonitorGetPowerSaveModeRequest, D> for (T0,)
1588    {
1589        #[inline]
1590        unsafe fn encode(
1591            self,
1592            encoder: &mut fidl::encoding::Encoder<'_, D>,
1593            offset: usize,
1594            depth: fidl::encoding::Depth,
1595        ) -> fidl::Result<()> {
1596            encoder.debug_check_bounds::<DeviceMonitorGetPowerSaveModeRequest>(offset);
1597            // Zero out padding regions. There's no need to apply masks
1598            // because the unmasked parts will be overwritten by fields.
1599            // Write the fields.
1600            self.0.encode(encoder, offset + 0, depth)?;
1601            Ok(())
1602        }
1603    }
1604
1605    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1606        for DeviceMonitorGetPowerSaveModeRequest
1607    {
1608        #[inline(always)]
1609        fn new_empty() -> Self {
1610            Self { phy_id: fidl::new_empty!(u16, D) }
1611        }
1612
1613        #[inline]
1614        unsafe fn decode(
1615            &mut self,
1616            decoder: &mut fidl::encoding::Decoder<'_, D>,
1617            offset: usize,
1618            _depth: fidl::encoding::Depth,
1619        ) -> fidl::Result<()> {
1620            decoder.debug_check_bounds::<Self>(offset);
1621            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1622            // Verify that padding bytes are zero.
1623            // Copy from the buffer into the object.
1624            unsafe {
1625                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
1626            }
1627            Ok(())
1628        }
1629    }
1630
1631    impl fidl::encoding::ValueTypeMarker for DeviceMonitorGetPowerStateRequest {
1632        type Borrowed<'a> = &'a Self;
1633        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1634            value
1635        }
1636    }
1637
1638    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorGetPowerStateRequest {
1639        type Owned = Self;
1640
1641        #[inline(always)]
1642        fn inline_align(_context: fidl::encoding::Context) -> usize {
1643            2
1644        }
1645
1646        #[inline(always)]
1647        fn inline_size(_context: fidl::encoding::Context) -> usize {
1648            2
1649        }
1650        #[inline(always)]
1651        fn encode_is_copy() -> bool {
1652            true
1653        }
1654
1655        #[inline(always)]
1656        fn decode_is_copy() -> bool {
1657            true
1658        }
1659    }
1660
1661    unsafe impl<D: fidl::encoding::ResourceDialect>
1662        fidl::encoding::Encode<DeviceMonitorGetPowerStateRequest, D>
1663        for &DeviceMonitorGetPowerStateRequest
1664    {
1665        #[inline]
1666        unsafe fn encode(
1667            self,
1668            encoder: &mut fidl::encoding::Encoder<'_, D>,
1669            offset: usize,
1670            _depth: fidl::encoding::Depth,
1671        ) -> fidl::Result<()> {
1672            encoder.debug_check_bounds::<DeviceMonitorGetPowerStateRequest>(offset);
1673            unsafe {
1674                // Copy the object into the buffer.
1675                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1676                (buf_ptr as *mut DeviceMonitorGetPowerStateRequest)
1677                    .write_unaligned((self as *const DeviceMonitorGetPowerStateRequest).read());
1678                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1679                // done second because the memcpy will write garbage to these bytes.
1680            }
1681            Ok(())
1682        }
1683    }
1684    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
1685        fidl::encoding::Encode<DeviceMonitorGetPowerStateRequest, D> for (T0,)
1686    {
1687        #[inline]
1688        unsafe fn encode(
1689            self,
1690            encoder: &mut fidl::encoding::Encoder<'_, D>,
1691            offset: usize,
1692            depth: fidl::encoding::Depth,
1693        ) -> fidl::Result<()> {
1694            encoder.debug_check_bounds::<DeviceMonitorGetPowerStateRequest>(offset);
1695            // Zero out padding regions. There's no need to apply masks
1696            // because the unmasked parts will be overwritten by fields.
1697            // Write the fields.
1698            self.0.encode(encoder, offset + 0, depth)?;
1699            Ok(())
1700        }
1701    }
1702
1703    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1704        for DeviceMonitorGetPowerStateRequest
1705    {
1706        #[inline(always)]
1707        fn new_empty() -> Self {
1708            Self { phy_id: fidl::new_empty!(u16, D) }
1709        }
1710
1711        #[inline]
1712        unsafe fn decode(
1713            &mut self,
1714            decoder: &mut fidl::encoding::Decoder<'_, D>,
1715            offset: usize,
1716            _depth: fidl::encoding::Depth,
1717        ) -> fidl::Result<()> {
1718            decoder.debug_check_bounds::<Self>(offset);
1719            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1720            // Verify that padding bytes are zero.
1721            // Copy from the buffer into the object.
1722            unsafe {
1723                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
1724            }
1725            Ok(())
1726        }
1727    }
1728
1729    impl fidl::encoding::ValueTypeMarker for DeviceMonitorGetSupportedMacRolesRequest {
1730        type Borrowed<'a> = &'a Self;
1731        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1732            value
1733        }
1734    }
1735
1736    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorGetSupportedMacRolesRequest {
1737        type Owned = Self;
1738
1739        #[inline(always)]
1740        fn inline_align(_context: fidl::encoding::Context) -> usize {
1741            2
1742        }
1743
1744        #[inline(always)]
1745        fn inline_size(_context: fidl::encoding::Context) -> usize {
1746            2
1747        }
1748        #[inline(always)]
1749        fn encode_is_copy() -> bool {
1750            true
1751        }
1752
1753        #[inline(always)]
1754        fn decode_is_copy() -> bool {
1755            true
1756        }
1757    }
1758
1759    unsafe impl<D: fidl::encoding::ResourceDialect>
1760        fidl::encoding::Encode<DeviceMonitorGetSupportedMacRolesRequest, D>
1761        for &DeviceMonitorGetSupportedMacRolesRequest
1762    {
1763        #[inline]
1764        unsafe fn encode(
1765            self,
1766            encoder: &mut fidl::encoding::Encoder<'_, D>,
1767            offset: usize,
1768            _depth: fidl::encoding::Depth,
1769        ) -> fidl::Result<()> {
1770            encoder.debug_check_bounds::<DeviceMonitorGetSupportedMacRolesRequest>(offset);
1771            unsafe {
1772                // Copy the object into the buffer.
1773                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1774                (buf_ptr as *mut DeviceMonitorGetSupportedMacRolesRequest).write_unaligned(
1775                    (self as *const DeviceMonitorGetSupportedMacRolesRequest).read(),
1776                );
1777                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1778                // done second because the memcpy will write garbage to these bytes.
1779            }
1780            Ok(())
1781        }
1782    }
1783    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
1784        fidl::encoding::Encode<DeviceMonitorGetSupportedMacRolesRequest, D> for (T0,)
1785    {
1786        #[inline]
1787        unsafe fn encode(
1788            self,
1789            encoder: &mut fidl::encoding::Encoder<'_, D>,
1790            offset: usize,
1791            depth: fidl::encoding::Depth,
1792        ) -> fidl::Result<()> {
1793            encoder.debug_check_bounds::<DeviceMonitorGetSupportedMacRolesRequest>(offset);
1794            // Zero out padding regions. There's no need to apply masks
1795            // because the unmasked parts will be overwritten by fields.
1796            // Write the fields.
1797            self.0.encode(encoder, offset + 0, depth)?;
1798            Ok(())
1799        }
1800    }
1801
1802    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1803        for DeviceMonitorGetSupportedMacRolesRequest
1804    {
1805        #[inline(always)]
1806        fn new_empty() -> Self {
1807            Self { phy_id: fidl::new_empty!(u16, D) }
1808        }
1809
1810        #[inline]
1811        unsafe fn decode(
1812            &mut self,
1813            decoder: &mut fidl::encoding::Decoder<'_, D>,
1814            offset: usize,
1815            _depth: fidl::encoding::Depth,
1816        ) -> fidl::Result<()> {
1817            decoder.debug_check_bounds::<Self>(offset);
1818            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1819            // Verify that padding bytes are zero.
1820            // Copy from the buffer into the object.
1821            unsafe {
1822                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
1823            }
1824            Ok(())
1825        }
1826    }
1827
1828    impl fidl::encoding::ValueTypeMarker for DeviceMonitorGetTxPowerScenarioRequest {
1829        type Borrowed<'a> = &'a Self;
1830        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1831            value
1832        }
1833    }
1834
1835    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorGetTxPowerScenarioRequest {
1836        type Owned = Self;
1837
1838        #[inline(always)]
1839        fn inline_align(_context: fidl::encoding::Context) -> usize {
1840            2
1841        }
1842
1843        #[inline(always)]
1844        fn inline_size(_context: fidl::encoding::Context) -> usize {
1845            2
1846        }
1847        #[inline(always)]
1848        fn encode_is_copy() -> bool {
1849            true
1850        }
1851
1852        #[inline(always)]
1853        fn decode_is_copy() -> bool {
1854            true
1855        }
1856    }
1857
1858    unsafe impl<D: fidl::encoding::ResourceDialect>
1859        fidl::encoding::Encode<DeviceMonitorGetTxPowerScenarioRequest, D>
1860        for &DeviceMonitorGetTxPowerScenarioRequest
1861    {
1862        #[inline]
1863        unsafe fn encode(
1864            self,
1865            encoder: &mut fidl::encoding::Encoder<'_, D>,
1866            offset: usize,
1867            _depth: fidl::encoding::Depth,
1868        ) -> fidl::Result<()> {
1869            encoder.debug_check_bounds::<DeviceMonitorGetTxPowerScenarioRequest>(offset);
1870            unsafe {
1871                // Copy the object into the buffer.
1872                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1873                (buf_ptr as *mut DeviceMonitorGetTxPowerScenarioRequest).write_unaligned(
1874                    (self as *const DeviceMonitorGetTxPowerScenarioRequest).read(),
1875                );
1876                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1877                // done second because the memcpy will write garbage to these bytes.
1878            }
1879            Ok(())
1880        }
1881    }
1882    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
1883        fidl::encoding::Encode<DeviceMonitorGetTxPowerScenarioRequest, D> for (T0,)
1884    {
1885        #[inline]
1886        unsafe fn encode(
1887            self,
1888            encoder: &mut fidl::encoding::Encoder<'_, D>,
1889            offset: usize,
1890            depth: fidl::encoding::Depth,
1891        ) -> fidl::Result<()> {
1892            encoder.debug_check_bounds::<DeviceMonitorGetTxPowerScenarioRequest>(offset);
1893            // Zero out padding regions. There's no need to apply masks
1894            // because the unmasked parts will be overwritten by fields.
1895            // Write the fields.
1896            self.0.encode(encoder, offset + 0, depth)?;
1897            Ok(())
1898        }
1899    }
1900
1901    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1902        for DeviceMonitorGetTxPowerScenarioRequest
1903    {
1904        #[inline(always)]
1905        fn new_empty() -> Self {
1906            Self { phy_id: fidl::new_empty!(u16, D) }
1907        }
1908
1909        #[inline]
1910        unsafe fn decode(
1911            &mut self,
1912            decoder: &mut fidl::encoding::Decoder<'_, D>,
1913            offset: usize,
1914            _depth: fidl::encoding::Depth,
1915        ) -> fidl::Result<()> {
1916            decoder.debug_check_bounds::<Self>(offset);
1917            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1918            // Verify that padding bytes are zero.
1919            // Copy from the buffer into the object.
1920            unsafe {
1921                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
1922            }
1923            Ok(())
1924        }
1925    }
1926
1927    impl fidl::encoding::ValueTypeMarker for DeviceMonitorListIfacesResponse {
1928        type Borrowed<'a> = &'a Self;
1929        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1930            value
1931        }
1932    }
1933
1934    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorListIfacesResponse {
1935        type Owned = Self;
1936
1937        #[inline(always)]
1938        fn inline_align(_context: fidl::encoding::Context) -> usize {
1939            8
1940        }
1941
1942        #[inline(always)]
1943        fn inline_size(_context: fidl::encoding::Context) -> usize {
1944            16
1945        }
1946    }
1947
1948    unsafe impl<D: fidl::encoding::ResourceDialect>
1949        fidl::encoding::Encode<DeviceMonitorListIfacesResponse, D>
1950        for &DeviceMonitorListIfacesResponse
1951    {
1952        #[inline]
1953        unsafe fn encode(
1954            self,
1955            encoder: &mut fidl::encoding::Encoder<'_, D>,
1956            offset: usize,
1957            _depth: fidl::encoding::Depth,
1958        ) -> fidl::Result<()> {
1959            encoder.debug_check_bounds::<DeviceMonitorListIfacesResponse>(offset);
1960            // Delegate to tuple encoding.
1961            fidl::encoding::Encode::<DeviceMonitorListIfacesResponse, D>::encode(
1962                (
1963                    <fidl::encoding::UnboundedVector<u16> as fidl::encoding::ValueTypeMarker>::borrow(&self.iface_list),
1964                ),
1965                encoder, offset, _depth
1966            )
1967        }
1968    }
1969    unsafe impl<
1970        D: fidl::encoding::ResourceDialect,
1971        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u16>, D>,
1972    > fidl::encoding::Encode<DeviceMonitorListIfacesResponse, D> for (T0,)
1973    {
1974        #[inline]
1975        unsafe fn encode(
1976            self,
1977            encoder: &mut fidl::encoding::Encoder<'_, D>,
1978            offset: usize,
1979            depth: fidl::encoding::Depth,
1980        ) -> fidl::Result<()> {
1981            encoder.debug_check_bounds::<DeviceMonitorListIfacesResponse>(offset);
1982            // Zero out padding regions. There's no need to apply masks
1983            // because the unmasked parts will be overwritten by fields.
1984            // Write the fields.
1985            self.0.encode(encoder, offset + 0, depth)?;
1986            Ok(())
1987        }
1988    }
1989
1990    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1991        for DeviceMonitorListIfacesResponse
1992    {
1993        #[inline(always)]
1994        fn new_empty() -> Self {
1995            Self { iface_list: fidl::new_empty!(fidl::encoding::UnboundedVector<u16>, D) }
1996        }
1997
1998        #[inline]
1999        unsafe fn decode(
2000            &mut self,
2001            decoder: &mut fidl::encoding::Decoder<'_, D>,
2002            offset: usize,
2003            _depth: fidl::encoding::Depth,
2004        ) -> fidl::Result<()> {
2005            decoder.debug_check_bounds::<Self>(offset);
2006            // Verify that padding bytes are zero.
2007            fidl::decode!(
2008                fidl::encoding::UnboundedVector<u16>,
2009                D,
2010                &mut self.iface_list,
2011                decoder,
2012                offset + 0,
2013                _depth
2014            )?;
2015            Ok(())
2016        }
2017    }
2018
2019    impl fidl::encoding::ValueTypeMarker for DeviceMonitorListPhysResponse {
2020        type Borrowed<'a> = &'a Self;
2021        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2022            value
2023        }
2024    }
2025
2026    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorListPhysResponse {
2027        type Owned = Self;
2028
2029        #[inline(always)]
2030        fn inline_align(_context: fidl::encoding::Context) -> usize {
2031            8
2032        }
2033
2034        #[inline(always)]
2035        fn inline_size(_context: fidl::encoding::Context) -> usize {
2036            16
2037        }
2038    }
2039
2040    unsafe impl<D: fidl::encoding::ResourceDialect>
2041        fidl::encoding::Encode<DeviceMonitorListPhysResponse, D>
2042        for &DeviceMonitorListPhysResponse
2043    {
2044        #[inline]
2045        unsafe fn encode(
2046            self,
2047            encoder: &mut fidl::encoding::Encoder<'_, D>,
2048            offset: usize,
2049            _depth: fidl::encoding::Depth,
2050        ) -> fidl::Result<()> {
2051            encoder.debug_check_bounds::<DeviceMonitorListPhysResponse>(offset);
2052            // Delegate to tuple encoding.
2053            fidl::encoding::Encode::<DeviceMonitorListPhysResponse, D>::encode(
2054                (
2055                    <fidl::encoding::UnboundedVector<u16> as fidl::encoding::ValueTypeMarker>::borrow(&self.phy_list),
2056                ),
2057                encoder, offset, _depth
2058            )
2059        }
2060    }
2061    unsafe impl<
2062        D: fidl::encoding::ResourceDialect,
2063        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u16>, D>,
2064    > fidl::encoding::Encode<DeviceMonitorListPhysResponse, D> for (T0,)
2065    {
2066        #[inline]
2067        unsafe fn encode(
2068            self,
2069            encoder: &mut fidl::encoding::Encoder<'_, D>,
2070            offset: usize,
2071            depth: fidl::encoding::Depth,
2072        ) -> fidl::Result<()> {
2073            encoder.debug_check_bounds::<DeviceMonitorListPhysResponse>(offset);
2074            // Zero out padding regions. There's no need to apply masks
2075            // because the unmasked parts will be overwritten by fields.
2076            // Write the fields.
2077            self.0.encode(encoder, offset + 0, depth)?;
2078            Ok(())
2079        }
2080    }
2081
2082    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2083        for DeviceMonitorListPhysResponse
2084    {
2085        #[inline(always)]
2086        fn new_empty() -> Self {
2087            Self { phy_list: fidl::new_empty!(fidl::encoding::UnboundedVector<u16>, D) }
2088        }
2089
2090        #[inline]
2091        unsafe fn decode(
2092            &mut self,
2093            decoder: &mut fidl::encoding::Decoder<'_, D>,
2094            offset: usize,
2095            _depth: fidl::encoding::Depth,
2096        ) -> fidl::Result<()> {
2097            decoder.debug_check_bounds::<Self>(offset);
2098            // Verify that padding bytes are zero.
2099            fidl::decode!(
2100                fidl::encoding::UnboundedVector<u16>,
2101                D,
2102                &mut self.phy_list,
2103                decoder,
2104                offset + 0,
2105                _depth
2106            )?;
2107            Ok(())
2108        }
2109    }
2110
2111    impl fidl::encoding::ValueTypeMarker for DeviceMonitorPowerDownRequest {
2112        type Borrowed<'a> = &'a Self;
2113        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2114            value
2115        }
2116    }
2117
2118    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorPowerDownRequest {
2119        type Owned = Self;
2120
2121        #[inline(always)]
2122        fn inline_align(_context: fidl::encoding::Context) -> usize {
2123            2
2124        }
2125
2126        #[inline(always)]
2127        fn inline_size(_context: fidl::encoding::Context) -> usize {
2128            2
2129        }
2130        #[inline(always)]
2131        fn encode_is_copy() -> bool {
2132            true
2133        }
2134
2135        #[inline(always)]
2136        fn decode_is_copy() -> bool {
2137            true
2138        }
2139    }
2140
2141    unsafe impl<D: fidl::encoding::ResourceDialect>
2142        fidl::encoding::Encode<DeviceMonitorPowerDownRequest, D>
2143        for &DeviceMonitorPowerDownRequest
2144    {
2145        #[inline]
2146        unsafe fn encode(
2147            self,
2148            encoder: &mut fidl::encoding::Encoder<'_, D>,
2149            offset: usize,
2150            _depth: fidl::encoding::Depth,
2151        ) -> fidl::Result<()> {
2152            encoder.debug_check_bounds::<DeviceMonitorPowerDownRequest>(offset);
2153            unsafe {
2154                // Copy the object into the buffer.
2155                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2156                (buf_ptr as *mut DeviceMonitorPowerDownRequest)
2157                    .write_unaligned((self as *const DeviceMonitorPowerDownRequest).read());
2158                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2159                // done second because the memcpy will write garbage to these bytes.
2160            }
2161            Ok(())
2162        }
2163    }
2164    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
2165        fidl::encoding::Encode<DeviceMonitorPowerDownRequest, D> for (T0,)
2166    {
2167        #[inline]
2168        unsafe fn encode(
2169            self,
2170            encoder: &mut fidl::encoding::Encoder<'_, D>,
2171            offset: usize,
2172            depth: fidl::encoding::Depth,
2173        ) -> fidl::Result<()> {
2174            encoder.debug_check_bounds::<DeviceMonitorPowerDownRequest>(offset);
2175            // Zero out padding regions. There's no need to apply masks
2176            // because the unmasked parts will be overwritten by fields.
2177            // Write the fields.
2178            self.0.encode(encoder, offset + 0, depth)?;
2179            Ok(())
2180        }
2181    }
2182
2183    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2184        for DeviceMonitorPowerDownRequest
2185    {
2186        #[inline(always)]
2187        fn new_empty() -> Self {
2188            Self { phy_id: fidl::new_empty!(u16, D) }
2189        }
2190
2191        #[inline]
2192        unsafe fn decode(
2193            &mut self,
2194            decoder: &mut fidl::encoding::Decoder<'_, D>,
2195            offset: usize,
2196            _depth: fidl::encoding::Depth,
2197        ) -> fidl::Result<()> {
2198            decoder.debug_check_bounds::<Self>(offset);
2199            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2200            // Verify that padding bytes are zero.
2201            // Copy from the buffer into the object.
2202            unsafe {
2203                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
2204            }
2205            Ok(())
2206        }
2207    }
2208
2209    impl fidl::encoding::ValueTypeMarker for DeviceMonitorPowerUpRequest {
2210        type Borrowed<'a> = &'a Self;
2211        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2212            value
2213        }
2214    }
2215
2216    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorPowerUpRequest {
2217        type Owned = Self;
2218
2219        #[inline(always)]
2220        fn inline_align(_context: fidl::encoding::Context) -> usize {
2221            2
2222        }
2223
2224        #[inline(always)]
2225        fn inline_size(_context: fidl::encoding::Context) -> usize {
2226            2
2227        }
2228        #[inline(always)]
2229        fn encode_is_copy() -> bool {
2230            true
2231        }
2232
2233        #[inline(always)]
2234        fn decode_is_copy() -> bool {
2235            true
2236        }
2237    }
2238
2239    unsafe impl<D: fidl::encoding::ResourceDialect>
2240        fidl::encoding::Encode<DeviceMonitorPowerUpRequest, D> for &DeviceMonitorPowerUpRequest
2241    {
2242        #[inline]
2243        unsafe fn encode(
2244            self,
2245            encoder: &mut fidl::encoding::Encoder<'_, D>,
2246            offset: usize,
2247            _depth: fidl::encoding::Depth,
2248        ) -> fidl::Result<()> {
2249            encoder.debug_check_bounds::<DeviceMonitorPowerUpRequest>(offset);
2250            unsafe {
2251                // Copy the object into the buffer.
2252                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2253                (buf_ptr as *mut DeviceMonitorPowerUpRequest)
2254                    .write_unaligned((self as *const DeviceMonitorPowerUpRequest).read());
2255                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2256                // done second because the memcpy will write garbage to these bytes.
2257            }
2258            Ok(())
2259        }
2260    }
2261    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
2262        fidl::encoding::Encode<DeviceMonitorPowerUpRequest, D> for (T0,)
2263    {
2264        #[inline]
2265        unsafe fn encode(
2266            self,
2267            encoder: &mut fidl::encoding::Encoder<'_, D>,
2268            offset: usize,
2269            depth: fidl::encoding::Depth,
2270        ) -> fidl::Result<()> {
2271            encoder.debug_check_bounds::<DeviceMonitorPowerUpRequest>(offset);
2272            // Zero out padding regions. There's no need to apply masks
2273            // because the unmasked parts will be overwritten by fields.
2274            // Write the fields.
2275            self.0.encode(encoder, offset + 0, depth)?;
2276            Ok(())
2277        }
2278    }
2279
2280    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2281        for DeviceMonitorPowerUpRequest
2282    {
2283        #[inline(always)]
2284        fn new_empty() -> Self {
2285            Self { phy_id: fidl::new_empty!(u16, D) }
2286        }
2287
2288        #[inline]
2289        unsafe fn decode(
2290            &mut self,
2291            decoder: &mut fidl::encoding::Decoder<'_, D>,
2292            offset: usize,
2293            _depth: fidl::encoding::Depth,
2294        ) -> fidl::Result<()> {
2295            decoder.debug_check_bounds::<Self>(offset);
2296            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2297            // Verify that padding bytes are zero.
2298            // Copy from the buffer into the object.
2299            unsafe {
2300                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
2301            }
2302            Ok(())
2303        }
2304    }
2305
2306    impl fidl::encoding::ValueTypeMarker for DeviceMonitorQueryIfaceRequest {
2307        type Borrowed<'a> = &'a Self;
2308        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2309            value
2310        }
2311    }
2312
2313    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorQueryIfaceRequest {
2314        type Owned = Self;
2315
2316        #[inline(always)]
2317        fn inline_align(_context: fidl::encoding::Context) -> usize {
2318            2
2319        }
2320
2321        #[inline(always)]
2322        fn inline_size(_context: fidl::encoding::Context) -> usize {
2323            2
2324        }
2325        #[inline(always)]
2326        fn encode_is_copy() -> bool {
2327            true
2328        }
2329
2330        #[inline(always)]
2331        fn decode_is_copy() -> bool {
2332            true
2333        }
2334    }
2335
2336    unsafe impl<D: fidl::encoding::ResourceDialect>
2337        fidl::encoding::Encode<DeviceMonitorQueryIfaceRequest, D>
2338        for &DeviceMonitorQueryIfaceRequest
2339    {
2340        #[inline]
2341        unsafe fn encode(
2342            self,
2343            encoder: &mut fidl::encoding::Encoder<'_, D>,
2344            offset: usize,
2345            _depth: fidl::encoding::Depth,
2346        ) -> fidl::Result<()> {
2347            encoder.debug_check_bounds::<DeviceMonitorQueryIfaceRequest>(offset);
2348            unsafe {
2349                // Copy the object into the buffer.
2350                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2351                (buf_ptr as *mut DeviceMonitorQueryIfaceRequest)
2352                    .write_unaligned((self as *const DeviceMonitorQueryIfaceRequest).read());
2353                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2354                // done second because the memcpy will write garbage to these bytes.
2355            }
2356            Ok(())
2357        }
2358    }
2359    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
2360        fidl::encoding::Encode<DeviceMonitorQueryIfaceRequest, D> for (T0,)
2361    {
2362        #[inline]
2363        unsafe fn encode(
2364            self,
2365            encoder: &mut fidl::encoding::Encoder<'_, D>,
2366            offset: usize,
2367            depth: fidl::encoding::Depth,
2368        ) -> fidl::Result<()> {
2369            encoder.debug_check_bounds::<DeviceMonitorQueryIfaceRequest>(offset);
2370            // Zero out padding regions. There's no need to apply masks
2371            // because the unmasked parts will be overwritten by fields.
2372            // Write the fields.
2373            self.0.encode(encoder, offset + 0, depth)?;
2374            Ok(())
2375        }
2376    }
2377
2378    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2379        for DeviceMonitorQueryIfaceRequest
2380    {
2381        #[inline(always)]
2382        fn new_empty() -> Self {
2383            Self { iface_id: fidl::new_empty!(u16, D) }
2384        }
2385
2386        #[inline]
2387        unsafe fn decode(
2388            &mut self,
2389            decoder: &mut fidl::encoding::Decoder<'_, D>,
2390            offset: usize,
2391            _depth: fidl::encoding::Depth,
2392        ) -> fidl::Result<()> {
2393            decoder.debug_check_bounds::<Self>(offset);
2394            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2395            // Verify that padding bytes are zero.
2396            // Copy from the buffer into the object.
2397            unsafe {
2398                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
2399            }
2400            Ok(())
2401        }
2402    }
2403
2404    impl fidl::encoding::ValueTypeMarker for DeviceMonitorResetRequest {
2405        type Borrowed<'a> = &'a Self;
2406        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2407            value
2408        }
2409    }
2410
2411    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorResetRequest {
2412        type Owned = Self;
2413
2414        #[inline(always)]
2415        fn inline_align(_context: fidl::encoding::Context) -> usize {
2416            2
2417        }
2418
2419        #[inline(always)]
2420        fn inline_size(_context: fidl::encoding::Context) -> usize {
2421            2
2422        }
2423        #[inline(always)]
2424        fn encode_is_copy() -> bool {
2425            true
2426        }
2427
2428        #[inline(always)]
2429        fn decode_is_copy() -> bool {
2430            true
2431        }
2432    }
2433
2434    unsafe impl<D: fidl::encoding::ResourceDialect>
2435        fidl::encoding::Encode<DeviceMonitorResetRequest, D> for &DeviceMonitorResetRequest
2436    {
2437        #[inline]
2438        unsafe fn encode(
2439            self,
2440            encoder: &mut fidl::encoding::Encoder<'_, D>,
2441            offset: usize,
2442            _depth: fidl::encoding::Depth,
2443        ) -> fidl::Result<()> {
2444            encoder.debug_check_bounds::<DeviceMonitorResetRequest>(offset);
2445            unsafe {
2446                // Copy the object into the buffer.
2447                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2448                (buf_ptr as *mut DeviceMonitorResetRequest)
2449                    .write_unaligned((self as *const DeviceMonitorResetRequest).read());
2450                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2451                // done second because the memcpy will write garbage to these bytes.
2452            }
2453            Ok(())
2454        }
2455    }
2456    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
2457        fidl::encoding::Encode<DeviceMonitorResetRequest, D> for (T0,)
2458    {
2459        #[inline]
2460        unsafe fn encode(
2461            self,
2462            encoder: &mut fidl::encoding::Encoder<'_, D>,
2463            offset: usize,
2464            depth: fidl::encoding::Depth,
2465        ) -> fidl::Result<()> {
2466            encoder.debug_check_bounds::<DeviceMonitorResetRequest>(offset);
2467            // Zero out padding regions. There's no need to apply masks
2468            // because the unmasked parts will be overwritten by fields.
2469            // Write the fields.
2470            self.0.encode(encoder, offset + 0, depth)?;
2471            Ok(())
2472        }
2473    }
2474
2475    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2476        for DeviceMonitorResetRequest
2477    {
2478        #[inline(always)]
2479        fn new_empty() -> Self {
2480            Self { phy_id: fidl::new_empty!(u16, D) }
2481        }
2482
2483        #[inline]
2484        unsafe fn decode(
2485            &mut self,
2486            decoder: &mut fidl::encoding::Decoder<'_, D>,
2487            offset: usize,
2488            _depth: fidl::encoding::Depth,
2489        ) -> fidl::Result<()> {
2490            decoder.debug_check_bounds::<Self>(offset);
2491            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2492            // Verify that padding bytes are zero.
2493            // Copy from the buffer into the object.
2494            unsafe {
2495                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
2496            }
2497            Ok(())
2498        }
2499    }
2500
2501    impl fidl::encoding::ValueTypeMarker for DeviceMonitorResetTxPowerScenarioRequest {
2502        type Borrowed<'a> = &'a Self;
2503        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2504            value
2505        }
2506    }
2507
2508    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorResetTxPowerScenarioRequest {
2509        type Owned = Self;
2510
2511        #[inline(always)]
2512        fn inline_align(_context: fidl::encoding::Context) -> usize {
2513            2
2514        }
2515
2516        #[inline(always)]
2517        fn inline_size(_context: fidl::encoding::Context) -> usize {
2518            2
2519        }
2520        #[inline(always)]
2521        fn encode_is_copy() -> bool {
2522            true
2523        }
2524
2525        #[inline(always)]
2526        fn decode_is_copy() -> bool {
2527            true
2528        }
2529    }
2530
2531    unsafe impl<D: fidl::encoding::ResourceDialect>
2532        fidl::encoding::Encode<DeviceMonitorResetTxPowerScenarioRequest, D>
2533        for &DeviceMonitorResetTxPowerScenarioRequest
2534    {
2535        #[inline]
2536        unsafe fn encode(
2537            self,
2538            encoder: &mut fidl::encoding::Encoder<'_, D>,
2539            offset: usize,
2540            _depth: fidl::encoding::Depth,
2541        ) -> fidl::Result<()> {
2542            encoder.debug_check_bounds::<DeviceMonitorResetTxPowerScenarioRequest>(offset);
2543            unsafe {
2544                // Copy the object into the buffer.
2545                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2546                (buf_ptr as *mut DeviceMonitorResetTxPowerScenarioRequest).write_unaligned(
2547                    (self as *const DeviceMonitorResetTxPowerScenarioRequest).read(),
2548                );
2549                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2550                // done second because the memcpy will write garbage to these bytes.
2551            }
2552            Ok(())
2553        }
2554    }
2555    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
2556        fidl::encoding::Encode<DeviceMonitorResetTxPowerScenarioRequest, D> for (T0,)
2557    {
2558        #[inline]
2559        unsafe fn encode(
2560            self,
2561            encoder: &mut fidl::encoding::Encoder<'_, D>,
2562            offset: usize,
2563            depth: fidl::encoding::Depth,
2564        ) -> fidl::Result<()> {
2565            encoder.debug_check_bounds::<DeviceMonitorResetTxPowerScenarioRequest>(offset);
2566            // Zero out padding regions. There's no need to apply masks
2567            // because the unmasked parts will be overwritten by fields.
2568            // Write the fields.
2569            self.0.encode(encoder, offset + 0, depth)?;
2570            Ok(())
2571        }
2572    }
2573
2574    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2575        for DeviceMonitorResetTxPowerScenarioRequest
2576    {
2577        #[inline(always)]
2578        fn new_empty() -> Self {
2579            Self { phy_id: fidl::new_empty!(u16, D) }
2580        }
2581
2582        #[inline]
2583        unsafe fn decode(
2584            &mut self,
2585            decoder: &mut fidl::encoding::Decoder<'_, D>,
2586            offset: usize,
2587            _depth: fidl::encoding::Depth,
2588        ) -> fidl::Result<()> {
2589            decoder.debug_check_bounds::<Self>(offset);
2590            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2591            // Verify that padding bytes are zero.
2592            // Copy from the buffer into the object.
2593            unsafe {
2594                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
2595            }
2596            Ok(())
2597        }
2598    }
2599
2600    impl fidl::encoding::ValueTypeMarker for DeviceMonitorSetBtCoexistenceModeRequest {
2601        type Borrowed<'a> = &'a Self;
2602        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2603            value
2604        }
2605    }
2606
2607    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorSetBtCoexistenceModeRequest {
2608        type Owned = Self;
2609
2610        #[inline(always)]
2611        fn inline_align(_context: fidl::encoding::Context) -> usize {
2612            4
2613        }
2614
2615        #[inline(always)]
2616        fn inline_size(_context: fidl::encoding::Context) -> usize {
2617            8
2618        }
2619    }
2620
2621    unsafe impl<D: fidl::encoding::ResourceDialect>
2622        fidl::encoding::Encode<DeviceMonitorSetBtCoexistenceModeRequest, D>
2623        for &DeviceMonitorSetBtCoexistenceModeRequest
2624    {
2625        #[inline]
2626        unsafe fn encode(
2627            self,
2628            encoder: &mut fidl::encoding::Encoder<'_, D>,
2629            offset: usize,
2630            _depth: fidl::encoding::Depth,
2631        ) -> fidl::Result<()> {
2632            encoder.debug_check_bounds::<DeviceMonitorSetBtCoexistenceModeRequest>(offset);
2633            // Delegate to tuple encoding.
2634            fidl::encoding::Encode::<DeviceMonitorSetBtCoexistenceModeRequest, D>::encode(
2635                (
2636                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.phy_id),
2637                    <fidl_fuchsia_wlan_internal__common::BtCoexistenceMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
2638                ),
2639                encoder, offset, _depth
2640            )
2641        }
2642    }
2643    unsafe impl<
2644        D: fidl::encoding::ResourceDialect,
2645        T0: fidl::encoding::Encode<u16, D>,
2646        T1: fidl::encoding::Encode<fidl_fuchsia_wlan_internal__common::BtCoexistenceMode, D>,
2647    > fidl::encoding::Encode<DeviceMonitorSetBtCoexistenceModeRequest, D> for (T0, T1)
2648    {
2649        #[inline]
2650        unsafe fn encode(
2651            self,
2652            encoder: &mut fidl::encoding::Encoder<'_, D>,
2653            offset: usize,
2654            depth: fidl::encoding::Depth,
2655        ) -> fidl::Result<()> {
2656            encoder.debug_check_bounds::<DeviceMonitorSetBtCoexistenceModeRequest>(offset);
2657            // Zero out padding regions. There's no need to apply masks
2658            // because the unmasked parts will be overwritten by fields.
2659            unsafe {
2660                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2661                (ptr as *mut u32).write_unaligned(0);
2662            }
2663            // Write the fields.
2664            self.0.encode(encoder, offset + 0, depth)?;
2665            self.1.encode(encoder, offset + 4, depth)?;
2666            Ok(())
2667        }
2668    }
2669
2670    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2671        for DeviceMonitorSetBtCoexistenceModeRequest
2672    {
2673        #[inline(always)]
2674        fn new_empty() -> Self {
2675            Self {
2676                phy_id: fidl::new_empty!(u16, D),
2677                mode: fidl::new_empty!(fidl_fuchsia_wlan_internal__common::BtCoexistenceMode, D),
2678            }
2679        }
2680
2681        #[inline]
2682        unsafe fn decode(
2683            &mut self,
2684            decoder: &mut fidl::encoding::Decoder<'_, D>,
2685            offset: usize,
2686            _depth: fidl::encoding::Depth,
2687        ) -> fidl::Result<()> {
2688            decoder.debug_check_bounds::<Self>(offset);
2689            // Verify that padding bytes are zero.
2690            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2691            let padval = unsafe { (ptr as *const u32).read_unaligned() };
2692            let mask = 0xffff0000u32;
2693            let maskedval = padval & mask;
2694            if maskedval != 0 {
2695                return Err(fidl::Error::NonZeroPadding {
2696                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
2697                });
2698            }
2699            fidl::decode!(u16, D, &mut self.phy_id, decoder, offset + 0, _depth)?;
2700            fidl::decode!(
2701                fidl_fuchsia_wlan_internal__common::BtCoexistenceMode,
2702                D,
2703                &mut self.mode,
2704                decoder,
2705                offset + 4,
2706                _depth
2707            )?;
2708            Ok(())
2709        }
2710    }
2711
2712    impl fidl::encoding::ValueTypeMarker for DeviceMonitorSetCountryRequest {
2713        type Borrowed<'a> = &'a Self;
2714        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2715            value
2716        }
2717    }
2718
2719    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorSetCountryRequest {
2720        type Owned = Self;
2721
2722        #[inline(always)]
2723        fn inline_align(_context: fidl::encoding::Context) -> usize {
2724            2
2725        }
2726
2727        #[inline(always)]
2728        fn inline_size(_context: fidl::encoding::Context) -> usize {
2729            4
2730        }
2731        #[inline(always)]
2732        fn encode_is_copy() -> bool {
2733            true
2734        }
2735
2736        #[inline(always)]
2737        fn decode_is_copy() -> bool {
2738            true
2739        }
2740    }
2741
2742    unsafe impl<D: fidl::encoding::ResourceDialect>
2743        fidl::encoding::Encode<DeviceMonitorSetCountryRequest, D>
2744        for &DeviceMonitorSetCountryRequest
2745    {
2746        #[inline]
2747        unsafe fn encode(
2748            self,
2749            encoder: &mut fidl::encoding::Encoder<'_, D>,
2750            offset: usize,
2751            _depth: fidl::encoding::Depth,
2752        ) -> fidl::Result<()> {
2753            encoder.debug_check_bounds::<DeviceMonitorSetCountryRequest>(offset);
2754            unsafe {
2755                // Copy the object into the buffer.
2756                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2757                (buf_ptr as *mut DeviceMonitorSetCountryRequest)
2758                    .write_unaligned((self as *const DeviceMonitorSetCountryRequest).read());
2759                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2760                // done second because the memcpy will write garbage to these bytes.
2761            }
2762            Ok(())
2763        }
2764    }
2765    unsafe impl<
2766        D: fidl::encoding::ResourceDialect,
2767        T0: fidl::encoding::Encode<SetCountryRequest, D>,
2768    > fidl::encoding::Encode<DeviceMonitorSetCountryRequest, D> for (T0,)
2769    {
2770        #[inline]
2771        unsafe fn encode(
2772            self,
2773            encoder: &mut fidl::encoding::Encoder<'_, D>,
2774            offset: usize,
2775            depth: fidl::encoding::Depth,
2776        ) -> fidl::Result<()> {
2777            encoder.debug_check_bounds::<DeviceMonitorSetCountryRequest>(offset);
2778            // Zero out padding regions. There's no need to apply masks
2779            // because the unmasked parts will be overwritten by fields.
2780            // Write the fields.
2781            self.0.encode(encoder, offset + 0, depth)?;
2782            Ok(())
2783        }
2784    }
2785
2786    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2787        for DeviceMonitorSetCountryRequest
2788    {
2789        #[inline(always)]
2790        fn new_empty() -> Self {
2791            Self { req: fidl::new_empty!(SetCountryRequest, D) }
2792        }
2793
2794        #[inline]
2795        unsafe fn decode(
2796            &mut self,
2797            decoder: &mut fidl::encoding::Decoder<'_, D>,
2798            offset: usize,
2799            _depth: fidl::encoding::Depth,
2800        ) -> fidl::Result<()> {
2801            decoder.debug_check_bounds::<Self>(offset);
2802            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2803            // Verify that padding bytes are zero.
2804            // Copy from the buffer into the object.
2805            unsafe {
2806                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2807            }
2808            Ok(())
2809        }
2810    }
2811
2812    impl fidl::encoding::ValueTypeMarker for DeviceMonitorSetCountryResponse {
2813        type Borrowed<'a> = &'a Self;
2814        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2815            value
2816        }
2817    }
2818
2819    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorSetCountryResponse {
2820        type Owned = Self;
2821
2822        #[inline(always)]
2823        fn inline_align(_context: fidl::encoding::Context) -> usize {
2824            4
2825        }
2826
2827        #[inline(always)]
2828        fn inline_size(_context: fidl::encoding::Context) -> usize {
2829            4
2830        }
2831        #[inline(always)]
2832        fn encode_is_copy() -> bool {
2833            true
2834        }
2835
2836        #[inline(always)]
2837        fn decode_is_copy() -> bool {
2838            true
2839        }
2840    }
2841
2842    unsafe impl<D: fidl::encoding::ResourceDialect>
2843        fidl::encoding::Encode<DeviceMonitorSetCountryResponse, D>
2844        for &DeviceMonitorSetCountryResponse
2845    {
2846        #[inline]
2847        unsafe fn encode(
2848            self,
2849            encoder: &mut fidl::encoding::Encoder<'_, D>,
2850            offset: usize,
2851            _depth: fidl::encoding::Depth,
2852        ) -> fidl::Result<()> {
2853            encoder.debug_check_bounds::<DeviceMonitorSetCountryResponse>(offset);
2854            unsafe {
2855                // Copy the object into the buffer.
2856                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2857                (buf_ptr as *mut DeviceMonitorSetCountryResponse)
2858                    .write_unaligned((self as *const DeviceMonitorSetCountryResponse).read());
2859                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2860                // done second because the memcpy will write garbage to these bytes.
2861            }
2862            Ok(())
2863        }
2864    }
2865    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
2866        fidl::encoding::Encode<DeviceMonitorSetCountryResponse, D> for (T0,)
2867    {
2868        #[inline]
2869        unsafe fn encode(
2870            self,
2871            encoder: &mut fidl::encoding::Encoder<'_, D>,
2872            offset: usize,
2873            depth: fidl::encoding::Depth,
2874        ) -> fidl::Result<()> {
2875            encoder.debug_check_bounds::<DeviceMonitorSetCountryResponse>(offset);
2876            // Zero out padding regions. There's no need to apply masks
2877            // because the unmasked parts will be overwritten by fields.
2878            // Write the fields.
2879            self.0.encode(encoder, offset + 0, depth)?;
2880            Ok(())
2881        }
2882    }
2883
2884    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2885        for DeviceMonitorSetCountryResponse
2886    {
2887        #[inline(always)]
2888        fn new_empty() -> Self {
2889            Self { status: fidl::new_empty!(i32, D) }
2890        }
2891
2892        #[inline]
2893        unsafe fn decode(
2894            &mut self,
2895            decoder: &mut fidl::encoding::Decoder<'_, D>,
2896            offset: usize,
2897            _depth: fidl::encoding::Depth,
2898        ) -> fidl::Result<()> {
2899            decoder.debug_check_bounds::<Self>(offset);
2900            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2901            // Verify that padding bytes are zero.
2902            // Copy from the buffer into the object.
2903            unsafe {
2904                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2905            }
2906            Ok(())
2907        }
2908    }
2909
2910    impl fidl::encoding::ValueTypeMarker for DeviceMonitorSetPowerSaveModeRequest {
2911        type Borrowed<'a> = &'a Self;
2912        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2913            value
2914        }
2915    }
2916
2917    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorSetPowerSaveModeRequest {
2918        type Owned = Self;
2919
2920        #[inline(always)]
2921        fn inline_align(_context: fidl::encoding::Context) -> usize {
2922            4
2923        }
2924
2925        #[inline(always)]
2926        fn inline_size(_context: fidl::encoding::Context) -> usize {
2927            8
2928        }
2929    }
2930
2931    unsafe impl<D: fidl::encoding::ResourceDialect>
2932        fidl::encoding::Encode<DeviceMonitorSetPowerSaveModeRequest, D>
2933        for &DeviceMonitorSetPowerSaveModeRequest
2934    {
2935        #[inline]
2936        unsafe fn encode(
2937            self,
2938            encoder: &mut fidl::encoding::Encoder<'_, D>,
2939            offset: usize,
2940            _depth: fidl::encoding::Depth,
2941        ) -> fidl::Result<()> {
2942            encoder.debug_check_bounds::<DeviceMonitorSetPowerSaveModeRequest>(offset);
2943            // Delegate to tuple encoding.
2944            fidl::encoding::Encode::<DeviceMonitorSetPowerSaveModeRequest, D>::encode(
2945                (<SetPowerSaveModeRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
2946                encoder,
2947                offset,
2948                _depth,
2949            )
2950        }
2951    }
2952    unsafe impl<
2953        D: fidl::encoding::ResourceDialect,
2954        T0: fidl::encoding::Encode<SetPowerSaveModeRequest, D>,
2955    > fidl::encoding::Encode<DeviceMonitorSetPowerSaveModeRequest, D> for (T0,)
2956    {
2957        #[inline]
2958        unsafe fn encode(
2959            self,
2960            encoder: &mut fidl::encoding::Encoder<'_, D>,
2961            offset: usize,
2962            depth: fidl::encoding::Depth,
2963        ) -> fidl::Result<()> {
2964            encoder.debug_check_bounds::<DeviceMonitorSetPowerSaveModeRequest>(offset);
2965            // Zero out padding regions. There's no need to apply masks
2966            // because the unmasked parts will be overwritten by fields.
2967            // Write the fields.
2968            self.0.encode(encoder, offset + 0, depth)?;
2969            Ok(())
2970        }
2971    }
2972
2973    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2974        for DeviceMonitorSetPowerSaveModeRequest
2975    {
2976        #[inline(always)]
2977        fn new_empty() -> Self {
2978            Self { req: fidl::new_empty!(SetPowerSaveModeRequest, D) }
2979        }
2980
2981        #[inline]
2982        unsafe fn decode(
2983            &mut self,
2984            decoder: &mut fidl::encoding::Decoder<'_, D>,
2985            offset: usize,
2986            _depth: fidl::encoding::Depth,
2987        ) -> fidl::Result<()> {
2988            decoder.debug_check_bounds::<Self>(offset);
2989            // Verify that padding bytes are zero.
2990            fidl::decode!(SetPowerSaveModeRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
2991            Ok(())
2992        }
2993    }
2994
2995    impl fidl::encoding::ValueTypeMarker for DeviceMonitorSetPowerSaveModeResponse {
2996        type Borrowed<'a> = &'a Self;
2997        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2998            value
2999        }
3000    }
3001
3002    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorSetPowerSaveModeResponse {
3003        type Owned = Self;
3004
3005        #[inline(always)]
3006        fn inline_align(_context: fidl::encoding::Context) -> usize {
3007            4
3008        }
3009
3010        #[inline(always)]
3011        fn inline_size(_context: fidl::encoding::Context) -> usize {
3012            4
3013        }
3014        #[inline(always)]
3015        fn encode_is_copy() -> bool {
3016            true
3017        }
3018
3019        #[inline(always)]
3020        fn decode_is_copy() -> bool {
3021            true
3022        }
3023    }
3024
3025    unsafe impl<D: fidl::encoding::ResourceDialect>
3026        fidl::encoding::Encode<DeviceMonitorSetPowerSaveModeResponse, D>
3027        for &DeviceMonitorSetPowerSaveModeResponse
3028    {
3029        #[inline]
3030        unsafe fn encode(
3031            self,
3032            encoder: &mut fidl::encoding::Encoder<'_, D>,
3033            offset: usize,
3034            _depth: fidl::encoding::Depth,
3035        ) -> fidl::Result<()> {
3036            encoder.debug_check_bounds::<DeviceMonitorSetPowerSaveModeResponse>(offset);
3037            unsafe {
3038                // Copy the object into the buffer.
3039                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3040                (buf_ptr as *mut DeviceMonitorSetPowerSaveModeResponse)
3041                    .write_unaligned((self as *const DeviceMonitorSetPowerSaveModeResponse).read());
3042                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3043                // done second because the memcpy will write garbage to these bytes.
3044            }
3045            Ok(())
3046        }
3047    }
3048    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
3049        fidl::encoding::Encode<DeviceMonitorSetPowerSaveModeResponse, D> for (T0,)
3050    {
3051        #[inline]
3052        unsafe fn encode(
3053            self,
3054            encoder: &mut fidl::encoding::Encoder<'_, D>,
3055            offset: usize,
3056            depth: fidl::encoding::Depth,
3057        ) -> fidl::Result<()> {
3058            encoder.debug_check_bounds::<DeviceMonitorSetPowerSaveModeResponse>(offset);
3059            // Zero out padding regions. There's no need to apply masks
3060            // because the unmasked parts will be overwritten by fields.
3061            // Write the fields.
3062            self.0.encode(encoder, offset + 0, depth)?;
3063            Ok(())
3064        }
3065    }
3066
3067    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3068        for DeviceMonitorSetPowerSaveModeResponse
3069    {
3070        #[inline(always)]
3071        fn new_empty() -> Self {
3072            Self { status: fidl::new_empty!(i32, D) }
3073        }
3074
3075        #[inline]
3076        unsafe fn decode(
3077            &mut self,
3078            decoder: &mut fidl::encoding::Decoder<'_, D>,
3079            offset: usize,
3080            _depth: fidl::encoding::Depth,
3081        ) -> fidl::Result<()> {
3082            decoder.debug_check_bounds::<Self>(offset);
3083            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3084            // Verify that padding bytes are zero.
3085            // Copy from the buffer into the object.
3086            unsafe {
3087                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
3088            }
3089            Ok(())
3090        }
3091    }
3092
3093    impl fidl::encoding::ValueTypeMarker for DeviceMonitorSetTxPowerScenarioRequest {
3094        type Borrowed<'a> = &'a Self;
3095        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3096            value
3097        }
3098    }
3099
3100    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorSetTxPowerScenarioRequest {
3101        type Owned = Self;
3102
3103        #[inline(always)]
3104        fn inline_align(_context: fidl::encoding::Context) -> usize {
3105            4
3106        }
3107
3108        #[inline(always)]
3109        fn inline_size(_context: fidl::encoding::Context) -> usize {
3110            8
3111        }
3112    }
3113
3114    unsafe impl<D: fidl::encoding::ResourceDialect>
3115        fidl::encoding::Encode<DeviceMonitorSetTxPowerScenarioRequest, D>
3116        for &DeviceMonitorSetTxPowerScenarioRequest
3117    {
3118        #[inline]
3119        unsafe fn encode(
3120            self,
3121            encoder: &mut fidl::encoding::Encoder<'_, D>,
3122            offset: usize,
3123            _depth: fidl::encoding::Depth,
3124        ) -> fidl::Result<()> {
3125            encoder.debug_check_bounds::<DeviceMonitorSetTxPowerScenarioRequest>(offset);
3126            // Delegate to tuple encoding.
3127            fidl::encoding::Encode::<DeviceMonitorSetTxPowerScenarioRequest, D>::encode(
3128                (
3129                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.phy_id),
3130                    <fidl_fuchsia_wlan_internal__common::TxPowerScenario as fidl::encoding::ValueTypeMarker>::borrow(&self.scenario),
3131                ),
3132                encoder, offset, _depth
3133            )
3134        }
3135    }
3136    unsafe impl<
3137        D: fidl::encoding::ResourceDialect,
3138        T0: fidl::encoding::Encode<u16, D>,
3139        T1: fidl::encoding::Encode<fidl_fuchsia_wlan_internal__common::TxPowerScenario, D>,
3140    > fidl::encoding::Encode<DeviceMonitorSetTxPowerScenarioRequest, D> for (T0, T1)
3141    {
3142        #[inline]
3143        unsafe fn encode(
3144            self,
3145            encoder: &mut fidl::encoding::Encoder<'_, D>,
3146            offset: usize,
3147            depth: fidl::encoding::Depth,
3148        ) -> fidl::Result<()> {
3149            encoder.debug_check_bounds::<DeviceMonitorSetTxPowerScenarioRequest>(offset);
3150            // Zero out padding regions. There's no need to apply masks
3151            // because the unmasked parts will be overwritten by fields.
3152            unsafe {
3153                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
3154                (ptr as *mut u32).write_unaligned(0);
3155            }
3156            // Write the fields.
3157            self.0.encode(encoder, offset + 0, depth)?;
3158            self.1.encode(encoder, offset + 4, depth)?;
3159            Ok(())
3160        }
3161    }
3162
3163    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3164        for DeviceMonitorSetTxPowerScenarioRequest
3165    {
3166        #[inline(always)]
3167        fn new_empty() -> Self {
3168            Self {
3169                phy_id: fidl::new_empty!(u16, D),
3170                scenario: fidl::new_empty!(fidl_fuchsia_wlan_internal__common::TxPowerScenario, D),
3171            }
3172        }
3173
3174        #[inline]
3175        unsafe fn decode(
3176            &mut self,
3177            decoder: &mut fidl::encoding::Decoder<'_, D>,
3178            offset: usize,
3179            _depth: fidl::encoding::Depth,
3180        ) -> fidl::Result<()> {
3181            decoder.debug_check_bounds::<Self>(offset);
3182            // Verify that padding bytes are zero.
3183            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
3184            let padval = unsafe { (ptr as *const u32).read_unaligned() };
3185            let mask = 0xffff0000u32;
3186            let maskedval = padval & mask;
3187            if maskedval != 0 {
3188                return Err(fidl::Error::NonZeroPadding {
3189                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
3190                });
3191            }
3192            fidl::decode!(u16, D, &mut self.phy_id, decoder, offset + 0, _depth)?;
3193            fidl::decode!(
3194                fidl_fuchsia_wlan_internal__common::TxPowerScenario,
3195                D,
3196                &mut self.scenario,
3197                decoder,
3198                offset + 4,
3199                _depth
3200            )?;
3201            Ok(())
3202        }
3203    }
3204
3205    impl fidl::encoding::ValueTypeMarker for DeviceMonitorGetCountryResponse {
3206        type Borrowed<'a> = &'a Self;
3207        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3208            value
3209        }
3210    }
3211
3212    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorGetCountryResponse {
3213        type Owned = Self;
3214
3215        #[inline(always)]
3216        fn inline_align(_context: fidl::encoding::Context) -> usize {
3217            1
3218        }
3219
3220        #[inline(always)]
3221        fn inline_size(_context: fidl::encoding::Context) -> usize {
3222            2
3223        }
3224        #[inline(always)]
3225        fn encode_is_copy() -> bool {
3226            true
3227        }
3228
3229        #[inline(always)]
3230        fn decode_is_copy() -> bool {
3231            true
3232        }
3233    }
3234
3235    unsafe impl<D: fidl::encoding::ResourceDialect>
3236        fidl::encoding::Encode<DeviceMonitorGetCountryResponse, D>
3237        for &DeviceMonitorGetCountryResponse
3238    {
3239        #[inline]
3240        unsafe fn encode(
3241            self,
3242            encoder: &mut fidl::encoding::Encoder<'_, D>,
3243            offset: usize,
3244            _depth: fidl::encoding::Depth,
3245        ) -> fidl::Result<()> {
3246            encoder.debug_check_bounds::<DeviceMonitorGetCountryResponse>(offset);
3247            unsafe {
3248                // Copy the object into the buffer.
3249                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3250                (buf_ptr as *mut DeviceMonitorGetCountryResponse)
3251                    .write_unaligned((self as *const DeviceMonitorGetCountryResponse).read());
3252                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3253                // done second because the memcpy will write garbage to these bytes.
3254            }
3255            Ok(())
3256        }
3257    }
3258    unsafe impl<
3259        D: fidl::encoding::ResourceDialect,
3260        T0: fidl::encoding::Encode<GetCountryResponse, D>,
3261    > fidl::encoding::Encode<DeviceMonitorGetCountryResponse, D> for (T0,)
3262    {
3263        #[inline]
3264        unsafe fn encode(
3265            self,
3266            encoder: &mut fidl::encoding::Encoder<'_, D>,
3267            offset: usize,
3268            depth: fidl::encoding::Depth,
3269        ) -> fidl::Result<()> {
3270            encoder.debug_check_bounds::<DeviceMonitorGetCountryResponse>(offset);
3271            // Zero out padding regions. There's no need to apply masks
3272            // because the unmasked parts will be overwritten by fields.
3273            // Write the fields.
3274            self.0.encode(encoder, offset + 0, depth)?;
3275            Ok(())
3276        }
3277    }
3278
3279    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3280        for DeviceMonitorGetCountryResponse
3281    {
3282        #[inline(always)]
3283        fn new_empty() -> Self {
3284            Self { resp: fidl::new_empty!(GetCountryResponse, D) }
3285        }
3286
3287        #[inline]
3288        unsafe fn decode(
3289            &mut self,
3290            decoder: &mut fidl::encoding::Decoder<'_, D>,
3291            offset: usize,
3292            _depth: fidl::encoding::Depth,
3293        ) -> fidl::Result<()> {
3294            decoder.debug_check_bounds::<Self>(offset);
3295            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3296            // Verify that padding bytes are zero.
3297            // Copy from the buffer into the object.
3298            unsafe {
3299                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
3300            }
3301            Ok(())
3302        }
3303    }
3304
3305    impl fidl::encoding::ValueTypeMarker for DeviceMonitorGetPowerSaveModeResponse {
3306        type Borrowed<'a> = &'a Self;
3307        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3308            value
3309        }
3310    }
3311
3312    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorGetPowerSaveModeResponse {
3313        type Owned = Self;
3314
3315        #[inline(always)]
3316        fn inline_align(_context: fidl::encoding::Context) -> usize {
3317            4
3318        }
3319
3320        #[inline(always)]
3321        fn inline_size(_context: fidl::encoding::Context) -> usize {
3322            4
3323        }
3324    }
3325
3326    unsafe impl<D: fidl::encoding::ResourceDialect>
3327        fidl::encoding::Encode<DeviceMonitorGetPowerSaveModeResponse, D>
3328        for &DeviceMonitorGetPowerSaveModeResponse
3329    {
3330        #[inline]
3331        unsafe fn encode(
3332            self,
3333            encoder: &mut fidl::encoding::Encoder<'_, D>,
3334            offset: usize,
3335            _depth: fidl::encoding::Depth,
3336        ) -> fidl::Result<()> {
3337            encoder.debug_check_bounds::<DeviceMonitorGetPowerSaveModeResponse>(offset);
3338            // Delegate to tuple encoding.
3339            fidl::encoding::Encode::<DeviceMonitorGetPowerSaveModeResponse, D>::encode(
3340                (<GetPowerSaveModeResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
3341                encoder,
3342                offset,
3343                _depth,
3344            )
3345        }
3346    }
3347    unsafe impl<
3348        D: fidl::encoding::ResourceDialect,
3349        T0: fidl::encoding::Encode<GetPowerSaveModeResponse, D>,
3350    > fidl::encoding::Encode<DeviceMonitorGetPowerSaveModeResponse, D> for (T0,)
3351    {
3352        #[inline]
3353        unsafe fn encode(
3354            self,
3355            encoder: &mut fidl::encoding::Encoder<'_, D>,
3356            offset: usize,
3357            depth: fidl::encoding::Depth,
3358        ) -> fidl::Result<()> {
3359            encoder.debug_check_bounds::<DeviceMonitorGetPowerSaveModeResponse>(offset);
3360            // Zero out padding regions. There's no need to apply masks
3361            // because the unmasked parts will be overwritten by fields.
3362            // Write the fields.
3363            self.0.encode(encoder, offset + 0, depth)?;
3364            Ok(())
3365        }
3366    }
3367
3368    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3369        for DeviceMonitorGetPowerSaveModeResponse
3370    {
3371        #[inline(always)]
3372        fn new_empty() -> Self {
3373            Self { resp: fidl::new_empty!(GetPowerSaveModeResponse, D) }
3374        }
3375
3376        #[inline]
3377        unsafe fn decode(
3378            &mut self,
3379            decoder: &mut fidl::encoding::Decoder<'_, D>,
3380            offset: usize,
3381            _depth: fidl::encoding::Depth,
3382        ) -> fidl::Result<()> {
3383            decoder.debug_check_bounds::<Self>(offset);
3384            // Verify that padding bytes are zero.
3385            fidl::decode!(
3386                GetPowerSaveModeResponse,
3387                D,
3388                &mut self.resp,
3389                decoder,
3390                offset + 0,
3391                _depth
3392            )?;
3393            Ok(())
3394        }
3395    }
3396
3397    impl fidl::encoding::ValueTypeMarker for DeviceMonitorGetPowerStateResponse {
3398        type Borrowed<'a> = &'a Self;
3399        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3400            value
3401        }
3402    }
3403
3404    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorGetPowerStateResponse {
3405        type Owned = Self;
3406
3407        #[inline(always)]
3408        fn inline_align(_context: fidl::encoding::Context) -> usize {
3409            1
3410        }
3411
3412        #[inline(always)]
3413        fn inline_size(_context: fidl::encoding::Context) -> usize {
3414            1
3415        }
3416    }
3417
3418    unsafe impl<D: fidl::encoding::ResourceDialect>
3419        fidl::encoding::Encode<DeviceMonitorGetPowerStateResponse, D>
3420        for &DeviceMonitorGetPowerStateResponse
3421    {
3422        #[inline]
3423        unsafe fn encode(
3424            self,
3425            encoder: &mut fidl::encoding::Encoder<'_, D>,
3426            offset: usize,
3427            _depth: fidl::encoding::Depth,
3428        ) -> fidl::Result<()> {
3429            encoder.debug_check_bounds::<DeviceMonitorGetPowerStateResponse>(offset);
3430            // Delegate to tuple encoding.
3431            fidl::encoding::Encode::<DeviceMonitorGetPowerStateResponse, D>::encode(
3432                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.power_on),),
3433                encoder,
3434                offset,
3435                _depth,
3436            )
3437        }
3438    }
3439    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
3440        fidl::encoding::Encode<DeviceMonitorGetPowerStateResponse, D> for (T0,)
3441    {
3442        #[inline]
3443        unsafe fn encode(
3444            self,
3445            encoder: &mut fidl::encoding::Encoder<'_, D>,
3446            offset: usize,
3447            depth: fidl::encoding::Depth,
3448        ) -> fidl::Result<()> {
3449            encoder.debug_check_bounds::<DeviceMonitorGetPowerStateResponse>(offset);
3450            // Zero out padding regions. There's no need to apply masks
3451            // because the unmasked parts will be overwritten by fields.
3452            // Write the fields.
3453            self.0.encode(encoder, offset + 0, depth)?;
3454            Ok(())
3455        }
3456    }
3457
3458    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3459        for DeviceMonitorGetPowerStateResponse
3460    {
3461        #[inline(always)]
3462        fn new_empty() -> Self {
3463            Self { power_on: fidl::new_empty!(bool, D) }
3464        }
3465
3466        #[inline]
3467        unsafe fn decode(
3468            &mut self,
3469            decoder: &mut fidl::encoding::Decoder<'_, D>,
3470            offset: usize,
3471            _depth: fidl::encoding::Depth,
3472        ) -> fidl::Result<()> {
3473            decoder.debug_check_bounds::<Self>(offset);
3474            // Verify that padding bytes are zero.
3475            fidl::decode!(bool, D, &mut self.power_on, decoder, offset + 0, _depth)?;
3476            Ok(())
3477        }
3478    }
3479
3480    impl fidl::encoding::ValueTypeMarker for DeviceMonitorGetSupportedMacRolesResponse {
3481        type Borrowed<'a> = &'a Self;
3482        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3483            value
3484        }
3485    }
3486
3487    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorGetSupportedMacRolesResponse {
3488        type Owned = Self;
3489
3490        #[inline(always)]
3491        fn inline_align(_context: fidl::encoding::Context) -> usize {
3492            8
3493        }
3494
3495        #[inline(always)]
3496        fn inline_size(_context: fidl::encoding::Context) -> usize {
3497            16
3498        }
3499    }
3500
3501    unsafe impl<D: fidl::encoding::ResourceDialect>
3502        fidl::encoding::Encode<DeviceMonitorGetSupportedMacRolesResponse, D>
3503        for &DeviceMonitorGetSupportedMacRolesResponse
3504    {
3505        #[inline]
3506        unsafe fn encode(
3507            self,
3508            encoder: &mut fidl::encoding::Encoder<'_, D>,
3509            offset: usize,
3510            _depth: fidl::encoding::Depth,
3511        ) -> fidl::Result<()> {
3512            encoder.debug_check_bounds::<DeviceMonitorGetSupportedMacRolesResponse>(offset);
3513            // Delegate to tuple encoding.
3514            fidl::encoding::Encode::<DeviceMonitorGetSupportedMacRolesResponse, D>::encode(
3515                (
3516                    <fidl::encoding::Vector<fidl_fuchsia_wlan_common__common::WlanMacRole, 16> as fidl::encoding::ValueTypeMarker>::borrow(&self.supported_mac_roles),
3517                ),
3518                encoder, offset, _depth
3519            )
3520        }
3521    }
3522    unsafe impl<
3523        D: fidl::encoding::ResourceDialect,
3524        T0: fidl::encoding::Encode<
3525                fidl::encoding::Vector<fidl_fuchsia_wlan_common__common::WlanMacRole, 16>,
3526                D,
3527            >,
3528    > fidl::encoding::Encode<DeviceMonitorGetSupportedMacRolesResponse, D> for (T0,)
3529    {
3530        #[inline]
3531        unsafe fn encode(
3532            self,
3533            encoder: &mut fidl::encoding::Encoder<'_, D>,
3534            offset: usize,
3535            depth: fidl::encoding::Depth,
3536        ) -> fidl::Result<()> {
3537            encoder.debug_check_bounds::<DeviceMonitorGetSupportedMacRolesResponse>(offset);
3538            // Zero out padding regions. There's no need to apply masks
3539            // because the unmasked parts will be overwritten by fields.
3540            // Write the fields.
3541            self.0.encode(encoder, offset + 0, depth)?;
3542            Ok(())
3543        }
3544    }
3545
3546    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3547        for DeviceMonitorGetSupportedMacRolesResponse
3548    {
3549        #[inline(always)]
3550        fn new_empty() -> Self {
3551            Self {
3552                supported_mac_roles: fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_wlan_common__common::WlanMacRole, 16>, D),
3553            }
3554        }
3555
3556        #[inline]
3557        unsafe fn decode(
3558            &mut self,
3559            decoder: &mut fidl::encoding::Decoder<'_, D>,
3560            offset: usize,
3561            _depth: fidl::encoding::Depth,
3562        ) -> fidl::Result<()> {
3563            decoder.debug_check_bounds::<Self>(offset);
3564            // Verify that padding bytes are zero.
3565            fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_wlan_common__common::WlanMacRole, 16>, D, &mut self.supported_mac_roles, decoder, offset + 0, _depth)?;
3566            Ok(())
3567        }
3568    }
3569
3570    impl fidl::encoding::ValueTypeMarker for DeviceMonitorGetTxPowerScenarioResponse {
3571        type Borrowed<'a> = &'a Self;
3572        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3573            value
3574        }
3575    }
3576
3577    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorGetTxPowerScenarioResponse {
3578        type Owned = Self;
3579
3580        #[inline(always)]
3581        fn inline_align(_context: fidl::encoding::Context) -> usize {
3582            4
3583        }
3584
3585        #[inline(always)]
3586        fn inline_size(_context: fidl::encoding::Context) -> usize {
3587            4
3588        }
3589    }
3590
3591    unsafe impl<D: fidl::encoding::ResourceDialect>
3592        fidl::encoding::Encode<DeviceMonitorGetTxPowerScenarioResponse, D>
3593        for &DeviceMonitorGetTxPowerScenarioResponse
3594    {
3595        #[inline]
3596        unsafe fn encode(
3597            self,
3598            encoder: &mut fidl::encoding::Encoder<'_, D>,
3599            offset: usize,
3600            _depth: fidl::encoding::Depth,
3601        ) -> fidl::Result<()> {
3602            encoder.debug_check_bounds::<DeviceMonitorGetTxPowerScenarioResponse>(offset);
3603            // Delegate to tuple encoding.
3604            fidl::encoding::Encode::<DeviceMonitorGetTxPowerScenarioResponse, D>::encode(
3605                (
3606                    <fidl_fuchsia_wlan_internal__common::TxPowerScenario as fidl::encoding::ValueTypeMarker>::borrow(&self.scenario),
3607                ),
3608                encoder, offset, _depth
3609            )
3610        }
3611    }
3612    unsafe impl<
3613        D: fidl::encoding::ResourceDialect,
3614        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal__common::TxPowerScenario, D>,
3615    > fidl::encoding::Encode<DeviceMonitorGetTxPowerScenarioResponse, D> for (T0,)
3616    {
3617        #[inline]
3618        unsafe fn encode(
3619            self,
3620            encoder: &mut fidl::encoding::Encoder<'_, D>,
3621            offset: usize,
3622            depth: fidl::encoding::Depth,
3623        ) -> fidl::Result<()> {
3624            encoder.debug_check_bounds::<DeviceMonitorGetTxPowerScenarioResponse>(offset);
3625            // Zero out padding regions. There's no need to apply masks
3626            // because the unmasked parts will be overwritten by fields.
3627            // Write the fields.
3628            self.0.encode(encoder, offset + 0, depth)?;
3629            Ok(())
3630        }
3631    }
3632
3633    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3634        for DeviceMonitorGetTxPowerScenarioResponse
3635    {
3636        #[inline(always)]
3637        fn new_empty() -> Self {
3638            Self {
3639                scenario: fidl::new_empty!(fidl_fuchsia_wlan_internal__common::TxPowerScenario, D),
3640            }
3641        }
3642
3643        #[inline]
3644        unsafe fn decode(
3645            &mut self,
3646            decoder: &mut fidl::encoding::Decoder<'_, D>,
3647            offset: usize,
3648            _depth: fidl::encoding::Depth,
3649        ) -> fidl::Result<()> {
3650            decoder.debug_check_bounds::<Self>(offset);
3651            // Verify that padding bytes are zero.
3652            fidl::decode!(
3653                fidl_fuchsia_wlan_internal__common::TxPowerScenario,
3654                D,
3655                &mut self.scenario,
3656                decoder,
3657                offset + 0,
3658                _depth
3659            )?;
3660            Ok(())
3661        }
3662    }
3663
3664    impl fidl::encoding::ValueTypeMarker for DeviceMonitorQueryIfaceResponse {
3665        type Borrowed<'a> = &'a Self;
3666        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3667            value
3668        }
3669    }
3670
3671    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorQueryIfaceResponse {
3672        type Owned = Self;
3673
3674        #[inline(always)]
3675        fn inline_align(_context: fidl::encoding::Context) -> usize {
3676            4
3677        }
3678
3679        #[inline(always)]
3680        fn inline_size(_context: fidl::encoding::Context) -> usize {
3681            24
3682        }
3683    }
3684
3685    unsafe impl<D: fidl::encoding::ResourceDialect>
3686        fidl::encoding::Encode<DeviceMonitorQueryIfaceResponse, D>
3687        for &DeviceMonitorQueryIfaceResponse
3688    {
3689        #[inline]
3690        unsafe fn encode(
3691            self,
3692            encoder: &mut fidl::encoding::Encoder<'_, D>,
3693            offset: usize,
3694            _depth: fidl::encoding::Depth,
3695        ) -> fidl::Result<()> {
3696            encoder.debug_check_bounds::<DeviceMonitorQueryIfaceResponse>(offset);
3697            // Delegate to tuple encoding.
3698            fidl::encoding::Encode::<DeviceMonitorQueryIfaceResponse, D>::encode(
3699                (<QueryIfaceResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
3700                encoder,
3701                offset,
3702                _depth,
3703            )
3704        }
3705    }
3706    unsafe impl<
3707        D: fidl::encoding::ResourceDialect,
3708        T0: fidl::encoding::Encode<QueryIfaceResponse, D>,
3709    > fidl::encoding::Encode<DeviceMonitorQueryIfaceResponse, D> for (T0,)
3710    {
3711        #[inline]
3712        unsafe fn encode(
3713            self,
3714            encoder: &mut fidl::encoding::Encoder<'_, D>,
3715            offset: usize,
3716            depth: fidl::encoding::Depth,
3717        ) -> fidl::Result<()> {
3718            encoder.debug_check_bounds::<DeviceMonitorQueryIfaceResponse>(offset);
3719            // Zero out padding regions. There's no need to apply masks
3720            // because the unmasked parts will be overwritten by fields.
3721            // Write the fields.
3722            self.0.encode(encoder, offset + 0, depth)?;
3723            Ok(())
3724        }
3725    }
3726
3727    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3728        for DeviceMonitorQueryIfaceResponse
3729    {
3730        #[inline(always)]
3731        fn new_empty() -> Self {
3732            Self { resp: fidl::new_empty!(QueryIfaceResponse, D) }
3733        }
3734
3735        #[inline]
3736        unsafe fn decode(
3737            &mut self,
3738            decoder: &mut fidl::encoding::Decoder<'_, D>,
3739            offset: usize,
3740            _depth: fidl::encoding::Depth,
3741        ) -> fidl::Result<()> {
3742            decoder.debug_check_bounds::<Self>(offset);
3743            // Verify that padding bytes are zero.
3744            fidl::decode!(QueryIfaceResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
3745            Ok(())
3746        }
3747    }
3748
3749    impl fidl::encoding::ValueTypeMarker for DeviceWatcherOnIfaceAddedRequest {
3750        type Borrowed<'a> = &'a Self;
3751        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3752            value
3753        }
3754    }
3755
3756    unsafe impl fidl::encoding::TypeMarker for DeviceWatcherOnIfaceAddedRequest {
3757        type Owned = Self;
3758
3759        #[inline(always)]
3760        fn inline_align(_context: fidl::encoding::Context) -> usize {
3761            2
3762        }
3763
3764        #[inline(always)]
3765        fn inline_size(_context: fidl::encoding::Context) -> usize {
3766            2
3767        }
3768        #[inline(always)]
3769        fn encode_is_copy() -> bool {
3770            true
3771        }
3772
3773        #[inline(always)]
3774        fn decode_is_copy() -> bool {
3775            true
3776        }
3777    }
3778
3779    unsafe impl<D: fidl::encoding::ResourceDialect>
3780        fidl::encoding::Encode<DeviceWatcherOnIfaceAddedRequest, D>
3781        for &DeviceWatcherOnIfaceAddedRequest
3782    {
3783        #[inline]
3784        unsafe fn encode(
3785            self,
3786            encoder: &mut fidl::encoding::Encoder<'_, D>,
3787            offset: usize,
3788            _depth: fidl::encoding::Depth,
3789        ) -> fidl::Result<()> {
3790            encoder.debug_check_bounds::<DeviceWatcherOnIfaceAddedRequest>(offset);
3791            unsafe {
3792                // Copy the object into the buffer.
3793                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3794                (buf_ptr as *mut DeviceWatcherOnIfaceAddedRequest)
3795                    .write_unaligned((self as *const DeviceWatcherOnIfaceAddedRequest).read());
3796                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3797                // done second because the memcpy will write garbage to these bytes.
3798            }
3799            Ok(())
3800        }
3801    }
3802    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
3803        fidl::encoding::Encode<DeviceWatcherOnIfaceAddedRequest, D> for (T0,)
3804    {
3805        #[inline]
3806        unsafe fn encode(
3807            self,
3808            encoder: &mut fidl::encoding::Encoder<'_, D>,
3809            offset: usize,
3810            depth: fidl::encoding::Depth,
3811        ) -> fidl::Result<()> {
3812            encoder.debug_check_bounds::<DeviceWatcherOnIfaceAddedRequest>(offset);
3813            // Zero out padding regions. There's no need to apply masks
3814            // because the unmasked parts will be overwritten by fields.
3815            // Write the fields.
3816            self.0.encode(encoder, offset + 0, depth)?;
3817            Ok(())
3818        }
3819    }
3820
3821    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3822        for DeviceWatcherOnIfaceAddedRequest
3823    {
3824        #[inline(always)]
3825        fn new_empty() -> Self {
3826            Self { iface_id: fidl::new_empty!(u16, D) }
3827        }
3828
3829        #[inline]
3830        unsafe fn decode(
3831            &mut self,
3832            decoder: &mut fidl::encoding::Decoder<'_, D>,
3833            offset: usize,
3834            _depth: fidl::encoding::Depth,
3835        ) -> fidl::Result<()> {
3836            decoder.debug_check_bounds::<Self>(offset);
3837            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3838            // Verify that padding bytes are zero.
3839            // Copy from the buffer into the object.
3840            unsafe {
3841                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
3842            }
3843            Ok(())
3844        }
3845    }
3846
3847    impl fidl::encoding::ValueTypeMarker for DeviceWatcherOnIfaceRemovedRequest {
3848        type Borrowed<'a> = &'a Self;
3849        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3850            value
3851        }
3852    }
3853
3854    unsafe impl fidl::encoding::TypeMarker for DeviceWatcherOnIfaceRemovedRequest {
3855        type Owned = Self;
3856
3857        #[inline(always)]
3858        fn inline_align(_context: fidl::encoding::Context) -> usize {
3859            2
3860        }
3861
3862        #[inline(always)]
3863        fn inline_size(_context: fidl::encoding::Context) -> usize {
3864            2
3865        }
3866        #[inline(always)]
3867        fn encode_is_copy() -> bool {
3868            true
3869        }
3870
3871        #[inline(always)]
3872        fn decode_is_copy() -> bool {
3873            true
3874        }
3875    }
3876
3877    unsafe impl<D: fidl::encoding::ResourceDialect>
3878        fidl::encoding::Encode<DeviceWatcherOnIfaceRemovedRequest, D>
3879        for &DeviceWatcherOnIfaceRemovedRequest
3880    {
3881        #[inline]
3882        unsafe fn encode(
3883            self,
3884            encoder: &mut fidl::encoding::Encoder<'_, D>,
3885            offset: usize,
3886            _depth: fidl::encoding::Depth,
3887        ) -> fidl::Result<()> {
3888            encoder.debug_check_bounds::<DeviceWatcherOnIfaceRemovedRequest>(offset);
3889            unsafe {
3890                // Copy the object into the buffer.
3891                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3892                (buf_ptr as *mut DeviceWatcherOnIfaceRemovedRequest)
3893                    .write_unaligned((self as *const DeviceWatcherOnIfaceRemovedRequest).read());
3894                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3895                // done second because the memcpy will write garbage to these bytes.
3896            }
3897            Ok(())
3898        }
3899    }
3900    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
3901        fidl::encoding::Encode<DeviceWatcherOnIfaceRemovedRequest, D> for (T0,)
3902    {
3903        #[inline]
3904        unsafe fn encode(
3905            self,
3906            encoder: &mut fidl::encoding::Encoder<'_, D>,
3907            offset: usize,
3908            depth: fidl::encoding::Depth,
3909        ) -> fidl::Result<()> {
3910            encoder.debug_check_bounds::<DeviceWatcherOnIfaceRemovedRequest>(offset);
3911            // Zero out padding regions. There's no need to apply masks
3912            // because the unmasked parts will be overwritten by fields.
3913            // Write the fields.
3914            self.0.encode(encoder, offset + 0, depth)?;
3915            Ok(())
3916        }
3917    }
3918
3919    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3920        for DeviceWatcherOnIfaceRemovedRequest
3921    {
3922        #[inline(always)]
3923        fn new_empty() -> Self {
3924            Self { iface_id: fidl::new_empty!(u16, D) }
3925        }
3926
3927        #[inline]
3928        unsafe fn decode(
3929            &mut self,
3930            decoder: &mut fidl::encoding::Decoder<'_, D>,
3931            offset: usize,
3932            _depth: fidl::encoding::Depth,
3933        ) -> fidl::Result<()> {
3934            decoder.debug_check_bounds::<Self>(offset);
3935            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3936            // Verify that padding bytes are zero.
3937            // Copy from the buffer into the object.
3938            unsafe {
3939                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
3940            }
3941            Ok(())
3942        }
3943    }
3944
3945    impl fidl::encoding::ValueTypeMarker for DeviceWatcherOnPhyAddedRequest {
3946        type Borrowed<'a> = &'a Self;
3947        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3948            value
3949        }
3950    }
3951
3952    unsafe impl fidl::encoding::TypeMarker for DeviceWatcherOnPhyAddedRequest {
3953        type Owned = Self;
3954
3955        #[inline(always)]
3956        fn inline_align(_context: fidl::encoding::Context) -> usize {
3957            2
3958        }
3959
3960        #[inline(always)]
3961        fn inline_size(_context: fidl::encoding::Context) -> usize {
3962            2
3963        }
3964        #[inline(always)]
3965        fn encode_is_copy() -> bool {
3966            true
3967        }
3968
3969        #[inline(always)]
3970        fn decode_is_copy() -> bool {
3971            true
3972        }
3973    }
3974
3975    unsafe impl<D: fidl::encoding::ResourceDialect>
3976        fidl::encoding::Encode<DeviceWatcherOnPhyAddedRequest, D>
3977        for &DeviceWatcherOnPhyAddedRequest
3978    {
3979        #[inline]
3980        unsafe fn encode(
3981            self,
3982            encoder: &mut fidl::encoding::Encoder<'_, D>,
3983            offset: usize,
3984            _depth: fidl::encoding::Depth,
3985        ) -> fidl::Result<()> {
3986            encoder.debug_check_bounds::<DeviceWatcherOnPhyAddedRequest>(offset);
3987            unsafe {
3988                // Copy the object into the buffer.
3989                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3990                (buf_ptr as *mut DeviceWatcherOnPhyAddedRequest)
3991                    .write_unaligned((self as *const DeviceWatcherOnPhyAddedRequest).read());
3992                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3993                // done second because the memcpy will write garbage to these bytes.
3994            }
3995            Ok(())
3996        }
3997    }
3998    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
3999        fidl::encoding::Encode<DeviceWatcherOnPhyAddedRequest, D> for (T0,)
4000    {
4001        #[inline]
4002        unsafe fn encode(
4003            self,
4004            encoder: &mut fidl::encoding::Encoder<'_, D>,
4005            offset: usize,
4006            depth: fidl::encoding::Depth,
4007        ) -> fidl::Result<()> {
4008            encoder.debug_check_bounds::<DeviceWatcherOnPhyAddedRequest>(offset);
4009            // Zero out padding regions. There's no need to apply masks
4010            // because the unmasked parts will be overwritten by fields.
4011            // Write the fields.
4012            self.0.encode(encoder, offset + 0, depth)?;
4013            Ok(())
4014        }
4015    }
4016
4017    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4018        for DeviceWatcherOnPhyAddedRequest
4019    {
4020        #[inline(always)]
4021        fn new_empty() -> Self {
4022            Self { phy_id: fidl::new_empty!(u16, D) }
4023        }
4024
4025        #[inline]
4026        unsafe fn decode(
4027            &mut self,
4028            decoder: &mut fidl::encoding::Decoder<'_, D>,
4029            offset: usize,
4030            _depth: fidl::encoding::Depth,
4031        ) -> fidl::Result<()> {
4032            decoder.debug_check_bounds::<Self>(offset);
4033            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4034            // Verify that padding bytes are zero.
4035            // Copy from the buffer into the object.
4036            unsafe {
4037                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
4038            }
4039            Ok(())
4040        }
4041    }
4042
4043    impl fidl::encoding::ValueTypeMarker for DeviceWatcherOnPhyRemovedRequest {
4044        type Borrowed<'a> = &'a Self;
4045        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4046            value
4047        }
4048    }
4049
4050    unsafe impl fidl::encoding::TypeMarker for DeviceWatcherOnPhyRemovedRequest {
4051        type Owned = Self;
4052
4053        #[inline(always)]
4054        fn inline_align(_context: fidl::encoding::Context) -> usize {
4055            2
4056        }
4057
4058        #[inline(always)]
4059        fn inline_size(_context: fidl::encoding::Context) -> usize {
4060            2
4061        }
4062        #[inline(always)]
4063        fn encode_is_copy() -> bool {
4064            true
4065        }
4066
4067        #[inline(always)]
4068        fn decode_is_copy() -> bool {
4069            true
4070        }
4071    }
4072
4073    unsafe impl<D: fidl::encoding::ResourceDialect>
4074        fidl::encoding::Encode<DeviceWatcherOnPhyRemovedRequest, D>
4075        for &DeviceWatcherOnPhyRemovedRequest
4076    {
4077        #[inline]
4078        unsafe fn encode(
4079            self,
4080            encoder: &mut fidl::encoding::Encoder<'_, D>,
4081            offset: usize,
4082            _depth: fidl::encoding::Depth,
4083        ) -> fidl::Result<()> {
4084            encoder.debug_check_bounds::<DeviceWatcherOnPhyRemovedRequest>(offset);
4085            unsafe {
4086                // Copy the object into the buffer.
4087                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4088                (buf_ptr as *mut DeviceWatcherOnPhyRemovedRequest)
4089                    .write_unaligned((self as *const DeviceWatcherOnPhyRemovedRequest).read());
4090                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4091                // done second because the memcpy will write garbage to these bytes.
4092            }
4093            Ok(())
4094        }
4095    }
4096    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
4097        fidl::encoding::Encode<DeviceWatcherOnPhyRemovedRequest, D> for (T0,)
4098    {
4099        #[inline]
4100        unsafe fn encode(
4101            self,
4102            encoder: &mut fidl::encoding::Encoder<'_, D>,
4103            offset: usize,
4104            depth: fidl::encoding::Depth,
4105        ) -> fidl::Result<()> {
4106            encoder.debug_check_bounds::<DeviceWatcherOnPhyRemovedRequest>(offset);
4107            // Zero out padding regions. There's no need to apply masks
4108            // because the unmasked parts will be overwritten by fields.
4109            // Write the fields.
4110            self.0.encode(encoder, offset + 0, depth)?;
4111            Ok(())
4112        }
4113    }
4114
4115    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4116        for DeviceWatcherOnPhyRemovedRequest
4117    {
4118        #[inline(always)]
4119        fn new_empty() -> Self {
4120            Self { phy_id: fidl::new_empty!(u16, D) }
4121        }
4122
4123        #[inline]
4124        unsafe fn decode(
4125            &mut self,
4126            decoder: &mut fidl::encoding::Decoder<'_, D>,
4127            offset: usize,
4128            _depth: fidl::encoding::Depth,
4129        ) -> fidl::Result<()> {
4130            decoder.debug_check_bounds::<Self>(offset);
4131            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4132            // Verify that padding bytes are zero.
4133            // Copy from the buffer into the object.
4134            unsafe {
4135                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
4136            }
4137            Ok(())
4138        }
4139    }
4140
4141    impl fidl::encoding::ValueTypeMarker for GetCountryResponse {
4142        type Borrowed<'a> = &'a Self;
4143        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4144            value
4145        }
4146    }
4147
4148    unsafe impl fidl::encoding::TypeMarker for GetCountryResponse {
4149        type Owned = Self;
4150
4151        #[inline(always)]
4152        fn inline_align(_context: fidl::encoding::Context) -> usize {
4153            1
4154        }
4155
4156        #[inline(always)]
4157        fn inline_size(_context: fidl::encoding::Context) -> usize {
4158            2
4159        }
4160        #[inline(always)]
4161        fn encode_is_copy() -> bool {
4162            true
4163        }
4164
4165        #[inline(always)]
4166        fn decode_is_copy() -> bool {
4167            true
4168        }
4169    }
4170
4171    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GetCountryResponse, D>
4172        for &GetCountryResponse
4173    {
4174        #[inline]
4175        unsafe fn encode(
4176            self,
4177            encoder: &mut fidl::encoding::Encoder<'_, D>,
4178            offset: usize,
4179            _depth: fidl::encoding::Depth,
4180        ) -> fidl::Result<()> {
4181            encoder.debug_check_bounds::<GetCountryResponse>(offset);
4182            unsafe {
4183                // Copy the object into the buffer.
4184                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4185                (buf_ptr as *mut GetCountryResponse)
4186                    .write_unaligned((self as *const GetCountryResponse).read());
4187                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4188                // done second because the memcpy will write garbage to these bytes.
4189            }
4190            Ok(())
4191        }
4192    }
4193    unsafe impl<
4194        D: fidl::encoding::ResourceDialect,
4195        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 2>, D>,
4196    > fidl::encoding::Encode<GetCountryResponse, D> for (T0,)
4197    {
4198        #[inline]
4199        unsafe fn encode(
4200            self,
4201            encoder: &mut fidl::encoding::Encoder<'_, D>,
4202            offset: usize,
4203            depth: fidl::encoding::Depth,
4204        ) -> fidl::Result<()> {
4205            encoder.debug_check_bounds::<GetCountryResponse>(offset);
4206            // Zero out padding regions. There's no need to apply masks
4207            // because the unmasked parts will be overwritten by fields.
4208            // Write the fields.
4209            self.0.encode(encoder, offset + 0, depth)?;
4210            Ok(())
4211        }
4212    }
4213
4214    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetCountryResponse {
4215        #[inline(always)]
4216        fn new_empty() -> Self {
4217            Self { alpha2: fidl::new_empty!(fidl::encoding::Array<u8, 2>, D) }
4218        }
4219
4220        #[inline]
4221        unsafe fn decode(
4222            &mut self,
4223            decoder: &mut fidl::encoding::Decoder<'_, D>,
4224            offset: usize,
4225            _depth: fidl::encoding::Depth,
4226        ) -> fidl::Result<()> {
4227            decoder.debug_check_bounds::<Self>(offset);
4228            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4229            // Verify that padding bytes are zero.
4230            // Copy from the buffer into the object.
4231            unsafe {
4232                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
4233            }
4234            Ok(())
4235        }
4236    }
4237
4238    impl fidl::encoding::ValueTypeMarker for GetPowerSaveModeResponse {
4239        type Borrowed<'a> = &'a Self;
4240        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4241            value
4242        }
4243    }
4244
4245    unsafe impl fidl::encoding::TypeMarker for GetPowerSaveModeResponse {
4246        type Owned = Self;
4247
4248        #[inline(always)]
4249        fn inline_align(_context: fidl::encoding::Context) -> usize {
4250            4
4251        }
4252
4253        #[inline(always)]
4254        fn inline_size(_context: fidl::encoding::Context) -> usize {
4255            4
4256        }
4257    }
4258
4259    unsafe impl<D: fidl::encoding::ResourceDialect>
4260        fidl::encoding::Encode<GetPowerSaveModeResponse, D> for &GetPowerSaveModeResponse
4261    {
4262        #[inline]
4263        unsafe fn encode(
4264            self,
4265            encoder: &mut fidl::encoding::Encoder<'_, D>,
4266            offset: usize,
4267            _depth: fidl::encoding::Depth,
4268        ) -> fidl::Result<()> {
4269            encoder.debug_check_bounds::<GetPowerSaveModeResponse>(offset);
4270            // Delegate to tuple encoding.
4271            fidl::encoding::Encode::<GetPowerSaveModeResponse, D>::encode(
4272                (
4273                    <fidl_fuchsia_wlan_common__common::PowerSaveType as fidl::encoding::ValueTypeMarker>::borrow(&self.ps_mode),
4274                ),
4275                encoder, offset, _depth
4276            )
4277        }
4278    }
4279    unsafe impl<
4280        D: fidl::encoding::ResourceDialect,
4281        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::PowerSaveType, D>,
4282    > fidl::encoding::Encode<GetPowerSaveModeResponse, D> for (T0,)
4283    {
4284        #[inline]
4285        unsafe fn encode(
4286            self,
4287            encoder: &mut fidl::encoding::Encoder<'_, D>,
4288            offset: usize,
4289            depth: fidl::encoding::Depth,
4290        ) -> fidl::Result<()> {
4291            encoder.debug_check_bounds::<GetPowerSaveModeResponse>(offset);
4292            // Zero out padding regions. There's no need to apply masks
4293            // because the unmasked parts will be overwritten by fields.
4294            // Write the fields.
4295            self.0.encode(encoder, offset + 0, depth)?;
4296            Ok(())
4297        }
4298    }
4299
4300    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4301        for GetPowerSaveModeResponse
4302    {
4303        #[inline(always)]
4304        fn new_empty() -> Self {
4305            Self { ps_mode: fidl::new_empty!(fidl_fuchsia_wlan_common__common::PowerSaveType, D) }
4306        }
4307
4308        #[inline]
4309        unsafe fn decode(
4310            &mut self,
4311            decoder: &mut fidl::encoding::Decoder<'_, D>,
4312            offset: usize,
4313            _depth: fidl::encoding::Depth,
4314        ) -> fidl::Result<()> {
4315            decoder.debug_check_bounds::<Self>(offset);
4316            // Verify that padding bytes are zero.
4317            fidl::decode!(
4318                fidl_fuchsia_wlan_common__common::PowerSaveType,
4319                D,
4320                &mut self.ps_mode,
4321                decoder,
4322                offset + 0,
4323                _depth
4324            )?;
4325            Ok(())
4326        }
4327    }
4328
4329    impl fidl::encoding::ValueTypeMarker for PhyEventWatcherOnCountryCodeChangeRequest {
4330        type Borrowed<'a> = &'a Self;
4331        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4332            value
4333        }
4334    }
4335
4336    unsafe impl fidl::encoding::TypeMarker for PhyEventWatcherOnCountryCodeChangeRequest {
4337        type Owned = Self;
4338
4339        #[inline(always)]
4340        fn inline_align(_context: fidl::encoding::Context) -> usize {
4341            2
4342        }
4343
4344        #[inline(always)]
4345        fn inline_size(_context: fidl::encoding::Context) -> usize {
4346            4
4347        }
4348        #[inline(always)]
4349        fn encode_is_copy() -> bool {
4350            true
4351        }
4352
4353        #[inline(always)]
4354        fn decode_is_copy() -> bool {
4355            true
4356        }
4357    }
4358
4359    unsafe impl<D: fidl::encoding::ResourceDialect>
4360        fidl::encoding::Encode<PhyEventWatcherOnCountryCodeChangeRequest, D>
4361        for &PhyEventWatcherOnCountryCodeChangeRequest
4362    {
4363        #[inline]
4364        unsafe fn encode(
4365            self,
4366            encoder: &mut fidl::encoding::Encoder<'_, D>,
4367            offset: usize,
4368            _depth: fidl::encoding::Depth,
4369        ) -> fidl::Result<()> {
4370            encoder.debug_check_bounds::<PhyEventWatcherOnCountryCodeChangeRequest>(offset);
4371            unsafe {
4372                // Copy the object into the buffer.
4373                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4374                (buf_ptr as *mut PhyEventWatcherOnCountryCodeChangeRequest).write_unaligned(
4375                    (self as *const PhyEventWatcherOnCountryCodeChangeRequest).read(),
4376                );
4377                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4378                // done second because the memcpy will write garbage to these bytes.
4379            }
4380            Ok(())
4381        }
4382    }
4383    unsafe impl<
4384        D: fidl::encoding::ResourceDialect,
4385        T0: fidl::encoding::Encode<u16, D>,
4386        T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 2>, D>,
4387    > fidl::encoding::Encode<PhyEventWatcherOnCountryCodeChangeRequest, D> for (T0, T1)
4388    {
4389        #[inline]
4390        unsafe fn encode(
4391            self,
4392            encoder: &mut fidl::encoding::Encoder<'_, D>,
4393            offset: usize,
4394            depth: fidl::encoding::Depth,
4395        ) -> fidl::Result<()> {
4396            encoder.debug_check_bounds::<PhyEventWatcherOnCountryCodeChangeRequest>(offset);
4397            // Zero out padding regions. There's no need to apply masks
4398            // because the unmasked parts will be overwritten by fields.
4399            // Write the fields.
4400            self.0.encode(encoder, offset + 0, depth)?;
4401            self.1.encode(encoder, offset + 2, depth)?;
4402            Ok(())
4403        }
4404    }
4405
4406    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4407        for PhyEventWatcherOnCountryCodeChangeRequest
4408    {
4409        #[inline(always)]
4410        fn new_empty() -> Self {
4411            Self {
4412                phy_id: fidl::new_empty!(u16, D),
4413                alpha2: fidl::new_empty!(fidl::encoding::Array<u8, 2>, D),
4414            }
4415        }
4416
4417        #[inline]
4418        unsafe fn decode(
4419            &mut self,
4420            decoder: &mut fidl::encoding::Decoder<'_, D>,
4421            offset: usize,
4422            _depth: fidl::encoding::Depth,
4423        ) -> fidl::Result<()> {
4424            decoder.debug_check_bounds::<Self>(offset);
4425            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4426            // Verify that padding bytes are zero.
4427            // Copy from the buffer into the object.
4428            unsafe {
4429                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
4430            }
4431            Ok(())
4432        }
4433    }
4434
4435    impl fidl::encoding::ValueTypeMarker for PhyEventWatcherOnCriticalErrorRequest {
4436        type Borrowed<'a> = &'a Self;
4437        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4438            value
4439        }
4440    }
4441
4442    unsafe impl fidl::encoding::TypeMarker for PhyEventWatcherOnCriticalErrorRequest {
4443        type Owned = Self;
4444
4445        #[inline(always)]
4446        fn inline_align(_context: fidl::encoding::Context) -> usize {
4447            2
4448        }
4449
4450        #[inline(always)]
4451        fn inline_size(_context: fidl::encoding::Context) -> usize {
4452            4
4453        }
4454    }
4455
4456    unsafe impl<D: fidl::encoding::ResourceDialect>
4457        fidl::encoding::Encode<PhyEventWatcherOnCriticalErrorRequest, D>
4458        for &PhyEventWatcherOnCriticalErrorRequest
4459    {
4460        #[inline]
4461        unsafe fn encode(
4462            self,
4463            encoder: &mut fidl::encoding::Encoder<'_, D>,
4464            offset: usize,
4465            _depth: fidl::encoding::Depth,
4466        ) -> fidl::Result<()> {
4467            encoder.debug_check_bounds::<PhyEventWatcherOnCriticalErrorRequest>(offset);
4468            // Delegate to tuple encoding.
4469            fidl::encoding::Encode::<PhyEventWatcherOnCriticalErrorRequest, D>::encode(
4470                (
4471                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.phy_id),
4472                    <CriticalErrorReason as fidl::encoding::ValueTypeMarker>::borrow(
4473                        &self.reason_code,
4474                    ),
4475                ),
4476                encoder,
4477                offset,
4478                _depth,
4479            )
4480        }
4481    }
4482    unsafe impl<
4483        D: fidl::encoding::ResourceDialect,
4484        T0: fidl::encoding::Encode<u16, D>,
4485        T1: fidl::encoding::Encode<CriticalErrorReason, D>,
4486    > fidl::encoding::Encode<PhyEventWatcherOnCriticalErrorRequest, D> for (T0, T1)
4487    {
4488        #[inline]
4489        unsafe fn encode(
4490            self,
4491            encoder: &mut fidl::encoding::Encoder<'_, D>,
4492            offset: usize,
4493            depth: fidl::encoding::Depth,
4494        ) -> fidl::Result<()> {
4495            encoder.debug_check_bounds::<PhyEventWatcherOnCriticalErrorRequest>(offset);
4496            // Zero out padding regions. There's no need to apply masks
4497            // because the unmasked parts will be overwritten by fields.
4498            unsafe {
4499                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2);
4500                (ptr as *mut u16).write_unaligned(0);
4501            }
4502            // Write the fields.
4503            self.0.encode(encoder, offset + 0, depth)?;
4504            self.1.encode(encoder, offset + 2, depth)?;
4505            Ok(())
4506        }
4507    }
4508
4509    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4510        for PhyEventWatcherOnCriticalErrorRequest
4511    {
4512        #[inline(always)]
4513        fn new_empty() -> Self {
4514            Self {
4515                phy_id: fidl::new_empty!(u16, D),
4516                reason_code: fidl::new_empty!(CriticalErrorReason, D),
4517            }
4518        }
4519
4520        #[inline]
4521        unsafe fn decode(
4522            &mut self,
4523            decoder: &mut fidl::encoding::Decoder<'_, D>,
4524            offset: usize,
4525            _depth: fidl::encoding::Depth,
4526        ) -> fidl::Result<()> {
4527            decoder.debug_check_bounds::<Self>(offset);
4528            // Verify that padding bytes are zero.
4529            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(2) };
4530            let padval = unsafe { (ptr as *const u16).read_unaligned() };
4531            let mask = 0xff00u16;
4532            let maskedval = padval & mask;
4533            if maskedval != 0 {
4534                return Err(fidl::Error::NonZeroPadding {
4535                    padding_start: offset + 2 + ((mask as u64).trailing_zeros() / 8) as usize,
4536                });
4537            }
4538            fidl::decode!(u16, D, &mut self.phy_id, decoder, offset + 0, _depth)?;
4539            fidl::decode!(
4540                CriticalErrorReason,
4541                D,
4542                &mut self.reason_code,
4543                decoder,
4544                offset + 2,
4545                _depth
4546            )?;
4547            Ok(())
4548        }
4549    }
4550
4551    impl fidl::encoding::ValueTypeMarker for QueryIfaceResponse {
4552        type Borrowed<'a> = &'a Self;
4553        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4554            value
4555        }
4556    }
4557
4558    unsafe impl fidl::encoding::TypeMarker for QueryIfaceResponse {
4559        type Owned = Self;
4560
4561        #[inline(always)]
4562        fn inline_align(_context: fidl::encoding::Context) -> usize {
4563            4
4564        }
4565
4566        #[inline(always)]
4567        fn inline_size(_context: fidl::encoding::Context) -> usize {
4568            24
4569        }
4570    }
4571
4572    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<QueryIfaceResponse, D>
4573        for &QueryIfaceResponse
4574    {
4575        #[inline]
4576        unsafe fn encode(
4577            self,
4578            encoder: &mut fidl::encoding::Encoder<'_, D>,
4579            offset: usize,
4580            _depth: fidl::encoding::Depth,
4581        ) -> fidl::Result<()> {
4582            encoder.debug_check_bounds::<QueryIfaceResponse>(offset);
4583            // Delegate to tuple encoding.
4584            fidl::encoding::Encode::<QueryIfaceResponse, D>::encode(
4585                (
4586                    <fidl_fuchsia_wlan_common__common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow(&self.role),
4587                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
4588                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.phy_id),
4589                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.phy_assigned_id),
4590                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.sta_addr),
4591                    <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.factory_addr),
4592                ),
4593                encoder, offset, _depth
4594            )
4595        }
4596    }
4597    unsafe impl<
4598        D: fidl::encoding::ResourceDialect,
4599        T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::WlanMacRole, D>,
4600        T1: fidl::encoding::Encode<u16, D>,
4601        T2: fidl::encoding::Encode<u16, D>,
4602        T3: fidl::encoding::Encode<u16, D>,
4603        T4: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4604        T5: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4605    > fidl::encoding::Encode<QueryIfaceResponse, D> for (T0, T1, T2, T3, T4, T5)
4606    {
4607        #[inline]
4608        unsafe fn encode(
4609            self,
4610            encoder: &mut fidl::encoding::Encoder<'_, D>,
4611            offset: usize,
4612            depth: fidl::encoding::Depth,
4613        ) -> fidl::Result<()> {
4614            encoder.debug_check_bounds::<QueryIfaceResponse>(offset);
4615            // Zero out padding regions. There's no need to apply masks
4616            // because the unmasked parts will be overwritten by fields.
4617            unsafe {
4618                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(20);
4619                (ptr as *mut u32).write_unaligned(0);
4620            }
4621            // Write the fields.
4622            self.0.encode(encoder, offset + 0, depth)?;
4623            self.1.encode(encoder, offset + 4, depth)?;
4624            self.2.encode(encoder, offset + 6, depth)?;
4625            self.3.encode(encoder, offset + 8, depth)?;
4626            self.4.encode(encoder, offset + 10, depth)?;
4627            self.5.encode(encoder, offset + 16, depth)?;
4628            Ok(())
4629        }
4630    }
4631
4632    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for QueryIfaceResponse {
4633        #[inline(always)]
4634        fn new_empty() -> Self {
4635            Self {
4636                role: fidl::new_empty!(fidl_fuchsia_wlan_common__common::WlanMacRole, D),
4637                id: fidl::new_empty!(u16, D),
4638                phy_id: fidl::new_empty!(u16, D),
4639                phy_assigned_id: fidl::new_empty!(u16, D),
4640                sta_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4641                factory_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4642            }
4643        }
4644
4645        #[inline]
4646        unsafe fn decode(
4647            &mut self,
4648            decoder: &mut fidl::encoding::Decoder<'_, D>,
4649            offset: usize,
4650            _depth: fidl::encoding::Depth,
4651        ) -> fidl::Result<()> {
4652            decoder.debug_check_bounds::<Self>(offset);
4653            // Verify that padding bytes are zero.
4654            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(20) };
4655            let padval = unsafe { (ptr as *const u32).read_unaligned() };
4656            let mask = 0xffff0000u32;
4657            let maskedval = padval & mask;
4658            if maskedval != 0 {
4659                return Err(fidl::Error::NonZeroPadding {
4660                    padding_start: offset + 20 + ((mask as u64).trailing_zeros() / 8) as usize,
4661                });
4662            }
4663            fidl::decode!(
4664                fidl_fuchsia_wlan_common__common::WlanMacRole,
4665                D,
4666                &mut self.role,
4667                decoder,
4668                offset + 0,
4669                _depth
4670            )?;
4671            fidl::decode!(u16, D, &mut self.id, decoder, offset + 4, _depth)?;
4672            fidl::decode!(u16, D, &mut self.phy_id, decoder, offset + 6, _depth)?;
4673            fidl::decode!(u16, D, &mut self.phy_assigned_id, decoder, offset + 8, _depth)?;
4674            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.sta_addr, decoder, offset + 10, _depth)?;
4675            fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.factory_addr, decoder, offset + 16, _depth)?;
4676            Ok(())
4677        }
4678    }
4679
4680    impl fidl::encoding::ValueTypeMarker for SetCountryRequest {
4681        type Borrowed<'a> = &'a Self;
4682        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4683            value
4684        }
4685    }
4686
4687    unsafe impl fidl::encoding::TypeMarker for SetCountryRequest {
4688        type Owned = Self;
4689
4690        #[inline(always)]
4691        fn inline_align(_context: fidl::encoding::Context) -> usize {
4692            2
4693        }
4694
4695        #[inline(always)]
4696        fn inline_size(_context: fidl::encoding::Context) -> usize {
4697            4
4698        }
4699        #[inline(always)]
4700        fn encode_is_copy() -> bool {
4701            true
4702        }
4703
4704        #[inline(always)]
4705        fn decode_is_copy() -> bool {
4706            true
4707        }
4708    }
4709
4710    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetCountryRequest, D>
4711        for &SetCountryRequest
4712    {
4713        #[inline]
4714        unsafe fn encode(
4715            self,
4716            encoder: &mut fidl::encoding::Encoder<'_, D>,
4717            offset: usize,
4718            _depth: fidl::encoding::Depth,
4719        ) -> fidl::Result<()> {
4720            encoder.debug_check_bounds::<SetCountryRequest>(offset);
4721            unsafe {
4722                // Copy the object into the buffer.
4723                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4724                (buf_ptr as *mut SetCountryRequest)
4725                    .write_unaligned((self as *const SetCountryRequest).read());
4726                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4727                // done second because the memcpy will write garbage to these bytes.
4728            }
4729            Ok(())
4730        }
4731    }
4732    unsafe impl<
4733        D: fidl::encoding::ResourceDialect,
4734        T0: fidl::encoding::Encode<u16, D>,
4735        T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 2>, D>,
4736    > fidl::encoding::Encode<SetCountryRequest, D> for (T0, T1)
4737    {
4738        #[inline]
4739        unsafe fn encode(
4740            self,
4741            encoder: &mut fidl::encoding::Encoder<'_, D>,
4742            offset: usize,
4743            depth: fidl::encoding::Depth,
4744        ) -> fidl::Result<()> {
4745            encoder.debug_check_bounds::<SetCountryRequest>(offset);
4746            // Zero out padding regions. There's no need to apply masks
4747            // because the unmasked parts will be overwritten by fields.
4748            // Write the fields.
4749            self.0.encode(encoder, offset + 0, depth)?;
4750            self.1.encode(encoder, offset + 2, depth)?;
4751            Ok(())
4752        }
4753    }
4754
4755    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetCountryRequest {
4756        #[inline(always)]
4757        fn new_empty() -> Self {
4758            Self {
4759                phy_id: fidl::new_empty!(u16, D),
4760                alpha2: fidl::new_empty!(fidl::encoding::Array<u8, 2>, D),
4761            }
4762        }
4763
4764        #[inline]
4765        unsafe fn decode(
4766            &mut self,
4767            decoder: &mut fidl::encoding::Decoder<'_, D>,
4768            offset: usize,
4769            _depth: fidl::encoding::Depth,
4770        ) -> fidl::Result<()> {
4771            decoder.debug_check_bounds::<Self>(offset);
4772            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4773            // Verify that padding bytes are zero.
4774            // Copy from the buffer into the object.
4775            unsafe {
4776                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
4777            }
4778            Ok(())
4779        }
4780    }
4781
4782    impl fidl::encoding::ValueTypeMarker for SetPowerSaveModeRequest {
4783        type Borrowed<'a> = &'a Self;
4784        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4785            value
4786        }
4787    }
4788
4789    unsafe impl fidl::encoding::TypeMarker for SetPowerSaveModeRequest {
4790        type Owned = Self;
4791
4792        #[inline(always)]
4793        fn inline_align(_context: fidl::encoding::Context) -> usize {
4794            4
4795        }
4796
4797        #[inline(always)]
4798        fn inline_size(_context: fidl::encoding::Context) -> usize {
4799            8
4800        }
4801    }
4802
4803    unsafe impl<D: fidl::encoding::ResourceDialect>
4804        fidl::encoding::Encode<SetPowerSaveModeRequest, D> for &SetPowerSaveModeRequest
4805    {
4806        #[inline]
4807        unsafe fn encode(
4808            self,
4809            encoder: &mut fidl::encoding::Encoder<'_, D>,
4810            offset: usize,
4811            _depth: fidl::encoding::Depth,
4812        ) -> fidl::Result<()> {
4813            encoder.debug_check_bounds::<SetPowerSaveModeRequest>(offset);
4814            // Delegate to tuple encoding.
4815            fidl::encoding::Encode::<SetPowerSaveModeRequest, D>::encode(
4816                (
4817                    <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.phy_id),
4818                    <fidl_fuchsia_wlan_common__common::PowerSaveType as fidl::encoding::ValueTypeMarker>::borrow(&self.ps_mode),
4819                ),
4820                encoder, offset, _depth
4821            )
4822        }
4823    }
4824    unsafe impl<
4825        D: fidl::encoding::ResourceDialect,
4826        T0: fidl::encoding::Encode<u16, D>,
4827        T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common__common::PowerSaveType, D>,
4828    > fidl::encoding::Encode<SetPowerSaveModeRequest, D> for (T0, T1)
4829    {
4830        #[inline]
4831        unsafe fn encode(
4832            self,
4833            encoder: &mut fidl::encoding::Encoder<'_, D>,
4834            offset: usize,
4835            depth: fidl::encoding::Depth,
4836        ) -> fidl::Result<()> {
4837            encoder.debug_check_bounds::<SetPowerSaveModeRequest>(offset);
4838            // Zero out padding regions. There's no need to apply masks
4839            // because the unmasked parts will be overwritten by fields.
4840            unsafe {
4841                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
4842                (ptr as *mut u32).write_unaligned(0);
4843            }
4844            // Write the fields.
4845            self.0.encode(encoder, offset + 0, depth)?;
4846            self.1.encode(encoder, offset + 4, depth)?;
4847            Ok(())
4848        }
4849    }
4850
4851    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4852        for SetPowerSaveModeRequest
4853    {
4854        #[inline(always)]
4855        fn new_empty() -> Self {
4856            Self {
4857                phy_id: fidl::new_empty!(u16, D),
4858                ps_mode: fidl::new_empty!(fidl_fuchsia_wlan_common__common::PowerSaveType, D),
4859            }
4860        }
4861
4862        #[inline]
4863        unsafe fn decode(
4864            &mut self,
4865            decoder: &mut fidl::encoding::Decoder<'_, D>,
4866            offset: usize,
4867            _depth: fidl::encoding::Depth,
4868        ) -> fidl::Result<()> {
4869            decoder.debug_check_bounds::<Self>(offset);
4870            // Verify that padding bytes are zero.
4871            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
4872            let padval = unsafe { (ptr as *const u32).read_unaligned() };
4873            let mask = 0xffff0000u32;
4874            let maskedval = padval & mask;
4875            if maskedval != 0 {
4876                return Err(fidl::Error::NonZeroPadding {
4877                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
4878                });
4879            }
4880            fidl::decode!(u16, D, &mut self.phy_id, decoder, offset + 0, _depth)?;
4881            fidl::decode!(
4882                fidl_fuchsia_wlan_common__common::PowerSaveType,
4883                D,
4884                &mut self.ps_mode,
4885                decoder,
4886                offset + 4,
4887                _depth
4888            )?;
4889            Ok(())
4890        }
4891    }
4892
4893    impl DeviceMonitorCreateIfaceRequest {
4894        #[inline(always)]
4895        fn max_ordinal_present(&self) -> u64 {
4896            if let Some(_) = self.sta_address {
4897                return 3;
4898            }
4899            if let Some(_) = self.role {
4900                return 2;
4901            }
4902            if let Some(_) = self.phy_id {
4903                return 1;
4904            }
4905            0
4906        }
4907    }
4908
4909    impl fidl::encoding::ValueTypeMarker for DeviceMonitorCreateIfaceRequest {
4910        type Borrowed<'a> = &'a Self;
4911        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4912            value
4913        }
4914    }
4915
4916    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorCreateIfaceRequest {
4917        type Owned = Self;
4918
4919        #[inline(always)]
4920        fn inline_align(_context: fidl::encoding::Context) -> usize {
4921            8
4922        }
4923
4924        #[inline(always)]
4925        fn inline_size(_context: fidl::encoding::Context) -> usize {
4926            16
4927        }
4928    }
4929
4930    unsafe impl<D: fidl::encoding::ResourceDialect>
4931        fidl::encoding::Encode<DeviceMonitorCreateIfaceRequest, D>
4932        for &DeviceMonitorCreateIfaceRequest
4933    {
4934        unsafe fn encode(
4935            self,
4936            encoder: &mut fidl::encoding::Encoder<'_, D>,
4937            offset: usize,
4938            mut depth: fidl::encoding::Depth,
4939        ) -> fidl::Result<()> {
4940            encoder.debug_check_bounds::<DeviceMonitorCreateIfaceRequest>(offset);
4941            // Vector header
4942            let max_ordinal: u64 = self.max_ordinal_present();
4943            encoder.write_num(max_ordinal, offset);
4944            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4945            // Calling encoder.out_of_line_offset(0) is not allowed.
4946            if max_ordinal == 0 {
4947                return Ok(());
4948            }
4949            depth.increment()?;
4950            let envelope_size = 8;
4951            let bytes_len = max_ordinal as usize * envelope_size;
4952            #[allow(unused_variables)]
4953            let offset = encoder.out_of_line_offset(bytes_len);
4954            let mut _prev_end_offset: usize = 0;
4955            if 1 > max_ordinal {
4956                return Ok(());
4957            }
4958
4959            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4960            // are envelope_size bytes.
4961            let cur_offset: usize = (1 - 1) * envelope_size;
4962
4963            // Zero reserved fields.
4964            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4965
4966            // Safety:
4967            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4968            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4969            //   envelope_size bytes, there is always sufficient room.
4970            fidl::encoding::encode_in_envelope_optional::<u16, D>(
4971                self.phy_id.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
4972                encoder,
4973                offset + cur_offset,
4974                depth,
4975            )?;
4976
4977            _prev_end_offset = cur_offset + envelope_size;
4978            if 2 > max_ordinal {
4979                return Ok(());
4980            }
4981
4982            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4983            // are envelope_size bytes.
4984            let cur_offset: usize = (2 - 1) * envelope_size;
4985
4986            // Zero reserved fields.
4987            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4988
4989            // Safety:
4990            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4991            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4992            //   envelope_size bytes, there is always sufficient room.
4993            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_wlan_common__common::WlanMacRole, D>(
4994            self.role.as_ref().map(<fidl_fuchsia_wlan_common__common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow),
4995            encoder, offset + cur_offset, depth
4996        )?;
4997
4998            _prev_end_offset = cur_offset + envelope_size;
4999            if 3 > max_ordinal {
5000                return Ok(());
5001            }
5002
5003            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5004            // are envelope_size bytes.
5005            let cur_offset: usize = (3 - 1) * envelope_size;
5006
5007            // Zero reserved fields.
5008            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5009
5010            // Safety:
5011            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5012            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5013            //   envelope_size bytes, there is always sufficient room.
5014            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 6>, D>(
5015                self.sta_address
5016                    .as_ref()
5017                    .map(<fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow),
5018                encoder,
5019                offset + cur_offset,
5020                depth,
5021            )?;
5022
5023            _prev_end_offset = cur_offset + envelope_size;
5024
5025            Ok(())
5026        }
5027    }
5028
5029    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5030        for DeviceMonitorCreateIfaceRequest
5031    {
5032        #[inline(always)]
5033        fn new_empty() -> Self {
5034            Self::default()
5035        }
5036
5037        unsafe fn decode(
5038            &mut self,
5039            decoder: &mut fidl::encoding::Decoder<'_, D>,
5040            offset: usize,
5041            mut depth: fidl::encoding::Depth,
5042        ) -> fidl::Result<()> {
5043            decoder.debug_check_bounds::<Self>(offset);
5044            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5045                None => return Err(fidl::Error::NotNullable),
5046                Some(len) => len,
5047            };
5048            // Calling decoder.out_of_line_offset(0) is not allowed.
5049            if len == 0 {
5050                return Ok(());
5051            };
5052            depth.increment()?;
5053            let envelope_size = 8;
5054            let bytes_len = len * envelope_size;
5055            let offset = decoder.out_of_line_offset(bytes_len)?;
5056            // Decode the envelope for each type.
5057            let mut _next_ordinal_to_read = 0;
5058            let mut next_offset = offset;
5059            let end_offset = offset + bytes_len;
5060            _next_ordinal_to_read += 1;
5061            if next_offset >= end_offset {
5062                return Ok(());
5063            }
5064
5065            // Decode unknown envelopes for gaps in ordinals.
5066            while _next_ordinal_to_read < 1 {
5067                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5068                _next_ordinal_to_read += 1;
5069                next_offset += envelope_size;
5070            }
5071
5072            let next_out_of_line = decoder.next_out_of_line();
5073            let handles_before = decoder.remaining_handles();
5074            if let Some((inlined, num_bytes, num_handles)) =
5075                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5076            {
5077                let member_inline_size =
5078                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5079                if inlined != (member_inline_size <= 4) {
5080                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5081                }
5082                let inner_offset;
5083                let mut inner_depth = depth.clone();
5084                if inlined {
5085                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5086                    inner_offset = next_offset;
5087                } else {
5088                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5089                    inner_depth.increment()?;
5090                }
5091                let val_ref = self.phy_id.get_or_insert_with(|| fidl::new_empty!(u16, D));
5092                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
5093                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5094                {
5095                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5096                }
5097                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5098                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5099                }
5100            }
5101
5102            next_offset += envelope_size;
5103            _next_ordinal_to_read += 1;
5104            if next_offset >= end_offset {
5105                return Ok(());
5106            }
5107
5108            // Decode unknown envelopes for gaps in ordinals.
5109            while _next_ordinal_to_read < 2 {
5110                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5111                _next_ordinal_to_read += 1;
5112                next_offset += envelope_size;
5113            }
5114
5115            let next_out_of_line = decoder.next_out_of_line();
5116            let handles_before = decoder.remaining_handles();
5117            if let Some((inlined, num_bytes, num_handles)) =
5118                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5119            {
5120                let member_inline_size = <fidl_fuchsia_wlan_common__common::WlanMacRole as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5121                if inlined != (member_inline_size <= 4) {
5122                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5123                }
5124                let inner_offset;
5125                let mut inner_depth = depth.clone();
5126                if inlined {
5127                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5128                    inner_offset = next_offset;
5129                } else {
5130                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5131                    inner_depth.increment()?;
5132                }
5133                let val_ref = self.role.get_or_insert_with(|| {
5134                    fidl::new_empty!(fidl_fuchsia_wlan_common__common::WlanMacRole, D)
5135                });
5136                fidl::decode!(
5137                    fidl_fuchsia_wlan_common__common::WlanMacRole,
5138                    D,
5139                    val_ref,
5140                    decoder,
5141                    inner_offset,
5142                    inner_depth
5143                )?;
5144                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5145                {
5146                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5147                }
5148                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5149                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5150                }
5151            }
5152
5153            next_offset += envelope_size;
5154            _next_ordinal_to_read += 1;
5155            if next_offset >= end_offset {
5156                return Ok(());
5157            }
5158
5159            // Decode unknown envelopes for gaps in ordinals.
5160            while _next_ordinal_to_read < 3 {
5161                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5162                _next_ordinal_to_read += 1;
5163                next_offset += envelope_size;
5164            }
5165
5166            let next_out_of_line = decoder.next_out_of_line();
5167            let handles_before = decoder.remaining_handles();
5168            if let Some((inlined, num_bytes, num_handles)) =
5169                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5170            {
5171                let member_inline_size =
5172                    <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
5173                        decoder.context,
5174                    );
5175                if inlined != (member_inline_size <= 4) {
5176                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5177                }
5178                let inner_offset;
5179                let mut inner_depth = depth.clone();
5180                if inlined {
5181                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5182                    inner_offset = next_offset;
5183                } else {
5184                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5185                    inner_depth.increment()?;
5186                }
5187                let val_ref = self
5188                    .sta_address
5189                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 6>, D));
5190                fidl::decode!(fidl::encoding::Array<u8, 6>, D, val_ref, decoder, inner_offset, inner_depth)?;
5191                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5192                {
5193                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5194                }
5195                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5196                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5197                }
5198            }
5199
5200            next_offset += envelope_size;
5201
5202            // Decode the remaining unknown envelopes.
5203            while next_offset < end_offset {
5204                _next_ordinal_to_read += 1;
5205                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5206                next_offset += envelope_size;
5207            }
5208
5209            Ok(())
5210        }
5211    }
5212
5213    impl DeviceMonitorCreateIfaceResponse {
5214        #[inline(always)]
5215        fn max_ordinal_present(&self) -> u64 {
5216            if let Some(_) = self.iface_id {
5217                return 1;
5218            }
5219            0
5220        }
5221    }
5222
5223    impl fidl::encoding::ValueTypeMarker for DeviceMonitorCreateIfaceResponse {
5224        type Borrowed<'a> = &'a Self;
5225        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5226            value
5227        }
5228    }
5229
5230    unsafe impl fidl::encoding::TypeMarker for DeviceMonitorCreateIfaceResponse {
5231        type Owned = Self;
5232
5233        #[inline(always)]
5234        fn inline_align(_context: fidl::encoding::Context) -> usize {
5235            8
5236        }
5237
5238        #[inline(always)]
5239        fn inline_size(_context: fidl::encoding::Context) -> usize {
5240            16
5241        }
5242    }
5243
5244    unsafe impl<D: fidl::encoding::ResourceDialect>
5245        fidl::encoding::Encode<DeviceMonitorCreateIfaceResponse, D>
5246        for &DeviceMonitorCreateIfaceResponse
5247    {
5248        unsafe fn encode(
5249            self,
5250            encoder: &mut fidl::encoding::Encoder<'_, D>,
5251            offset: usize,
5252            mut depth: fidl::encoding::Depth,
5253        ) -> fidl::Result<()> {
5254            encoder.debug_check_bounds::<DeviceMonitorCreateIfaceResponse>(offset);
5255            // Vector header
5256            let max_ordinal: u64 = self.max_ordinal_present();
5257            encoder.write_num(max_ordinal, offset);
5258            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5259            // Calling encoder.out_of_line_offset(0) is not allowed.
5260            if max_ordinal == 0 {
5261                return Ok(());
5262            }
5263            depth.increment()?;
5264            let envelope_size = 8;
5265            let bytes_len = max_ordinal as usize * envelope_size;
5266            #[allow(unused_variables)]
5267            let offset = encoder.out_of_line_offset(bytes_len);
5268            let mut _prev_end_offset: usize = 0;
5269            if 1 > max_ordinal {
5270                return Ok(());
5271            }
5272
5273            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5274            // are envelope_size bytes.
5275            let cur_offset: usize = (1 - 1) * envelope_size;
5276
5277            // Zero reserved fields.
5278            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5279
5280            // Safety:
5281            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5282            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5283            //   envelope_size bytes, there is always sufficient room.
5284            fidl::encoding::encode_in_envelope_optional::<u16, D>(
5285                self.iface_id.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
5286                encoder,
5287                offset + cur_offset,
5288                depth,
5289            )?;
5290
5291            _prev_end_offset = cur_offset + envelope_size;
5292
5293            Ok(())
5294        }
5295    }
5296
5297    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5298        for DeviceMonitorCreateIfaceResponse
5299    {
5300        #[inline(always)]
5301        fn new_empty() -> Self {
5302            Self::default()
5303        }
5304
5305        unsafe fn decode(
5306            &mut self,
5307            decoder: &mut fidl::encoding::Decoder<'_, D>,
5308            offset: usize,
5309            mut depth: fidl::encoding::Depth,
5310        ) -> fidl::Result<()> {
5311            decoder.debug_check_bounds::<Self>(offset);
5312            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5313                None => return Err(fidl::Error::NotNullable),
5314                Some(len) => len,
5315            };
5316            // Calling decoder.out_of_line_offset(0) is not allowed.
5317            if len == 0 {
5318                return Ok(());
5319            };
5320            depth.increment()?;
5321            let envelope_size = 8;
5322            let bytes_len = len * envelope_size;
5323            let offset = decoder.out_of_line_offset(bytes_len)?;
5324            // Decode the envelope for each type.
5325            let mut _next_ordinal_to_read = 0;
5326            let mut next_offset = offset;
5327            let end_offset = offset + bytes_len;
5328            _next_ordinal_to_read += 1;
5329            if next_offset >= end_offset {
5330                return Ok(());
5331            }
5332
5333            // Decode unknown envelopes for gaps in ordinals.
5334            while _next_ordinal_to_read < 1 {
5335                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5336                _next_ordinal_to_read += 1;
5337                next_offset += envelope_size;
5338            }
5339
5340            let next_out_of_line = decoder.next_out_of_line();
5341            let handles_before = decoder.remaining_handles();
5342            if let Some((inlined, num_bytes, num_handles)) =
5343                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5344            {
5345                let member_inline_size =
5346                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5347                if inlined != (member_inline_size <= 4) {
5348                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5349                }
5350                let inner_offset;
5351                let mut inner_depth = depth.clone();
5352                if inlined {
5353                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5354                    inner_offset = next_offset;
5355                } else {
5356                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5357                    inner_depth.increment()?;
5358                }
5359                let val_ref = self.iface_id.get_or_insert_with(|| fidl::new_empty!(u16, D));
5360                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
5361                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5362                {
5363                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5364                }
5365                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5366                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5367                }
5368            }
5369
5370            next_offset += envelope_size;
5371
5372            // Decode the remaining unknown envelopes.
5373            while next_offset < end_offset {
5374                _next_ordinal_to_read += 1;
5375                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5376                next_offset += envelope_size;
5377            }
5378
5379            Ok(())
5380        }
5381    }
5382
5383    impl fidl::encoding::ValueTypeMarker for GetIfaceHistogramStatsResponse {
5384        type Borrowed<'a> = &'a Self;
5385        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5386            value
5387        }
5388    }
5389
5390    unsafe impl fidl::encoding::TypeMarker for GetIfaceHistogramStatsResponse {
5391        type Owned = Self;
5392
5393        #[inline(always)]
5394        fn inline_align(_context: fidl::encoding::Context) -> usize {
5395            8
5396        }
5397
5398        #[inline(always)]
5399        fn inline_size(_context: fidl::encoding::Context) -> usize {
5400            16
5401        }
5402    }
5403
5404    unsafe impl<D: fidl::encoding::ResourceDialect>
5405        fidl::encoding::Encode<GetIfaceHistogramStatsResponse, D>
5406        for &GetIfaceHistogramStatsResponse
5407    {
5408        #[inline]
5409        unsafe fn encode(
5410            self,
5411            encoder: &mut fidl::encoding::Encoder<'_, D>,
5412            offset: usize,
5413            _depth: fidl::encoding::Depth,
5414        ) -> fidl::Result<()> {
5415            encoder.debug_check_bounds::<GetIfaceHistogramStatsResponse>(offset);
5416            encoder.write_num::<u64>(self.ordinal(), offset);
5417            match self {
5418            GetIfaceHistogramStatsResponse::Stats(ref val) => {
5419                fidl::encoding::encode_in_envelope::<fidl_fuchsia_wlan_stats__common::IfaceHistogramStats, D>(
5420                    <fidl_fuchsia_wlan_stats__common::IfaceHistogramStats as fidl::encoding::ValueTypeMarker>::borrow(val),
5421                    encoder, offset + 8, _depth
5422                )
5423            }
5424            GetIfaceHistogramStatsResponse::ErrorStatus(ref val) => {
5425                fidl::encoding::encode_in_envelope::<i32, D>(
5426                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
5427                    encoder, offset + 8, _depth
5428                )
5429            }
5430        }
5431        }
5432    }
5433
5434    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5435        for GetIfaceHistogramStatsResponse
5436    {
5437        #[inline(always)]
5438        fn new_empty() -> Self {
5439            Self::Stats(fidl::new_empty!(fidl_fuchsia_wlan_stats__common::IfaceHistogramStats, D))
5440        }
5441
5442        #[inline]
5443        unsafe fn decode(
5444            &mut self,
5445            decoder: &mut fidl::encoding::Decoder<'_, D>,
5446            offset: usize,
5447            mut depth: fidl::encoding::Depth,
5448        ) -> fidl::Result<()> {
5449            decoder.debug_check_bounds::<Self>(offset);
5450            #[allow(unused_variables)]
5451            let next_out_of_line = decoder.next_out_of_line();
5452            let handles_before = decoder.remaining_handles();
5453            let (ordinal, inlined, num_bytes, num_handles) =
5454                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
5455
5456            let member_inline_size = match ordinal {
5457            1 => <fidl_fuchsia_wlan_stats__common::IfaceHistogramStats as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5458            2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5459            _ => return Err(fidl::Error::UnknownUnionTag),
5460        };
5461
5462            if inlined != (member_inline_size <= 4) {
5463                return Err(fidl::Error::InvalidInlineBitInEnvelope);
5464            }
5465            let _inner_offset;
5466            if inlined {
5467                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
5468                _inner_offset = offset + 8;
5469            } else {
5470                depth.increment()?;
5471                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5472            }
5473            match ordinal {
5474                1 => {
5475                    #[allow(irrefutable_let_patterns)]
5476                    if let GetIfaceHistogramStatsResponse::Stats(_) = self {
5477                        // Do nothing, read the value into the object
5478                    } else {
5479                        // Initialize `self` to the right variant
5480                        *self = GetIfaceHistogramStatsResponse::Stats(fidl::new_empty!(
5481                            fidl_fuchsia_wlan_stats__common::IfaceHistogramStats,
5482                            D
5483                        ));
5484                    }
5485                    #[allow(irrefutable_let_patterns)]
5486                    if let GetIfaceHistogramStatsResponse::Stats(ref mut val) = self {
5487                        fidl::decode!(
5488                            fidl_fuchsia_wlan_stats__common::IfaceHistogramStats,
5489                            D,
5490                            val,
5491                            decoder,
5492                            _inner_offset,
5493                            depth
5494                        )?;
5495                    } else {
5496                        unreachable!()
5497                    }
5498                }
5499                2 => {
5500                    #[allow(irrefutable_let_patterns)]
5501                    if let GetIfaceHistogramStatsResponse::ErrorStatus(_) = self {
5502                        // Do nothing, read the value into the object
5503                    } else {
5504                        // Initialize `self` to the right variant
5505                        *self =
5506                            GetIfaceHistogramStatsResponse::ErrorStatus(fidl::new_empty!(i32, D));
5507                    }
5508                    #[allow(irrefutable_let_patterns)]
5509                    if let GetIfaceHistogramStatsResponse::ErrorStatus(ref mut val) = self {
5510                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
5511                    } else {
5512                        unreachable!()
5513                    }
5514                }
5515                ordinal => panic!("unexpected ordinal {:?}", ordinal),
5516            }
5517            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5518                return Err(fidl::Error::InvalidNumBytesInEnvelope);
5519            }
5520            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5521                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5522            }
5523            Ok(())
5524        }
5525    }
5526}