Skip to main content

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