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