fidl_fuchsia_wlan_sme__common/
fidl_fuchsia_wlan_sme__common.rs

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