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
11pub type QosInfo = u8;
13
14pub const MAX_SSIDS_PER_SCAN_REQUEST: u32 = 32;
15
16pub const WMM_PARAM_LEN: u8 = 18;
20
21pub const COUNTRY_ENVIRON_ALL: u8 = 32;
22
23pub const COUNTRY_ENVIRON_INDOOR: u8 = 73;
24
25pub const COUNTRY_ENVIRON_NON_COUNTRY: u8 = 88;
26
27pub const COUNTRY_ENVIRON_OUTDOOR: u8 = 79;
28
29bitflags! {
30 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
36 pub struct MgmtFrameCaptureFlags: u32 {
37 const ASSOC_REQ = 1;
38 const ASSOC_RESP = 2;
39 const REASSOC_REQ = 4;
40 const REASSOC_RESP = 8;
41 const PROBE_REQ = 16;
42 const PROBE_RESP = 32;
43 const TIMING_AD = 64;
44 const BEACON = 256;
45 const ATIM = 512;
46 const DISASSOC = 1024;
47 const AUTH = 2048;
48 const DEAUTH = 4096;
49 const ACTION = 8192;
50 const ACTION_NO_ACK = 16384;
51 }
52}
53
54impl MgmtFrameCaptureFlags {
55 #[deprecated = "Strict bits should not use `has_unknown_bits`"]
56 #[inline(always)]
57 pub fn has_unknown_bits(&self) -> bool {
58 false
59 }
60
61 #[deprecated = "Strict bits should not use `get_unknown_bits`"]
62 #[inline(always)]
63 pub fn get_unknown_bits(&self) -> u32 {
64 0
65 }
66}
67
68#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
69#[repr(u32)]
70pub enum AssociateResultCode {
71 Success = 0,
72 RefusedReasonUnspecified = 1,
73 RefusedNotAuthenticated = 2,
74 RefusedCapabilitiesMismatch = 3,
75 RefusedExternalReason = 4,
76 RefusedApOutOfMemory = 5,
77 RefusedBasicRatesMismatch = 6,
78 RejectedEmergencyServicesNotSupported = 7,
79 RefusedTemporarily = 8,
80}
81
82impl AssociateResultCode {
83 #[inline]
84 pub fn from_primitive(prim: u32) -> Option<Self> {
85 match prim {
86 0 => Some(Self::Success),
87 1 => Some(Self::RefusedReasonUnspecified),
88 2 => Some(Self::RefusedNotAuthenticated),
89 3 => Some(Self::RefusedCapabilitiesMismatch),
90 4 => Some(Self::RefusedExternalReason),
91 5 => Some(Self::RefusedApOutOfMemory),
92 6 => Some(Self::RefusedBasicRatesMismatch),
93 7 => Some(Self::RejectedEmergencyServicesNotSupported),
94 8 => Some(Self::RefusedTemporarily),
95 _ => None,
96 }
97 }
98
99 #[inline]
100 pub const fn into_primitive(self) -> u32 {
101 self as u32
102 }
103
104 #[deprecated = "Strict enums should not use `is_unknown`"]
105 #[inline]
106 pub fn is_unknown(&self) -> bool {
107 false
108 }
109}
110
111#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
112#[repr(u32)]
113pub enum AuthenticateResultCode {
114 Success = 0,
115 Refused = 1,
116 AntiCloggingTokenRequired = 2,
117 FiniteCyclicGroupNotSupported = 3,
118 AuthenticationRejected = 4,
119 AuthFailureTimeout = 5,
120}
121
122impl AuthenticateResultCode {
123 #[inline]
124 pub fn from_primitive(prim: u32) -> Option<Self> {
125 match prim {
126 0 => Some(Self::Success),
127 1 => Some(Self::Refused),
128 2 => Some(Self::AntiCloggingTokenRequired),
129 3 => Some(Self::FiniteCyclicGroupNotSupported),
130 4 => Some(Self::AuthenticationRejected),
131 5 => Some(Self::AuthFailureTimeout),
132 _ => None,
133 }
134 }
135
136 #[inline]
137 pub const fn into_primitive(self) -> u32 {
138 self as u32
139 }
140
141 #[deprecated = "Strict enums should not use `is_unknown`"]
142 #[inline]
143 pub fn is_unknown(&self) -> bool {
144 false
145 }
146}
147
148#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
149#[repr(u32)]
150pub enum AuthenticationTypes {
151 OpenSystem = 1,
152 SharedKey = 2,
153 FastBssTransition = 3,
154 Sae = 4,
155}
156
157impl AuthenticationTypes {
158 #[inline]
159 pub fn from_primitive(prim: u32) -> Option<Self> {
160 match prim {
161 1 => Some(Self::OpenSystem),
162 2 => Some(Self::SharedKey),
163 3 => Some(Self::FastBssTransition),
164 4 => Some(Self::Sae),
165 _ => None,
166 }
167 }
168
169 #[inline]
170 pub const fn into_primitive(self) -> u32 {
171 self as u32
172 }
173
174 #[deprecated = "Strict enums should not use `is_unknown`"]
175 #[inline]
176 pub fn is_unknown(&self) -> bool {
177 false
178 }
179}
180
181#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
182#[repr(u32)]
183pub enum ControlledPortState {
184 Closed = 0,
185 Open = 1,
186}
187
188impl ControlledPortState {
189 #[inline]
190 pub fn from_primitive(prim: u32) -> Option<Self> {
191 match prim {
192 0 => Some(Self::Closed),
193 1 => Some(Self::Open),
194 _ => None,
195 }
196 }
197
198 #[inline]
199 pub const fn into_primitive(self) -> u32 {
200 self as u32
201 }
202
203 #[deprecated = "Strict enums should not use `is_unknown`"]
204 #[inline]
205 pub fn is_unknown(&self) -> bool {
206 false
207 }
208}
209
210#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
211#[repr(u32)]
212pub enum EapolResultCode {
213 Success = 0,
214 TransmissionFailure = 1,
215}
216
217impl EapolResultCode {
218 #[inline]
219 pub fn from_primitive(prim: u32) -> Option<Self> {
220 match prim {
221 0 => Some(Self::Success),
222 1 => Some(Self::TransmissionFailure),
223 _ => None,
224 }
225 }
226
227 #[inline]
228 pub const fn into_primitive(self) -> u32 {
229 self as u32
230 }
231
232 #[deprecated = "Strict enums should not use `is_unknown`"]
233 #[inline]
234 pub fn is_unknown(&self) -> bool {
235 false
236 }
237}
238
239#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
240#[repr(u32)]
241pub enum KeyType {
242 Group = 1,
243 Pairwise = 2,
244 PeerKey = 3,
245 Igtk = 4,
246}
247
248impl KeyType {
249 #[inline]
250 pub fn from_primitive(prim: u32) -> Option<Self> {
251 match prim {
252 1 => Some(Self::Group),
253 2 => Some(Self::Pairwise),
254 3 => Some(Self::PeerKey),
255 4 => Some(Self::Igtk),
256 _ => None,
257 }
258 }
259
260 #[inline]
261 pub const fn into_primitive(self) -> u32 {
262 self as u32
263 }
264
265 #[deprecated = "Strict enums should not use `is_unknown`"]
266 #[inline]
267 pub fn is_unknown(&self) -> bool {
268 false
269 }
270}
271
272#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
273#[repr(u32)]
274pub enum ScanResultCode {
275 Success = 0,
276 NotSupported = 1,
277 InvalidArgs = 2,
278 InternalError = 3,
279 ShouldWait = 4,
280 CanceledByDriverOrFirmware = 5,
281}
282
283impl ScanResultCode {
284 #[inline]
285 pub fn from_primitive(prim: u32) -> Option<Self> {
286 match prim {
287 0 => Some(Self::Success),
288 1 => Some(Self::NotSupported),
289 2 => Some(Self::InvalidArgs),
290 3 => Some(Self::InternalError),
291 4 => Some(Self::ShouldWait),
292 5 => Some(Self::CanceledByDriverOrFirmware),
293 _ => None,
294 }
295 }
296
297 #[inline]
298 pub const fn into_primitive(self) -> u32 {
299 self as u32
300 }
301
302 #[deprecated = "Strict enums should not use `is_unknown`"]
303 #[inline]
304 pub fn is_unknown(&self) -> bool {
305 false
306 }
307}
308
309#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
310#[repr(u32)]
311pub enum ScanTypes {
312 Active = 1,
313 Passive = 2,
314}
315
316impl ScanTypes {
317 #[inline]
318 pub fn from_primitive(prim: u32) -> Option<Self> {
319 match prim {
320 1 => Some(Self::Active),
321 2 => Some(Self::Passive),
322 _ => None,
323 }
324 }
325
326 #[inline]
327 pub const fn into_primitive(self) -> u32 {
328 self as u32
329 }
330
331 #[deprecated = "Strict enums should not use `is_unknown`"]
332 #[inline]
333 pub fn is_unknown(&self) -> bool {
334 false
335 }
336}
337
338#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
339#[repr(u32)]
340pub enum StartResultCode {
341 Success = 0,
342 BssAlreadyStartedOrJoined = 1,
343 ResetRequiredBeforeStart = 2,
344 NotSupported = 3,
345 InternalError = 4,
346}
347
348impl StartResultCode {
349 #[inline]
350 pub fn from_primitive(prim: u32) -> Option<Self> {
351 match prim {
352 0 => Some(Self::Success),
353 1 => Some(Self::BssAlreadyStartedOrJoined),
354 2 => Some(Self::ResetRequiredBeforeStart),
355 3 => Some(Self::NotSupported),
356 4 => Some(Self::InternalError),
357 _ => None,
358 }
359 }
360
361 #[inline]
362 pub const fn into_primitive(self) -> u32 {
363 self as u32
364 }
365
366 #[deprecated = "Strict enums should not use `is_unknown`"]
367 #[inline]
368 pub fn is_unknown(&self) -> bool {
369 false
370 }
371}
372
373#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
374#[repr(u32)]
375pub enum StopResultCode {
376 Success = 0,
377 BssAlreadyStopped = 1,
378 InternalError = 2,
379}
380
381impl StopResultCode {
382 #[inline]
383 pub fn from_primitive(prim: u32) -> Option<Self> {
384 match prim {
385 0 => Some(Self::Success),
386 1 => Some(Self::BssAlreadyStopped),
387 2 => Some(Self::InternalError),
388 _ => None,
389 }
390 }
391
392 #[inline]
393 pub const fn into_primitive(self) -> u32 {
394 self as u32
395 }
396
397 #[deprecated = "Strict enums should not use `is_unknown`"]
398 #[inline]
399 pub fn is_unknown(&self) -> bool {
400 false
401 }
402}
403
404#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
405pub struct AssociateIndication {
406 pub peer_sta_address: [u8; 6],
407 pub capability_info: u16,
408 pub listen_interval: u16,
409 pub ssid: Option<Vec<u8>>,
410 pub rates: Vec<u8>,
411 pub rsne: Option<Vec<u8>>,
412}
413
414impl fidl::Persistable for AssociateIndication {}
415
416#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
417pub struct AssociateResponse {
418 pub peer_sta_address: [u8; 6],
419 pub result_code: AssociateResultCode,
420 pub association_id: u16,
421 pub capability_info: u16,
422 pub rates: Vec<u8>,
423}
424
425impl fidl::Persistable for AssociateResponse {}
426
427#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
428pub struct AuthenticateIndication {
429 pub peer_sta_address: [u8; 6],
430 pub auth_type: AuthenticationTypes,
431}
432
433impl fidl::Persistable for AuthenticateIndication {}
434
435#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
436pub struct AuthenticateResponse {
437 pub peer_sta_address: [u8; 6],
438 pub result_code: AuthenticateResultCode,
439}
440
441impl fidl::Persistable for AuthenticateResponse {}
442
443#[derive(Clone, Debug, PartialEq)]
444pub struct BandCapability {
445 pub band: fidl_fuchsia_wlan_ieee80211::WlanBand,
447 pub basic_rates: Vec<u8>,
452 pub ht_cap: Option<Box<fidl_fuchsia_wlan_ieee80211::HtCapabilities>>,
453 pub vht_cap: Option<Box<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>>,
454 pub operating_channels: Vec<u8>,
464}
465
466impl fidl::Persistable for BandCapability {}
467
468#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
469pub struct CapturedFrameResult {
470 pub frame: Vec<u8>,
471}
472
473impl fidl::Persistable for CapturedFrameResult {}
474
475#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
476pub struct ConnectConfirm {
477 pub peer_sta_address: [u8; 6],
478 pub result_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
479 pub association_id: u16,
480 pub association_ies: Vec<u8>,
481}
482
483impl fidl::Persistable for ConnectConfirm {}
484
485#[derive(Clone, Debug, PartialEq)]
486pub struct ConnectRequest {
487 pub selected_bss: fidl_fuchsia_wlan_common::BssDescription,
488 pub connect_failure_timeout: u32,
489 pub auth_type: AuthenticationTypes,
491 pub sae_password: Vec<u8>,
492 pub wep_key: Option<Box<SetKeyDescriptor>>,
494 pub security_ie: Vec<u8>,
496}
497
498impl fidl::Persistable for ConnectRequest {}
499
500#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
501#[repr(C)]
502pub struct Country {
503 pub alpha2: [u8; 2],
504 pub suffix: u8,
505}
506
507impl fidl::Persistable for Country {}
508
509#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
510#[repr(C)]
511pub struct DeauthenticateConfirm {
512 pub peer_sta_address: [u8; 6],
513}
514
515impl fidl::Persistable for DeauthenticateConfirm {}
516
517#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
518pub struct DeauthenticateIndication {
519 pub peer_sta_address: [u8; 6],
520 pub reason_code: fidl_fuchsia_wlan_ieee80211::ReasonCode,
521 pub locally_initiated: bool,
524}
525
526impl fidl::Persistable for DeauthenticateIndication {}
527
528#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
529pub struct DeauthenticateRequest {
530 pub peer_sta_address: [u8; 6],
531 pub reason_code: fidl_fuchsia_wlan_ieee80211::ReasonCode,
532}
533
534impl fidl::Persistable for DeauthenticateRequest {}
535
536#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
537pub struct DeleteKeyDescriptor {
538 pub key_id: u16,
539 pub key_type: KeyType,
540 pub address: [u8; 6],
541}
542
543impl fidl::Persistable for DeleteKeyDescriptor {}
544
545#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
546pub struct DeleteKeysRequest {
547 pub keylist: Vec<DeleteKeyDescriptor>,
548}
549
550impl fidl::Persistable for DeleteKeysRequest {}
551
552#[derive(Clone, Debug, PartialEq)]
553pub struct DeviceInfo {
554 pub sta_addr: [u8; 6],
555 pub role: fidl_fuchsia_wlan_common::WlanMacRole,
556 pub bands: Vec<BandCapability>,
557 pub softmac_hardware_capability: u32,
558 pub qos_capable: bool,
559}
560
561impl fidl::Persistable for DeviceInfo {}
562
563#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
564#[repr(C)]
565pub struct DisassociateConfirm {
566 pub status: i32,
567}
568
569impl fidl::Persistable for DisassociateConfirm {}
570
571#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
572pub struct DisassociateIndication {
573 pub peer_sta_address: [u8; 6],
574 pub reason_code: fidl_fuchsia_wlan_ieee80211::ReasonCode,
575 pub locally_initiated: bool,
578}
579
580impl fidl::Persistable for DisassociateIndication {}
581
582#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
583pub struct DisassociateRequest {
584 pub peer_sta_address: [u8; 6],
585 pub reason_code: fidl_fuchsia_wlan_ieee80211::ReasonCode,
586}
587
588impl fidl::Persistable for DisassociateRequest {}
589
590#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
591pub struct EapolConfirm {
592 pub result_code: EapolResultCode,
593 pub dst_addr: [u8; 6],
597}
598
599impl fidl::Persistable for EapolConfirm {}
600
601#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
602pub struct EapolIndication {
603 pub src_addr: [u8; 6],
604 pub dst_addr: [u8; 6],
605 pub data: Vec<u8>,
606}
607
608impl fidl::Persistable for EapolIndication {}
609
610#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
611pub struct EapolRequest {
612 pub src_addr: [u8; 6],
613 pub dst_addr: [u8; 6],
614 pub data: Vec<u8>,
615}
616
617impl fidl::Persistable for EapolRequest {}
618
619#[derive(Clone, Debug, PartialEq)]
620pub struct MlmeQueryTelemetrySupportResponse {
621 pub resp: fidl_fuchsia_wlan_stats::TelemetrySupport,
622}
623
624impl fidl::Persistable for MlmeQueryTelemetrySupportResponse {}
625
626#[derive(Clone, Debug, PartialEq)]
627pub struct MinstrelListResponse {
628 pub peers: fidl_fuchsia_wlan_minstrel::Peers,
629}
630
631impl fidl::Persistable for MinstrelListResponse {}
632
633#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
634#[repr(C)]
635pub struct MinstrelStatsRequest {
636 pub peer_addr: [u8; 6],
637}
638
639impl fidl::Persistable for MinstrelStatsRequest {}
640
641#[derive(Clone, Debug, PartialEq)]
642pub struct MinstrelStatsResponse {
643 pub peer: Option<Box<fidl_fuchsia_wlan_minstrel::Peer>>,
644}
645
646impl fidl::Persistable for MinstrelStatsResponse {}
647
648#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
649pub struct MlmeAssociateIndRequest {
650 pub ind: AssociateIndication,
651}
652
653impl fidl::Persistable for MlmeAssociateIndRequest {}
654
655#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
656pub struct MlmeAssociateRespRequest {
657 pub resp: AssociateResponse,
658}
659
660impl fidl::Persistable for MlmeAssociateRespRequest {}
661
662#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
663pub struct MlmeAuthenticateIndRequest {
664 pub ind: AuthenticateIndication,
665}
666
667impl fidl::Persistable for MlmeAuthenticateIndRequest {}
668
669#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
670pub struct MlmeAuthenticateRespRequest {
671 pub resp: AuthenticateResponse,
672}
673
674impl fidl::Persistable for MlmeAuthenticateRespRequest {}
675
676#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
677pub struct MlmeConnectConfRequest {
678 pub resp: ConnectConfirm,
679}
680
681impl fidl::Persistable for MlmeConnectConfRequest {}
682
683#[derive(Clone, Debug, PartialEq)]
684pub struct MlmeConnectReqRequest {
685 pub req: ConnectRequest,
686}
687
688impl fidl::Persistable for MlmeConnectReqRequest {}
689
690#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
691#[repr(C)]
692pub struct MlmeDeauthenticateConfRequest {
693 pub resp: DeauthenticateConfirm,
694}
695
696impl fidl::Persistable for MlmeDeauthenticateConfRequest {}
697
698#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
699pub struct MlmeDeauthenticateIndRequest {
700 pub ind: DeauthenticateIndication,
701}
702
703impl fidl::Persistable for MlmeDeauthenticateIndRequest {}
704
705#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
706pub struct MlmeDeauthenticateReqRequest {
707 pub req: DeauthenticateRequest,
708}
709
710impl fidl::Persistable for MlmeDeauthenticateReqRequest {}
711
712#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
713pub struct MlmeDeleteKeysReqRequest {
714 pub req: DeleteKeysRequest,
715}
716
717impl fidl::Persistable for MlmeDeleteKeysReqRequest {}
718
719#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
720#[repr(C)]
721pub struct MlmeDisassociateConfRequest {
722 pub resp: DisassociateConfirm,
723}
724
725impl fidl::Persistable for MlmeDisassociateConfRequest {}
726
727#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
728pub struct MlmeDisassociateIndRequest {
729 pub ind: DisassociateIndication,
730}
731
732impl fidl::Persistable for MlmeDisassociateIndRequest {}
733
734#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
735pub struct MlmeDisassociateReqRequest {
736 pub req: DisassociateRequest,
737}
738
739impl fidl::Persistable for MlmeDisassociateReqRequest {}
740
741#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
742pub struct MlmeEapolConfRequest {
743 pub resp: EapolConfirm,
744}
745
746impl fidl::Persistable for MlmeEapolConfRequest {}
747
748#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
749pub struct MlmeEapolIndRequest {
750 pub ind: EapolIndication,
751}
752
753impl fidl::Persistable for MlmeEapolIndRequest {}
754
755#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
756pub struct MlmeEapolReqRequest {
757 pub req: EapolRequest,
758}
759
760impl fidl::Persistable for MlmeEapolReqRequest {}
761
762#[derive(Clone, Debug, PartialEq)]
763pub struct MlmeFinalizeAssociationReqRequest {
764 pub negotiated_capabilities: NegotiatedCapabilities,
765}
766
767impl fidl::Persistable for MlmeFinalizeAssociationReqRequest {}
768
769#[derive(Clone, Debug, PartialEq)]
770pub struct MlmeGetIfaceHistogramStatsResponse {
771 pub resp: GetIfaceHistogramStatsResponse,
772}
773
774impl fidl::Persistable for MlmeGetIfaceHistogramStatsResponse {}
775
776#[derive(Clone, Debug, PartialEq)]
777pub struct MlmeGetIfaceStatsResponse {
778 pub resp: GetIfaceStatsResponse,
779}
780
781impl fidl::Persistable for MlmeGetIfaceStatsResponse {}
782
783#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
784#[repr(C)]
785pub struct MlmeGetMinstrelStatsRequest {
786 pub req: MinstrelStatsRequest,
787}
788
789impl fidl::Persistable for MlmeGetMinstrelStatsRequest {}
790
791#[derive(Clone, Debug, PartialEq)]
792pub struct MlmeGetMinstrelStatsResponse {
793 pub resp: MinstrelStatsResponse,
794}
795
796impl fidl::Persistable for MlmeGetMinstrelStatsResponse {}
797
798#[derive(Clone, Debug, PartialEq)]
799pub struct MlmeListMinstrelPeersResponse {
800 pub resp: MinstrelListResponse,
801}
802
803impl fidl::Persistable for MlmeListMinstrelPeersResponse {}
804
805#[derive(Clone, Debug, PartialEq)]
806pub struct MlmeOnChannelSwitchedRequest {
807 pub info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
808}
809
810impl fidl::Persistable for MlmeOnChannelSwitchedRequest {}
811
812#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
813pub struct MlmeOnPmkAvailableRequest {
814 pub info: PmkInfo,
815}
816
817impl fidl::Persistable for MlmeOnPmkAvailableRequest {}
818
819#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
820pub struct MlmeOnSaeFrameRxRequest {
821 pub frame: SaeFrame,
822}
823
824impl fidl::Persistable for MlmeOnSaeFrameRxRequest {}
825
826#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
827#[repr(C)]
828pub struct MlmeOnSaeHandshakeIndRequest {
829 pub ind: SaeHandshakeIndication,
830}
831
832impl fidl::Persistable for MlmeOnSaeHandshakeIndRequest {}
833
834#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
835pub struct MlmeOnScanEndRequest {
836 pub end: ScanEnd,
837}
838
839impl fidl::Persistable for MlmeOnScanEndRequest {}
840
841#[derive(Clone, Debug, PartialEq)]
842pub struct MlmeOnScanResultRequest {
843 pub result: ScanResult,
844}
845
846impl fidl::Persistable for MlmeOnScanResultRequest {}
847
848#[derive(Clone, Debug, PartialEq)]
849pub struct MlmeOnWmmStatusRespRequest {
850 pub status: i32,
851 pub resp: fidl_fuchsia_wlan_internal::WmmStatusResponse,
852}
853
854impl fidl::Persistable for MlmeOnWmmStatusRespRequest {}
855
856#[derive(Clone, Debug, PartialEq)]
857pub struct MlmeQueryDeviceInfoResponse {
858 pub info: DeviceInfo,
859}
860
861impl fidl::Persistable for MlmeQueryDeviceInfoResponse {}
862
863#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
864#[repr(C)]
865pub struct MlmeReconnectReqRequest {
866 pub req: ReconnectRequest,
867}
868
869impl fidl::Persistable for MlmeReconnectReqRequest {}
870
871#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
872pub struct MlmeRelayCapturedFrameRequest {
873 pub result: CapturedFrameResult,
874}
875
876impl fidl::Persistable for MlmeRelayCapturedFrameRequest {}
877
878#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
879pub struct MlmeResetReqRequest {
880 pub req: ResetRequest,
881}
882
883impl fidl::Persistable for MlmeResetReqRequest {}
884
885#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
886pub struct MlmeRoamConfRequest {
887 pub conf: RoamConfirm,
888}
889
890impl fidl::Persistable for MlmeRoamConfRequest {}
891
892#[derive(Clone, Debug, PartialEq)]
893pub struct MlmeRoamReqRequest {
894 pub req: RoamRequest,
895}
896
897impl fidl::Persistable for MlmeRoamReqRequest {}
898
899#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
900pub struct MlmeRoamResultIndRequest {
901 pub ind: RoamResultIndication,
902}
903
904impl fidl::Persistable for MlmeRoamResultIndRequest {}
905
906#[derive(Clone, Debug, PartialEq)]
907pub struct MlmeRoamStartIndRequest {
908 pub ind: RoamStartIndication,
909}
910
911impl fidl::Persistable for MlmeRoamStartIndRequest {}
912
913#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
914pub struct MlmeSaeFrameTxRequest {
915 pub frame: SaeFrame,
916}
917
918impl fidl::Persistable for MlmeSaeFrameTxRequest {}
919
920#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
921pub struct MlmeSaeHandshakeRespRequest {
922 pub resp: SaeHandshakeResponse,
923}
924
925impl fidl::Persistable for MlmeSaeHandshakeRespRequest {}
926
927#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
928pub struct MlmeSetControlledPortRequest {
929 pub req: SetControlledPortRequest,
930}
931
932impl fidl::Persistable for MlmeSetControlledPortRequest {}
933
934#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
935pub struct MlmeSetKeysConfRequest {
936 pub conf: SetKeysConfirm,
937}
938
939impl fidl::Persistable for MlmeSetKeysConfRequest {}
940
941#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
942pub struct MlmeSetKeysReqRequest {
943 pub req: SetKeysRequest,
944}
945
946impl fidl::Persistable for MlmeSetKeysReqRequest {}
947
948#[derive(Clone, Debug, PartialEq)]
949pub struct MlmeSignalReportRequest {
950 pub ind: fidl_fuchsia_wlan_internal::SignalReportIndication,
951}
952
953impl fidl::Persistable for MlmeSignalReportRequest {}
954
955#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
956pub struct MlmeStartCaptureFramesRequest {
957 pub req: StartCaptureFramesRequest,
958}
959
960impl fidl::Persistable for MlmeStartCaptureFramesRequest {}
961
962#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
963pub struct MlmeStartCaptureFramesResponse {
964 pub resp: StartCaptureFramesResponse,
965}
966
967impl fidl::Persistable for MlmeStartCaptureFramesResponse {}
968
969#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
970pub struct MlmeStartConfRequest {
971 pub resp: StartConfirm,
972}
973
974impl fidl::Persistable for MlmeStartConfRequest {}
975
976#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
977pub struct MlmeStartReqRequest {
978 pub req: StartRequest,
979}
980
981impl fidl::Persistable for MlmeStartReqRequest {}
982
983#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
984pub struct MlmeStartScanRequest {
985 pub req: ScanRequest,
986}
987
988impl fidl::Persistable for MlmeStartScanRequest {}
989
990#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
991pub struct MlmeStopConfRequest {
992 pub resp: StopConfirm,
993}
994
995impl fidl::Persistable for MlmeStopConfRequest {}
996
997#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
998pub struct MlmeStopReqRequest {
999 pub req: StopRequest,
1000}
1001
1002impl fidl::Persistable for MlmeStopReqRequest {}
1003
1004#[derive(Clone, Debug, PartialEq)]
1006pub struct NegotiatedCapabilities {
1007 pub channel: fidl_fuchsia_wlan_common::WlanChannel,
1008 pub capability_info: u16,
1009 pub rates: Vec<u8>,
1010 pub wmm_param: Option<Box<WmmParameter>>,
1011 pub ht_cap: Option<Box<fidl_fuchsia_wlan_ieee80211::HtCapabilities>>,
1012 pub vht_cap: Option<Box<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>>,
1013}
1014
1015impl fidl::Persistable for NegotiatedCapabilities {}
1016
1017#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1018pub struct PmkInfo {
1019 pub pmk: Vec<u8>,
1020 pub pmkid: Vec<u8>,
1021}
1022
1023impl fidl::Persistable for PmkInfo {}
1024
1025#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1026#[repr(C)]
1027pub struct ReconnectRequest {
1028 pub peer_sta_address: [u8; 6],
1029}
1030
1031impl fidl::Persistable for ReconnectRequest {}
1032
1033#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1034pub struct ResetRequest {
1035 pub sta_address: [u8; 6],
1036 pub set_default_mib: bool,
1037}
1038
1039impl fidl::Persistable for ResetRequest {}
1040
1041#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1043pub struct RoamConfirm {
1044 pub selected_bssid: [u8; 6],
1045 pub status_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
1046 pub original_association_maintained: bool,
1051 pub target_bss_authenticated: bool,
1056 pub association_id: u16,
1057 pub association_ies: Vec<u8>,
1058}
1059
1060impl fidl::Persistable for RoamConfirm {}
1061
1062#[derive(Clone, Debug, PartialEq)]
1063pub struct RoamRequest {
1064 pub selected_bss: fidl_fuchsia_wlan_common::BssDescription,
1065}
1066
1067impl fidl::Persistable for RoamRequest {}
1068
1069#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1071pub struct RoamResultIndication {
1072 pub selected_bssid: [u8; 6],
1073 pub status_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
1074 pub original_association_maintained: bool,
1079 pub target_bss_authenticated: bool,
1084 pub association_id: u16,
1085 pub association_ies: Vec<u8>,
1086}
1087
1088impl fidl::Persistable for RoamResultIndication {}
1089
1090#[derive(Clone, Debug, PartialEq)]
1092pub struct RoamStartIndication {
1093 pub selected_bssid: [u8; 6],
1094 pub selected_bss: fidl_fuchsia_wlan_common::BssDescription,
1095 pub original_association_maintained: bool,
1102}
1103
1104impl fidl::Persistable for RoamStartIndication {}
1105
1106#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1107pub struct SaeFrame {
1108 pub peer_sta_address: [u8; 6],
1109 pub status_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
1110 pub seq_num: u16,
1111 pub sae_fields: Vec<u8>,
1112}
1113
1114impl fidl::Persistable for SaeFrame {}
1115
1116#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1117#[repr(C)]
1118pub struct SaeHandshakeIndication {
1119 pub peer_sta_address: [u8; 6],
1120}
1121
1122impl fidl::Persistable for SaeHandshakeIndication {}
1123
1124#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1125pub struct SaeHandshakeResponse {
1126 pub peer_sta_address: [u8; 6],
1127 pub status_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
1128}
1129
1130impl fidl::Persistable for SaeHandshakeResponse {}
1131
1132#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1133pub struct ScanEnd {
1134 pub txn_id: u64,
1135 pub code: ScanResultCode,
1136}
1137
1138impl fidl::Persistable for ScanEnd {}
1139
1140#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1141pub struct ScanRequest {
1142 pub txn_id: u64,
1143 pub scan_type: ScanTypes,
1144 pub channel_list: Vec<u8>,
1151 pub ssid_list: Vec<Vec<u8>>,
1160 pub probe_delay: u32,
1161 pub min_channel_time: u32,
1162 pub max_channel_time: u32,
1163}
1164
1165impl fidl::Persistable for ScanRequest {}
1166
1167#[derive(Clone, Debug, PartialEq)]
1168pub struct ScanResult {
1169 pub txn_id: u64,
1170 pub timestamp_nanos: i64,
1171 pub bss: fidl_fuchsia_wlan_common::BssDescription,
1172}
1173
1174impl fidl::Persistable for ScanResult {}
1175
1176#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1177pub struct SetControlledPortRequest {
1178 pub peer_sta_address: [u8; 6],
1179 pub state: ControlledPortState,
1180}
1181
1182impl fidl::Persistable for SetControlledPortRequest {}
1183
1184#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1185pub struct SetKeyDescriptor {
1186 pub key: Vec<u8>,
1187 pub key_id: u16,
1188 pub key_type: KeyType,
1189 pub address: [u8; 6],
1190 pub rsc: u64,
1191 pub cipher_suite_oui: [u8; 3],
1192 pub cipher_suite_type: fidl_fuchsia_wlan_ieee80211::CipherSuiteType,
1193}
1194
1195impl fidl::Persistable for SetKeyDescriptor {}
1196
1197#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1198#[repr(C)]
1199pub struct SetKeyResult {
1200 pub key_id: u16,
1201 pub status: i32,
1202}
1203
1204impl fidl::Persistable for SetKeyResult {}
1205
1206#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1207pub struct SetKeysConfirm {
1208 pub results: Vec<SetKeyResult>,
1209}
1210
1211impl fidl::Persistable for SetKeysConfirm {}
1212
1213#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1214pub struct SetKeysRequest {
1215 pub keylist: Vec<SetKeyDescriptor>,
1216}
1217
1218impl fidl::Persistable for SetKeysRequest {}
1219
1220#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1221pub struct StartCaptureFramesRequest {
1222 pub mgmt_frame_flags: MgmtFrameCaptureFlags,
1223}
1224
1225impl fidl::Persistable for StartCaptureFramesRequest {}
1226
1227#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1228pub struct StartCaptureFramesResponse {
1229 pub status: i32,
1230 pub supported_mgmt_frames: MgmtFrameCaptureFlags,
1231}
1232
1233impl fidl::Persistable for StartCaptureFramesResponse {}
1234
1235#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1236pub struct StartConfirm {
1237 pub result_code: StartResultCode,
1238}
1239
1240impl fidl::Persistable for StartConfirm {}
1241
1242#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1243pub struct StartRequest {
1244 pub ssid: Vec<u8>,
1245 pub bss_type: fidl_fuchsia_wlan_common::BssType,
1246 pub beacon_period: u16,
1247 pub dtim_period: u8,
1248 pub channel: u8,
1249 pub capability_info: u16,
1250 pub rates: Vec<u8>,
1251 pub country: Country,
1252 pub mesh_id: Vec<u8>,
1253 pub rsne: Option<Vec<u8>>,
1254 pub phy: fidl_fuchsia_wlan_common::WlanPhyType,
1255 pub channel_bandwidth: fidl_fuchsia_wlan_common::ChannelBandwidth,
1256}
1257
1258impl fidl::Persistable for StartRequest {}
1259
1260#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1261pub struct StopConfirm {
1262 pub result_code: StopResultCode,
1263}
1264
1265impl fidl::Persistable for StopConfirm {}
1266
1267#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1268pub struct StopRequest {
1269 pub ssid: Vec<u8>,
1270}
1271
1272impl fidl::Persistable for StopRequest {}
1273
1274#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1275#[repr(C)]
1276pub struct WmmParameter {
1277 pub bytes: [u8; 18],
1278}
1279
1280impl fidl::Persistable for WmmParameter {}
1281
1282#[derive(Clone, Debug, PartialEq)]
1283pub enum GetIfaceHistogramStatsResponse {
1284 Stats(fidl_fuchsia_wlan_stats::IfaceHistogramStats),
1285 ErrorStatus(i32),
1286}
1287
1288impl GetIfaceHistogramStatsResponse {
1289 #[inline]
1290 pub fn ordinal(&self) -> u64 {
1291 match *self {
1292 Self::Stats(_) => 1,
1293 Self::ErrorStatus(_) => 2,
1294 }
1295 }
1296
1297 #[deprecated = "Strict unions should not use `is_unknown`"]
1298 #[inline]
1299 pub fn is_unknown(&self) -> bool {
1300 false
1301 }
1302}
1303
1304impl fidl::Persistable for GetIfaceHistogramStatsResponse {}
1305
1306#[derive(Clone, Debug, PartialEq)]
1307pub enum GetIfaceStatsResponse {
1308 Stats(fidl_fuchsia_wlan_stats::IfaceStats),
1309 ErrorStatus(i32),
1310}
1311
1312impl GetIfaceStatsResponse {
1313 #[inline]
1314 pub fn ordinal(&self) -> u64 {
1315 match *self {
1316 Self::Stats(_) => 1,
1317 Self::ErrorStatus(_) => 2,
1318 }
1319 }
1320
1321 #[deprecated = "Strict unions should not use `is_unknown`"]
1322 #[inline]
1323 pub fn is_unknown(&self) -> bool {
1324 false
1325 }
1326}
1327
1328impl fidl::Persistable for GetIfaceStatsResponse {}
1329
1330mod internal {
1331 use super::*;
1332 unsafe impl fidl::encoding::TypeMarker for MgmtFrameCaptureFlags {
1333 type Owned = Self;
1334
1335 #[inline(always)]
1336 fn inline_align(_context: fidl::encoding::Context) -> usize {
1337 4
1338 }
1339
1340 #[inline(always)]
1341 fn inline_size(_context: fidl::encoding::Context) -> usize {
1342 4
1343 }
1344 }
1345
1346 impl fidl::encoding::ValueTypeMarker for MgmtFrameCaptureFlags {
1347 type Borrowed<'a> = Self;
1348 #[inline(always)]
1349 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1350 *value
1351 }
1352 }
1353
1354 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1355 for MgmtFrameCaptureFlags
1356 {
1357 #[inline]
1358 unsafe fn encode(
1359 self,
1360 encoder: &mut fidl::encoding::Encoder<'_, D>,
1361 offset: usize,
1362 _depth: fidl::encoding::Depth,
1363 ) -> fidl::Result<()> {
1364 encoder.debug_check_bounds::<Self>(offset);
1365 if self.bits() & Self::all().bits() != self.bits() {
1366 return Err(fidl::Error::InvalidBitsValue);
1367 }
1368 encoder.write_num(self.bits(), offset);
1369 Ok(())
1370 }
1371 }
1372
1373 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MgmtFrameCaptureFlags {
1374 #[inline(always)]
1375 fn new_empty() -> Self {
1376 Self::empty()
1377 }
1378
1379 #[inline]
1380 unsafe fn decode(
1381 &mut self,
1382 decoder: &mut fidl::encoding::Decoder<'_, D>,
1383 offset: usize,
1384 _depth: fidl::encoding::Depth,
1385 ) -> fidl::Result<()> {
1386 decoder.debug_check_bounds::<Self>(offset);
1387 let prim = decoder.read_num::<u32>(offset);
1388 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
1389 Ok(())
1390 }
1391 }
1392 unsafe impl fidl::encoding::TypeMarker for AssociateResultCode {
1393 type Owned = Self;
1394
1395 #[inline(always)]
1396 fn inline_align(_context: fidl::encoding::Context) -> usize {
1397 std::mem::align_of::<u32>()
1398 }
1399
1400 #[inline(always)]
1401 fn inline_size(_context: fidl::encoding::Context) -> usize {
1402 std::mem::size_of::<u32>()
1403 }
1404
1405 #[inline(always)]
1406 fn encode_is_copy() -> bool {
1407 true
1408 }
1409
1410 #[inline(always)]
1411 fn decode_is_copy() -> bool {
1412 false
1413 }
1414 }
1415
1416 impl fidl::encoding::ValueTypeMarker for AssociateResultCode {
1417 type Borrowed<'a> = Self;
1418 #[inline(always)]
1419 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1420 *value
1421 }
1422 }
1423
1424 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1425 for AssociateResultCode
1426 {
1427 #[inline]
1428 unsafe fn encode(
1429 self,
1430 encoder: &mut fidl::encoding::Encoder<'_, D>,
1431 offset: usize,
1432 _depth: fidl::encoding::Depth,
1433 ) -> fidl::Result<()> {
1434 encoder.debug_check_bounds::<Self>(offset);
1435 encoder.write_num(self.into_primitive(), offset);
1436 Ok(())
1437 }
1438 }
1439
1440 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AssociateResultCode {
1441 #[inline(always)]
1442 fn new_empty() -> Self {
1443 Self::Success
1444 }
1445
1446 #[inline]
1447 unsafe fn decode(
1448 &mut self,
1449 decoder: &mut fidl::encoding::Decoder<'_, D>,
1450 offset: usize,
1451 _depth: fidl::encoding::Depth,
1452 ) -> fidl::Result<()> {
1453 decoder.debug_check_bounds::<Self>(offset);
1454 let prim = decoder.read_num::<u32>(offset);
1455
1456 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1457 Ok(())
1458 }
1459 }
1460 unsafe impl fidl::encoding::TypeMarker for AuthenticateResultCode {
1461 type Owned = Self;
1462
1463 #[inline(always)]
1464 fn inline_align(_context: fidl::encoding::Context) -> usize {
1465 std::mem::align_of::<u32>()
1466 }
1467
1468 #[inline(always)]
1469 fn inline_size(_context: fidl::encoding::Context) -> usize {
1470 std::mem::size_of::<u32>()
1471 }
1472
1473 #[inline(always)]
1474 fn encode_is_copy() -> bool {
1475 true
1476 }
1477
1478 #[inline(always)]
1479 fn decode_is_copy() -> bool {
1480 false
1481 }
1482 }
1483
1484 impl fidl::encoding::ValueTypeMarker for AuthenticateResultCode {
1485 type Borrowed<'a> = Self;
1486 #[inline(always)]
1487 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1488 *value
1489 }
1490 }
1491
1492 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1493 for AuthenticateResultCode
1494 {
1495 #[inline]
1496 unsafe fn encode(
1497 self,
1498 encoder: &mut fidl::encoding::Encoder<'_, D>,
1499 offset: usize,
1500 _depth: fidl::encoding::Depth,
1501 ) -> fidl::Result<()> {
1502 encoder.debug_check_bounds::<Self>(offset);
1503 encoder.write_num(self.into_primitive(), offset);
1504 Ok(())
1505 }
1506 }
1507
1508 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1509 for AuthenticateResultCode
1510 {
1511 #[inline(always)]
1512 fn new_empty() -> Self {
1513 Self::Success
1514 }
1515
1516 #[inline]
1517 unsafe fn decode(
1518 &mut self,
1519 decoder: &mut fidl::encoding::Decoder<'_, D>,
1520 offset: usize,
1521 _depth: fidl::encoding::Depth,
1522 ) -> fidl::Result<()> {
1523 decoder.debug_check_bounds::<Self>(offset);
1524 let prim = decoder.read_num::<u32>(offset);
1525
1526 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1527 Ok(())
1528 }
1529 }
1530 unsafe impl fidl::encoding::TypeMarker for AuthenticationTypes {
1531 type Owned = Self;
1532
1533 #[inline(always)]
1534 fn inline_align(_context: fidl::encoding::Context) -> usize {
1535 std::mem::align_of::<u32>()
1536 }
1537
1538 #[inline(always)]
1539 fn inline_size(_context: fidl::encoding::Context) -> usize {
1540 std::mem::size_of::<u32>()
1541 }
1542
1543 #[inline(always)]
1544 fn encode_is_copy() -> bool {
1545 true
1546 }
1547
1548 #[inline(always)]
1549 fn decode_is_copy() -> bool {
1550 false
1551 }
1552 }
1553
1554 impl fidl::encoding::ValueTypeMarker for AuthenticationTypes {
1555 type Borrowed<'a> = Self;
1556 #[inline(always)]
1557 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1558 *value
1559 }
1560 }
1561
1562 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1563 for AuthenticationTypes
1564 {
1565 #[inline]
1566 unsafe fn encode(
1567 self,
1568 encoder: &mut fidl::encoding::Encoder<'_, D>,
1569 offset: usize,
1570 _depth: fidl::encoding::Depth,
1571 ) -> fidl::Result<()> {
1572 encoder.debug_check_bounds::<Self>(offset);
1573 encoder.write_num(self.into_primitive(), offset);
1574 Ok(())
1575 }
1576 }
1577
1578 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AuthenticationTypes {
1579 #[inline(always)]
1580 fn new_empty() -> Self {
1581 Self::OpenSystem
1582 }
1583
1584 #[inline]
1585 unsafe fn decode(
1586 &mut self,
1587 decoder: &mut fidl::encoding::Decoder<'_, D>,
1588 offset: usize,
1589 _depth: fidl::encoding::Depth,
1590 ) -> fidl::Result<()> {
1591 decoder.debug_check_bounds::<Self>(offset);
1592 let prim = decoder.read_num::<u32>(offset);
1593
1594 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1595 Ok(())
1596 }
1597 }
1598 unsafe impl fidl::encoding::TypeMarker for ControlledPortState {
1599 type Owned = Self;
1600
1601 #[inline(always)]
1602 fn inline_align(_context: fidl::encoding::Context) -> usize {
1603 std::mem::align_of::<u32>()
1604 }
1605
1606 #[inline(always)]
1607 fn inline_size(_context: fidl::encoding::Context) -> usize {
1608 std::mem::size_of::<u32>()
1609 }
1610
1611 #[inline(always)]
1612 fn encode_is_copy() -> bool {
1613 true
1614 }
1615
1616 #[inline(always)]
1617 fn decode_is_copy() -> bool {
1618 false
1619 }
1620 }
1621
1622 impl fidl::encoding::ValueTypeMarker for ControlledPortState {
1623 type Borrowed<'a> = Self;
1624 #[inline(always)]
1625 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1626 *value
1627 }
1628 }
1629
1630 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1631 for ControlledPortState
1632 {
1633 #[inline]
1634 unsafe fn encode(
1635 self,
1636 encoder: &mut fidl::encoding::Encoder<'_, D>,
1637 offset: usize,
1638 _depth: fidl::encoding::Depth,
1639 ) -> fidl::Result<()> {
1640 encoder.debug_check_bounds::<Self>(offset);
1641 encoder.write_num(self.into_primitive(), offset);
1642 Ok(())
1643 }
1644 }
1645
1646 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ControlledPortState {
1647 #[inline(always)]
1648 fn new_empty() -> Self {
1649 Self::Closed
1650 }
1651
1652 #[inline]
1653 unsafe fn decode(
1654 &mut self,
1655 decoder: &mut fidl::encoding::Decoder<'_, D>,
1656 offset: usize,
1657 _depth: fidl::encoding::Depth,
1658 ) -> fidl::Result<()> {
1659 decoder.debug_check_bounds::<Self>(offset);
1660 let prim = decoder.read_num::<u32>(offset);
1661
1662 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1663 Ok(())
1664 }
1665 }
1666 unsafe impl fidl::encoding::TypeMarker for EapolResultCode {
1667 type Owned = Self;
1668
1669 #[inline(always)]
1670 fn inline_align(_context: fidl::encoding::Context) -> usize {
1671 std::mem::align_of::<u32>()
1672 }
1673
1674 #[inline(always)]
1675 fn inline_size(_context: fidl::encoding::Context) -> usize {
1676 std::mem::size_of::<u32>()
1677 }
1678
1679 #[inline(always)]
1680 fn encode_is_copy() -> bool {
1681 true
1682 }
1683
1684 #[inline(always)]
1685 fn decode_is_copy() -> bool {
1686 false
1687 }
1688 }
1689
1690 impl fidl::encoding::ValueTypeMarker for EapolResultCode {
1691 type Borrowed<'a> = Self;
1692 #[inline(always)]
1693 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1694 *value
1695 }
1696 }
1697
1698 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1699 for EapolResultCode
1700 {
1701 #[inline]
1702 unsafe fn encode(
1703 self,
1704 encoder: &mut fidl::encoding::Encoder<'_, D>,
1705 offset: usize,
1706 _depth: fidl::encoding::Depth,
1707 ) -> fidl::Result<()> {
1708 encoder.debug_check_bounds::<Self>(offset);
1709 encoder.write_num(self.into_primitive(), offset);
1710 Ok(())
1711 }
1712 }
1713
1714 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EapolResultCode {
1715 #[inline(always)]
1716 fn new_empty() -> Self {
1717 Self::Success
1718 }
1719
1720 #[inline]
1721 unsafe fn decode(
1722 &mut self,
1723 decoder: &mut fidl::encoding::Decoder<'_, D>,
1724 offset: usize,
1725 _depth: fidl::encoding::Depth,
1726 ) -> fidl::Result<()> {
1727 decoder.debug_check_bounds::<Self>(offset);
1728 let prim = decoder.read_num::<u32>(offset);
1729
1730 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1731 Ok(())
1732 }
1733 }
1734 unsafe impl fidl::encoding::TypeMarker for KeyType {
1735 type Owned = Self;
1736
1737 #[inline(always)]
1738 fn inline_align(_context: fidl::encoding::Context) -> usize {
1739 std::mem::align_of::<u32>()
1740 }
1741
1742 #[inline(always)]
1743 fn inline_size(_context: fidl::encoding::Context) -> usize {
1744 std::mem::size_of::<u32>()
1745 }
1746
1747 #[inline(always)]
1748 fn encode_is_copy() -> bool {
1749 true
1750 }
1751
1752 #[inline(always)]
1753 fn decode_is_copy() -> bool {
1754 false
1755 }
1756 }
1757
1758 impl fidl::encoding::ValueTypeMarker for KeyType {
1759 type Borrowed<'a> = Self;
1760 #[inline(always)]
1761 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1762 *value
1763 }
1764 }
1765
1766 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for KeyType {
1767 #[inline]
1768 unsafe fn encode(
1769 self,
1770 encoder: &mut fidl::encoding::Encoder<'_, D>,
1771 offset: usize,
1772 _depth: fidl::encoding::Depth,
1773 ) -> fidl::Result<()> {
1774 encoder.debug_check_bounds::<Self>(offset);
1775 encoder.write_num(self.into_primitive(), offset);
1776 Ok(())
1777 }
1778 }
1779
1780 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for KeyType {
1781 #[inline(always)]
1782 fn new_empty() -> Self {
1783 Self::Group
1784 }
1785
1786 #[inline]
1787 unsafe fn decode(
1788 &mut self,
1789 decoder: &mut fidl::encoding::Decoder<'_, D>,
1790 offset: usize,
1791 _depth: fidl::encoding::Depth,
1792 ) -> fidl::Result<()> {
1793 decoder.debug_check_bounds::<Self>(offset);
1794 let prim = decoder.read_num::<u32>(offset);
1795
1796 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1797 Ok(())
1798 }
1799 }
1800 unsafe impl fidl::encoding::TypeMarker for ScanResultCode {
1801 type Owned = Self;
1802
1803 #[inline(always)]
1804 fn inline_align(_context: fidl::encoding::Context) -> usize {
1805 std::mem::align_of::<u32>()
1806 }
1807
1808 #[inline(always)]
1809 fn inline_size(_context: fidl::encoding::Context) -> usize {
1810 std::mem::size_of::<u32>()
1811 }
1812
1813 #[inline(always)]
1814 fn encode_is_copy() -> bool {
1815 true
1816 }
1817
1818 #[inline(always)]
1819 fn decode_is_copy() -> bool {
1820 false
1821 }
1822 }
1823
1824 impl fidl::encoding::ValueTypeMarker for ScanResultCode {
1825 type Borrowed<'a> = Self;
1826 #[inline(always)]
1827 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1828 *value
1829 }
1830 }
1831
1832 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ScanResultCode {
1833 #[inline]
1834 unsafe fn encode(
1835 self,
1836 encoder: &mut fidl::encoding::Encoder<'_, D>,
1837 offset: usize,
1838 _depth: fidl::encoding::Depth,
1839 ) -> fidl::Result<()> {
1840 encoder.debug_check_bounds::<Self>(offset);
1841 encoder.write_num(self.into_primitive(), offset);
1842 Ok(())
1843 }
1844 }
1845
1846 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanResultCode {
1847 #[inline(always)]
1848 fn new_empty() -> Self {
1849 Self::Success
1850 }
1851
1852 #[inline]
1853 unsafe fn decode(
1854 &mut self,
1855 decoder: &mut fidl::encoding::Decoder<'_, D>,
1856 offset: usize,
1857 _depth: fidl::encoding::Depth,
1858 ) -> fidl::Result<()> {
1859 decoder.debug_check_bounds::<Self>(offset);
1860 let prim = decoder.read_num::<u32>(offset);
1861
1862 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1863 Ok(())
1864 }
1865 }
1866 unsafe impl fidl::encoding::TypeMarker for ScanTypes {
1867 type Owned = Self;
1868
1869 #[inline(always)]
1870 fn inline_align(_context: fidl::encoding::Context) -> usize {
1871 std::mem::align_of::<u32>()
1872 }
1873
1874 #[inline(always)]
1875 fn inline_size(_context: fidl::encoding::Context) -> usize {
1876 std::mem::size_of::<u32>()
1877 }
1878
1879 #[inline(always)]
1880 fn encode_is_copy() -> bool {
1881 true
1882 }
1883
1884 #[inline(always)]
1885 fn decode_is_copy() -> bool {
1886 false
1887 }
1888 }
1889
1890 impl fidl::encoding::ValueTypeMarker for ScanTypes {
1891 type Borrowed<'a> = Self;
1892 #[inline(always)]
1893 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1894 *value
1895 }
1896 }
1897
1898 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ScanTypes {
1899 #[inline]
1900 unsafe fn encode(
1901 self,
1902 encoder: &mut fidl::encoding::Encoder<'_, D>,
1903 offset: usize,
1904 _depth: fidl::encoding::Depth,
1905 ) -> fidl::Result<()> {
1906 encoder.debug_check_bounds::<Self>(offset);
1907 encoder.write_num(self.into_primitive(), offset);
1908 Ok(())
1909 }
1910 }
1911
1912 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanTypes {
1913 #[inline(always)]
1914 fn new_empty() -> Self {
1915 Self::Active
1916 }
1917
1918 #[inline]
1919 unsafe fn decode(
1920 &mut self,
1921 decoder: &mut fidl::encoding::Decoder<'_, D>,
1922 offset: usize,
1923 _depth: fidl::encoding::Depth,
1924 ) -> fidl::Result<()> {
1925 decoder.debug_check_bounds::<Self>(offset);
1926 let prim = decoder.read_num::<u32>(offset);
1927
1928 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1929 Ok(())
1930 }
1931 }
1932 unsafe impl fidl::encoding::TypeMarker for StartResultCode {
1933 type Owned = Self;
1934
1935 #[inline(always)]
1936 fn inline_align(_context: fidl::encoding::Context) -> usize {
1937 std::mem::align_of::<u32>()
1938 }
1939
1940 #[inline(always)]
1941 fn inline_size(_context: fidl::encoding::Context) -> usize {
1942 std::mem::size_of::<u32>()
1943 }
1944
1945 #[inline(always)]
1946 fn encode_is_copy() -> bool {
1947 true
1948 }
1949
1950 #[inline(always)]
1951 fn decode_is_copy() -> bool {
1952 false
1953 }
1954 }
1955
1956 impl fidl::encoding::ValueTypeMarker for StartResultCode {
1957 type Borrowed<'a> = Self;
1958 #[inline(always)]
1959 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1960 *value
1961 }
1962 }
1963
1964 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1965 for StartResultCode
1966 {
1967 #[inline]
1968 unsafe fn encode(
1969 self,
1970 encoder: &mut fidl::encoding::Encoder<'_, D>,
1971 offset: usize,
1972 _depth: fidl::encoding::Depth,
1973 ) -> fidl::Result<()> {
1974 encoder.debug_check_bounds::<Self>(offset);
1975 encoder.write_num(self.into_primitive(), offset);
1976 Ok(())
1977 }
1978 }
1979
1980 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartResultCode {
1981 #[inline(always)]
1982 fn new_empty() -> Self {
1983 Self::Success
1984 }
1985
1986 #[inline]
1987 unsafe fn decode(
1988 &mut self,
1989 decoder: &mut fidl::encoding::Decoder<'_, D>,
1990 offset: usize,
1991 _depth: fidl::encoding::Depth,
1992 ) -> fidl::Result<()> {
1993 decoder.debug_check_bounds::<Self>(offset);
1994 let prim = decoder.read_num::<u32>(offset);
1995
1996 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1997 Ok(())
1998 }
1999 }
2000 unsafe impl fidl::encoding::TypeMarker for StopResultCode {
2001 type Owned = Self;
2002
2003 #[inline(always)]
2004 fn inline_align(_context: fidl::encoding::Context) -> usize {
2005 std::mem::align_of::<u32>()
2006 }
2007
2008 #[inline(always)]
2009 fn inline_size(_context: fidl::encoding::Context) -> usize {
2010 std::mem::size_of::<u32>()
2011 }
2012
2013 #[inline(always)]
2014 fn encode_is_copy() -> bool {
2015 true
2016 }
2017
2018 #[inline(always)]
2019 fn decode_is_copy() -> bool {
2020 false
2021 }
2022 }
2023
2024 impl fidl::encoding::ValueTypeMarker for StopResultCode {
2025 type Borrowed<'a> = Self;
2026 #[inline(always)]
2027 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2028 *value
2029 }
2030 }
2031
2032 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StopResultCode {
2033 #[inline]
2034 unsafe fn encode(
2035 self,
2036 encoder: &mut fidl::encoding::Encoder<'_, D>,
2037 offset: usize,
2038 _depth: fidl::encoding::Depth,
2039 ) -> fidl::Result<()> {
2040 encoder.debug_check_bounds::<Self>(offset);
2041 encoder.write_num(self.into_primitive(), offset);
2042 Ok(())
2043 }
2044 }
2045
2046 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopResultCode {
2047 #[inline(always)]
2048 fn new_empty() -> Self {
2049 Self::Success
2050 }
2051
2052 #[inline]
2053 unsafe fn decode(
2054 &mut self,
2055 decoder: &mut fidl::encoding::Decoder<'_, D>,
2056 offset: usize,
2057 _depth: fidl::encoding::Depth,
2058 ) -> fidl::Result<()> {
2059 decoder.debug_check_bounds::<Self>(offset);
2060 let prim = decoder.read_num::<u32>(offset);
2061
2062 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2063 Ok(())
2064 }
2065 }
2066
2067 impl fidl::encoding::ValueTypeMarker for AssociateIndication {
2068 type Borrowed<'a> = &'a Self;
2069 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2070 value
2071 }
2072 }
2073
2074 unsafe impl fidl::encoding::TypeMarker for AssociateIndication {
2075 type Owned = Self;
2076
2077 #[inline(always)]
2078 fn inline_align(_context: fidl::encoding::Context) -> usize {
2079 8
2080 }
2081
2082 #[inline(always)]
2083 fn inline_size(_context: fidl::encoding::Context) -> usize {
2084 64
2085 }
2086 }
2087
2088 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AssociateIndication, D>
2089 for &AssociateIndication
2090 {
2091 #[inline]
2092 unsafe fn encode(
2093 self,
2094 encoder: &mut fidl::encoding::Encoder<'_, D>,
2095 offset: usize,
2096 _depth: fidl::encoding::Depth,
2097 ) -> fidl::Result<()> {
2098 encoder.debug_check_bounds::<AssociateIndication>(offset);
2099 fidl::encoding::Encode::<AssociateIndication, D>::encode(
2101 (
2102 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
2103 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_info),
2104 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.listen_interval),
2105 <fidl::encoding::Optional<fidl::encoding::Vector<u8, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
2106 <fidl::encoding::Vector<u8, 14> as fidl::encoding::ValueTypeMarker>::borrow(&self.rates),
2107 <fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>> as fidl::encoding::ValueTypeMarker>::borrow(&self.rsne),
2108 ),
2109 encoder, offset, _depth
2110 )
2111 }
2112 }
2113 unsafe impl<
2114 D: fidl::encoding::ResourceDialect,
2115 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
2116 T1: fidl::encoding::Encode<u16, D>,
2117 T2: fidl::encoding::Encode<u16, D>,
2118 T3: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u8, 32>>, D>,
2119 T4: fidl::encoding::Encode<fidl::encoding::Vector<u8, 14>, D>,
2120 T5: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>, D>,
2121 > fidl::encoding::Encode<AssociateIndication, D> for (T0, T1, T2, T3, T4, T5)
2122 {
2123 #[inline]
2124 unsafe fn encode(
2125 self,
2126 encoder: &mut fidl::encoding::Encoder<'_, D>,
2127 offset: usize,
2128 depth: fidl::encoding::Depth,
2129 ) -> fidl::Result<()> {
2130 encoder.debug_check_bounds::<AssociateIndication>(offset);
2131 unsafe {
2134 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
2135 (ptr as *mut u64).write_unaligned(0);
2136 }
2137 self.0.encode(encoder, offset + 0, depth)?;
2139 self.1.encode(encoder, offset + 6, depth)?;
2140 self.2.encode(encoder, offset + 8, depth)?;
2141 self.3.encode(encoder, offset + 16, depth)?;
2142 self.4.encode(encoder, offset + 32, depth)?;
2143 self.5.encode(encoder, offset + 48, depth)?;
2144 Ok(())
2145 }
2146 }
2147
2148 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AssociateIndication {
2149 #[inline(always)]
2150 fn new_empty() -> Self {
2151 Self {
2152 peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
2153 capability_info: fidl::new_empty!(u16, D),
2154 listen_interval: fidl::new_empty!(u16, D),
2155 ssid: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::Vector<u8, 32>>, D),
2156 rates: fidl::new_empty!(fidl::encoding::Vector<u8, 14>, D),
2157 rsne: fidl::new_empty!(
2158 fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>,
2159 D
2160 ),
2161 }
2162 }
2163
2164 #[inline]
2165 unsafe fn decode(
2166 &mut self,
2167 decoder: &mut fidl::encoding::Decoder<'_, D>,
2168 offset: usize,
2169 _depth: fidl::encoding::Depth,
2170 ) -> fidl::Result<()> {
2171 decoder.debug_check_bounds::<Self>(offset);
2172 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
2174 let padval = unsafe { (ptr as *const u64).read_unaligned() };
2175 let mask = 0xffffffffffff0000u64;
2176 let maskedval = padval & mask;
2177 if maskedval != 0 {
2178 return Err(fidl::Error::NonZeroPadding {
2179 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
2180 });
2181 }
2182 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
2183 fidl::decode!(u16, D, &mut self.capability_info, decoder, offset + 6, _depth)?;
2184 fidl::decode!(u16, D, &mut self.listen_interval, decoder, offset + 8, _depth)?;
2185 fidl::decode!(
2186 fidl::encoding::Optional<fidl::encoding::Vector<u8, 32>>,
2187 D,
2188 &mut self.ssid,
2189 decoder,
2190 offset + 16,
2191 _depth
2192 )?;
2193 fidl::decode!(fidl::encoding::Vector<u8, 14>, D, &mut self.rates, decoder, offset + 32, _depth)?;
2194 fidl::decode!(
2195 fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>,
2196 D,
2197 &mut self.rsne,
2198 decoder,
2199 offset + 48,
2200 _depth
2201 )?;
2202 Ok(())
2203 }
2204 }
2205
2206 impl fidl::encoding::ValueTypeMarker for AssociateResponse {
2207 type Borrowed<'a> = &'a Self;
2208 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2209 value
2210 }
2211 }
2212
2213 unsafe impl fidl::encoding::TypeMarker for AssociateResponse {
2214 type Owned = Self;
2215
2216 #[inline(always)]
2217 fn inline_align(_context: fidl::encoding::Context) -> usize {
2218 8
2219 }
2220
2221 #[inline(always)]
2222 fn inline_size(_context: fidl::encoding::Context) -> usize {
2223 32
2224 }
2225 }
2226
2227 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AssociateResponse, D>
2228 for &AssociateResponse
2229 {
2230 #[inline]
2231 unsafe fn encode(
2232 self,
2233 encoder: &mut fidl::encoding::Encoder<'_, D>,
2234 offset: usize,
2235 _depth: fidl::encoding::Depth,
2236 ) -> fidl::Result<()> {
2237 encoder.debug_check_bounds::<AssociateResponse>(offset);
2238 fidl::encoding::Encode::<AssociateResponse, D>::encode(
2240 (
2241 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
2242 &self.peer_sta_address,
2243 ),
2244 <AssociateResultCode as fidl::encoding::ValueTypeMarker>::borrow(
2245 &self.result_code,
2246 ),
2247 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.association_id),
2248 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_info),
2249 <fidl::encoding::Vector<u8, 14> as fidl::encoding::ValueTypeMarker>::borrow(
2250 &self.rates,
2251 ),
2252 ),
2253 encoder,
2254 offset,
2255 _depth,
2256 )
2257 }
2258 }
2259 unsafe impl<
2260 D: fidl::encoding::ResourceDialect,
2261 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
2262 T1: fidl::encoding::Encode<AssociateResultCode, D>,
2263 T2: fidl::encoding::Encode<u16, D>,
2264 T3: fidl::encoding::Encode<u16, D>,
2265 T4: fidl::encoding::Encode<fidl::encoding::Vector<u8, 14>, D>,
2266 > fidl::encoding::Encode<AssociateResponse, D> for (T0, T1, T2, T3, T4)
2267 {
2268 #[inline]
2269 unsafe fn encode(
2270 self,
2271 encoder: &mut fidl::encoding::Encoder<'_, D>,
2272 offset: usize,
2273 depth: fidl::encoding::Depth,
2274 ) -> fidl::Result<()> {
2275 encoder.debug_check_bounds::<AssociateResponse>(offset);
2276 unsafe {
2279 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2280 (ptr as *mut u64).write_unaligned(0);
2281 }
2282 self.0.encode(encoder, offset + 0, depth)?;
2284 self.1.encode(encoder, offset + 8, depth)?;
2285 self.2.encode(encoder, offset + 12, depth)?;
2286 self.3.encode(encoder, offset + 14, depth)?;
2287 self.4.encode(encoder, offset + 16, depth)?;
2288 Ok(())
2289 }
2290 }
2291
2292 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AssociateResponse {
2293 #[inline(always)]
2294 fn new_empty() -> Self {
2295 Self {
2296 peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
2297 result_code: fidl::new_empty!(AssociateResultCode, D),
2298 association_id: fidl::new_empty!(u16, D),
2299 capability_info: fidl::new_empty!(u16, D),
2300 rates: fidl::new_empty!(fidl::encoding::Vector<u8, 14>, D),
2301 }
2302 }
2303
2304 #[inline]
2305 unsafe fn decode(
2306 &mut self,
2307 decoder: &mut fidl::encoding::Decoder<'_, D>,
2308 offset: usize,
2309 _depth: fidl::encoding::Depth,
2310 ) -> fidl::Result<()> {
2311 decoder.debug_check_bounds::<Self>(offset);
2312 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2314 let padval = unsafe { (ptr as *const u64).read_unaligned() };
2315 let mask = 0xffff000000000000u64;
2316 let maskedval = padval & mask;
2317 if maskedval != 0 {
2318 return Err(fidl::Error::NonZeroPadding {
2319 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
2320 });
2321 }
2322 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
2323 fidl::decode!(
2324 AssociateResultCode,
2325 D,
2326 &mut self.result_code,
2327 decoder,
2328 offset + 8,
2329 _depth
2330 )?;
2331 fidl::decode!(u16, D, &mut self.association_id, decoder, offset + 12, _depth)?;
2332 fidl::decode!(u16, D, &mut self.capability_info, decoder, offset + 14, _depth)?;
2333 fidl::decode!(fidl::encoding::Vector<u8, 14>, D, &mut self.rates, decoder, offset + 16, _depth)?;
2334 Ok(())
2335 }
2336 }
2337
2338 impl fidl::encoding::ValueTypeMarker for AuthenticateIndication {
2339 type Borrowed<'a> = &'a Self;
2340 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2341 value
2342 }
2343 }
2344
2345 unsafe impl fidl::encoding::TypeMarker for AuthenticateIndication {
2346 type Owned = Self;
2347
2348 #[inline(always)]
2349 fn inline_align(_context: fidl::encoding::Context) -> usize {
2350 4
2351 }
2352
2353 #[inline(always)]
2354 fn inline_size(_context: fidl::encoding::Context) -> usize {
2355 12
2356 }
2357 }
2358
2359 unsafe impl<D: fidl::encoding::ResourceDialect>
2360 fidl::encoding::Encode<AuthenticateIndication, D> for &AuthenticateIndication
2361 {
2362 #[inline]
2363 unsafe fn encode(
2364 self,
2365 encoder: &mut fidl::encoding::Encoder<'_, D>,
2366 offset: usize,
2367 _depth: fidl::encoding::Depth,
2368 ) -> fidl::Result<()> {
2369 encoder.debug_check_bounds::<AuthenticateIndication>(offset);
2370 fidl::encoding::Encode::<AuthenticateIndication, D>::encode(
2372 (
2373 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
2374 &self.peer_sta_address,
2375 ),
2376 <AuthenticationTypes as fidl::encoding::ValueTypeMarker>::borrow(
2377 &self.auth_type,
2378 ),
2379 ),
2380 encoder,
2381 offset,
2382 _depth,
2383 )
2384 }
2385 }
2386 unsafe impl<
2387 D: fidl::encoding::ResourceDialect,
2388 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
2389 T1: fidl::encoding::Encode<AuthenticationTypes, D>,
2390 > fidl::encoding::Encode<AuthenticateIndication, D> for (T0, T1)
2391 {
2392 #[inline]
2393 unsafe fn encode(
2394 self,
2395 encoder: &mut fidl::encoding::Encoder<'_, D>,
2396 offset: usize,
2397 depth: fidl::encoding::Depth,
2398 ) -> fidl::Result<()> {
2399 encoder.debug_check_bounds::<AuthenticateIndication>(offset);
2400 unsafe {
2403 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
2404 (ptr as *mut u32).write_unaligned(0);
2405 }
2406 self.0.encode(encoder, offset + 0, depth)?;
2408 self.1.encode(encoder, offset + 8, depth)?;
2409 Ok(())
2410 }
2411 }
2412
2413 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2414 for AuthenticateIndication
2415 {
2416 #[inline(always)]
2417 fn new_empty() -> Self {
2418 Self {
2419 peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
2420 auth_type: fidl::new_empty!(AuthenticationTypes, D),
2421 }
2422 }
2423
2424 #[inline]
2425 unsafe fn decode(
2426 &mut self,
2427 decoder: &mut fidl::encoding::Decoder<'_, D>,
2428 offset: usize,
2429 _depth: fidl::encoding::Depth,
2430 ) -> fidl::Result<()> {
2431 decoder.debug_check_bounds::<Self>(offset);
2432 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
2434 let padval = unsafe { (ptr as *const u32).read_unaligned() };
2435 let mask = 0xffff0000u32;
2436 let maskedval = padval & mask;
2437 if maskedval != 0 {
2438 return Err(fidl::Error::NonZeroPadding {
2439 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
2440 });
2441 }
2442 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
2443 fidl::decode!(
2444 AuthenticationTypes,
2445 D,
2446 &mut self.auth_type,
2447 decoder,
2448 offset + 8,
2449 _depth
2450 )?;
2451 Ok(())
2452 }
2453 }
2454
2455 impl fidl::encoding::ValueTypeMarker for AuthenticateResponse {
2456 type Borrowed<'a> = &'a Self;
2457 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2458 value
2459 }
2460 }
2461
2462 unsafe impl fidl::encoding::TypeMarker for AuthenticateResponse {
2463 type Owned = Self;
2464
2465 #[inline(always)]
2466 fn inline_align(_context: fidl::encoding::Context) -> usize {
2467 4
2468 }
2469
2470 #[inline(always)]
2471 fn inline_size(_context: fidl::encoding::Context) -> usize {
2472 12
2473 }
2474 }
2475
2476 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AuthenticateResponse, D>
2477 for &AuthenticateResponse
2478 {
2479 #[inline]
2480 unsafe fn encode(
2481 self,
2482 encoder: &mut fidl::encoding::Encoder<'_, D>,
2483 offset: usize,
2484 _depth: fidl::encoding::Depth,
2485 ) -> fidl::Result<()> {
2486 encoder.debug_check_bounds::<AuthenticateResponse>(offset);
2487 fidl::encoding::Encode::<AuthenticateResponse, D>::encode(
2489 (
2490 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
2491 &self.peer_sta_address,
2492 ),
2493 <AuthenticateResultCode as fidl::encoding::ValueTypeMarker>::borrow(
2494 &self.result_code,
2495 ),
2496 ),
2497 encoder,
2498 offset,
2499 _depth,
2500 )
2501 }
2502 }
2503 unsafe impl<
2504 D: fidl::encoding::ResourceDialect,
2505 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
2506 T1: fidl::encoding::Encode<AuthenticateResultCode, D>,
2507 > fidl::encoding::Encode<AuthenticateResponse, D> for (T0, T1)
2508 {
2509 #[inline]
2510 unsafe fn encode(
2511 self,
2512 encoder: &mut fidl::encoding::Encoder<'_, D>,
2513 offset: usize,
2514 depth: fidl::encoding::Depth,
2515 ) -> fidl::Result<()> {
2516 encoder.debug_check_bounds::<AuthenticateResponse>(offset);
2517 unsafe {
2520 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
2521 (ptr as *mut u32).write_unaligned(0);
2522 }
2523 self.0.encode(encoder, offset + 0, depth)?;
2525 self.1.encode(encoder, offset + 8, depth)?;
2526 Ok(())
2527 }
2528 }
2529
2530 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AuthenticateResponse {
2531 #[inline(always)]
2532 fn new_empty() -> Self {
2533 Self {
2534 peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
2535 result_code: fidl::new_empty!(AuthenticateResultCode, D),
2536 }
2537 }
2538
2539 #[inline]
2540 unsafe fn decode(
2541 &mut self,
2542 decoder: &mut fidl::encoding::Decoder<'_, D>,
2543 offset: usize,
2544 _depth: fidl::encoding::Depth,
2545 ) -> fidl::Result<()> {
2546 decoder.debug_check_bounds::<Self>(offset);
2547 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
2549 let padval = unsafe { (ptr as *const u32).read_unaligned() };
2550 let mask = 0xffff0000u32;
2551 let maskedval = padval & mask;
2552 if maskedval != 0 {
2553 return Err(fidl::Error::NonZeroPadding {
2554 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
2555 });
2556 }
2557 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
2558 fidl::decode!(
2559 AuthenticateResultCode,
2560 D,
2561 &mut self.result_code,
2562 decoder,
2563 offset + 8,
2564 _depth
2565 )?;
2566 Ok(())
2567 }
2568 }
2569
2570 impl fidl::encoding::ValueTypeMarker for BandCapability {
2571 type Borrowed<'a> = &'a Self;
2572 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2573 value
2574 }
2575 }
2576
2577 unsafe impl fidl::encoding::TypeMarker for BandCapability {
2578 type Owned = Self;
2579
2580 #[inline(always)]
2581 fn inline_align(_context: fidl::encoding::Context) -> usize {
2582 8
2583 }
2584
2585 #[inline(always)]
2586 fn inline_size(_context: fidl::encoding::Context) -> usize {
2587 56
2588 }
2589 }
2590
2591 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BandCapability, D>
2592 for &BandCapability
2593 {
2594 #[inline]
2595 unsafe fn encode(
2596 self,
2597 encoder: &mut fidl::encoding::Encoder<'_, D>,
2598 offset: usize,
2599 _depth: fidl::encoding::Depth,
2600 ) -> fidl::Result<()> {
2601 encoder.debug_check_bounds::<BandCapability>(offset);
2602 fidl::encoding::Encode::<BandCapability, D>::encode(
2604 (
2605 <fidl_fuchsia_wlan_ieee80211::WlanBand as fidl::encoding::ValueTypeMarker>::borrow(&self.band),
2606 <fidl::encoding::Vector<u8, 12> as fidl::encoding::ValueTypeMarker>::borrow(&self.basic_rates),
2607 <fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities> as fidl::encoding::ValueTypeMarker>::borrow(&self.ht_cap),
2608 <fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities> as fidl::encoding::ValueTypeMarker>::borrow(&self.vht_cap),
2609 <fidl::encoding::Vector<u8, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.operating_channels),
2610 ),
2611 encoder, offset, _depth
2612 )
2613 }
2614 }
2615 unsafe impl<
2616 D: fidl::encoding::ResourceDialect,
2617 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::WlanBand, D>,
2618 T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 12>, D>,
2619 T2: fidl::encoding::Encode<
2620 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
2621 D,
2622 >,
2623 T3: fidl::encoding::Encode<
2624 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
2625 D,
2626 >,
2627 T4: fidl::encoding::Encode<fidl::encoding::Vector<u8, 256>, D>,
2628 > fidl::encoding::Encode<BandCapability, D> for (T0, T1, T2, T3, T4)
2629 {
2630 #[inline]
2631 unsafe fn encode(
2632 self,
2633 encoder: &mut fidl::encoding::Encoder<'_, D>,
2634 offset: usize,
2635 depth: fidl::encoding::Depth,
2636 ) -> fidl::Result<()> {
2637 encoder.debug_check_bounds::<BandCapability>(offset);
2638 unsafe {
2641 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2642 (ptr as *mut u64).write_unaligned(0);
2643 }
2644 self.0.encode(encoder, offset + 0, depth)?;
2646 self.1.encode(encoder, offset + 8, depth)?;
2647 self.2.encode(encoder, offset + 24, depth)?;
2648 self.3.encode(encoder, offset + 32, depth)?;
2649 self.4.encode(encoder, offset + 40, depth)?;
2650 Ok(())
2651 }
2652 }
2653
2654 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BandCapability {
2655 #[inline(always)]
2656 fn new_empty() -> Self {
2657 Self {
2658 band: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::WlanBand, D),
2659 basic_rates: fidl::new_empty!(fidl::encoding::Vector<u8, 12>, D),
2660 ht_cap: fidl::new_empty!(
2661 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
2662 D
2663 ),
2664 vht_cap: fidl::new_empty!(
2665 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
2666 D
2667 ),
2668 operating_channels: fidl::new_empty!(fidl::encoding::Vector<u8, 256>, D),
2669 }
2670 }
2671
2672 #[inline]
2673 unsafe fn decode(
2674 &mut self,
2675 decoder: &mut fidl::encoding::Decoder<'_, D>,
2676 offset: usize,
2677 _depth: fidl::encoding::Depth,
2678 ) -> fidl::Result<()> {
2679 decoder.debug_check_bounds::<Self>(offset);
2680 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2682 let padval = unsafe { (ptr as *const u64).read_unaligned() };
2683 let mask = 0xffffffffffffff00u64;
2684 let maskedval = padval & mask;
2685 if maskedval != 0 {
2686 return Err(fidl::Error::NonZeroPadding {
2687 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
2688 });
2689 }
2690 fidl::decode!(
2691 fidl_fuchsia_wlan_ieee80211::WlanBand,
2692 D,
2693 &mut self.band,
2694 decoder,
2695 offset + 0,
2696 _depth
2697 )?;
2698 fidl::decode!(fidl::encoding::Vector<u8, 12>, D, &mut self.basic_rates, decoder, offset + 8, _depth)?;
2699 fidl::decode!(
2700 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
2701 D,
2702 &mut self.ht_cap,
2703 decoder,
2704 offset + 24,
2705 _depth
2706 )?;
2707 fidl::decode!(
2708 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
2709 D,
2710 &mut self.vht_cap,
2711 decoder,
2712 offset + 32,
2713 _depth
2714 )?;
2715 fidl::decode!(fidl::encoding::Vector<u8, 256>, D, &mut self.operating_channels, decoder, offset + 40, _depth)?;
2716 Ok(())
2717 }
2718 }
2719
2720 impl fidl::encoding::ValueTypeMarker for CapturedFrameResult {
2721 type Borrowed<'a> = &'a Self;
2722 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2723 value
2724 }
2725 }
2726
2727 unsafe impl fidl::encoding::TypeMarker for CapturedFrameResult {
2728 type Owned = Self;
2729
2730 #[inline(always)]
2731 fn inline_align(_context: fidl::encoding::Context) -> usize {
2732 8
2733 }
2734
2735 #[inline(always)]
2736 fn inline_size(_context: fidl::encoding::Context) -> usize {
2737 16
2738 }
2739 }
2740
2741 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CapturedFrameResult, D>
2742 for &CapturedFrameResult
2743 {
2744 #[inline]
2745 unsafe fn encode(
2746 self,
2747 encoder: &mut fidl::encoding::Encoder<'_, D>,
2748 offset: usize,
2749 _depth: fidl::encoding::Depth,
2750 ) -> fidl::Result<()> {
2751 encoder.debug_check_bounds::<CapturedFrameResult>(offset);
2752 fidl::encoding::Encode::<CapturedFrameResult, D>::encode(
2754 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
2755 &self.frame,
2756 ),),
2757 encoder,
2758 offset,
2759 _depth,
2760 )
2761 }
2762 }
2763 unsafe impl<
2764 D: fidl::encoding::ResourceDialect,
2765 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
2766 > fidl::encoding::Encode<CapturedFrameResult, D> for (T0,)
2767 {
2768 #[inline]
2769 unsafe fn encode(
2770 self,
2771 encoder: &mut fidl::encoding::Encoder<'_, D>,
2772 offset: usize,
2773 depth: fidl::encoding::Depth,
2774 ) -> fidl::Result<()> {
2775 encoder.debug_check_bounds::<CapturedFrameResult>(offset);
2776 self.0.encode(encoder, offset + 0, depth)?;
2780 Ok(())
2781 }
2782 }
2783
2784 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CapturedFrameResult {
2785 #[inline(always)]
2786 fn new_empty() -> Self {
2787 Self { frame: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
2788 }
2789
2790 #[inline]
2791 unsafe fn decode(
2792 &mut self,
2793 decoder: &mut fidl::encoding::Decoder<'_, D>,
2794 offset: usize,
2795 _depth: fidl::encoding::Depth,
2796 ) -> fidl::Result<()> {
2797 decoder.debug_check_bounds::<Self>(offset);
2798 fidl::decode!(
2800 fidl::encoding::UnboundedVector<u8>,
2801 D,
2802 &mut self.frame,
2803 decoder,
2804 offset + 0,
2805 _depth
2806 )?;
2807 Ok(())
2808 }
2809 }
2810
2811 impl fidl::encoding::ValueTypeMarker for ConnectConfirm {
2812 type Borrowed<'a> = &'a Self;
2813 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2814 value
2815 }
2816 }
2817
2818 unsafe impl fidl::encoding::TypeMarker for ConnectConfirm {
2819 type Owned = Self;
2820
2821 #[inline(always)]
2822 fn inline_align(_context: fidl::encoding::Context) -> usize {
2823 8
2824 }
2825
2826 #[inline(always)]
2827 fn inline_size(_context: fidl::encoding::Context) -> usize {
2828 32
2829 }
2830 }
2831
2832 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ConnectConfirm, D>
2833 for &ConnectConfirm
2834 {
2835 #[inline]
2836 unsafe fn encode(
2837 self,
2838 encoder: &mut fidl::encoding::Encoder<'_, D>,
2839 offset: usize,
2840 _depth: fidl::encoding::Depth,
2841 ) -> fidl::Result<()> {
2842 encoder.debug_check_bounds::<ConnectConfirm>(offset);
2843 fidl::encoding::Encode::<ConnectConfirm, D>::encode(
2845 (
2846 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
2847 <fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.result_code),
2848 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.association_id),
2849 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.association_ies),
2850 ),
2851 encoder, offset, _depth
2852 )
2853 }
2854 }
2855 unsafe impl<
2856 D: fidl::encoding::ResourceDialect,
2857 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
2858 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::StatusCode, D>,
2859 T2: fidl::encoding::Encode<u16, D>,
2860 T3: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
2861 > fidl::encoding::Encode<ConnectConfirm, D> for (T0, T1, T2, T3)
2862 {
2863 #[inline]
2864 unsafe fn encode(
2865 self,
2866 encoder: &mut fidl::encoding::Encoder<'_, D>,
2867 offset: usize,
2868 depth: fidl::encoding::Depth,
2869 ) -> fidl::Result<()> {
2870 encoder.debug_check_bounds::<ConnectConfirm>(offset);
2871 unsafe {
2874 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
2875 (ptr as *mut u64).write_unaligned(0);
2876 }
2877 self.0.encode(encoder, offset + 0, depth)?;
2879 self.1.encode(encoder, offset + 6, depth)?;
2880 self.2.encode(encoder, offset + 8, depth)?;
2881 self.3.encode(encoder, offset + 16, depth)?;
2882 Ok(())
2883 }
2884 }
2885
2886 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectConfirm {
2887 #[inline(always)]
2888 fn new_empty() -> Self {
2889 Self {
2890 peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
2891 result_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
2892 association_id: fidl::new_empty!(u16, D),
2893 association_ies: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
2894 }
2895 }
2896
2897 #[inline]
2898 unsafe fn decode(
2899 &mut self,
2900 decoder: &mut fidl::encoding::Decoder<'_, D>,
2901 offset: usize,
2902 _depth: fidl::encoding::Depth,
2903 ) -> fidl::Result<()> {
2904 decoder.debug_check_bounds::<Self>(offset);
2905 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
2907 let padval = unsafe { (ptr as *const u64).read_unaligned() };
2908 let mask = 0xffffffffffff0000u64;
2909 let maskedval = padval & mask;
2910 if maskedval != 0 {
2911 return Err(fidl::Error::NonZeroPadding {
2912 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
2913 });
2914 }
2915 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
2916 fidl::decode!(
2917 fidl_fuchsia_wlan_ieee80211::StatusCode,
2918 D,
2919 &mut self.result_code,
2920 decoder,
2921 offset + 6,
2922 _depth
2923 )?;
2924 fidl::decode!(u16, D, &mut self.association_id, decoder, offset + 8, _depth)?;
2925 fidl::decode!(
2926 fidl::encoding::UnboundedVector<u8>,
2927 D,
2928 &mut self.association_ies,
2929 decoder,
2930 offset + 16,
2931 _depth
2932 )?;
2933 Ok(())
2934 }
2935 }
2936
2937 impl fidl::encoding::ValueTypeMarker for ConnectRequest {
2938 type Borrowed<'a> = &'a Self;
2939 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2940 value
2941 }
2942 }
2943
2944 unsafe impl fidl::encoding::TypeMarker for ConnectRequest {
2945 type Owned = Self;
2946
2947 #[inline(always)]
2948 fn inline_align(_context: fidl::encoding::Context) -> usize {
2949 8
2950 }
2951
2952 #[inline(always)]
2953 fn inline_size(_context: fidl::encoding::Context) -> usize {
2954 96
2955 }
2956 }
2957
2958 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ConnectRequest, D>
2959 for &ConnectRequest
2960 {
2961 #[inline]
2962 unsafe fn encode(
2963 self,
2964 encoder: &mut fidl::encoding::Encoder<'_, D>,
2965 offset: usize,
2966 _depth: fidl::encoding::Depth,
2967 ) -> fidl::Result<()> {
2968 encoder.debug_check_bounds::<ConnectRequest>(offset);
2969 fidl::encoding::Encode::<ConnectRequest, D>::encode(
2971 (
2972 <fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bss),
2973 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.connect_failure_timeout),
2974 <AuthenticationTypes as fidl::encoding::ValueTypeMarker>::borrow(&self.auth_type),
2975 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.sae_password),
2976 <fidl::encoding::Boxed<SetKeyDescriptor> as fidl::encoding::ValueTypeMarker>::borrow(&self.wep_key),
2977 <fidl::encoding::Vector<u8, 257> as fidl::encoding::ValueTypeMarker>::borrow(&self.security_ie),
2978 ),
2979 encoder, offset, _depth
2980 )
2981 }
2982 }
2983 unsafe impl<
2984 D: fidl::encoding::ResourceDialect,
2985 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssDescription, D>,
2986 T1: fidl::encoding::Encode<u32, D>,
2987 T2: fidl::encoding::Encode<AuthenticationTypes, D>,
2988 T3: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
2989 T4: fidl::encoding::Encode<fidl::encoding::Boxed<SetKeyDescriptor>, D>,
2990 T5: fidl::encoding::Encode<fidl::encoding::Vector<u8, 257>, D>,
2991 > fidl::encoding::Encode<ConnectRequest, D> for (T0, T1, T2, T3, T4, T5)
2992 {
2993 #[inline]
2994 unsafe fn encode(
2995 self,
2996 encoder: &mut fidl::encoding::Encoder<'_, D>,
2997 offset: usize,
2998 depth: fidl::encoding::Depth,
2999 ) -> fidl::Result<()> {
3000 encoder.debug_check_bounds::<ConnectRequest>(offset);
3001 self.0.encode(encoder, offset + 0, depth)?;
3005 self.1.encode(encoder, offset + 48, depth)?;
3006 self.2.encode(encoder, offset + 52, depth)?;
3007 self.3.encode(encoder, offset + 56, depth)?;
3008 self.4.encode(encoder, offset + 72, depth)?;
3009 self.5.encode(encoder, offset + 80, depth)?;
3010 Ok(())
3011 }
3012 }
3013
3014 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectRequest {
3015 #[inline(always)]
3016 fn new_empty() -> Self {
3017 Self {
3018 selected_bss: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D),
3019 connect_failure_timeout: fidl::new_empty!(u32, D),
3020 auth_type: fidl::new_empty!(AuthenticationTypes, D),
3021 sae_password: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
3022 wep_key: fidl::new_empty!(fidl::encoding::Boxed<SetKeyDescriptor>, D),
3023 security_ie: fidl::new_empty!(fidl::encoding::Vector<u8, 257>, D),
3024 }
3025 }
3026
3027 #[inline]
3028 unsafe fn decode(
3029 &mut self,
3030 decoder: &mut fidl::encoding::Decoder<'_, D>,
3031 offset: usize,
3032 _depth: fidl::encoding::Depth,
3033 ) -> fidl::Result<()> {
3034 decoder.debug_check_bounds::<Self>(offset);
3035 fidl::decode!(
3037 fidl_fuchsia_wlan_common::BssDescription,
3038 D,
3039 &mut self.selected_bss,
3040 decoder,
3041 offset + 0,
3042 _depth
3043 )?;
3044 fidl::decode!(u32, D, &mut self.connect_failure_timeout, decoder, offset + 48, _depth)?;
3045 fidl::decode!(
3046 AuthenticationTypes,
3047 D,
3048 &mut self.auth_type,
3049 decoder,
3050 offset + 52,
3051 _depth
3052 )?;
3053 fidl::decode!(
3054 fidl::encoding::UnboundedVector<u8>,
3055 D,
3056 &mut self.sae_password,
3057 decoder,
3058 offset + 56,
3059 _depth
3060 )?;
3061 fidl::decode!(
3062 fidl::encoding::Boxed<SetKeyDescriptor>,
3063 D,
3064 &mut self.wep_key,
3065 decoder,
3066 offset + 72,
3067 _depth
3068 )?;
3069 fidl::decode!(fidl::encoding::Vector<u8, 257>, D, &mut self.security_ie, decoder, offset + 80, _depth)?;
3070 Ok(())
3071 }
3072 }
3073
3074 impl fidl::encoding::ValueTypeMarker for Country {
3075 type Borrowed<'a> = &'a Self;
3076 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3077 value
3078 }
3079 }
3080
3081 unsafe impl fidl::encoding::TypeMarker for Country {
3082 type Owned = Self;
3083
3084 #[inline(always)]
3085 fn inline_align(_context: fidl::encoding::Context) -> usize {
3086 1
3087 }
3088
3089 #[inline(always)]
3090 fn inline_size(_context: fidl::encoding::Context) -> usize {
3091 3
3092 }
3093 #[inline(always)]
3094 fn encode_is_copy() -> bool {
3095 true
3096 }
3097
3098 #[inline(always)]
3099 fn decode_is_copy() -> bool {
3100 true
3101 }
3102 }
3103
3104 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Country, D> for &Country {
3105 #[inline]
3106 unsafe fn encode(
3107 self,
3108 encoder: &mut fidl::encoding::Encoder<'_, D>,
3109 offset: usize,
3110 _depth: fidl::encoding::Depth,
3111 ) -> fidl::Result<()> {
3112 encoder.debug_check_bounds::<Country>(offset);
3113 unsafe {
3114 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3116 (buf_ptr as *mut Country).write_unaligned((self as *const Country).read());
3117 }
3120 Ok(())
3121 }
3122 }
3123 unsafe impl<
3124 D: fidl::encoding::ResourceDialect,
3125 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 2>, D>,
3126 T1: fidl::encoding::Encode<u8, D>,
3127 > fidl::encoding::Encode<Country, D> for (T0, T1)
3128 {
3129 #[inline]
3130 unsafe fn encode(
3131 self,
3132 encoder: &mut fidl::encoding::Encoder<'_, D>,
3133 offset: usize,
3134 depth: fidl::encoding::Depth,
3135 ) -> fidl::Result<()> {
3136 encoder.debug_check_bounds::<Country>(offset);
3137 self.0.encode(encoder, offset + 0, depth)?;
3141 self.1.encode(encoder, offset + 2, depth)?;
3142 Ok(())
3143 }
3144 }
3145
3146 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Country {
3147 #[inline(always)]
3148 fn new_empty() -> Self {
3149 Self {
3150 alpha2: fidl::new_empty!(fidl::encoding::Array<u8, 2>, D),
3151 suffix: fidl::new_empty!(u8, D),
3152 }
3153 }
3154
3155 #[inline]
3156 unsafe fn decode(
3157 &mut self,
3158 decoder: &mut fidl::encoding::Decoder<'_, D>,
3159 offset: usize,
3160 _depth: fidl::encoding::Depth,
3161 ) -> fidl::Result<()> {
3162 decoder.debug_check_bounds::<Self>(offset);
3163 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3164 unsafe {
3167 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 3);
3168 }
3169 Ok(())
3170 }
3171 }
3172
3173 impl fidl::encoding::ValueTypeMarker for DeauthenticateConfirm {
3174 type Borrowed<'a> = &'a Self;
3175 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3176 value
3177 }
3178 }
3179
3180 unsafe impl fidl::encoding::TypeMarker for DeauthenticateConfirm {
3181 type Owned = Self;
3182
3183 #[inline(always)]
3184 fn inline_align(_context: fidl::encoding::Context) -> usize {
3185 1
3186 }
3187
3188 #[inline(always)]
3189 fn inline_size(_context: fidl::encoding::Context) -> usize {
3190 6
3191 }
3192 #[inline(always)]
3193 fn encode_is_copy() -> bool {
3194 true
3195 }
3196
3197 #[inline(always)]
3198 fn decode_is_copy() -> bool {
3199 true
3200 }
3201 }
3202
3203 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeauthenticateConfirm, D>
3204 for &DeauthenticateConfirm
3205 {
3206 #[inline]
3207 unsafe fn encode(
3208 self,
3209 encoder: &mut fidl::encoding::Encoder<'_, D>,
3210 offset: usize,
3211 _depth: fidl::encoding::Depth,
3212 ) -> fidl::Result<()> {
3213 encoder.debug_check_bounds::<DeauthenticateConfirm>(offset);
3214 unsafe {
3215 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3217 (buf_ptr as *mut DeauthenticateConfirm)
3218 .write_unaligned((self as *const DeauthenticateConfirm).read());
3219 }
3222 Ok(())
3223 }
3224 }
3225 unsafe impl<
3226 D: fidl::encoding::ResourceDialect,
3227 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
3228 > fidl::encoding::Encode<DeauthenticateConfirm, D> for (T0,)
3229 {
3230 #[inline]
3231 unsafe fn encode(
3232 self,
3233 encoder: &mut fidl::encoding::Encoder<'_, D>,
3234 offset: usize,
3235 depth: fidl::encoding::Depth,
3236 ) -> fidl::Result<()> {
3237 encoder.debug_check_bounds::<DeauthenticateConfirm>(offset);
3238 self.0.encode(encoder, offset + 0, depth)?;
3242 Ok(())
3243 }
3244 }
3245
3246 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeauthenticateConfirm {
3247 #[inline(always)]
3248 fn new_empty() -> Self {
3249 Self { peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D) }
3250 }
3251
3252 #[inline]
3253 unsafe fn decode(
3254 &mut self,
3255 decoder: &mut fidl::encoding::Decoder<'_, D>,
3256 offset: usize,
3257 _depth: fidl::encoding::Depth,
3258 ) -> fidl::Result<()> {
3259 decoder.debug_check_bounds::<Self>(offset);
3260 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3261 unsafe {
3264 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
3265 }
3266 Ok(())
3267 }
3268 }
3269
3270 impl fidl::encoding::ValueTypeMarker for DeauthenticateIndication {
3271 type Borrowed<'a> = &'a Self;
3272 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3273 value
3274 }
3275 }
3276
3277 unsafe impl fidl::encoding::TypeMarker for DeauthenticateIndication {
3278 type Owned = Self;
3279
3280 #[inline(always)]
3281 fn inline_align(_context: fidl::encoding::Context) -> usize {
3282 2
3283 }
3284
3285 #[inline(always)]
3286 fn inline_size(_context: fidl::encoding::Context) -> usize {
3287 10
3288 }
3289 }
3290
3291 unsafe impl<D: fidl::encoding::ResourceDialect>
3292 fidl::encoding::Encode<DeauthenticateIndication, D> for &DeauthenticateIndication
3293 {
3294 #[inline]
3295 unsafe fn encode(
3296 self,
3297 encoder: &mut fidl::encoding::Encoder<'_, D>,
3298 offset: usize,
3299 _depth: fidl::encoding::Depth,
3300 ) -> fidl::Result<()> {
3301 encoder.debug_check_bounds::<DeauthenticateIndication>(offset);
3302 fidl::encoding::Encode::<DeauthenticateIndication, D>::encode(
3304 (
3305 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
3306 <fidl_fuchsia_wlan_ieee80211::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow(&self.reason_code),
3307 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.locally_initiated),
3308 ),
3309 encoder, offset, _depth
3310 )
3311 }
3312 }
3313 unsafe impl<
3314 D: fidl::encoding::ResourceDialect,
3315 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
3316 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::ReasonCode, D>,
3317 T2: fidl::encoding::Encode<bool, D>,
3318 > fidl::encoding::Encode<DeauthenticateIndication, D> for (T0, T1, T2)
3319 {
3320 #[inline]
3321 unsafe fn encode(
3322 self,
3323 encoder: &mut fidl::encoding::Encoder<'_, D>,
3324 offset: usize,
3325 depth: fidl::encoding::Depth,
3326 ) -> fidl::Result<()> {
3327 encoder.debug_check_bounds::<DeauthenticateIndication>(offset);
3328 unsafe {
3331 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
3332 (ptr as *mut u16).write_unaligned(0);
3333 }
3334 self.0.encode(encoder, offset + 0, depth)?;
3336 self.1.encode(encoder, offset + 6, depth)?;
3337 self.2.encode(encoder, offset + 8, depth)?;
3338 Ok(())
3339 }
3340 }
3341
3342 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3343 for DeauthenticateIndication
3344 {
3345 #[inline(always)]
3346 fn new_empty() -> Self {
3347 Self {
3348 peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
3349 reason_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::ReasonCode, D),
3350 locally_initiated: fidl::new_empty!(bool, D),
3351 }
3352 }
3353
3354 #[inline]
3355 unsafe fn decode(
3356 &mut self,
3357 decoder: &mut fidl::encoding::Decoder<'_, D>,
3358 offset: usize,
3359 _depth: fidl::encoding::Depth,
3360 ) -> fidl::Result<()> {
3361 decoder.debug_check_bounds::<Self>(offset);
3362 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3364 let padval = unsafe { (ptr as *const u16).read_unaligned() };
3365 let mask = 0xff00u16;
3366 let maskedval = padval & mask;
3367 if maskedval != 0 {
3368 return Err(fidl::Error::NonZeroPadding {
3369 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3370 });
3371 }
3372 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
3373 fidl::decode!(
3374 fidl_fuchsia_wlan_ieee80211::ReasonCode,
3375 D,
3376 &mut self.reason_code,
3377 decoder,
3378 offset + 6,
3379 _depth
3380 )?;
3381 fidl::decode!(bool, D, &mut self.locally_initiated, decoder, offset + 8, _depth)?;
3382 Ok(())
3383 }
3384 }
3385
3386 impl fidl::encoding::ValueTypeMarker for DeauthenticateRequest {
3387 type Borrowed<'a> = &'a Self;
3388 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3389 value
3390 }
3391 }
3392
3393 unsafe impl fidl::encoding::TypeMarker for DeauthenticateRequest {
3394 type Owned = Self;
3395
3396 #[inline(always)]
3397 fn inline_align(_context: fidl::encoding::Context) -> usize {
3398 2
3399 }
3400
3401 #[inline(always)]
3402 fn inline_size(_context: fidl::encoding::Context) -> usize {
3403 8
3404 }
3405 }
3406
3407 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeauthenticateRequest, D>
3408 for &DeauthenticateRequest
3409 {
3410 #[inline]
3411 unsafe fn encode(
3412 self,
3413 encoder: &mut fidl::encoding::Encoder<'_, D>,
3414 offset: usize,
3415 _depth: fidl::encoding::Depth,
3416 ) -> fidl::Result<()> {
3417 encoder.debug_check_bounds::<DeauthenticateRequest>(offset);
3418 fidl::encoding::Encode::<DeauthenticateRequest, D>::encode(
3420 (
3421 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
3422 <fidl_fuchsia_wlan_ieee80211::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow(&self.reason_code),
3423 ),
3424 encoder, offset, _depth
3425 )
3426 }
3427 }
3428 unsafe impl<
3429 D: fidl::encoding::ResourceDialect,
3430 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
3431 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::ReasonCode, D>,
3432 > fidl::encoding::Encode<DeauthenticateRequest, D> for (T0, T1)
3433 {
3434 #[inline]
3435 unsafe fn encode(
3436 self,
3437 encoder: &mut fidl::encoding::Encoder<'_, D>,
3438 offset: usize,
3439 depth: fidl::encoding::Depth,
3440 ) -> fidl::Result<()> {
3441 encoder.debug_check_bounds::<DeauthenticateRequest>(offset);
3442 self.0.encode(encoder, offset + 0, depth)?;
3446 self.1.encode(encoder, offset + 6, depth)?;
3447 Ok(())
3448 }
3449 }
3450
3451 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeauthenticateRequest {
3452 #[inline(always)]
3453 fn new_empty() -> Self {
3454 Self {
3455 peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
3456 reason_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::ReasonCode, D),
3457 }
3458 }
3459
3460 #[inline]
3461 unsafe fn decode(
3462 &mut self,
3463 decoder: &mut fidl::encoding::Decoder<'_, D>,
3464 offset: usize,
3465 _depth: fidl::encoding::Depth,
3466 ) -> fidl::Result<()> {
3467 decoder.debug_check_bounds::<Self>(offset);
3468 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
3470 fidl::decode!(
3471 fidl_fuchsia_wlan_ieee80211::ReasonCode,
3472 D,
3473 &mut self.reason_code,
3474 decoder,
3475 offset + 6,
3476 _depth
3477 )?;
3478 Ok(())
3479 }
3480 }
3481
3482 impl fidl::encoding::ValueTypeMarker for DeleteKeyDescriptor {
3483 type Borrowed<'a> = &'a Self;
3484 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3485 value
3486 }
3487 }
3488
3489 unsafe impl fidl::encoding::TypeMarker for DeleteKeyDescriptor {
3490 type Owned = Self;
3491
3492 #[inline(always)]
3493 fn inline_align(_context: fidl::encoding::Context) -> usize {
3494 4
3495 }
3496
3497 #[inline(always)]
3498 fn inline_size(_context: fidl::encoding::Context) -> usize {
3499 16
3500 }
3501 }
3502
3503 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeleteKeyDescriptor, D>
3504 for &DeleteKeyDescriptor
3505 {
3506 #[inline]
3507 unsafe fn encode(
3508 self,
3509 encoder: &mut fidl::encoding::Encoder<'_, D>,
3510 offset: usize,
3511 _depth: fidl::encoding::Depth,
3512 ) -> fidl::Result<()> {
3513 encoder.debug_check_bounds::<DeleteKeyDescriptor>(offset);
3514 fidl::encoding::Encode::<DeleteKeyDescriptor, D>::encode(
3516 (
3517 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.key_id),
3518 <KeyType as fidl::encoding::ValueTypeMarker>::borrow(&self.key_type),
3519 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
3520 &self.address,
3521 ),
3522 ),
3523 encoder,
3524 offset,
3525 _depth,
3526 )
3527 }
3528 }
3529 unsafe impl<
3530 D: fidl::encoding::ResourceDialect,
3531 T0: fidl::encoding::Encode<u16, D>,
3532 T1: fidl::encoding::Encode<KeyType, D>,
3533 T2: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
3534 > fidl::encoding::Encode<DeleteKeyDescriptor, D> for (T0, T1, T2)
3535 {
3536 #[inline]
3537 unsafe fn encode(
3538 self,
3539 encoder: &mut fidl::encoding::Encoder<'_, D>,
3540 offset: usize,
3541 depth: fidl::encoding::Depth,
3542 ) -> fidl::Result<()> {
3543 encoder.debug_check_bounds::<DeleteKeyDescriptor>(offset);
3544 unsafe {
3547 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
3548 (ptr as *mut u32).write_unaligned(0);
3549 }
3550 unsafe {
3551 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(12);
3552 (ptr as *mut u32).write_unaligned(0);
3553 }
3554 self.0.encode(encoder, offset + 0, depth)?;
3556 self.1.encode(encoder, offset + 4, depth)?;
3557 self.2.encode(encoder, offset + 8, depth)?;
3558 Ok(())
3559 }
3560 }
3561
3562 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeleteKeyDescriptor {
3563 #[inline(always)]
3564 fn new_empty() -> Self {
3565 Self {
3566 key_id: fidl::new_empty!(u16, D),
3567 key_type: fidl::new_empty!(KeyType, D),
3568 address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
3569 }
3570 }
3571
3572 #[inline]
3573 unsafe fn decode(
3574 &mut self,
3575 decoder: &mut fidl::encoding::Decoder<'_, D>,
3576 offset: usize,
3577 _depth: fidl::encoding::Depth,
3578 ) -> fidl::Result<()> {
3579 decoder.debug_check_bounds::<Self>(offset);
3580 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
3582 let padval = unsafe { (ptr as *const u32).read_unaligned() };
3583 let mask = 0xffff0000u32;
3584 let maskedval = padval & mask;
3585 if maskedval != 0 {
3586 return Err(fidl::Error::NonZeroPadding {
3587 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
3588 });
3589 }
3590 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(12) };
3591 let padval = unsafe { (ptr as *const u32).read_unaligned() };
3592 let mask = 0xffff0000u32;
3593 let maskedval = padval & mask;
3594 if maskedval != 0 {
3595 return Err(fidl::Error::NonZeroPadding {
3596 padding_start: offset + 12 + ((mask as u64).trailing_zeros() / 8) as usize,
3597 });
3598 }
3599 fidl::decode!(u16, D, &mut self.key_id, decoder, offset + 0, _depth)?;
3600 fidl::decode!(KeyType, D, &mut self.key_type, decoder, offset + 4, _depth)?;
3601 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.address, decoder, offset + 8, _depth)?;
3602 Ok(())
3603 }
3604 }
3605
3606 impl fidl::encoding::ValueTypeMarker for DeleteKeysRequest {
3607 type Borrowed<'a> = &'a Self;
3608 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3609 value
3610 }
3611 }
3612
3613 unsafe impl fidl::encoding::TypeMarker for DeleteKeysRequest {
3614 type Owned = Self;
3615
3616 #[inline(always)]
3617 fn inline_align(_context: fidl::encoding::Context) -> usize {
3618 8
3619 }
3620
3621 #[inline(always)]
3622 fn inline_size(_context: fidl::encoding::Context) -> usize {
3623 16
3624 }
3625 }
3626
3627 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeleteKeysRequest, D>
3628 for &DeleteKeysRequest
3629 {
3630 #[inline]
3631 unsafe fn encode(
3632 self,
3633 encoder: &mut fidl::encoding::Encoder<'_, D>,
3634 offset: usize,
3635 _depth: fidl::encoding::Depth,
3636 ) -> fidl::Result<()> {
3637 encoder.debug_check_bounds::<DeleteKeysRequest>(offset);
3638 fidl::encoding::Encode::<DeleteKeysRequest, D>::encode(
3640 (
3641 <fidl::encoding::UnboundedVector<DeleteKeyDescriptor> as fidl::encoding::ValueTypeMarker>::borrow(&self.keylist),
3642 ),
3643 encoder, offset, _depth
3644 )
3645 }
3646 }
3647 unsafe impl<
3648 D: fidl::encoding::ResourceDialect,
3649 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<DeleteKeyDescriptor>, D>,
3650 > fidl::encoding::Encode<DeleteKeysRequest, D> for (T0,)
3651 {
3652 #[inline]
3653 unsafe fn encode(
3654 self,
3655 encoder: &mut fidl::encoding::Encoder<'_, D>,
3656 offset: usize,
3657 depth: fidl::encoding::Depth,
3658 ) -> fidl::Result<()> {
3659 encoder.debug_check_bounds::<DeleteKeysRequest>(offset);
3660 self.0.encode(encoder, offset + 0, depth)?;
3664 Ok(())
3665 }
3666 }
3667
3668 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeleteKeysRequest {
3669 #[inline(always)]
3670 fn new_empty() -> Self {
3671 Self {
3672 keylist: fidl::new_empty!(fidl::encoding::UnboundedVector<DeleteKeyDescriptor>, D),
3673 }
3674 }
3675
3676 #[inline]
3677 unsafe fn decode(
3678 &mut self,
3679 decoder: &mut fidl::encoding::Decoder<'_, D>,
3680 offset: usize,
3681 _depth: fidl::encoding::Depth,
3682 ) -> fidl::Result<()> {
3683 decoder.debug_check_bounds::<Self>(offset);
3684 fidl::decode!(
3686 fidl::encoding::UnboundedVector<DeleteKeyDescriptor>,
3687 D,
3688 &mut self.keylist,
3689 decoder,
3690 offset + 0,
3691 _depth
3692 )?;
3693 Ok(())
3694 }
3695 }
3696
3697 impl fidl::encoding::ValueTypeMarker for DeviceInfo {
3698 type Borrowed<'a> = &'a Self;
3699 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3700 value
3701 }
3702 }
3703
3704 unsafe impl fidl::encoding::TypeMarker for DeviceInfo {
3705 type Owned = Self;
3706
3707 #[inline(always)]
3708 fn inline_align(_context: fidl::encoding::Context) -> usize {
3709 8
3710 }
3711
3712 #[inline(always)]
3713 fn inline_size(_context: fidl::encoding::Context) -> usize {
3714 40
3715 }
3716 }
3717
3718 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeviceInfo, D>
3719 for &DeviceInfo
3720 {
3721 #[inline]
3722 unsafe fn encode(
3723 self,
3724 encoder: &mut fidl::encoding::Encoder<'_, D>,
3725 offset: usize,
3726 _depth: fidl::encoding::Depth,
3727 ) -> fidl::Result<()> {
3728 encoder.debug_check_bounds::<DeviceInfo>(offset);
3729 fidl::encoding::Encode::<DeviceInfo, D>::encode(
3731 (
3732 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.sta_addr),
3733 <fidl_fuchsia_wlan_common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow(&self.role),
3734 <fidl::encoding::Vector<BandCapability, 16> as fidl::encoding::ValueTypeMarker>::borrow(&self.bands),
3735 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.softmac_hardware_capability),
3736 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.qos_capable),
3737 ),
3738 encoder, offset, _depth
3739 )
3740 }
3741 }
3742 unsafe impl<
3743 D: fidl::encoding::ResourceDialect,
3744 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
3745 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanMacRole, D>,
3746 T2: fidl::encoding::Encode<fidl::encoding::Vector<BandCapability, 16>, D>,
3747 T3: fidl::encoding::Encode<u32, D>,
3748 T4: fidl::encoding::Encode<bool, D>,
3749 > fidl::encoding::Encode<DeviceInfo, D> for (T0, T1, T2, T3, T4)
3750 {
3751 #[inline]
3752 unsafe fn encode(
3753 self,
3754 encoder: &mut fidl::encoding::Encoder<'_, D>,
3755 offset: usize,
3756 depth: fidl::encoding::Depth,
3757 ) -> fidl::Result<()> {
3758 encoder.debug_check_bounds::<DeviceInfo>(offset);
3759 unsafe {
3762 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
3763 (ptr as *mut u64).write_unaligned(0);
3764 }
3765 unsafe {
3766 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
3767 (ptr as *mut u64).write_unaligned(0);
3768 }
3769 unsafe {
3770 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
3771 (ptr as *mut u64).write_unaligned(0);
3772 }
3773 self.0.encode(encoder, offset + 0, depth)?;
3775 self.1.encode(encoder, offset + 8, depth)?;
3776 self.2.encode(encoder, offset + 16, depth)?;
3777 self.3.encode(encoder, offset + 32, depth)?;
3778 self.4.encode(encoder, offset + 36, depth)?;
3779 Ok(())
3780 }
3781 }
3782
3783 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeviceInfo {
3784 #[inline(always)]
3785 fn new_empty() -> Self {
3786 Self {
3787 sta_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
3788 role: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanMacRole, D),
3789 bands: fidl::new_empty!(fidl::encoding::Vector<BandCapability, 16>, D),
3790 softmac_hardware_capability: fidl::new_empty!(u32, D),
3791 qos_capable: fidl::new_empty!(bool, D),
3792 }
3793 }
3794
3795 #[inline]
3796 unsafe fn decode(
3797 &mut self,
3798 decoder: &mut fidl::encoding::Decoder<'_, D>,
3799 offset: usize,
3800 _depth: fidl::encoding::Depth,
3801 ) -> fidl::Result<()> {
3802 decoder.debug_check_bounds::<Self>(offset);
3803 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
3805 let padval = unsafe { (ptr as *const u64).read_unaligned() };
3806 let mask = 0xffff000000000000u64;
3807 let maskedval = padval & mask;
3808 if maskedval != 0 {
3809 return Err(fidl::Error::NonZeroPadding {
3810 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
3811 });
3812 }
3813 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3814 let padval = unsafe { (ptr as *const u64).read_unaligned() };
3815 let mask = 0xffffffff00000000u64;
3816 let maskedval = padval & mask;
3817 if maskedval != 0 {
3818 return Err(fidl::Error::NonZeroPadding {
3819 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3820 });
3821 }
3822 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
3823 let padval = unsafe { (ptr as *const u64).read_unaligned() };
3824 let mask = 0xffffff0000000000u64;
3825 let maskedval = padval & mask;
3826 if maskedval != 0 {
3827 return Err(fidl::Error::NonZeroPadding {
3828 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
3829 });
3830 }
3831 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.sta_addr, decoder, offset + 0, _depth)?;
3832 fidl::decode!(
3833 fidl_fuchsia_wlan_common::WlanMacRole,
3834 D,
3835 &mut self.role,
3836 decoder,
3837 offset + 8,
3838 _depth
3839 )?;
3840 fidl::decode!(fidl::encoding::Vector<BandCapability, 16>, D, &mut self.bands, decoder, offset + 16, _depth)?;
3841 fidl::decode!(
3842 u32,
3843 D,
3844 &mut self.softmac_hardware_capability,
3845 decoder,
3846 offset + 32,
3847 _depth
3848 )?;
3849 fidl::decode!(bool, D, &mut self.qos_capable, decoder, offset + 36, _depth)?;
3850 Ok(())
3851 }
3852 }
3853
3854 impl fidl::encoding::ValueTypeMarker for DisassociateConfirm {
3855 type Borrowed<'a> = &'a Self;
3856 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3857 value
3858 }
3859 }
3860
3861 unsafe impl fidl::encoding::TypeMarker for DisassociateConfirm {
3862 type Owned = Self;
3863
3864 #[inline(always)]
3865 fn inline_align(_context: fidl::encoding::Context) -> usize {
3866 4
3867 }
3868
3869 #[inline(always)]
3870 fn inline_size(_context: fidl::encoding::Context) -> usize {
3871 4
3872 }
3873 #[inline(always)]
3874 fn encode_is_copy() -> bool {
3875 true
3876 }
3877
3878 #[inline(always)]
3879 fn decode_is_copy() -> bool {
3880 true
3881 }
3882 }
3883
3884 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisassociateConfirm, D>
3885 for &DisassociateConfirm
3886 {
3887 #[inline]
3888 unsafe fn encode(
3889 self,
3890 encoder: &mut fidl::encoding::Encoder<'_, D>,
3891 offset: usize,
3892 _depth: fidl::encoding::Depth,
3893 ) -> fidl::Result<()> {
3894 encoder.debug_check_bounds::<DisassociateConfirm>(offset);
3895 unsafe {
3896 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3898 (buf_ptr as *mut DisassociateConfirm)
3899 .write_unaligned((self as *const DisassociateConfirm).read());
3900 }
3903 Ok(())
3904 }
3905 }
3906 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
3907 fidl::encoding::Encode<DisassociateConfirm, D> for (T0,)
3908 {
3909 #[inline]
3910 unsafe fn encode(
3911 self,
3912 encoder: &mut fidl::encoding::Encoder<'_, D>,
3913 offset: usize,
3914 depth: fidl::encoding::Depth,
3915 ) -> fidl::Result<()> {
3916 encoder.debug_check_bounds::<DisassociateConfirm>(offset);
3917 self.0.encode(encoder, offset + 0, depth)?;
3921 Ok(())
3922 }
3923 }
3924
3925 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisassociateConfirm {
3926 #[inline(always)]
3927 fn new_empty() -> Self {
3928 Self { status: fidl::new_empty!(i32, D) }
3929 }
3930
3931 #[inline]
3932 unsafe fn decode(
3933 &mut self,
3934 decoder: &mut fidl::encoding::Decoder<'_, D>,
3935 offset: usize,
3936 _depth: fidl::encoding::Depth,
3937 ) -> fidl::Result<()> {
3938 decoder.debug_check_bounds::<Self>(offset);
3939 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3940 unsafe {
3943 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
3944 }
3945 Ok(())
3946 }
3947 }
3948
3949 impl fidl::encoding::ValueTypeMarker for DisassociateIndication {
3950 type Borrowed<'a> = &'a Self;
3951 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3952 value
3953 }
3954 }
3955
3956 unsafe impl fidl::encoding::TypeMarker for DisassociateIndication {
3957 type Owned = Self;
3958
3959 #[inline(always)]
3960 fn inline_align(_context: fidl::encoding::Context) -> usize {
3961 2
3962 }
3963
3964 #[inline(always)]
3965 fn inline_size(_context: fidl::encoding::Context) -> usize {
3966 10
3967 }
3968 }
3969
3970 unsafe impl<D: fidl::encoding::ResourceDialect>
3971 fidl::encoding::Encode<DisassociateIndication, D> for &DisassociateIndication
3972 {
3973 #[inline]
3974 unsafe fn encode(
3975 self,
3976 encoder: &mut fidl::encoding::Encoder<'_, D>,
3977 offset: usize,
3978 _depth: fidl::encoding::Depth,
3979 ) -> fidl::Result<()> {
3980 encoder.debug_check_bounds::<DisassociateIndication>(offset);
3981 fidl::encoding::Encode::<DisassociateIndication, D>::encode(
3983 (
3984 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
3985 <fidl_fuchsia_wlan_ieee80211::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow(&self.reason_code),
3986 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.locally_initiated),
3987 ),
3988 encoder, offset, _depth
3989 )
3990 }
3991 }
3992 unsafe impl<
3993 D: fidl::encoding::ResourceDialect,
3994 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
3995 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::ReasonCode, D>,
3996 T2: fidl::encoding::Encode<bool, D>,
3997 > fidl::encoding::Encode<DisassociateIndication, D> for (T0, T1, T2)
3998 {
3999 #[inline]
4000 unsafe fn encode(
4001 self,
4002 encoder: &mut fidl::encoding::Encoder<'_, D>,
4003 offset: usize,
4004 depth: fidl::encoding::Depth,
4005 ) -> fidl::Result<()> {
4006 encoder.debug_check_bounds::<DisassociateIndication>(offset);
4007 unsafe {
4010 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
4011 (ptr as *mut u16).write_unaligned(0);
4012 }
4013 self.0.encode(encoder, offset + 0, depth)?;
4015 self.1.encode(encoder, offset + 6, depth)?;
4016 self.2.encode(encoder, offset + 8, depth)?;
4017 Ok(())
4018 }
4019 }
4020
4021 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4022 for DisassociateIndication
4023 {
4024 #[inline(always)]
4025 fn new_empty() -> Self {
4026 Self {
4027 peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4028 reason_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::ReasonCode, D),
4029 locally_initiated: fidl::new_empty!(bool, D),
4030 }
4031 }
4032
4033 #[inline]
4034 unsafe fn decode(
4035 &mut self,
4036 decoder: &mut fidl::encoding::Decoder<'_, D>,
4037 offset: usize,
4038 _depth: fidl::encoding::Depth,
4039 ) -> fidl::Result<()> {
4040 decoder.debug_check_bounds::<Self>(offset);
4041 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
4043 let padval = unsafe { (ptr as *const u16).read_unaligned() };
4044 let mask = 0xff00u16;
4045 let maskedval = padval & mask;
4046 if maskedval != 0 {
4047 return Err(fidl::Error::NonZeroPadding {
4048 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
4049 });
4050 }
4051 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
4052 fidl::decode!(
4053 fidl_fuchsia_wlan_ieee80211::ReasonCode,
4054 D,
4055 &mut self.reason_code,
4056 decoder,
4057 offset + 6,
4058 _depth
4059 )?;
4060 fidl::decode!(bool, D, &mut self.locally_initiated, decoder, offset + 8, _depth)?;
4061 Ok(())
4062 }
4063 }
4064
4065 impl fidl::encoding::ValueTypeMarker for DisassociateRequest {
4066 type Borrowed<'a> = &'a Self;
4067 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4068 value
4069 }
4070 }
4071
4072 unsafe impl fidl::encoding::TypeMarker for DisassociateRequest {
4073 type Owned = Self;
4074
4075 #[inline(always)]
4076 fn inline_align(_context: fidl::encoding::Context) -> usize {
4077 2
4078 }
4079
4080 #[inline(always)]
4081 fn inline_size(_context: fidl::encoding::Context) -> usize {
4082 8
4083 }
4084 }
4085
4086 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisassociateRequest, D>
4087 for &DisassociateRequest
4088 {
4089 #[inline]
4090 unsafe fn encode(
4091 self,
4092 encoder: &mut fidl::encoding::Encoder<'_, D>,
4093 offset: usize,
4094 _depth: fidl::encoding::Depth,
4095 ) -> fidl::Result<()> {
4096 encoder.debug_check_bounds::<DisassociateRequest>(offset);
4097 fidl::encoding::Encode::<DisassociateRequest, D>::encode(
4099 (
4100 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
4101 <fidl_fuchsia_wlan_ieee80211::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow(&self.reason_code),
4102 ),
4103 encoder, offset, _depth
4104 )
4105 }
4106 }
4107 unsafe impl<
4108 D: fidl::encoding::ResourceDialect,
4109 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4110 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::ReasonCode, D>,
4111 > fidl::encoding::Encode<DisassociateRequest, D> for (T0, T1)
4112 {
4113 #[inline]
4114 unsafe fn encode(
4115 self,
4116 encoder: &mut fidl::encoding::Encoder<'_, D>,
4117 offset: usize,
4118 depth: fidl::encoding::Depth,
4119 ) -> fidl::Result<()> {
4120 encoder.debug_check_bounds::<DisassociateRequest>(offset);
4121 self.0.encode(encoder, offset + 0, depth)?;
4125 self.1.encode(encoder, offset + 6, depth)?;
4126 Ok(())
4127 }
4128 }
4129
4130 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisassociateRequest {
4131 #[inline(always)]
4132 fn new_empty() -> Self {
4133 Self {
4134 peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4135 reason_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::ReasonCode, D),
4136 }
4137 }
4138
4139 #[inline]
4140 unsafe fn decode(
4141 &mut self,
4142 decoder: &mut fidl::encoding::Decoder<'_, D>,
4143 offset: usize,
4144 _depth: fidl::encoding::Depth,
4145 ) -> fidl::Result<()> {
4146 decoder.debug_check_bounds::<Self>(offset);
4147 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
4149 fidl::decode!(
4150 fidl_fuchsia_wlan_ieee80211::ReasonCode,
4151 D,
4152 &mut self.reason_code,
4153 decoder,
4154 offset + 6,
4155 _depth
4156 )?;
4157 Ok(())
4158 }
4159 }
4160
4161 impl fidl::encoding::ValueTypeMarker for EapolConfirm {
4162 type Borrowed<'a> = &'a Self;
4163 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4164 value
4165 }
4166 }
4167
4168 unsafe impl fidl::encoding::TypeMarker for EapolConfirm {
4169 type Owned = Self;
4170
4171 #[inline(always)]
4172 fn inline_align(_context: fidl::encoding::Context) -> usize {
4173 4
4174 }
4175
4176 #[inline(always)]
4177 fn inline_size(_context: fidl::encoding::Context) -> usize {
4178 12
4179 }
4180 }
4181
4182 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EapolConfirm, D>
4183 for &EapolConfirm
4184 {
4185 #[inline]
4186 unsafe fn encode(
4187 self,
4188 encoder: &mut fidl::encoding::Encoder<'_, D>,
4189 offset: usize,
4190 _depth: fidl::encoding::Depth,
4191 ) -> fidl::Result<()> {
4192 encoder.debug_check_bounds::<EapolConfirm>(offset);
4193 fidl::encoding::Encode::<EapolConfirm, D>::encode(
4195 (
4196 <EapolResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.result_code),
4197 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
4198 &self.dst_addr,
4199 ),
4200 ),
4201 encoder,
4202 offset,
4203 _depth,
4204 )
4205 }
4206 }
4207 unsafe impl<
4208 D: fidl::encoding::ResourceDialect,
4209 T0: fidl::encoding::Encode<EapolResultCode, D>,
4210 T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4211 > fidl::encoding::Encode<EapolConfirm, D> for (T0, T1)
4212 {
4213 #[inline]
4214 unsafe fn encode(
4215 self,
4216 encoder: &mut fidl::encoding::Encoder<'_, D>,
4217 offset: usize,
4218 depth: fidl::encoding::Depth,
4219 ) -> fidl::Result<()> {
4220 encoder.debug_check_bounds::<EapolConfirm>(offset);
4221 unsafe {
4224 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
4225 (ptr as *mut u32).write_unaligned(0);
4226 }
4227 self.0.encode(encoder, offset + 0, depth)?;
4229 self.1.encode(encoder, offset + 4, depth)?;
4230 Ok(())
4231 }
4232 }
4233
4234 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EapolConfirm {
4235 #[inline(always)]
4236 fn new_empty() -> Self {
4237 Self {
4238 result_code: fidl::new_empty!(EapolResultCode, D),
4239 dst_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4240 }
4241 }
4242
4243 #[inline]
4244 unsafe fn decode(
4245 &mut self,
4246 decoder: &mut fidl::encoding::Decoder<'_, D>,
4247 offset: usize,
4248 _depth: fidl::encoding::Depth,
4249 ) -> fidl::Result<()> {
4250 decoder.debug_check_bounds::<Self>(offset);
4251 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
4253 let padval = unsafe { (ptr as *const u32).read_unaligned() };
4254 let mask = 0xffff0000u32;
4255 let maskedval = padval & mask;
4256 if maskedval != 0 {
4257 return Err(fidl::Error::NonZeroPadding {
4258 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
4259 });
4260 }
4261 fidl::decode!(EapolResultCode, D, &mut self.result_code, decoder, offset + 0, _depth)?;
4262 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.dst_addr, decoder, offset + 4, _depth)?;
4263 Ok(())
4264 }
4265 }
4266
4267 impl fidl::encoding::ValueTypeMarker for EapolIndication {
4268 type Borrowed<'a> = &'a Self;
4269 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4270 value
4271 }
4272 }
4273
4274 unsafe impl fidl::encoding::TypeMarker for EapolIndication {
4275 type Owned = Self;
4276
4277 #[inline(always)]
4278 fn inline_align(_context: fidl::encoding::Context) -> usize {
4279 8
4280 }
4281
4282 #[inline(always)]
4283 fn inline_size(_context: fidl::encoding::Context) -> usize {
4284 32
4285 }
4286 }
4287
4288 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EapolIndication, D>
4289 for &EapolIndication
4290 {
4291 #[inline]
4292 unsafe fn encode(
4293 self,
4294 encoder: &mut fidl::encoding::Encoder<'_, D>,
4295 offset: usize,
4296 _depth: fidl::encoding::Depth,
4297 ) -> fidl::Result<()> {
4298 encoder.debug_check_bounds::<EapolIndication>(offset);
4299 fidl::encoding::Encode::<EapolIndication, D>::encode(
4301 (
4302 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.src_addr),
4303 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.dst_addr),
4304 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
4305 ),
4306 encoder, offset, _depth
4307 )
4308 }
4309 }
4310 unsafe impl<
4311 D: fidl::encoding::ResourceDialect,
4312 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4313 T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4314 T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
4315 > fidl::encoding::Encode<EapolIndication, D> for (T0, T1, T2)
4316 {
4317 #[inline]
4318 unsafe fn encode(
4319 self,
4320 encoder: &mut fidl::encoding::Encoder<'_, D>,
4321 offset: usize,
4322 depth: fidl::encoding::Depth,
4323 ) -> fidl::Result<()> {
4324 encoder.debug_check_bounds::<EapolIndication>(offset);
4325 unsafe {
4328 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
4329 (ptr as *mut u64).write_unaligned(0);
4330 }
4331 self.0.encode(encoder, offset + 0, depth)?;
4333 self.1.encode(encoder, offset + 6, depth)?;
4334 self.2.encode(encoder, offset + 16, depth)?;
4335 Ok(())
4336 }
4337 }
4338
4339 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EapolIndication {
4340 #[inline(always)]
4341 fn new_empty() -> Self {
4342 Self {
4343 src_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4344 dst_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4345 data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
4346 }
4347 }
4348
4349 #[inline]
4350 unsafe fn decode(
4351 &mut self,
4352 decoder: &mut fidl::encoding::Decoder<'_, D>,
4353 offset: usize,
4354 _depth: fidl::encoding::Depth,
4355 ) -> fidl::Result<()> {
4356 decoder.debug_check_bounds::<Self>(offset);
4357 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
4359 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4360 let mask = 0xffffffff00000000u64;
4361 let maskedval = padval & mask;
4362 if maskedval != 0 {
4363 return Err(fidl::Error::NonZeroPadding {
4364 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
4365 });
4366 }
4367 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.src_addr, decoder, offset + 0, _depth)?;
4368 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.dst_addr, decoder, offset + 6, _depth)?;
4369 fidl::decode!(
4370 fidl::encoding::UnboundedVector<u8>,
4371 D,
4372 &mut self.data,
4373 decoder,
4374 offset + 16,
4375 _depth
4376 )?;
4377 Ok(())
4378 }
4379 }
4380
4381 impl fidl::encoding::ValueTypeMarker for EapolRequest {
4382 type Borrowed<'a> = &'a Self;
4383 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4384 value
4385 }
4386 }
4387
4388 unsafe impl fidl::encoding::TypeMarker for EapolRequest {
4389 type Owned = Self;
4390
4391 #[inline(always)]
4392 fn inline_align(_context: fidl::encoding::Context) -> usize {
4393 8
4394 }
4395
4396 #[inline(always)]
4397 fn inline_size(_context: fidl::encoding::Context) -> usize {
4398 32
4399 }
4400 }
4401
4402 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EapolRequest, D>
4403 for &EapolRequest
4404 {
4405 #[inline]
4406 unsafe fn encode(
4407 self,
4408 encoder: &mut fidl::encoding::Encoder<'_, D>,
4409 offset: usize,
4410 _depth: fidl::encoding::Depth,
4411 ) -> fidl::Result<()> {
4412 encoder.debug_check_bounds::<EapolRequest>(offset);
4413 fidl::encoding::Encode::<EapolRequest, D>::encode(
4415 (
4416 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.src_addr),
4417 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.dst_addr),
4418 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.data),
4419 ),
4420 encoder, offset, _depth
4421 )
4422 }
4423 }
4424 unsafe impl<
4425 D: fidl::encoding::ResourceDialect,
4426 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4427 T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4428 T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
4429 > fidl::encoding::Encode<EapolRequest, D> for (T0, T1, T2)
4430 {
4431 #[inline]
4432 unsafe fn encode(
4433 self,
4434 encoder: &mut fidl::encoding::Encoder<'_, D>,
4435 offset: usize,
4436 depth: fidl::encoding::Depth,
4437 ) -> fidl::Result<()> {
4438 encoder.debug_check_bounds::<EapolRequest>(offset);
4439 unsafe {
4442 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
4443 (ptr as *mut u64).write_unaligned(0);
4444 }
4445 self.0.encode(encoder, offset + 0, depth)?;
4447 self.1.encode(encoder, offset + 6, depth)?;
4448 self.2.encode(encoder, offset + 16, depth)?;
4449 Ok(())
4450 }
4451 }
4452
4453 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EapolRequest {
4454 #[inline(always)]
4455 fn new_empty() -> Self {
4456 Self {
4457 src_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4458 dst_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
4459 data: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
4460 }
4461 }
4462
4463 #[inline]
4464 unsafe fn decode(
4465 &mut self,
4466 decoder: &mut fidl::encoding::Decoder<'_, D>,
4467 offset: usize,
4468 _depth: fidl::encoding::Depth,
4469 ) -> fidl::Result<()> {
4470 decoder.debug_check_bounds::<Self>(offset);
4471 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
4473 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4474 let mask = 0xffffffff00000000u64;
4475 let maskedval = padval & mask;
4476 if maskedval != 0 {
4477 return Err(fidl::Error::NonZeroPadding {
4478 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
4479 });
4480 }
4481 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.src_addr, decoder, offset + 0, _depth)?;
4482 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.dst_addr, decoder, offset + 6, _depth)?;
4483 fidl::decode!(
4484 fidl::encoding::UnboundedVector<u8>,
4485 D,
4486 &mut self.data,
4487 decoder,
4488 offset + 16,
4489 _depth
4490 )?;
4491 Ok(())
4492 }
4493 }
4494
4495 impl fidl::encoding::ValueTypeMarker for MlmeQueryTelemetrySupportResponse {
4496 type Borrowed<'a> = &'a Self;
4497 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4498 value
4499 }
4500 }
4501
4502 unsafe impl fidl::encoding::TypeMarker for MlmeQueryTelemetrySupportResponse {
4503 type Owned = Self;
4504
4505 #[inline(always)]
4506 fn inline_align(_context: fidl::encoding::Context) -> usize {
4507 8
4508 }
4509
4510 #[inline(always)]
4511 fn inline_size(_context: fidl::encoding::Context) -> usize {
4512 16
4513 }
4514 }
4515
4516 unsafe impl<D: fidl::encoding::ResourceDialect>
4517 fidl::encoding::Encode<MlmeQueryTelemetrySupportResponse, D>
4518 for &MlmeQueryTelemetrySupportResponse
4519 {
4520 #[inline]
4521 unsafe fn encode(
4522 self,
4523 encoder: &mut fidl::encoding::Encoder<'_, D>,
4524 offset: usize,
4525 _depth: fidl::encoding::Depth,
4526 ) -> fidl::Result<()> {
4527 encoder.debug_check_bounds::<MlmeQueryTelemetrySupportResponse>(offset);
4528 fidl::encoding::Encode::<MlmeQueryTelemetrySupportResponse, D>::encode(
4530 (
4531 <fidl_fuchsia_wlan_stats::TelemetrySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
4532 ),
4533 encoder, offset, _depth
4534 )
4535 }
4536 }
4537 unsafe impl<
4538 D: fidl::encoding::ResourceDialect,
4539 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats::TelemetrySupport, D>,
4540 > fidl::encoding::Encode<MlmeQueryTelemetrySupportResponse, D> for (T0,)
4541 {
4542 #[inline]
4543 unsafe fn encode(
4544 self,
4545 encoder: &mut fidl::encoding::Encoder<'_, D>,
4546 offset: usize,
4547 depth: fidl::encoding::Depth,
4548 ) -> fidl::Result<()> {
4549 encoder.debug_check_bounds::<MlmeQueryTelemetrySupportResponse>(offset);
4550 self.0.encode(encoder, offset + 0, depth)?;
4554 Ok(())
4555 }
4556 }
4557
4558 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4559 for MlmeQueryTelemetrySupportResponse
4560 {
4561 #[inline(always)]
4562 fn new_empty() -> Self {
4563 Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_stats::TelemetrySupport, D) }
4564 }
4565
4566 #[inline]
4567 unsafe fn decode(
4568 &mut self,
4569 decoder: &mut fidl::encoding::Decoder<'_, D>,
4570 offset: usize,
4571 _depth: fidl::encoding::Depth,
4572 ) -> fidl::Result<()> {
4573 decoder.debug_check_bounds::<Self>(offset);
4574 fidl::decode!(
4576 fidl_fuchsia_wlan_stats::TelemetrySupport,
4577 D,
4578 &mut self.resp,
4579 decoder,
4580 offset + 0,
4581 _depth
4582 )?;
4583 Ok(())
4584 }
4585 }
4586
4587 impl fidl::encoding::ValueTypeMarker for MinstrelListResponse {
4588 type Borrowed<'a> = &'a Self;
4589 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4590 value
4591 }
4592 }
4593
4594 unsafe impl fidl::encoding::TypeMarker for MinstrelListResponse {
4595 type Owned = Self;
4596
4597 #[inline(always)]
4598 fn inline_align(_context: fidl::encoding::Context) -> usize {
4599 8
4600 }
4601
4602 #[inline(always)]
4603 fn inline_size(_context: fidl::encoding::Context) -> usize {
4604 16
4605 }
4606 }
4607
4608 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MinstrelListResponse, D>
4609 for &MinstrelListResponse
4610 {
4611 #[inline]
4612 unsafe fn encode(
4613 self,
4614 encoder: &mut fidl::encoding::Encoder<'_, D>,
4615 offset: usize,
4616 _depth: fidl::encoding::Depth,
4617 ) -> fidl::Result<()> {
4618 encoder.debug_check_bounds::<MinstrelListResponse>(offset);
4619 fidl::encoding::Encode::<MinstrelListResponse, D>::encode(
4621 (<fidl_fuchsia_wlan_minstrel::Peers as fidl::encoding::ValueTypeMarker>::borrow(
4622 &self.peers,
4623 ),),
4624 encoder,
4625 offset,
4626 _depth,
4627 )
4628 }
4629 }
4630 unsafe impl<
4631 D: fidl::encoding::ResourceDialect,
4632 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_minstrel::Peers, D>,
4633 > fidl::encoding::Encode<MinstrelListResponse, D> for (T0,)
4634 {
4635 #[inline]
4636 unsafe fn encode(
4637 self,
4638 encoder: &mut fidl::encoding::Encoder<'_, D>,
4639 offset: usize,
4640 depth: fidl::encoding::Depth,
4641 ) -> fidl::Result<()> {
4642 encoder.debug_check_bounds::<MinstrelListResponse>(offset);
4643 self.0.encode(encoder, offset + 0, depth)?;
4647 Ok(())
4648 }
4649 }
4650
4651 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MinstrelListResponse {
4652 #[inline(always)]
4653 fn new_empty() -> Self {
4654 Self { peers: fidl::new_empty!(fidl_fuchsia_wlan_minstrel::Peers, D) }
4655 }
4656
4657 #[inline]
4658 unsafe fn decode(
4659 &mut self,
4660 decoder: &mut fidl::encoding::Decoder<'_, D>,
4661 offset: usize,
4662 _depth: fidl::encoding::Depth,
4663 ) -> fidl::Result<()> {
4664 decoder.debug_check_bounds::<Self>(offset);
4665 fidl::decode!(
4667 fidl_fuchsia_wlan_minstrel::Peers,
4668 D,
4669 &mut self.peers,
4670 decoder,
4671 offset + 0,
4672 _depth
4673 )?;
4674 Ok(())
4675 }
4676 }
4677
4678 impl fidl::encoding::ValueTypeMarker for MinstrelStatsRequest {
4679 type Borrowed<'a> = &'a Self;
4680 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4681 value
4682 }
4683 }
4684
4685 unsafe impl fidl::encoding::TypeMarker for MinstrelStatsRequest {
4686 type Owned = Self;
4687
4688 #[inline(always)]
4689 fn inline_align(_context: fidl::encoding::Context) -> usize {
4690 1
4691 }
4692
4693 #[inline(always)]
4694 fn inline_size(_context: fidl::encoding::Context) -> usize {
4695 6
4696 }
4697 #[inline(always)]
4698 fn encode_is_copy() -> bool {
4699 true
4700 }
4701
4702 #[inline(always)]
4703 fn decode_is_copy() -> bool {
4704 true
4705 }
4706 }
4707
4708 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MinstrelStatsRequest, D>
4709 for &MinstrelStatsRequest
4710 {
4711 #[inline]
4712 unsafe fn encode(
4713 self,
4714 encoder: &mut fidl::encoding::Encoder<'_, D>,
4715 offset: usize,
4716 _depth: fidl::encoding::Depth,
4717 ) -> fidl::Result<()> {
4718 encoder.debug_check_bounds::<MinstrelStatsRequest>(offset);
4719 unsafe {
4720 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4722 (buf_ptr as *mut MinstrelStatsRequest)
4723 .write_unaligned((self as *const MinstrelStatsRequest).read());
4724 }
4727 Ok(())
4728 }
4729 }
4730 unsafe impl<
4731 D: fidl::encoding::ResourceDialect,
4732 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
4733 > fidl::encoding::Encode<MinstrelStatsRequest, D> for (T0,)
4734 {
4735 #[inline]
4736 unsafe fn encode(
4737 self,
4738 encoder: &mut fidl::encoding::Encoder<'_, D>,
4739 offset: usize,
4740 depth: fidl::encoding::Depth,
4741 ) -> fidl::Result<()> {
4742 encoder.debug_check_bounds::<MinstrelStatsRequest>(offset);
4743 self.0.encode(encoder, offset + 0, depth)?;
4747 Ok(())
4748 }
4749 }
4750
4751 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MinstrelStatsRequest {
4752 #[inline(always)]
4753 fn new_empty() -> Self {
4754 Self { peer_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D) }
4755 }
4756
4757 #[inline]
4758 unsafe fn decode(
4759 &mut self,
4760 decoder: &mut fidl::encoding::Decoder<'_, D>,
4761 offset: usize,
4762 _depth: fidl::encoding::Depth,
4763 ) -> fidl::Result<()> {
4764 decoder.debug_check_bounds::<Self>(offset);
4765 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4766 unsafe {
4769 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
4770 }
4771 Ok(())
4772 }
4773 }
4774
4775 impl fidl::encoding::ValueTypeMarker for MinstrelStatsResponse {
4776 type Borrowed<'a> = &'a Self;
4777 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4778 value
4779 }
4780 }
4781
4782 unsafe impl fidl::encoding::TypeMarker for MinstrelStatsResponse {
4783 type Owned = Self;
4784
4785 #[inline(always)]
4786 fn inline_align(_context: fidl::encoding::Context) -> usize {
4787 8
4788 }
4789
4790 #[inline(always)]
4791 fn inline_size(_context: fidl::encoding::Context) -> usize {
4792 8
4793 }
4794 }
4795
4796 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MinstrelStatsResponse, D>
4797 for &MinstrelStatsResponse
4798 {
4799 #[inline]
4800 unsafe fn encode(
4801 self,
4802 encoder: &mut fidl::encoding::Encoder<'_, D>,
4803 offset: usize,
4804 _depth: fidl::encoding::Depth,
4805 ) -> fidl::Result<()> {
4806 encoder.debug_check_bounds::<MinstrelStatsResponse>(offset);
4807 fidl::encoding::Encode::<MinstrelStatsResponse, D>::encode(
4809 (
4810 <fidl::encoding::Boxed<fidl_fuchsia_wlan_minstrel::Peer> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer),
4811 ),
4812 encoder, offset, _depth
4813 )
4814 }
4815 }
4816 unsafe impl<
4817 D: fidl::encoding::ResourceDialect,
4818 T0: fidl::encoding::Encode<fidl::encoding::Boxed<fidl_fuchsia_wlan_minstrel::Peer>, D>,
4819 > fidl::encoding::Encode<MinstrelStatsResponse, D> for (T0,)
4820 {
4821 #[inline]
4822 unsafe fn encode(
4823 self,
4824 encoder: &mut fidl::encoding::Encoder<'_, D>,
4825 offset: usize,
4826 depth: fidl::encoding::Depth,
4827 ) -> fidl::Result<()> {
4828 encoder.debug_check_bounds::<MinstrelStatsResponse>(offset);
4829 self.0.encode(encoder, offset + 0, depth)?;
4833 Ok(())
4834 }
4835 }
4836
4837 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MinstrelStatsResponse {
4838 #[inline(always)]
4839 fn new_empty() -> Self {
4840 Self {
4841 peer: fidl::new_empty!(fidl::encoding::Boxed<fidl_fuchsia_wlan_minstrel::Peer>, D),
4842 }
4843 }
4844
4845 #[inline]
4846 unsafe fn decode(
4847 &mut self,
4848 decoder: &mut fidl::encoding::Decoder<'_, D>,
4849 offset: usize,
4850 _depth: fidl::encoding::Depth,
4851 ) -> fidl::Result<()> {
4852 decoder.debug_check_bounds::<Self>(offset);
4853 fidl::decode!(
4855 fidl::encoding::Boxed<fidl_fuchsia_wlan_minstrel::Peer>,
4856 D,
4857 &mut self.peer,
4858 decoder,
4859 offset + 0,
4860 _depth
4861 )?;
4862 Ok(())
4863 }
4864 }
4865
4866 impl fidl::encoding::ValueTypeMarker for MlmeAssociateIndRequest {
4867 type Borrowed<'a> = &'a Self;
4868 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4869 value
4870 }
4871 }
4872
4873 unsafe impl fidl::encoding::TypeMarker for MlmeAssociateIndRequest {
4874 type Owned = Self;
4875
4876 #[inline(always)]
4877 fn inline_align(_context: fidl::encoding::Context) -> usize {
4878 8
4879 }
4880
4881 #[inline(always)]
4882 fn inline_size(_context: fidl::encoding::Context) -> usize {
4883 64
4884 }
4885 }
4886
4887 unsafe impl<D: fidl::encoding::ResourceDialect>
4888 fidl::encoding::Encode<MlmeAssociateIndRequest, D> for &MlmeAssociateIndRequest
4889 {
4890 #[inline]
4891 unsafe fn encode(
4892 self,
4893 encoder: &mut fidl::encoding::Encoder<'_, D>,
4894 offset: usize,
4895 _depth: fidl::encoding::Depth,
4896 ) -> fidl::Result<()> {
4897 encoder.debug_check_bounds::<MlmeAssociateIndRequest>(offset);
4898 fidl::encoding::Encode::<MlmeAssociateIndRequest, D>::encode(
4900 (<AssociateIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
4901 encoder,
4902 offset,
4903 _depth,
4904 )
4905 }
4906 }
4907 unsafe impl<
4908 D: fidl::encoding::ResourceDialect,
4909 T0: fidl::encoding::Encode<AssociateIndication, D>,
4910 > fidl::encoding::Encode<MlmeAssociateIndRequest, D> for (T0,)
4911 {
4912 #[inline]
4913 unsafe fn encode(
4914 self,
4915 encoder: &mut fidl::encoding::Encoder<'_, D>,
4916 offset: usize,
4917 depth: fidl::encoding::Depth,
4918 ) -> fidl::Result<()> {
4919 encoder.debug_check_bounds::<MlmeAssociateIndRequest>(offset);
4920 self.0.encode(encoder, offset + 0, depth)?;
4924 Ok(())
4925 }
4926 }
4927
4928 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4929 for MlmeAssociateIndRequest
4930 {
4931 #[inline(always)]
4932 fn new_empty() -> Self {
4933 Self { ind: fidl::new_empty!(AssociateIndication, D) }
4934 }
4935
4936 #[inline]
4937 unsafe fn decode(
4938 &mut self,
4939 decoder: &mut fidl::encoding::Decoder<'_, D>,
4940 offset: usize,
4941 _depth: fidl::encoding::Depth,
4942 ) -> fidl::Result<()> {
4943 decoder.debug_check_bounds::<Self>(offset);
4944 fidl::decode!(AssociateIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
4946 Ok(())
4947 }
4948 }
4949
4950 impl fidl::encoding::ValueTypeMarker for MlmeAssociateRespRequest {
4951 type Borrowed<'a> = &'a Self;
4952 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4953 value
4954 }
4955 }
4956
4957 unsafe impl fidl::encoding::TypeMarker for MlmeAssociateRespRequest {
4958 type Owned = Self;
4959
4960 #[inline(always)]
4961 fn inline_align(_context: fidl::encoding::Context) -> usize {
4962 8
4963 }
4964
4965 #[inline(always)]
4966 fn inline_size(_context: fidl::encoding::Context) -> usize {
4967 32
4968 }
4969 }
4970
4971 unsafe impl<D: fidl::encoding::ResourceDialect>
4972 fidl::encoding::Encode<MlmeAssociateRespRequest, D> for &MlmeAssociateRespRequest
4973 {
4974 #[inline]
4975 unsafe fn encode(
4976 self,
4977 encoder: &mut fidl::encoding::Encoder<'_, D>,
4978 offset: usize,
4979 _depth: fidl::encoding::Depth,
4980 ) -> fidl::Result<()> {
4981 encoder.debug_check_bounds::<MlmeAssociateRespRequest>(offset);
4982 fidl::encoding::Encode::<MlmeAssociateRespRequest, D>::encode(
4984 (<AssociateResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
4985 encoder,
4986 offset,
4987 _depth,
4988 )
4989 }
4990 }
4991 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<AssociateResponse, D>>
4992 fidl::encoding::Encode<MlmeAssociateRespRequest, D> for (T0,)
4993 {
4994 #[inline]
4995 unsafe fn encode(
4996 self,
4997 encoder: &mut fidl::encoding::Encoder<'_, D>,
4998 offset: usize,
4999 depth: fidl::encoding::Depth,
5000 ) -> fidl::Result<()> {
5001 encoder.debug_check_bounds::<MlmeAssociateRespRequest>(offset);
5002 self.0.encode(encoder, offset + 0, depth)?;
5006 Ok(())
5007 }
5008 }
5009
5010 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5011 for MlmeAssociateRespRequest
5012 {
5013 #[inline(always)]
5014 fn new_empty() -> Self {
5015 Self { resp: fidl::new_empty!(AssociateResponse, D) }
5016 }
5017
5018 #[inline]
5019 unsafe fn decode(
5020 &mut self,
5021 decoder: &mut fidl::encoding::Decoder<'_, D>,
5022 offset: usize,
5023 _depth: fidl::encoding::Depth,
5024 ) -> fidl::Result<()> {
5025 decoder.debug_check_bounds::<Self>(offset);
5026 fidl::decode!(AssociateResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
5028 Ok(())
5029 }
5030 }
5031
5032 impl fidl::encoding::ValueTypeMarker for MlmeAuthenticateIndRequest {
5033 type Borrowed<'a> = &'a Self;
5034 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5035 value
5036 }
5037 }
5038
5039 unsafe impl fidl::encoding::TypeMarker for MlmeAuthenticateIndRequest {
5040 type Owned = Self;
5041
5042 #[inline(always)]
5043 fn inline_align(_context: fidl::encoding::Context) -> usize {
5044 4
5045 }
5046
5047 #[inline(always)]
5048 fn inline_size(_context: fidl::encoding::Context) -> usize {
5049 12
5050 }
5051 }
5052
5053 unsafe impl<D: fidl::encoding::ResourceDialect>
5054 fidl::encoding::Encode<MlmeAuthenticateIndRequest, D> for &MlmeAuthenticateIndRequest
5055 {
5056 #[inline]
5057 unsafe fn encode(
5058 self,
5059 encoder: &mut fidl::encoding::Encoder<'_, D>,
5060 offset: usize,
5061 _depth: fidl::encoding::Depth,
5062 ) -> fidl::Result<()> {
5063 encoder.debug_check_bounds::<MlmeAuthenticateIndRequest>(offset);
5064 fidl::encoding::Encode::<MlmeAuthenticateIndRequest, D>::encode(
5066 (<AuthenticateIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
5067 encoder,
5068 offset,
5069 _depth,
5070 )
5071 }
5072 }
5073 unsafe impl<
5074 D: fidl::encoding::ResourceDialect,
5075 T0: fidl::encoding::Encode<AuthenticateIndication, D>,
5076 > fidl::encoding::Encode<MlmeAuthenticateIndRequest, D> for (T0,)
5077 {
5078 #[inline]
5079 unsafe fn encode(
5080 self,
5081 encoder: &mut fidl::encoding::Encoder<'_, D>,
5082 offset: usize,
5083 depth: fidl::encoding::Depth,
5084 ) -> fidl::Result<()> {
5085 encoder.debug_check_bounds::<MlmeAuthenticateIndRequest>(offset);
5086 self.0.encode(encoder, offset + 0, depth)?;
5090 Ok(())
5091 }
5092 }
5093
5094 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5095 for MlmeAuthenticateIndRequest
5096 {
5097 #[inline(always)]
5098 fn new_empty() -> Self {
5099 Self { ind: fidl::new_empty!(AuthenticateIndication, D) }
5100 }
5101
5102 #[inline]
5103 unsafe fn decode(
5104 &mut self,
5105 decoder: &mut fidl::encoding::Decoder<'_, D>,
5106 offset: usize,
5107 _depth: fidl::encoding::Depth,
5108 ) -> fidl::Result<()> {
5109 decoder.debug_check_bounds::<Self>(offset);
5110 fidl::decode!(AuthenticateIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
5112 Ok(())
5113 }
5114 }
5115
5116 impl fidl::encoding::ValueTypeMarker for MlmeAuthenticateRespRequest {
5117 type Borrowed<'a> = &'a Self;
5118 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5119 value
5120 }
5121 }
5122
5123 unsafe impl fidl::encoding::TypeMarker for MlmeAuthenticateRespRequest {
5124 type Owned = Self;
5125
5126 #[inline(always)]
5127 fn inline_align(_context: fidl::encoding::Context) -> usize {
5128 4
5129 }
5130
5131 #[inline(always)]
5132 fn inline_size(_context: fidl::encoding::Context) -> usize {
5133 12
5134 }
5135 }
5136
5137 unsafe impl<D: fidl::encoding::ResourceDialect>
5138 fidl::encoding::Encode<MlmeAuthenticateRespRequest, D> for &MlmeAuthenticateRespRequest
5139 {
5140 #[inline]
5141 unsafe fn encode(
5142 self,
5143 encoder: &mut fidl::encoding::Encoder<'_, D>,
5144 offset: usize,
5145 _depth: fidl::encoding::Depth,
5146 ) -> fidl::Result<()> {
5147 encoder.debug_check_bounds::<MlmeAuthenticateRespRequest>(offset);
5148 fidl::encoding::Encode::<MlmeAuthenticateRespRequest, D>::encode(
5150 (<AuthenticateResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
5151 encoder,
5152 offset,
5153 _depth,
5154 )
5155 }
5156 }
5157 unsafe impl<
5158 D: fidl::encoding::ResourceDialect,
5159 T0: fidl::encoding::Encode<AuthenticateResponse, D>,
5160 > fidl::encoding::Encode<MlmeAuthenticateRespRequest, D> for (T0,)
5161 {
5162 #[inline]
5163 unsafe fn encode(
5164 self,
5165 encoder: &mut fidl::encoding::Encoder<'_, D>,
5166 offset: usize,
5167 depth: fidl::encoding::Depth,
5168 ) -> fidl::Result<()> {
5169 encoder.debug_check_bounds::<MlmeAuthenticateRespRequest>(offset);
5170 self.0.encode(encoder, offset + 0, depth)?;
5174 Ok(())
5175 }
5176 }
5177
5178 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5179 for MlmeAuthenticateRespRequest
5180 {
5181 #[inline(always)]
5182 fn new_empty() -> Self {
5183 Self { resp: fidl::new_empty!(AuthenticateResponse, D) }
5184 }
5185
5186 #[inline]
5187 unsafe fn decode(
5188 &mut self,
5189 decoder: &mut fidl::encoding::Decoder<'_, D>,
5190 offset: usize,
5191 _depth: fidl::encoding::Depth,
5192 ) -> fidl::Result<()> {
5193 decoder.debug_check_bounds::<Self>(offset);
5194 fidl::decode!(AuthenticateResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
5196 Ok(())
5197 }
5198 }
5199
5200 impl fidl::encoding::ValueTypeMarker for MlmeConnectConfRequest {
5201 type Borrowed<'a> = &'a Self;
5202 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5203 value
5204 }
5205 }
5206
5207 unsafe impl fidl::encoding::TypeMarker for MlmeConnectConfRequest {
5208 type Owned = Self;
5209
5210 #[inline(always)]
5211 fn inline_align(_context: fidl::encoding::Context) -> usize {
5212 8
5213 }
5214
5215 #[inline(always)]
5216 fn inline_size(_context: fidl::encoding::Context) -> usize {
5217 32
5218 }
5219 }
5220
5221 unsafe impl<D: fidl::encoding::ResourceDialect>
5222 fidl::encoding::Encode<MlmeConnectConfRequest, D> for &MlmeConnectConfRequest
5223 {
5224 #[inline]
5225 unsafe fn encode(
5226 self,
5227 encoder: &mut fidl::encoding::Encoder<'_, D>,
5228 offset: usize,
5229 _depth: fidl::encoding::Depth,
5230 ) -> fidl::Result<()> {
5231 encoder.debug_check_bounds::<MlmeConnectConfRequest>(offset);
5232 fidl::encoding::Encode::<MlmeConnectConfRequest, D>::encode(
5234 (<ConnectConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
5235 encoder,
5236 offset,
5237 _depth,
5238 )
5239 }
5240 }
5241 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ConnectConfirm, D>>
5242 fidl::encoding::Encode<MlmeConnectConfRequest, D> for (T0,)
5243 {
5244 #[inline]
5245 unsafe fn encode(
5246 self,
5247 encoder: &mut fidl::encoding::Encoder<'_, D>,
5248 offset: usize,
5249 depth: fidl::encoding::Depth,
5250 ) -> fidl::Result<()> {
5251 encoder.debug_check_bounds::<MlmeConnectConfRequest>(offset);
5252 self.0.encode(encoder, offset + 0, depth)?;
5256 Ok(())
5257 }
5258 }
5259
5260 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5261 for MlmeConnectConfRequest
5262 {
5263 #[inline(always)]
5264 fn new_empty() -> Self {
5265 Self { resp: fidl::new_empty!(ConnectConfirm, D) }
5266 }
5267
5268 #[inline]
5269 unsafe fn decode(
5270 &mut self,
5271 decoder: &mut fidl::encoding::Decoder<'_, D>,
5272 offset: usize,
5273 _depth: fidl::encoding::Depth,
5274 ) -> fidl::Result<()> {
5275 decoder.debug_check_bounds::<Self>(offset);
5276 fidl::decode!(ConnectConfirm, D, &mut self.resp, decoder, offset + 0, _depth)?;
5278 Ok(())
5279 }
5280 }
5281
5282 impl fidl::encoding::ValueTypeMarker for MlmeConnectReqRequest {
5283 type Borrowed<'a> = &'a Self;
5284 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5285 value
5286 }
5287 }
5288
5289 unsafe impl fidl::encoding::TypeMarker for MlmeConnectReqRequest {
5290 type Owned = Self;
5291
5292 #[inline(always)]
5293 fn inline_align(_context: fidl::encoding::Context) -> usize {
5294 8
5295 }
5296
5297 #[inline(always)]
5298 fn inline_size(_context: fidl::encoding::Context) -> usize {
5299 96
5300 }
5301 }
5302
5303 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeConnectReqRequest, D>
5304 for &MlmeConnectReqRequest
5305 {
5306 #[inline]
5307 unsafe fn encode(
5308 self,
5309 encoder: &mut fidl::encoding::Encoder<'_, D>,
5310 offset: usize,
5311 _depth: fidl::encoding::Depth,
5312 ) -> fidl::Result<()> {
5313 encoder.debug_check_bounds::<MlmeConnectReqRequest>(offset);
5314 fidl::encoding::Encode::<MlmeConnectReqRequest, D>::encode(
5316 (<ConnectRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
5317 encoder,
5318 offset,
5319 _depth,
5320 )
5321 }
5322 }
5323 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ConnectRequest, D>>
5324 fidl::encoding::Encode<MlmeConnectReqRequest, D> for (T0,)
5325 {
5326 #[inline]
5327 unsafe fn encode(
5328 self,
5329 encoder: &mut fidl::encoding::Encoder<'_, D>,
5330 offset: usize,
5331 depth: fidl::encoding::Depth,
5332 ) -> fidl::Result<()> {
5333 encoder.debug_check_bounds::<MlmeConnectReqRequest>(offset);
5334 self.0.encode(encoder, offset + 0, depth)?;
5338 Ok(())
5339 }
5340 }
5341
5342 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeConnectReqRequest {
5343 #[inline(always)]
5344 fn new_empty() -> Self {
5345 Self { req: fidl::new_empty!(ConnectRequest, D) }
5346 }
5347
5348 #[inline]
5349 unsafe fn decode(
5350 &mut self,
5351 decoder: &mut fidl::encoding::Decoder<'_, D>,
5352 offset: usize,
5353 _depth: fidl::encoding::Depth,
5354 ) -> fidl::Result<()> {
5355 decoder.debug_check_bounds::<Self>(offset);
5356 fidl::decode!(ConnectRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
5358 Ok(())
5359 }
5360 }
5361
5362 impl fidl::encoding::ValueTypeMarker for MlmeDeauthenticateConfRequest {
5363 type Borrowed<'a> = &'a Self;
5364 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5365 value
5366 }
5367 }
5368
5369 unsafe impl fidl::encoding::TypeMarker for MlmeDeauthenticateConfRequest {
5370 type Owned = Self;
5371
5372 #[inline(always)]
5373 fn inline_align(_context: fidl::encoding::Context) -> usize {
5374 1
5375 }
5376
5377 #[inline(always)]
5378 fn inline_size(_context: fidl::encoding::Context) -> usize {
5379 6
5380 }
5381 #[inline(always)]
5382 fn encode_is_copy() -> bool {
5383 true
5384 }
5385
5386 #[inline(always)]
5387 fn decode_is_copy() -> bool {
5388 true
5389 }
5390 }
5391
5392 unsafe impl<D: fidl::encoding::ResourceDialect>
5393 fidl::encoding::Encode<MlmeDeauthenticateConfRequest, D>
5394 for &MlmeDeauthenticateConfRequest
5395 {
5396 #[inline]
5397 unsafe fn encode(
5398 self,
5399 encoder: &mut fidl::encoding::Encoder<'_, D>,
5400 offset: usize,
5401 _depth: fidl::encoding::Depth,
5402 ) -> fidl::Result<()> {
5403 encoder.debug_check_bounds::<MlmeDeauthenticateConfRequest>(offset);
5404 unsafe {
5405 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5407 (buf_ptr as *mut MlmeDeauthenticateConfRequest)
5408 .write_unaligned((self as *const MlmeDeauthenticateConfRequest).read());
5409 }
5412 Ok(())
5413 }
5414 }
5415 unsafe impl<
5416 D: fidl::encoding::ResourceDialect,
5417 T0: fidl::encoding::Encode<DeauthenticateConfirm, D>,
5418 > fidl::encoding::Encode<MlmeDeauthenticateConfRequest, D> for (T0,)
5419 {
5420 #[inline]
5421 unsafe fn encode(
5422 self,
5423 encoder: &mut fidl::encoding::Encoder<'_, D>,
5424 offset: usize,
5425 depth: fidl::encoding::Depth,
5426 ) -> fidl::Result<()> {
5427 encoder.debug_check_bounds::<MlmeDeauthenticateConfRequest>(offset);
5428 self.0.encode(encoder, offset + 0, depth)?;
5432 Ok(())
5433 }
5434 }
5435
5436 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5437 for MlmeDeauthenticateConfRequest
5438 {
5439 #[inline(always)]
5440 fn new_empty() -> Self {
5441 Self { resp: fidl::new_empty!(DeauthenticateConfirm, D) }
5442 }
5443
5444 #[inline]
5445 unsafe fn decode(
5446 &mut self,
5447 decoder: &mut fidl::encoding::Decoder<'_, D>,
5448 offset: usize,
5449 _depth: fidl::encoding::Depth,
5450 ) -> fidl::Result<()> {
5451 decoder.debug_check_bounds::<Self>(offset);
5452 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5453 unsafe {
5456 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
5457 }
5458 Ok(())
5459 }
5460 }
5461
5462 impl fidl::encoding::ValueTypeMarker for MlmeDeauthenticateIndRequest {
5463 type Borrowed<'a> = &'a Self;
5464 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5465 value
5466 }
5467 }
5468
5469 unsafe impl fidl::encoding::TypeMarker for MlmeDeauthenticateIndRequest {
5470 type Owned = Self;
5471
5472 #[inline(always)]
5473 fn inline_align(_context: fidl::encoding::Context) -> usize {
5474 2
5475 }
5476
5477 #[inline(always)]
5478 fn inline_size(_context: fidl::encoding::Context) -> usize {
5479 10
5480 }
5481 }
5482
5483 unsafe impl<D: fidl::encoding::ResourceDialect>
5484 fidl::encoding::Encode<MlmeDeauthenticateIndRequest, D> for &MlmeDeauthenticateIndRequest
5485 {
5486 #[inline]
5487 unsafe fn encode(
5488 self,
5489 encoder: &mut fidl::encoding::Encoder<'_, D>,
5490 offset: usize,
5491 _depth: fidl::encoding::Depth,
5492 ) -> fidl::Result<()> {
5493 encoder.debug_check_bounds::<MlmeDeauthenticateIndRequest>(offset);
5494 fidl::encoding::Encode::<MlmeDeauthenticateIndRequest, D>::encode(
5496 (<DeauthenticateIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
5497 encoder,
5498 offset,
5499 _depth,
5500 )
5501 }
5502 }
5503 unsafe impl<
5504 D: fidl::encoding::ResourceDialect,
5505 T0: fidl::encoding::Encode<DeauthenticateIndication, D>,
5506 > fidl::encoding::Encode<MlmeDeauthenticateIndRequest, D> for (T0,)
5507 {
5508 #[inline]
5509 unsafe fn encode(
5510 self,
5511 encoder: &mut fidl::encoding::Encoder<'_, D>,
5512 offset: usize,
5513 depth: fidl::encoding::Depth,
5514 ) -> fidl::Result<()> {
5515 encoder.debug_check_bounds::<MlmeDeauthenticateIndRequest>(offset);
5516 self.0.encode(encoder, offset + 0, depth)?;
5520 Ok(())
5521 }
5522 }
5523
5524 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5525 for MlmeDeauthenticateIndRequest
5526 {
5527 #[inline(always)]
5528 fn new_empty() -> Self {
5529 Self { ind: fidl::new_empty!(DeauthenticateIndication, D) }
5530 }
5531
5532 #[inline]
5533 unsafe fn decode(
5534 &mut self,
5535 decoder: &mut fidl::encoding::Decoder<'_, D>,
5536 offset: usize,
5537 _depth: fidl::encoding::Depth,
5538 ) -> fidl::Result<()> {
5539 decoder.debug_check_bounds::<Self>(offset);
5540 fidl::decode!(DeauthenticateIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
5542 Ok(())
5543 }
5544 }
5545
5546 impl fidl::encoding::ValueTypeMarker for MlmeDeauthenticateReqRequest {
5547 type Borrowed<'a> = &'a Self;
5548 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5549 value
5550 }
5551 }
5552
5553 unsafe impl fidl::encoding::TypeMarker for MlmeDeauthenticateReqRequest {
5554 type Owned = Self;
5555
5556 #[inline(always)]
5557 fn inline_align(_context: fidl::encoding::Context) -> usize {
5558 2
5559 }
5560
5561 #[inline(always)]
5562 fn inline_size(_context: fidl::encoding::Context) -> usize {
5563 8
5564 }
5565 }
5566
5567 unsafe impl<D: fidl::encoding::ResourceDialect>
5568 fidl::encoding::Encode<MlmeDeauthenticateReqRequest, D> for &MlmeDeauthenticateReqRequest
5569 {
5570 #[inline]
5571 unsafe fn encode(
5572 self,
5573 encoder: &mut fidl::encoding::Encoder<'_, D>,
5574 offset: usize,
5575 _depth: fidl::encoding::Depth,
5576 ) -> fidl::Result<()> {
5577 encoder.debug_check_bounds::<MlmeDeauthenticateReqRequest>(offset);
5578 fidl::encoding::Encode::<MlmeDeauthenticateReqRequest, D>::encode(
5580 (<DeauthenticateRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
5581 encoder,
5582 offset,
5583 _depth,
5584 )
5585 }
5586 }
5587 unsafe impl<
5588 D: fidl::encoding::ResourceDialect,
5589 T0: fidl::encoding::Encode<DeauthenticateRequest, D>,
5590 > fidl::encoding::Encode<MlmeDeauthenticateReqRequest, D> for (T0,)
5591 {
5592 #[inline]
5593 unsafe fn encode(
5594 self,
5595 encoder: &mut fidl::encoding::Encoder<'_, D>,
5596 offset: usize,
5597 depth: fidl::encoding::Depth,
5598 ) -> fidl::Result<()> {
5599 encoder.debug_check_bounds::<MlmeDeauthenticateReqRequest>(offset);
5600 self.0.encode(encoder, offset + 0, depth)?;
5604 Ok(())
5605 }
5606 }
5607
5608 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5609 for MlmeDeauthenticateReqRequest
5610 {
5611 #[inline(always)]
5612 fn new_empty() -> Self {
5613 Self { req: fidl::new_empty!(DeauthenticateRequest, D) }
5614 }
5615
5616 #[inline]
5617 unsafe fn decode(
5618 &mut self,
5619 decoder: &mut fidl::encoding::Decoder<'_, D>,
5620 offset: usize,
5621 _depth: fidl::encoding::Depth,
5622 ) -> fidl::Result<()> {
5623 decoder.debug_check_bounds::<Self>(offset);
5624 fidl::decode!(DeauthenticateRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
5626 Ok(())
5627 }
5628 }
5629
5630 impl fidl::encoding::ValueTypeMarker for MlmeDeleteKeysReqRequest {
5631 type Borrowed<'a> = &'a Self;
5632 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5633 value
5634 }
5635 }
5636
5637 unsafe impl fidl::encoding::TypeMarker for MlmeDeleteKeysReqRequest {
5638 type Owned = Self;
5639
5640 #[inline(always)]
5641 fn inline_align(_context: fidl::encoding::Context) -> usize {
5642 8
5643 }
5644
5645 #[inline(always)]
5646 fn inline_size(_context: fidl::encoding::Context) -> usize {
5647 16
5648 }
5649 }
5650
5651 unsafe impl<D: fidl::encoding::ResourceDialect>
5652 fidl::encoding::Encode<MlmeDeleteKeysReqRequest, D> for &MlmeDeleteKeysReqRequest
5653 {
5654 #[inline]
5655 unsafe fn encode(
5656 self,
5657 encoder: &mut fidl::encoding::Encoder<'_, D>,
5658 offset: usize,
5659 _depth: fidl::encoding::Depth,
5660 ) -> fidl::Result<()> {
5661 encoder.debug_check_bounds::<MlmeDeleteKeysReqRequest>(offset);
5662 fidl::encoding::Encode::<MlmeDeleteKeysReqRequest, D>::encode(
5664 (<DeleteKeysRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
5665 encoder,
5666 offset,
5667 _depth,
5668 )
5669 }
5670 }
5671 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<DeleteKeysRequest, D>>
5672 fidl::encoding::Encode<MlmeDeleteKeysReqRequest, D> for (T0,)
5673 {
5674 #[inline]
5675 unsafe fn encode(
5676 self,
5677 encoder: &mut fidl::encoding::Encoder<'_, D>,
5678 offset: usize,
5679 depth: fidl::encoding::Depth,
5680 ) -> fidl::Result<()> {
5681 encoder.debug_check_bounds::<MlmeDeleteKeysReqRequest>(offset);
5682 self.0.encode(encoder, offset + 0, depth)?;
5686 Ok(())
5687 }
5688 }
5689
5690 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5691 for MlmeDeleteKeysReqRequest
5692 {
5693 #[inline(always)]
5694 fn new_empty() -> Self {
5695 Self { req: fidl::new_empty!(DeleteKeysRequest, D) }
5696 }
5697
5698 #[inline]
5699 unsafe fn decode(
5700 &mut self,
5701 decoder: &mut fidl::encoding::Decoder<'_, D>,
5702 offset: usize,
5703 _depth: fidl::encoding::Depth,
5704 ) -> fidl::Result<()> {
5705 decoder.debug_check_bounds::<Self>(offset);
5706 fidl::decode!(DeleteKeysRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
5708 Ok(())
5709 }
5710 }
5711
5712 impl fidl::encoding::ValueTypeMarker for MlmeDisassociateConfRequest {
5713 type Borrowed<'a> = &'a Self;
5714 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5715 value
5716 }
5717 }
5718
5719 unsafe impl fidl::encoding::TypeMarker for MlmeDisassociateConfRequest {
5720 type Owned = Self;
5721
5722 #[inline(always)]
5723 fn inline_align(_context: fidl::encoding::Context) -> usize {
5724 4
5725 }
5726
5727 #[inline(always)]
5728 fn inline_size(_context: fidl::encoding::Context) -> usize {
5729 4
5730 }
5731 #[inline(always)]
5732 fn encode_is_copy() -> bool {
5733 true
5734 }
5735
5736 #[inline(always)]
5737 fn decode_is_copy() -> bool {
5738 true
5739 }
5740 }
5741
5742 unsafe impl<D: fidl::encoding::ResourceDialect>
5743 fidl::encoding::Encode<MlmeDisassociateConfRequest, D> for &MlmeDisassociateConfRequest
5744 {
5745 #[inline]
5746 unsafe fn encode(
5747 self,
5748 encoder: &mut fidl::encoding::Encoder<'_, D>,
5749 offset: usize,
5750 _depth: fidl::encoding::Depth,
5751 ) -> fidl::Result<()> {
5752 encoder.debug_check_bounds::<MlmeDisassociateConfRequest>(offset);
5753 unsafe {
5754 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5756 (buf_ptr as *mut MlmeDisassociateConfRequest)
5757 .write_unaligned((self as *const MlmeDisassociateConfRequest).read());
5758 }
5761 Ok(())
5762 }
5763 }
5764 unsafe impl<
5765 D: fidl::encoding::ResourceDialect,
5766 T0: fidl::encoding::Encode<DisassociateConfirm, D>,
5767 > fidl::encoding::Encode<MlmeDisassociateConfRequest, D> for (T0,)
5768 {
5769 #[inline]
5770 unsafe fn encode(
5771 self,
5772 encoder: &mut fidl::encoding::Encoder<'_, D>,
5773 offset: usize,
5774 depth: fidl::encoding::Depth,
5775 ) -> fidl::Result<()> {
5776 encoder.debug_check_bounds::<MlmeDisassociateConfRequest>(offset);
5777 self.0.encode(encoder, offset + 0, depth)?;
5781 Ok(())
5782 }
5783 }
5784
5785 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5786 for MlmeDisassociateConfRequest
5787 {
5788 #[inline(always)]
5789 fn new_empty() -> Self {
5790 Self { resp: fidl::new_empty!(DisassociateConfirm, D) }
5791 }
5792
5793 #[inline]
5794 unsafe fn decode(
5795 &mut self,
5796 decoder: &mut fidl::encoding::Decoder<'_, D>,
5797 offset: usize,
5798 _depth: fidl::encoding::Depth,
5799 ) -> fidl::Result<()> {
5800 decoder.debug_check_bounds::<Self>(offset);
5801 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5802 unsafe {
5805 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5806 }
5807 Ok(())
5808 }
5809 }
5810
5811 impl fidl::encoding::ValueTypeMarker for MlmeDisassociateIndRequest {
5812 type Borrowed<'a> = &'a Self;
5813 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5814 value
5815 }
5816 }
5817
5818 unsafe impl fidl::encoding::TypeMarker for MlmeDisassociateIndRequest {
5819 type Owned = Self;
5820
5821 #[inline(always)]
5822 fn inline_align(_context: fidl::encoding::Context) -> usize {
5823 2
5824 }
5825
5826 #[inline(always)]
5827 fn inline_size(_context: fidl::encoding::Context) -> usize {
5828 10
5829 }
5830 }
5831
5832 unsafe impl<D: fidl::encoding::ResourceDialect>
5833 fidl::encoding::Encode<MlmeDisassociateIndRequest, D> for &MlmeDisassociateIndRequest
5834 {
5835 #[inline]
5836 unsafe fn encode(
5837 self,
5838 encoder: &mut fidl::encoding::Encoder<'_, D>,
5839 offset: usize,
5840 _depth: fidl::encoding::Depth,
5841 ) -> fidl::Result<()> {
5842 encoder.debug_check_bounds::<MlmeDisassociateIndRequest>(offset);
5843 fidl::encoding::Encode::<MlmeDisassociateIndRequest, D>::encode(
5845 (<DisassociateIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
5846 encoder,
5847 offset,
5848 _depth,
5849 )
5850 }
5851 }
5852 unsafe impl<
5853 D: fidl::encoding::ResourceDialect,
5854 T0: fidl::encoding::Encode<DisassociateIndication, D>,
5855 > fidl::encoding::Encode<MlmeDisassociateIndRequest, D> for (T0,)
5856 {
5857 #[inline]
5858 unsafe fn encode(
5859 self,
5860 encoder: &mut fidl::encoding::Encoder<'_, D>,
5861 offset: usize,
5862 depth: fidl::encoding::Depth,
5863 ) -> fidl::Result<()> {
5864 encoder.debug_check_bounds::<MlmeDisassociateIndRequest>(offset);
5865 self.0.encode(encoder, offset + 0, depth)?;
5869 Ok(())
5870 }
5871 }
5872
5873 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5874 for MlmeDisassociateIndRequest
5875 {
5876 #[inline(always)]
5877 fn new_empty() -> Self {
5878 Self { ind: fidl::new_empty!(DisassociateIndication, D) }
5879 }
5880
5881 #[inline]
5882 unsafe fn decode(
5883 &mut self,
5884 decoder: &mut fidl::encoding::Decoder<'_, D>,
5885 offset: usize,
5886 _depth: fidl::encoding::Depth,
5887 ) -> fidl::Result<()> {
5888 decoder.debug_check_bounds::<Self>(offset);
5889 fidl::decode!(DisassociateIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
5891 Ok(())
5892 }
5893 }
5894
5895 impl fidl::encoding::ValueTypeMarker for MlmeDisassociateReqRequest {
5896 type Borrowed<'a> = &'a Self;
5897 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5898 value
5899 }
5900 }
5901
5902 unsafe impl fidl::encoding::TypeMarker for MlmeDisassociateReqRequest {
5903 type Owned = Self;
5904
5905 #[inline(always)]
5906 fn inline_align(_context: fidl::encoding::Context) -> usize {
5907 2
5908 }
5909
5910 #[inline(always)]
5911 fn inline_size(_context: fidl::encoding::Context) -> usize {
5912 8
5913 }
5914 }
5915
5916 unsafe impl<D: fidl::encoding::ResourceDialect>
5917 fidl::encoding::Encode<MlmeDisassociateReqRequest, D> for &MlmeDisassociateReqRequest
5918 {
5919 #[inline]
5920 unsafe fn encode(
5921 self,
5922 encoder: &mut fidl::encoding::Encoder<'_, D>,
5923 offset: usize,
5924 _depth: fidl::encoding::Depth,
5925 ) -> fidl::Result<()> {
5926 encoder.debug_check_bounds::<MlmeDisassociateReqRequest>(offset);
5927 fidl::encoding::Encode::<MlmeDisassociateReqRequest, D>::encode(
5929 (<DisassociateRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
5930 encoder,
5931 offset,
5932 _depth,
5933 )
5934 }
5935 }
5936 unsafe impl<
5937 D: fidl::encoding::ResourceDialect,
5938 T0: fidl::encoding::Encode<DisassociateRequest, D>,
5939 > fidl::encoding::Encode<MlmeDisassociateReqRequest, D> for (T0,)
5940 {
5941 #[inline]
5942 unsafe fn encode(
5943 self,
5944 encoder: &mut fidl::encoding::Encoder<'_, D>,
5945 offset: usize,
5946 depth: fidl::encoding::Depth,
5947 ) -> fidl::Result<()> {
5948 encoder.debug_check_bounds::<MlmeDisassociateReqRequest>(offset);
5949 self.0.encode(encoder, offset + 0, depth)?;
5953 Ok(())
5954 }
5955 }
5956
5957 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5958 for MlmeDisassociateReqRequest
5959 {
5960 #[inline(always)]
5961 fn new_empty() -> Self {
5962 Self { req: fidl::new_empty!(DisassociateRequest, D) }
5963 }
5964
5965 #[inline]
5966 unsafe fn decode(
5967 &mut self,
5968 decoder: &mut fidl::encoding::Decoder<'_, D>,
5969 offset: usize,
5970 _depth: fidl::encoding::Depth,
5971 ) -> fidl::Result<()> {
5972 decoder.debug_check_bounds::<Self>(offset);
5973 fidl::decode!(DisassociateRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
5975 Ok(())
5976 }
5977 }
5978
5979 impl fidl::encoding::ValueTypeMarker for MlmeEapolConfRequest {
5980 type Borrowed<'a> = &'a Self;
5981 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5982 value
5983 }
5984 }
5985
5986 unsafe impl fidl::encoding::TypeMarker for MlmeEapolConfRequest {
5987 type Owned = Self;
5988
5989 #[inline(always)]
5990 fn inline_align(_context: fidl::encoding::Context) -> usize {
5991 4
5992 }
5993
5994 #[inline(always)]
5995 fn inline_size(_context: fidl::encoding::Context) -> usize {
5996 12
5997 }
5998 }
5999
6000 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeEapolConfRequest, D>
6001 for &MlmeEapolConfRequest
6002 {
6003 #[inline]
6004 unsafe fn encode(
6005 self,
6006 encoder: &mut fidl::encoding::Encoder<'_, D>,
6007 offset: usize,
6008 _depth: fidl::encoding::Depth,
6009 ) -> fidl::Result<()> {
6010 encoder.debug_check_bounds::<MlmeEapolConfRequest>(offset);
6011 fidl::encoding::Encode::<MlmeEapolConfRequest, D>::encode(
6013 (<EapolConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
6014 encoder,
6015 offset,
6016 _depth,
6017 )
6018 }
6019 }
6020 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EapolConfirm, D>>
6021 fidl::encoding::Encode<MlmeEapolConfRequest, D> for (T0,)
6022 {
6023 #[inline]
6024 unsafe fn encode(
6025 self,
6026 encoder: &mut fidl::encoding::Encoder<'_, D>,
6027 offset: usize,
6028 depth: fidl::encoding::Depth,
6029 ) -> fidl::Result<()> {
6030 encoder.debug_check_bounds::<MlmeEapolConfRequest>(offset);
6031 self.0.encode(encoder, offset + 0, depth)?;
6035 Ok(())
6036 }
6037 }
6038
6039 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeEapolConfRequest {
6040 #[inline(always)]
6041 fn new_empty() -> Self {
6042 Self { resp: fidl::new_empty!(EapolConfirm, D) }
6043 }
6044
6045 #[inline]
6046 unsafe fn decode(
6047 &mut self,
6048 decoder: &mut fidl::encoding::Decoder<'_, D>,
6049 offset: usize,
6050 _depth: fidl::encoding::Depth,
6051 ) -> fidl::Result<()> {
6052 decoder.debug_check_bounds::<Self>(offset);
6053 fidl::decode!(EapolConfirm, D, &mut self.resp, decoder, offset + 0, _depth)?;
6055 Ok(())
6056 }
6057 }
6058
6059 impl fidl::encoding::ValueTypeMarker for MlmeEapolIndRequest {
6060 type Borrowed<'a> = &'a Self;
6061 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6062 value
6063 }
6064 }
6065
6066 unsafe impl fidl::encoding::TypeMarker for MlmeEapolIndRequest {
6067 type Owned = Self;
6068
6069 #[inline(always)]
6070 fn inline_align(_context: fidl::encoding::Context) -> usize {
6071 8
6072 }
6073
6074 #[inline(always)]
6075 fn inline_size(_context: fidl::encoding::Context) -> usize {
6076 32
6077 }
6078 }
6079
6080 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeEapolIndRequest, D>
6081 for &MlmeEapolIndRequest
6082 {
6083 #[inline]
6084 unsafe fn encode(
6085 self,
6086 encoder: &mut fidl::encoding::Encoder<'_, D>,
6087 offset: usize,
6088 _depth: fidl::encoding::Depth,
6089 ) -> fidl::Result<()> {
6090 encoder.debug_check_bounds::<MlmeEapolIndRequest>(offset);
6091 fidl::encoding::Encode::<MlmeEapolIndRequest, D>::encode(
6093 (<EapolIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
6094 encoder,
6095 offset,
6096 _depth,
6097 )
6098 }
6099 }
6100 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EapolIndication, D>>
6101 fidl::encoding::Encode<MlmeEapolIndRequest, D> for (T0,)
6102 {
6103 #[inline]
6104 unsafe fn encode(
6105 self,
6106 encoder: &mut fidl::encoding::Encoder<'_, D>,
6107 offset: usize,
6108 depth: fidl::encoding::Depth,
6109 ) -> fidl::Result<()> {
6110 encoder.debug_check_bounds::<MlmeEapolIndRequest>(offset);
6111 self.0.encode(encoder, offset + 0, depth)?;
6115 Ok(())
6116 }
6117 }
6118
6119 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeEapolIndRequest {
6120 #[inline(always)]
6121 fn new_empty() -> Self {
6122 Self { ind: fidl::new_empty!(EapolIndication, D) }
6123 }
6124
6125 #[inline]
6126 unsafe fn decode(
6127 &mut self,
6128 decoder: &mut fidl::encoding::Decoder<'_, D>,
6129 offset: usize,
6130 _depth: fidl::encoding::Depth,
6131 ) -> fidl::Result<()> {
6132 decoder.debug_check_bounds::<Self>(offset);
6133 fidl::decode!(EapolIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
6135 Ok(())
6136 }
6137 }
6138
6139 impl fidl::encoding::ValueTypeMarker for MlmeEapolReqRequest {
6140 type Borrowed<'a> = &'a Self;
6141 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6142 value
6143 }
6144 }
6145
6146 unsafe impl fidl::encoding::TypeMarker for MlmeEapolReqRequest {
6147 type Owned = Self;
6148
6149 #[inline(always)]
6150 fn inline_align(_context: fidl::encoding::Context) -> usize {
6151 8
6152 }
6153
6154 #[inline(always)]
6155 fn inline_size(_context: fidl::encoding::Context) -> usize {
6156 32
6157 }
6158 }
6159
6160 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeEapolReqRequest, D>
6161 for &MlmeEapolReqRequest
6162 {
6163 #[inline]
6164 unsafe fn encode(
6165 self,
6166 encoder: &mut fidl::encoding::Encoder<'_, D>,
6167 offset: usize,
6168 _depth: fidl::encoding::Depth,
6169 ) -> fidl::Result<()> {
6170 encoder.debug_check_bounds::<MlmeEapolReqRequest>(offset);
6171 fidl::encoding::Encode::<MlmeEapolReqRequest, D>::encode(
6173 (<EapolRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
6174 encoder,
6175 offset,
6176 _depth,
6177 )
6178 }
6179 }
6180 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EapolRequest, D>>
6181 fidl::encoding::Encode<MlmeEapolReqRequest, D> for (T0,)
6182 {
6183 #[inline]
6184 unsafe fn encode(
6185 self,
6186 encoder: &mut fidl::encoding::Encoder<'_, D>,
6187 offset: usize,
6188 depth: fidl::encoding::Depth,
6189 ) -> fidl::Result<()> {
6190 encoder.debug_check_bounds::<MlmeEapolReqRequest>(offset);
6191 self.0.encode(encoder, offset + 0, depth)?;
6195 Ok(())
6196 }
6197 }
6198
6199 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeEapolReqRequest {
6200 #[inline(always)]
6201 fn new_empty() -> Self {
6202 Self { req: fidl::new_empty!(EapolRequest, D) }
6203 }
6204
6205 #[inline]
6206 unsafe fn decode(
6207 &mut self,
6208 decoder: &mut fidl::encoding::Decoder<'_, D>,
6209 offset: usize,
6210 _depth: fidl::encoding::Depth,
6211 ) -> fidl::Result<()> {
6212 decoder.debug_check_bounds::<Self>(offset);
6213 fidl::decode!(EapolRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
6215 Ok(())
6216 }
6217 }
6218
6219 impl fidl::encoding::ValueTypeMarker for MlmeFinalizeAssociationReqRequest {
6220 type Borrowed<'a> = &'a Self;
6221 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6222 value
6223 }
6224 }
6225
6226 unsafe impl fidl::encoding::TypeMarker for MlmeFinalizeAssociationReqRequest {
6227 type Owned = Self;
6228
6229 #[inline(always)]
6230 fn inline_align(_context: fidl::encoding::Context) -> usize {
6231 8
6232 }
6233
6234 #[inline(always)]
6235 fn inline_size(_context: fidl::encoding::Context) -> usize {
6236 56
6237 }
6238 }
6239
6240 unsafe impl<D: fidl::encoding::ResourceDialect>
6241 fidl::encoding::Encode<MlmeFinalizeAssociationReqRequest, D>
6242 for &MlmeFinalizeAssociationReqRequest
6243 {
6244 #[inline]
6245 unsafe fn encode(
6246 self,
6247 encoder: &mut fidl::encoding::Encoder<'_, D>,
6248 offset: usize,
6249 _depth: fidl::encoding::Depth,
6250 ) -> fidl::Result<()> {
6251 encoder.debug_check_bounds::<MlmeFinalizeAssociationReqRequest>(offset);
6252 fidl::encoding::Encode::<MlmeFinalizeAssociationReqRequest, D>::encode(
6254 (<NegotiatedCapabilities as fidl::encoding::ValueTypeMarker>::borrow(
6255 &self.negotiated_capabilities,
6256 ),),
6257 encoder,
6258 offset,
6259 _depth,
6260 )
6261 }
6262 }
6263 unsafe impl<
6264 D: fidl::encoding::ResourceDialect,
6265 T0: fidl::encoding::Encode<NegotiatedCapabilities, D>,
6266 > fidl::encoding::Encode<MlmeFinalizeAssociationReqRequest, D> for (T0,)
6267 {
6268 #[inline]
6269 unsafe fn encode(
6270 self,
6271 encoder: &mut fidl::encoding::Encoder<'_, D>,
6272 offset: usize,
6273 depth: fidl::encoding::Depth,
6274 ) -> fidl::Result<()> {
6275 encoder.debug_check_bounds::<MlmeFinalizeAssociationReqRequest>(offset);
6276 self.0.encode(encoder, offset + 0, depth)?;
6280 Ok(())
6281 }
6282 }
6283
6284 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6285 for MlmeFinalizeAssociationReqRequest
6286 {
6287 #[inline(always)]
6288 fn new_empty() -> Self {
6289 Self { negotiated_capabilities: fidl::new_empty!(NegotiatedCapabilities, D) }
6290 }
6291
6292 #[inline]
6293 unsafe fn decode(
6294 &mut self,
6295 decoder: &mut fidl::encoding::Decoder<'_, D>,
6296 offset: usize,
6297 _depth: fidl::encoding::Depth,
6298 ) -> fidl::Result<()> {
6299 decoder.debug_check_bounds::<Self>(offset);
6300 fidl::decode!(
6302 NegotiatedCapabilities,
6303 D,
6304 &mut self.negotiated_capabilities,
6305 decoder,
6306 offset + 0,
6307 _depth
6308 )?;
6309 Ok(())
6310 }
6311 }
6312
6313 impl fidl::encoding::ValueTypeMarker for MlmeGetIfaceHistogramStatsResponse {
6314 type Borrowed<'a> = &'a Self;
6315 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6316 value
6317 }
6318 }
6319
6320 unsafe impl fidl::encoding::TypeMarker for MlmeGetIfaceHistogramStatsResponse {
6321 type Owned = Self;
6322
6323 #[inline(always)]
6324 fn inline_align(_context: fidl::encoding::Context) -> usize {
6325 8
6326 }
6327
6328 #[inline(always)]
6329 fn inline_size(_context: fidl::encoding::Context) -> usize {
6330 16
6331 }
6332 }
6333
6334 unsafe impl<D: fidl::encoding::ResourceDialect>
6335 fidl::encoding::Encode<MlmeGetIfaceHistogramStatsResponse, D>
6336 for &MlmeGetIfaceHistogramStatsResponse
6337 {
6338 #[inline]
6339 unsafe fn encode(
6340 self,
6341 encoder: &mut fidl::encoding::Encoder<'_, D>,
6342 offset: usize,
6343 _depth: fidl::encoding::Depth,
6344 ) -> fidl::Result<()> {
6345 encoder.debug_check_bounds::<MlmeGetIfaceHistogramStatsResponse>(offset);
6346 fidl::encoding::Encode::<MlmeGetIfaceHistogramStatsResponse, D>::encode(
6348 (<GetIfaceHistogramStatsResponse as fidl::encoding::ValueTypeMarker>::borrow(
6349 &self.resp,
6350 ),),
6351 encoder,
6352 offset,
6353 _depth,
6354 )
6355 }
6356 }
6357 unsafe impl<
6358 D: fidl::encoding::ResourceDialect,
6359 T0: fidl::encoding::Encode<GetIfaceHistogramStatsResponse, D>,
6360 > fidl::encoding::Encode<MlmeGetIfaceHistogramStatsResponse, D> for (T0,)
6361 {
6362 #[inline]
6363 unsafe fn encode(
6364 self,
6365 encoder: &mut fidl::encoding::Encoder<'_, D>,
6366 offset: usize,
6367 depth: fidl::encoding::Depth,
6368 ) -> fidl::Result<()> {
6369 encoder.debug_check_bounds::<MlmeGetIfaceHistogramStatsResponse>(offset);
6370 self.0.encode(encoder, offset + 0, depth)?;
6374 Ok(())
6375 }
6376 }
6377
6378 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6379 for MlmeGetIfaceHistogramStatsResponse
6380 {
6381 #[inline(always)]
6382 fn new_empty() -> Self {
6383 Self { resp: fidl::new_empty!(GetIfaceHistogramStatsResponse, D) }
6384 }
6385
6386 #[inline]
6387 unsafe fn decode(
6388 &mut self,
6389 decoder: &mut fidl::encoding::Decoder<'_, D>,
6390 offset: usize,
6391 _depth: fidl::encoding::Depth,
6392 ) -> fidl::Result<()> {
6393 decoder.debug_check_bounds::<Self>(offset);
6394 fidl::decode!(
6396 GetIfaceHistogramStatsResponse,
6397 D,
6398 &mut self.resp,
6399 decoder,
6400 offset + 0,
6401 _depth
6402 )?;
6403 Ok(())
6404 }
6405 }
6406
6407 impl fidl::encoding::ValueTypeMarker for MlmeGetIfaceStatsResponse {
6408 type Borrowed<'a> = &'a Self;
6409 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6410 value
6411 }
6412 }
6413
6414 unsafe impl fidl::encoding::TypeMarker for MlmeGetIfaceStatsResponse {
6415 type Owned = Self;
6416
6417 #[inline(always)]
6418 fn inline_align(_context: fidl::encoding::Context) -> usize {
6419 8
6420 }
6421
6422 #[inline(always)]
6423 fn inline_size(_context: fidl::encoding::Context) -> usize {
6424 16
6425 }
6426 }
6427
6428 unsafe impl<D: fidl::encoding::ResourceDialect>
6429 fidl::encoding::Encode<MlmeGetIfaceStatsResponse, D> for &MlmeGetIfaceStatsResponse
6430 {
6431 #[inline]
6432 unsafe fn encode(
6433 self,
6434 encoder: &mut fidl::encoding::Encoder<'_, D>,
6435 offset: usize,
6436 _depth: fidl::encoding::Depth,
6437 ) -> fidl::Result<()> {
6438 encoder.debug_check_bounds::<MlmeGetIfaceStatsResponse>(offset);
6439 fidl::encoding::Encode::<MlmeGetIfaceStatsResponse, D>::encode(
6441 (<GetIfaceStatsResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
6442 encoder,
6443 offset,
6444 _depth,
6445 )
6446 }
6447 }
6448 unsafe impl<
6449 D: fidl::encoding::ResourceDialect,
6450 T0: fidl::encoding::Encode<GetIfaceStatsResponse, D>,
6451 > fidl::encoding::Encode<MlmeGetIfaceStatsResponse, D> for (T0,)
6452 {
6453 #[inline]
6454 unsafe fn encode(
6455 self,
6456 encoder: &mut fidl::encoding::Encoder<'_, D>,
6457 offset: usize,
6458 depth: fidl::encoding::Depth,
6459 ) -> fidl::Result<()> {
6460 encoder.debug_check_bounds::<MlmeGetIfaceStatsResponse>(offset);
6461 self.0.encode(encoder, offset + 0, depth)?;
6465 Ok(())
6466 }
6467 }
6468
6469 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6470 for MlmeGetIfaceStatsResponse
6471 {
6472 #[inline(always)]
6473 fn new_empty() -> Self {
6474 Self { resp: fidl::new_empty!(GetIfaceStatsResponse, D) }
6475 }
6476
6477 #[inline]
6478 unsafe fn decode(
6479 &mut self,
6480 decoder: &mut fidl::encoding::Decoder<'_, D>,
6481 offset: usize,
6482 _depth: fidl::encoding::Depth,
6483 ) -> fidl::Result<()> {
6484 decoder.debug_check_bounds::<Self>(offset);
6485 fidl::decode!(GetIfaceStatsResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
6487 Ok(())
6488 }
6489 }
6490
6491 impl fidl::encoding::ValueTypeMarker for MlmeGetMinstrelStatsRequest {
6492 type Borrowed<'a> = &'a Self;
6493 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6494 value
6495 }
6496 }
6497
6498 unsafe impl fidl::encoding::TypeMarker for MlmeGetMinstrelStatsRequest {
6499 type Owned = Self;
6500
6501 #[inline(always)]
6502 fn inline_align(_context: fidl::encoding::Context) -> usize {
6503 1
6504 }
6505
6506 #[inline(always)]
6507 fn inline_size(_context: fidl::encoding::Context) -> usize {
6508 6
6509 }
6510 #[inline(always)]
6511 fn encode_is_copy() -> bool {
6512 true
6513 }
6514
6515 #[inline(always)]
6516 fn decode_is_copy() -> bool {
6517 true
6518 }
6519 }
6520
6521 unsafe impl<D: fidl::encoding::ResourceDialect>
6522 fidl::encoding::Encode<MlmeGetMinstrelStatsRequest, D> for &MlmeGetMinstrelStatsRequest
6523 {
6524 #[inline]
6525 unsafe fn encode(
6526 self,
6527 encoder: &mut fidl::encoding::Encoder<'_, D>,
6528 offset: usize,
6529 _depth: fidl::encoding::Depth,
6530 ) -> fidl::Result<()> {
6531 encoder.debug_check_bounds::<MlmeGetMinstrelStatsRequest>(offset);
6532 unsafe {
6533 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6535 (buf_ptr as *mut MlmeGetMinstrelStatsRequest)
6536 .write_unaligned((self as *const MlmeGetMinstrelStatsRequest).read());
6537 }
6540 Ok(())
6541 }
6542 }
6543 unsafe impl<
6544 D: fidl::encoding::ResourceDialect,
6545 T0: fidl::encoding::Encode<MinstrelStatsRequest, D>,
6546 > fidl::encoding::Encode<MlmeGetMinstrelStatsRequest, D> for (T0,)
6547 {
6548 #[inline]
6549 unsafe fn encode(
6550 self,
6551 encoder: &mut fidl::encoding::Encoder<'_, D>,
6552 offset: usize,
6553 depth: fidl::encoding::Depth,
6554 ) -> fidl::Result<()> {
6555 encoder.debug_check_bounds::<MlmeGetMinstrelStatsRequest>(offset);
6556 self.0.encode(encoder, offset + 0, depth)?;
6560 Ok(())
6561 }
6562 }
6563
6564 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6565 for MlmeGetMinstrelStatsRequest
6566 {
6567 #[inline(always)]
6568 fn new_empty() -> Self {
6569 Self { req: fidl::new_empty!(MinstrelStatsRequest, D) }
6570 }
6571
6572 #[inline]
6573 unsafe fn decode(
6574 &mut self,
6575 decoder: &mut fidl::encoding::Decoder<'_, D>,
6576 offset: usize,
6577 _depth: fidl::encoding::Depth,
6578 ) -> fidl::Result<()> {
6579 decoder.debug_check_bounds::<Self>(offset);
6580 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6581 unsafe {
6584 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
6585 }
6586 Ok(())
6587 }
6588 }
6589
6590 impl fidl::encoding::ValueTypeMarker for MlmeGetMinstrelStatsResponse {
6591 type Borrowed<'a> = &'a Self;
6592 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6593 value
6594 }
6595 }
6596
6597 unsafe impl fidl::encoding::TypeMarker for MlmeGetMinstrelStatsResponse {
6598 type Owned = Self;
6599
6600 #[inline(always)]
6601 fn inline_align(_context: fidl::encoding::Context) -> usize {
6602 8
6603 }
6604
6605 #[inline(always)]
6606 fn inline_size(_context: fidl::encoding::Context) -> usize {
6607 8
6608 }
6609 }
6610
6611 unsafe impl<D: fidl::encoding::ResourceDialect>
6612 fidl::encoding::Encode<MlmeGetMinstrelStatsResponse, D> for &MlmeGetMinstrelStatsResponse
6613 {
6614 #[inline]
6615 unsafe fn encode(
6616 self,
6617 encoder: &mut fidl::encoding::Encoder<'_, D>,
6618 offset: usize,
6619 _depth: fidl::encoding::Depth,
6620 ) -> fidl::Result<()> {
6621 encoder.debug_check_bounds::<MlmeGetMinstrelStatsResponse>(offset);
6622 fidl::encoding::Encode::<MlmeGetMinstrelStatsResponse, D>::encode(
6624 (<MinstrelStatsResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
6625 encoder,
6626 offset,
6627 _depth,
6628 )
6629 }
6630 }
6631 unsafe impl<
6632 D: fidl::encoding::ResourceDialect,
6633 T0: fidl::encoding::Encode<MinstrelStatsResponse, D>,
6634 > fidl::encoding::Encode<MlmeGetMinstrelStatsResponse, D> for (T0,)
6635 {
6636 #[inline]
6637 unsafe fn encode(
6638 self,
6639 encoder: &mut fidl::encoding::Encoder<'_, D>,
6640 offset: usize,
6641 depth: fidl::encoding::Depth,
6642 ) -> fidl::Result<()> {
6643 encoder.debug_check_bounds::<MlmeGetMinstrelStatsResponse>(offset);
6644 self.0.encode(encoder, offset + 0, depth)?;
6648 Ok(())
6649 }
6650 }
6651
6652 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6653 for MlmeGetMinstrelStatsResponse
6654 {
6655 #[inline(always)]
6656 fn new_empty() -> Self {
6657 Self { resp: fidl::new_empty!(MinstrelStatsResponse, D) }
6658 }
6659
6660 #[inline]
6661 unsafe fn decode(
6662 &mut self,
6663 decoder: &mut fidl::encoding::Decoder<'_, D>,
6664 offset: usize,
6665 _depth: fidl::encoding::Depth,
6666 ) -> fidl::Result<()> {
6667 decoder.debug_check_bounds::<Self>(offset);
6668 fidl::decode!(MinstrelStatsResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
6670 Ok(())
6671 }
6672 }
6673
6674 impl fidl::encoding::ValueTypeMarker for MlmeListMinstrelPeersResponse {
6675 type Borrowed<'a> = &'a Self;
6676 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6677 value
6678 }
6679 }
6680
6681 unsafe impl fidl::encoding::TypeMarker for MlmeListMinstrelPeersResponse {
6682 type Owned = Self;
6683
6684 #[inline(always)]
6685 fn inline_align(_context: fidl::encoding::Context) -> usize {
6686 8
6687 }
6688
6689 #[inline(always)]
6690 fn inline_size(_context: fidl::encoding::Context) -> usize {
6691 16
6692 }
6693 }
6694
6695 unsafe impl<D: fidl::encoding::ResourceDialect>
6696 fidl::encoding::Encode<MlmeListMinstrelPeersResponse, D>
6697 for &MlmeListMinstrelPeersResponse
6698 {
6699 #[inline]
6700 unsafe fn encode(
6701 self,
6702 encoder: &mut fidl::encoding::Encoder<'_, D>,
6703 offset: usize,
6704 _depth: fidl::encoding::Depth,
6705 ) -> fidl::Result<()> {
6706 encoder.debug_check_bounds::<MlmeListMinstrelPeersResponse>(offset);
6707 fidl::encoding::Encode::<MlmeListMinstrelPeersResponse, D>::encode(
6709 (<MinstrelListResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
6710 encoder,
6711 offset,
6712 _depth,
6713 )
6714 }
6715 }
6716 unsafe impl<
6717 D: fidl::encoding::ResourceDialect,
6718 T0: fidl::encoding::Encode<MinstrelListResponse, D>,
6719 > fidl::encoding::Encode<MlmeListMinstrelPeersResponse, D> for (T0,)
6720 {
6721 #[inline]
6722 unsafe fn encode(
6723 self,
6724 encoder: &mut fidl::encoding::Encoder<'_, D>,
6725 offset: usize,
6726 depth: fidl::encoding::Depth,
6727 ) -> fidl::Result<()> {
6728 encoder.debug_check_bounds::<MlmeListMinstrelPeersResponse>(offset);
6729 self.0.encode(encoder, offset + 0, depth)?;
6733 Ok(())
6734 }
6735 }
6736
6737 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6738 for MlmeListMinstrelPeersResponse
6739 {
6740 #[inline(always)]
6741 fn new_empty() -> Self {
6742 Self { resp: fidl::new_empty!(MinstrelListResponse, D) }
6743 }
6744
6745 #[inline]
6746 unsafe fn decode(
6747 &mut self,
6748 decoder: &mut fidl::encoding::Decoder<'_, D>,
6749 offset: usize,
6750 _depth: fidl::encoding::Depth,
6751 ) -> fidl::Result<()> {
6752 decoder.debug_check_bounds::<Self>(offset);
6753 fidl::decode!(MinstrelListResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
6755 Ok(())
6756 }
6757 }
6758
6759 impl fidl::encoding::ValueTypeMarker for MlmeOnChannelSwitchedRequest {
6760 type Borrowed<'a> = &'a Self;
6761 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6762 value
6763 }
6764 }
6765
6766 unsafe impl fidl::encoding::TypeMarker for MlmeOnChannelSwitchedRequest {
6767 type Owned = Self;
6768
6769 #[inline(always)]
6770 fn inline_align(_context: fidl::encoding::Context) -> usize {
6771 1
6772 }
6773
6774 #[inline(always)]
6775 fn inline_size(_context: fidl::encoding::Context) -> usize {
6776 1
6777 }
6778 }
6779
6780 unsafe impl<D: fidl::encoding::ResourceDialect>
6781 fidl::encoding::Encode<MlmeOnChannelSwitchedRequest, D> for &MlmeOnChannelSwitchedRequest
6782 {
6783 #[inline]
6784 unsafe fn encode(
6785 self,
6786 encoder: &mut fidl::encoding::Encoder<'_, D>,
6787 offset: usize,
6788 _depth: fidl::encoding::Depth,
6789 ) -> fidl::Result<()> {
6790 encoder.debug_check_bounds::<MlmeOnChannelSwitchedRequest>(offset);
6791 fidl::encoding::Encode::<MlmeOnChannelSwitchedRequest, D>::encode(
6793 (
6794 <fidl_fuchsia_wlan_internal::ChannelSwitchInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),
6795 ),
6796 encoder, offset, _depth
6797 )
6798 }
6799 }
6800 unsafe impl<
6801 D: fidl::encoding::ResourceDialect,
6802 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal::ChannelSwitchInfo, D>,
6803 > fidl::encoding::Encode<MlmeOnChannelSwitchedRequest, D> for (T0,)
6804 {
6805 #[inline]
6806 unsafe fn encode(
6807 self,
6808 encoder: &mut fidl::encoding::Encoder<'_, D>,
6809 offset: usize,
6810 depth: fidl::encoding::Depth,
6811 ) -> fidl::Result<()> {
6812 encoder.debug_check_bounds::<MlmeOnChannelSwitchedRequest>(offset);
6813 self.0.encode(encoder, offset + 0, depth)?;
6817 Ok(())
6818 }
6819 }
6820
6821 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6822 for MlmeOnChannelSwitchedRequest
6823 {
6824 #[inline(always)]
6825 fn new_empty() -> Self {
6826 Self { info: fidl::new_empty!(fidl_fuchsia_wlan_internal::ChannelSwitchInfo, D) }
6827 }
6828
6829 #[inline]
6830 unsafe fn decode(
6831 &mut self,
6832 decoder: &mut fidl::encoding::Decoder<'_, D>,
6833 offset: usize,
6834 _depth: fidl::encoding::Depth,
6835 ) -> fidl::Result<()> {
6836 decoder.debug_check_bounds::<Self>(offset);
6837 fidl::decode!(
6839 fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
6840 D,
6841 &mut self.info,
6842 decoder,
6843 offset + 0,
6844 _depth
6845 )?;
6846 Ok(())
6847 }
6848 }
6849
6850 impl fidl::encoding::ValueTypeMarker for MlmeOnPmkAvailableRequest {
6851 type Borrowed<'a> = &'a Self;
6852 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6853 value
6854 }
6855 }
6856
6857 unsafe impl fidl::encoding::TypeMarker for MlmeOnPmkAvailableRequest {
6858 type Owned = Self;
6859
6860 #[inline(always)]
6861 fn inline_align(_context: fidl::encoding::Context) -> usize {
6862 8
6863 }
6864
6865 #[inline(always)]
6866 fn inline_size(_context: fidl::encoding::Context) -> usize {
6867 32
6868 }
6869 }
6870
6871 unsafe impl<D: fidl::encoding::ResourceDialect>
6872 fidl::encoding::Encode<MlmeOnPmkAvailableRequest, D> for &MlmeOnPmkAvailableRequest
6873 {
6874 #[inline]
6875 unsafe fn encode(
6876 self,
6877 encoder: &mut fidl::encoding::Encoder<'_, D>,
6878 offset: usize,
6879 _depth: fidl::encoding::Depth,
6880 ) -> fidl::Result<()> {
6881 encoder.debug_check_bounds::<MlmeOnPmkAvailableRequest>(offset);
6882 fidl::encoding::Encode::<MlmeOnPmkAvailableRequest, D>::encode(
6884 (<PmkInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
6885 encoder,
6886 offset,
6887 _depth,
6888 )
6889 }
6890 }
6891 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<PmkInfo, D>>
6892 fidl::encoding::Encode<MlmeOnPmkAvailableRequest, D> for (T0,)
6893 {
6894 #[inline]
6895 unsafe fn encode(
6896 self,
6897 encoder: &mut fidl::encoding::Encoder<'_, D>,
6898 offset: usize,
6899 depth: fidl::encoding::Depth,
6900 ) -> fidl::Result<()> {
6901 encoder.debug_check_bounds::<MlmeOnPmkAvailableRequest>(offset);
6902 self.0.encode(encoder, offset + 0, depth)?;
6906 Ok(())
6907 }
6908 }
6909
6910 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6911 for MlmeOnPmkAvailableRequest
6912 {
6913 #[inline(always)]
6914 fn new_empty() -> Self {
6915 Self { info: fidl::new_empty!(PmkInfo, D) }
6916 }
6917
6918 #[inline]
6919 unsafe fn decode(
6920 &mut self,
6921 decoder: &mut fidl::encoding::Decoder<'_, D>,
6922 offset: usize,
6923 _depth: fidl::encoding::Depth,
6924 ) -> fidl::Result<()> {
6925 decoder.debug_check_bounds::<Self>(offset);
6926 fidl::decode!(PmkInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
6928 Ok(())
6929 }
6930 }
6931
6932 impl fidl::encoding::ValueTypeMarker for MlmeOnSaeFrameRxRequest {
6933 type Borrowed<'a> = &'a Self;
6934 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6935 value
6936 }
6937 }
6938
6939 unsafe impl fidl::encoding::TypeMarker for MlmeOnSaeFrameRxRequest {
6940 type Owned = Self;
6941
6942 #[inline(always)]
6943 fn inline_align(_context: fidl::encoding::Context) -> usize {
6944 8
6945 }
6946
6947 #[inline(always)]
6948 fn inline_size(_context: fidl::encoding::Context) -> usize {
6949 32
6950 }
6951 }
6952
6953 unsafe impl<D: fidl::encoding::ResourceDialect>
6954 fidl::encoding::Encode<MlmeOnSaeFrameRxRequest, D> for &MlmeOnSaeFrameRxRequest
6955 {
6956 #[inline]
6957 unsafe fn encode(
6958 self,
6959 encoder: &mut fidl::encoding::Encoder<'_, D>,
6960 offset: usize,
6961 _depth: fidl::encoding::Depth,
6962 ) -> fidl::Result<()> {
6963 encoder.debug_check_bounds::<MlmeOnSaeFrameRxRequest>(offset);
6964 fidl::encoding::Encode::<MlmeOnSaeFrameRxRequest, D>::encode(
6966 (<SaeFrame as fidl::encoding::ValueTypeMarker>::borrow(&self.frame),),
6967 encoder,
6968 offset,
6969 _depth,
6970 )
6971 }
6972 }
6973 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SaeFrame, D>>
6974 fidl::encoding::Encode<MlmeOnSaeFrameRxRequest, D> for (T0,)
6975 {
6976 #[inline]
6977 unsafe fn encode(
6978 self,
6979 encoder: &mut fidl::encoding::Encoder<'_, D>,
6980 offset: usize,
6981 depth: fidl::encoding::Depth,
6982 ) -> fidl::Result<()> {
6983 encoder.debug_check_bounds::<MlmeOnSaeFrameRxRequest>(offset);
6984 self.0.encode(encoder, offset + 0, depth)?;
6988 Ok(())
6989 }
6990 }
6991
6992 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6993 for MlmeOnSaeFrameRxRequest
6994 {
6995 #[inline(always)]
6996 fn new_empty() -> Self {
6997 Self { frame: fidl::new_empty!(SaeFrame, D) }
6998 }
6999
7000 #[inline]
7001 unsafe fn decode(
7002 &mut self,
7003 decoder: &mut fidl::encoding::Decoder<'_, D>,
7004 offset: usize,
7005 _depth: fidl::encoding::Depth,
7006 ) -> fidl::Result<()> {
7007 decoder.debug_check_bounds::<Self>(offset);
7008 fidl::decode!(SaeFrame, D, &mut self.frame, decoder, offset + 0, _depth)?;
7010 Ok(())
7011 }
7012 }
7013
7014 impl fidl::encoding::ValueTypeMarker for MlmeOnSaeHandshakeIndRequest {
7015 type Borrowed<'a> = &'a Self;
7016 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7017 value
7018 }
7019 }
7020
7021 unsafe impl fidl::encoding::TypeMarker for MlmeOnSaeHandshakeIndRequest {
7022 type Owned = Self;
7023
7024 #[inline(always)]
7025 fn inline_align(_context: fidl::encoding::Context) -> usize {
7026 1
7027 }
7028
7029 #[inline(always)]
7030 fn inline_size(_context: fidl::encoding::Context) -> usize {
7031 6
7032 }
7033 #[inline(always)]
7034 fn encode_is_copy() -> bool {
7035 true
7036 }
7037
7038 #[inline(always)]
7039 fn decode_is_copy() -> bool {
7040 true
7041 }
7042 }
7043
7044 unsafe impl<D: fidl::encoding::ResourceDialect>
7045 fidl::encoding::Encode<MlmeOnSaeHandshakeIndRequest, D> for &MlmeOnSaeHandshakeIndRequest
7046 {
7047 #[inline]
7048 unsafe fn encode(
7049 self,
7050 encoder: &mut fidl::encoding::Encoder<'_, D>,
7051 offset: usize,
7052 _depth: fidl::encoding::Depth,
7053 ) -> fidl::Result<()> {
7054 encoder.debug_check_bounds::<MlmeOnSaeHandshakeIndRequest>(offset);
7055 unsafe {
7056 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7058 (buf_ptr as *mut MlmeOnSaeHandshakeIndRequest)
7059 .write_unaligned((self as *const MlmeOnSaeHandshakeIndRequest).read());
7060 }
7063 Ok(())
7064 }
7065 }
7066 unsafe impl<
7067 D: fidl::encoding::ResourceDialect,
7068 T0: fidl::encoding::Encode<SaeHandshakeIndication, D>,
7069 > fidl::encoding::Encode<MlmeOnSaeHandshakeIndRequest, D> for (T0,)
7070 {
7071 #[inline]
7072 unsafe fn encode(
7073 self,
7074 encoder: &mut fidl::encoding::Encoder<'_, D>,
7075 offset: usize,
7076 depth: fidl::encoding::Depth,
7077 ) -> fidl::Result<()> {
7078 encoder.debug_check_bounds::<MlmeOnSaeHandshakeIndRequest>(offset);
7079 self.0.encode(encoder, offset + 0, depth)?;
7083 Ok(())
7084 }
7085 }
7086
7087 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7088 for MlmeOnSaeHandshakeIndRequest
7089 {
7090 #[inline(always)]
7091 fn new_empty() -> Self {
7092 Self { ind: fidl::new_empty!(SaeHandshakeIndication, D) }
7093 }
7094
7095 #[inline]
7096 unsafe fn decode(
7097 &mut self,
7098 decoder: &mut fidl::encoding::Decoder<'_, D>,
7099 offset: usize,
7100 _depth: fidl::encoding::Depth,
7101 ) -> fidl::Result<()> {
7102 decoder.debug_check_bounds::<Self>(offset);
7103 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7104 unsafe {
7107 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
7108 }
7109 Ok(())
7110 }
7111 }
7112
7113 impl fidl::encoding::ValueTypeMarker for MlmeOnScanEndRequest {
7114 type Borrowed<'a> = &'a Self;
7115 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7116 value
7117 }
7118 }
7119
7120 unsafe impl fidl::encoding::TypeMarker for MlmeOnScanEndRequest {
7121 type Owned = Self;
7122
7123 #[inline(always)]
7124 fn inline_align(_context: fidl::encoding::Context) -> usize {
7125 8
7126 }
7127
7128 #[inline(always)]
7129 fn inline_size(_context: fidl::encoding::Context) -> usize {
7130 16
7131 }
7132 }
7133
7134 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeOnScanEndRequest, D>
7135 for &MlmeOnScanEndRequest
7136 {
7137 #[inline]
7138 unsafe fn encode(
7139 self,
7140 encoder: &mut fidl::encoding::Encoder<'_, D>,
7141 offset: usize,
7142 _depth: fidl::encoding::Depth,
7143 ) -> fidl::Result<()> {
7144 encoder.debug_check_bounds::<MlmeOnScanEndRequest>(offset);
7145 fidl::encoding::Encode::<MlmeOnScanEndRequest, D>::encode(
7147 (<ScanEnd as fidl::encoding::ValueTypeMarker>::borrow(&self.end),),
7148 encoder,
7149 offset,
7150 _depth,
7151 )
7152 }
7153 }
7154 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ScanEnd, D>>
7155 fidl::encoding::Encode<MlmeOnScanEndRequest, D> for (T0,)
7156 {
7157 #[inline]
7158 unsafe fn encode(
7159 self,
7160 encoder: &mut fidl::encoding::Encoder<'_, D>,
7161 offset: usize,
7162 depth: fidl::encoding::Depth,
7163 ) -> fidl::Result<()> {
7164 encoder.debug_check_bounds::<MlmeOnScanEndRequest>(offset);
7165 self.0.encode(encoder, offset + 0, depth)?;
7169 Ok(())
7170 }
7171 }
7172
7173 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeOnScanEndRequest {
7174 #[inline(always)]
7175 fn new_empty() -> Self {
7176 Self { end: fidl::new_empty!(ScanEnd, D) }
7177 }
7178
7179 #[inline]
7180 unsafe fn decode(
7181 &mut self,
7182 decoder: &mut fidl::encoding::Decoder<'_, D>,
7183 offset: usize,
7184 _depth: fidl::encoding::Depth,
7185 ) -> fidl::Result<()> {
7186 decoder.debug_check_bounds::<Self>(offset);
7187 fidl::decode!(ScanEnd, D, &mut self.end, decoder, offset + 0, _depth)?;
7189 Ok(())
7190 }
7191 }
7192
7193 impl fidl::encoding::ValueTypeMarker for MlmeOnScanResultRequest {
7194 type Borrowed<'a> = &'a Self;
7195 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7196 value
7197 }
7198 }
7199
7200 unsafe impl fidl::encoding::TypeMarker for MlmeOnScanResultRequest {
7201 type Owned = Self;
7202
7203 #[inline(always)]
7204 fn inline_align(_context: fidl::encoding::Context) -> usize {
7205 8
7206 }
7207
7208 #[inline(always)]
7209 fn inline_size(_context: fidl::encoding::Context) -> usize {
7210 64
7211 }
7212 }
7213
7214 unsafe impl<D: fidl::encoding::ResourceDialect>
7215 fidl::encoding::Encode<MlmeOnScanResultRequest, D> for &MlmeOnScanResultRequest
7216 {
7217 #[inline]
7218 unsafe fn encode(
7219 self,
7220 encoder: &mut fidl::encoding::Encoder<'_, D>,
7221 offset: usize,
7222 _depth: fidl::encoding::Depth,
7223 ) -> fidl::Result<()> {
7224 encoder.debug_check_bounds::<MlmeOnScanResultRequest>(offset);
7225 fidl::encoding::Encode::<MlmeOnScanResultRequest, D>::encode(
7227 (<ScanResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
7228 encoder,
7229 offset,
7230 _depth,
7231 )
7232 }
7233 }
7234 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ScanResult, D>>
7235 fidl::encoding::Encode<MlmeOnScanResultRequest, D> for (T0,)
7236 {
7237 #[inline]
7238 unsafe fn encode(
7239 self,
7240 encoder: &mut fidl::encoding::Encoder<'_, D>,
7241 offset: usize,
7242 depth: fidl::encoding::Depth,
7243 ) -> fidl::Result<()> {
7244 encoder.debug_check_bounds::<MlmeOnScanResultRequest>(offset);
7245 self.0.encode(encoder, offset + 0, depth)?;
7249 Ok(())
7250 }
7251 }
7252
7253 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7254 for MlmeOnScanResultRequest
7255 {
7256 #[inline(always)]
7257 fn new_empty() -> Self {
7258 Self { result: fidl::new_empty!(ScanResult, D) }
7259 }
7260
7261 #[inline]
7262 unsafe fn decode(
7263 &mut self,
7264 decoder: &mut fidl::encoding::Decoder<'_, D>,
7265 offset: usize,
7266 _depth: fidl::encoding::Depth,
7267 ) -> fidl::Result<()> {
7268 decoder.debug_check_bounds::<Self>(offset);
7269 fidl::decode!(ScanResult, D, &mut self.result, decoder, offset + 0, _depth)?;
7271 Ok(())
7272 }
7273 }
7274
7275 impl fidl::encoding::ValueTypeMarker for MlmeOnWmmStatusRespRequest {
7276 type Borrowed<'a> = &'a Self;
7277 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7278 value
7279 }
7280 }
7281
7282 unsafe impl fidl::encoding::TypeMarker for MlmeOnWmmStatusRespRequest {
7283 type Owned = Self;
7284
7285 #[inline(always)]
7286 fn inline_align(_context: fidl::encoding::Context) -> usize {
7287 4
7288 }
7289
7290 #[inline(always)]
7291 fn inline_size(_context: fidl::encoding::Context) -> usize {
7292 40
7293 }
7294 }
7295
7296 unsafe impl<D: fidl::encoding::ResourceDialect>
7297 fidl::encoding::Encode<MlmeOnWmmStatusRespRequest, D> for &MlmeOnWmmStatusRespRequest
7298 {
7299 #[inline]
7300 unsafe fn encode(
7301 self,
7302 encoder: &mut fidl::encoding::Encoder<'_, D>,
7303 offset: usize,
7304 _depth: fidl::encoding::Depth,
7305 ) -> fidl::Result<()> {
7306 encoder.debug_check_bounds::<MlmeOnWmmStatusRespRequest>(offset);
7307 fidl::encoding::Encode::<MlmeOnWmmStatusRespRequest, D>::encode(
7309 (
7310 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.status),
7311 <fidl_fuchsia_wlan_internal::WmmStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
7312 ),
7313 encoder, offset, _depth
7314 )
7315 }
7316 }
7317 unsafe impl<
7318 D: fidl::encoding::ResourceDialect,
7319 T0: fidl::encoding::Encode<i32, D>,
7320 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_internal::WmmStatusResponse, D>,
7321 > fidl::encoding::Encode<MlmeOnWmmStatusRespRequest, D> for (T0, T1)
7322 {
7323 #[inline]
7324 unsafe fn encode(
7325 self,
7326 encoder: &mut fidl::encoding::Encoder<'_, D>,
7327 offset: usize,
7328 depth: fidl::encoding::Depth,
7329 ) -> fidl::Result<()> {
7330 encoder.debug_check_bounds::<MlmeOnWmmStatusRespRequest>(offset);
7331 unsafe {
7334 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(36);
7335 (ptr as *mut u32).write_unaligned(0);
7336 }
7337 self.0.encode(encoder, offset + 0, depth)?;
7339 self.1.encode(encoder, offset + 4, depth)?;
7340 Ok(())
7341 }
7342 }
7343
7344 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7345 for MlmeOnWmmStatusRespRequest
7346 {
7347 #[inline(always)]
7348 fn new_empty() -> Self {
7349 Self {
7350 status: fidl::new_empty!(i32, D),
7351 resp: fidl::new_empty!(fidl_fuchsia_wlan_internal::WmmStatusResponse, D),
7352 }
7353 }
7354
7355 #[inline]
7356 unsafe fn decode(
7357 &mut self,
7358 decoder: &mut fidl::encoding::Decoder<'_, D>,
7359 offset: usize,
7360 _depth: fidl::encoding::Depth,
7361 ) -> fidl::Result<()> {
7362 decoder.debug_check_bounds::<Self>(offset);
7363 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(36) };
7365 let padval = unsafe { (ptr as *const u32).read_unaligned() };
7366 let mask = 0xffff0000u32;
7367 let maskedval = padval & mask;
7368 if maskedval != 0 {
7369 return Err(fidl::Error::NonZeroPadding {
7370 padding_start: offset + 36 + ((mask as u64).trailing_zeros() / 8) as usize,
7371 });
7372 }
7373 fidl::decode!(i32, D, &mut self.status, decoder, offset + 0, _depth)?;
7374 fidl::decode!(
7375 fidl_fuchsia_wlan_internal::WmmStatusResponse,
7376 D,
7377 &mut self.resp,
7378 decoder,
7379 offset + 4,
7380 _depth
7381 )?;
7382 Ok(())
7383 }
7384 }
7385
7386 impl fidl::encoding::ValueTypeMarker for MlmeQueryDeviceInfoResponse {
7387 type Borrowed<'a> = &'a Self;
7388 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7389 value
7390 }
7391 }
7392
7393 unsafe impl fidl::encoding::TypeMarker for MlmeQueryDeviceInfoResponse {
7394 type Owned = Self;
7395
7396 #[inline(always)]
7397 fn inline_align(_context: fidl::encoding::Context) -> usize {
7398 8
7399 }
7400
7401 #[inline(always)]
7402 fn inline_size(_context: fidl::encoding::Context) -> usize {
7403 40
7404 }
7405 }
7406
7407 unsafe impl<D: fidl::encoding::ResourceDialect>
7408 fidl::encoding::Encode<MlmeQueryDeviceInfoResponse, D> for &MlmeQueryDeviceInfoResponse
7409 {
7410 #[inline]
7411 unsafe fn encode(
7412 self,
7413 encoder: &mut fidl::encoding::Encoder<'_, D>,
7414 offset: usize,
7415 _depth: fidl::encoding::Depth,
7416 ) -> fidl::Result<()> {
7417 encoder.debug_check_bounds::<MlmeQueryDeviceInfoResponse>(offset);
7418 fidl::encoding::Encode::<MlmeQueryDeviceInfoResponse, D>::encode(
7420 (<DeviceInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
7421 encoder,
7422 offset,
7423 _depth,
7424 )
7425 }
7426 }
7427 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<DeviceInfo, D>>
7428 fidl::encoding::Encode<MlmeQueryDeviceInfoResponse, D> for (T0,)
7429 {
7430 #[inline]
7431 unsafe fn encode(
7432 self,
7433 encoder: &mut fidl::encoding::Encoder<'_, D>,
7434 offset: usize,
7435 depth: fidl::encoding::Depth,
7436 ) -> fidl::Result<()> {
7437 encoder.debug_check_bounds::<MlmeQueryDeviceInfoResponse>(offset);
7438 self.0.encode(encoder, offset + 0, depth)?;
7442 Ok(())
7443 }
7444 }
7445
7446 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7447 for MlmeQueryDeviceInfoResponse
7448 {
7449 #[inline(always)]
7450 fn new_empty() -> Self {
7451 Self { info: fidl::new_empty!(DeviceInfo, D) }
7452 }
7453
7454 #[inline]
7455 unsafe fn decode(
7456 &mut self,
7457 decoder: &mut fidl::encoding::Decoder<'_, D>,
7458 offset: usize,
7459 _depth: fidl::encoding::Depth,
7460 ) -> fidl::Result<()> {
7461 decoder.debug_check_bounds::<Self>(offset);
7462 fidl::decode!(DeviceInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
7464 Ok(())
7465 }
7466 }
7467
7468 impl fidl::encoding::ValueTypeMarker for MlmeReconnectReqRequest {
7469 type Borrowed<'a> = &'a Self;
7470 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7471 value
7472 }
7473 }
7474
7475 unsafe impl fidl::encoding::TypeMarker for MlmeReconnectReqRequest {
7476 type Owned = Self;
7477
7478 #[inline(always)]
7479 fn inline_align(_context: fidl::encoding::Context) -> usize {
7480 1
7481 }
7482
7483 #[inline(always)]
7484 fn inline_size(_context: fidl::encoding::Context) -> usize {
7485 6
7486 }
7487 #[inline(always)]
7488 fn encode_is_copy() -> bool {
7489 true
7490 }
7491
7492 #[inline(always)]
7493 fn decode_is_copy() -> bool {
7494 true
7495 }
7496 }
7497
7498 unsafe impl<D: fidl::encoding::ResourceDialect>
7499 fidl::encoding::Encode<MlmeReconnectReqRequest, D> for &MlmeReconnectReqRequest
7500 {
7501 #[inline]
7502 unsafe fn encode(
7503 self,
7504 encoder: &mut fidl::encoding::Encoder<'_, D>,
7505 offset: usize,
7506 _depth: fidl::encoding::Depth,
7507 ) -> fidl::Result<()> {
7508 encoder.debug_check_bounds::<MlmeReconnectReqRequest>(offset);
7509 unsafe {
7510 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7512 (buf_ptr as *mut MlmeReconnectReqRequest)
7513 .write_unaligned((self as *const MlmeReconnectReqRequest).read());
7514 }
7517 Ok(())
7518 }
7519 }
7520 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ReconnectRequest, D>>
7521 fidl::encoding::Encode<MlmeReconnectReqRequest, D> for (T0,)
7522 {
7523 #[inline]
7524 unsafe fn encode(
7525 self,
7526 encoder: &mut fidl::encoding::Encoder<'_, D>,
7527 offset: usize,
7528 depth: fidl::encoding::Depth,
7529 ) -> fidl::Result<()> {
7530 encoder.debug_check_bounds::<MlmeReconnectReqRequest>(offset);
7531 self.0.encode(encoder, offset + 0, depth)?;
7535 Ok(())
7536 }
7537 }
7538
7539 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7540 for MlmeReconnectReqRequest
7541 {
7542 #[inline(always)]
7543 fn new_empty() -> Self {
7544 Self { req: fidl::new_empty!(ReconnectRequest, D) }
7545 }
7546
7547 #[inline]
7548 unsafe fn decode(
7549 &mut self,
7550 decoder: &mut fidl::encoding::Decoder<'_, D>,
7551 offset: usize,
7552 _depth: fidl::encoding::Depth,
7553 ) -> fidl::Result<()> {
7554 decoder.debug_check_bounds::<Self>(offset);
7555 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7556 unsafe {
7559 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
7560 }
7561 Ok(())
7562 }
7563 }
7564
7565 impl fidl::encoding::ValueTypeMarker for MlmeRelayCapturedFrameRequest {
7566 type Borrowed<'a> = &'a Self;
7567 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7568 value
7569 }
7570 }
7571
7572 unsafe impl fidl::encoding::TypeMarker for MlmeRelayCapturedFrameRequest {
7573 type Owned = Self;
7574
7575 #[inline(always)]
7576 fn inline_align(_context: fidl::encoding::Context) -> usize {
7577 8
7578 }
7579
7580 #[inline(always)]
7581 fn inline_size(_context: fidl::encoding::Context) -> usize {
7582 16
7583 }
7584 }
7585
7586 unsafe impl<D: fidl::encoding::ResourceDialect>
7587 fidl::encoding::Encode<MlmeRelayCapturedFrameRequest, D>
7588 for &MlmeRelayCapturedFrameRequest
7589 {
7590 #[inline]
7591 unsafe fn encode(
7592 self,
7593 encoder: &mut fidl::encoding::Encoder<'_, D>,
7594 offset: usize,
7595 _depth: fidl::encoding::Depth,
7596 ) -> fidl::Result<()> {
7597 encoder.debug_check_bounds::<MlmeRelayCapturedFrameRequest>(offset);
7598 fidl::encoding::Encode::<MlmeRelayCapturedFrameRequest, D>::encode(
7600 (<CapturedFrameResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
7601 encoder,
7602 offset,
7603 _depth,
7604 )
7605 }
7606 }
7607 unsafe impl<
7608 D: fidl::encoding::ResourceDialect,
7609 T0: fidl::encoding::Encode<CapturedFrameResult, D>,
7610 > fidl::encoding::Encode<MlmeRelayCapturedFrameRequest, D> for (T0,)
7611 {
7612 #[inline]
7613 unsafe fn encode(
7614 self,
7615 encoder: &mut fidl::encoding::Encoder<'_, D>,
7616 offset: usize,
7617 depth: fidl::encoding::Depth,
7618 ) -> fidl::Result<()> {
7619 encoder.debug_check_bounds::<MlmeRelayCapturedFrameRequest>(offset);
7620 self.0.encode(encoder, offset + 0, depth)?;
7624 Ok(())
7625 }
7626 }
7627
7628 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7629 for MlmeRelayCapturedFrameRequest
7630 {
7631 #[inline(always)]
7632 fn new_empty() -> Self {
7633 Self { result: fidl::new_empty!(CapturedFrameResult, D) }
7634 }
7635
7636 #[inline]
7637 unsafe fn decode(
7638 &mut self,
7639 decoder: &mut fidl::encoding::Decoder<'_, D>,
7640 offset: usize,
7641 _depth: fidl::encoding::Depth,
7642 ) -> fidl::Result<()> {
7643 decoder.debug_check_bounds::<Self>(offset);
7644 fidl::decode!(CapturedFrameResult, D, &mut self.result, decoder, offset + 0, _depth)?;
7646 Ok(())
7647 }
7648 }
7649
7650 impl fidl::encoding::ValueTypeMarker for MlmeResetReqRequest {
7651 type Borrowed<'a> = &'a Self;
7652 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7653 value
7654 }
7655 }
7656
7657 unsafe impl fidl::encoding::TypeMarker for MlmeResetReqRequest {
7658 type Owned = Self;
7659
7660 #[inline(always)]
7661 fn inline_align(_context: fidl::encoding::Context) -> usize {
7662 1
7663 }
7664
7665 #[inline(always)]
7666 fn inline_size(_context: fidl::encoding::Context) -> usize {
7667 7
7668 }
7669 }
7670
7671 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeResetReqRequest, D>
7672 for &MlmeResetReqRequest
7673 {
7674 #[inline]
7675 unsafe fn encode(
7676 self,
7677 encoder: &mut fidl::encoding::Encoder<'_, D>,
7678 offset: usize,
7679 _depth: fidl::encoding::Depth,
7680 ) -> fidl::Result<()> {
7681 encoder.debug_check_bounds::<MlmeResetReqRequest>(offset);
7682 fidl::encoding::Encode::<MlmeResetReqRequest, D>::encode(
7684 (<ResetRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
7685 encoder,
7686 offset,
7687 _depth,
7688 )
7689 }
7690 }
7691 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ResetRequest, D>>
7692 fidl::encoding::Encode<MlmeResetReqRequest, D> for (T0,)
7693 {
7694 #[inline]
7695 unsafe fn encode(
7696 self,
7697 encoder: &mut fidl::encoding::Encoder<'_, D>,
7698 offset: usize,
7699 depth: fidl::encoding::Depth,
7700 ) -> fidl::Result<()> {
7701 encoder.debug_check_bounds::<MlmeResetReqRequest>(offset);
7702 self.0.encode(encoder, offset + 0, depth)?;
7706 Ok(())
7707 }
7708 }
7709
7710 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeResetReqRequest {
7711 #[inline(always)]
7712 fn new_empty() -> Self {
7713 Self { req: fidl::new_empty!(ResetRequest, D) }
7714 }
7715
7716 #[inline]
7717 unsafe fn decode(
7718 &mut self,
7719 decoder: &mut fidl::encoding::Decoder<'_, D>,
7720 offset: usize,
7721 _depth: fidl::encoding::Depth,
7722 ) -> fidl::Result<()> {
7723 decoder.debug_check_bounds::<Self>(offset);
7724 fidl::decode!(ResetRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
7726 Ok(())
7727 }
7728 }
7729
7730 impl fidl::encoding::ValueTypeMarker for MlmeRoamConfRequest {
7731 type Borrowed<'a> = &'a Self;
7732 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7733 value
7734 }
7735 }
7736
7737 unsafe impl fidl::encoding::TypeMarker for MlmeRoamConfRequest {
7738 type Owned = Self;
7739
7740 #[inline(always)]
7741 fn inline_align(_context: fidl::encoding::Context) -> usize {
7742 8
7743 }
7744
7745 #[inline(always)]
7746 fn inline_size(_context: fidl::encoding::Context) -> usize {
7747 32
7748 }
7749 }
7750
7751 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeRoamConfRequest, D>
7752 for &MlmeRoamConfRequest
7753 {
7754 #[inline]
7755 unsafe fn encode(
7756 self,
7757 encoder: &mut fidl::encoding::Encoder<'_, D>,
7758 offset: usize,
7759 _depth: fidl::encoding::Depth,
7760 ) -> fidl::Result<()> {
7761 encoder.debug_check_bounds::<MlmeRoamConfRequest>(offset);
7762 fidl::encoding::Encode::<MlmeRoamConfRequest, D>::encode(
7764 (<RoamConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.conf),),
7765 encoder,
7766 offset,
7767 _depth,
7768 )
7769 }
7770 }
7771 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RoamConfirm, D>>
7772 fidl::encoding::Encode<MlmeRoamConfRequest, D> for (T0,)
7773 {
7774 #[inline]
7775 unsafe fn encode(
7776 self,
7777 encoder: &mut fidl::encoding::Encoder<'_, D>,
7778 offset: usize,
7779 depth: fidl::encoding::Depth,
7780 ) -> fidl::Result<()> {
7781 encoder.debug_check_bounds::<MlmeRoamConfRequest>(offset);
7782 self.0.encode(encoder, offset + 0, depth)?;
7786 Ok(())
7787 }
7788 }
7789
7790 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeRoamConfRequest {
7791 #[inline(always)]
7792 fn new_empty() -> Self {
7793 Self { conf: fidl::new_empty!(RoamConfirm, D) }
7794 }
7795
7796 #[inline]
7797 unsafe fn decode(
7798 &mut self,
7799 decoder: &mut fidl::encoding::Decoder<'_, D>,
7800 offset: usize,
7801 _depth: fidl::encoding::Depth,
7802 ) -> fidl::Result<()> {
7803 decoder.debug_check_bounds::<Self>(offset);
7804 fidl::decode!(RoamConfirm, D, &mut self.conf, decoder, offset + 0, _depth)?;
7806 Ok(())
7807 }
7808 }
7809
7810 impl fidl::encoding::ValueTypeMarker for MlmeRoamReqRequest {
7811 type Borrowed<'a> = &'a Self;
7812 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7813 value
7814 }
7815 }
7816
7817 unsafe impl fidl::encoding::TypeMarker for MlmeRoamReqRequest {
7818 type Owned = Self;
7819
7820 #[inline(always)]
7821 fn inline_align(_context: fidl::encoding::Context) -> usize {
7822 8
7823 }
7824
7825 #[inline(always)]
7826 fn inline_size(_context: fidl::encoding::Context) -> usize {
7827 48
7828 }
7829 }
7830
7831 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeRoamReqRequest, D>
7832 for &MlmeRoamReqRequest
7833 {
7834 #[inline]
7835 unsafe fn encode(
7836 self,
7837 encoder: &mut fidl::encoding::Encoder<'_, D>,
7838 offset: usize,
7839 _depth: fidl::encoding::Depth,
7840 ) -> fidl::Result<()> {
7841 encoder.debug_check_bounds::<MlmeRoamReqRequest>(offset);
7842 fidl::encoding::Encode::<MlmeRoamReqRequest, D>::encode(
7844 (<RoamRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
7845 encoder,
7846 offset,
7847 _depth,
7848 )
7849 }
7850 }
7851 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RoamRequest, D>>
7852 fidl::encoding::Encode<MlmeRoamReqRequest, D> for (T0,)
7853 {
7854 #[inline]
7855 unsafe fn encode(
7856 self,
7857 encoder: &mut fidl::encoding::Encoder<'_, D>,
7858 offset: usize,
7859 depth: fidl::encoding::Depth,
7860 ) -> fidl::Result<()> {
7861 encoder.debug_check_bounds::<MlmeRoamReqRequest>(offset);
7862 self.0.encode(encoder, offset + 0, depth)?;
7866 Ok(())
7867 }
7868 }
7869
7870 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeRoamReqRequest {
7871 #[inline(always)]
7872 fn new_empty() -> Self {
7873 Self { req: fidl::new_empty!(RoamRequest, D) }
7874 }
7875
7876 #[inline]
7877 unsafe fn decode(
7878 &mut self,
7879 decoder: &mut fidl::encoding::Decoder<'_, D>,
7880 offset: usize,
7881 _depth: fidl::encoding::Depth,
7882 ) -> fidl::Result<()> {
7883 decoder.debug_check_bounds::<Self>(offset);
7884 fidl::decode!(RoamRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
7886 Ok(())
7887 }
7888 }
7889
7890 impl fidl::encoding::ValueTypeMarker for MlmeRoamResultIndRequest {
7891 type Borrowed<'a> = &'a Self;
7892 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7893 value
7894 }
7895 }
7896
7897 unsafe impl fidl::encoding::TypeMarker for MlmeRoamResultIndRequest {
7898 type Owned = Self;
7899
7900 #[inline(always)]
7901 fn inline_align(_context: fidl::encoding::Context) -> usize {
7902 8
7903 }
7904
7905 #[inline(always)]
7906 fn inline_size(_context: fidl::encoding::Context) -> usize {
7907 32
7908 }
7909 }
7910
7911 unsafe impl<D: fidl::encoding::ResourceDialect>
7912 fidl::encoding::Encode<MlmeRoamResultIndRequest, D> for &MlmeRoamResultIndRequest
7913 {
7914 #[inline]
7915 unsafe fn encode(
7916 self,
7917 encoder: &mut fidl::encoding::Encoder<'_, D>,
7918 offset: usize,
7919 _depth: fidl::encoding::Depth,
7920 ) -> fidl::Result<()> {
7921 encoder.debug_check_bounds::<MlmeRoamResultIndRequest>(offset);
7922 fidl::encoding::Encode::<MlmeRoamResultIndRequest, D>::encode(
7924 (<RoamResultIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
7925 encoder,
7926 offset,
7927 _depth,
7928 )
7929 }
7930 }
7931 unsafe impl<
7932 D: fidl::encoding::ResourceDialect,
7933 T0: fidl::encoding::Encode<RoamResultIndication, D>,
7934 > fidl::encoding::Encode<MlmeRoamResultIndRequest, D> for (T0,)
7935 {
7936 #[inline]
7937 unsafe fn encode(
7938 self,
7939 encoder: &mut fidl::encoding::Encoder<'_, D>,
7940 offset: usize,
7941 depth: fidl::encoding::Depth,
7942 ) -> fidl::Result<()> {
7943 encoder.debug_check_bounds::<MlmeRoamResultIndRequest>(offset);
7944 self.0.encode(encoder, offset + 0, depth)?;
7948 Ok(())
7949 }
7950 }
7951
7952 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7953 for MlmeRoamResultIndRequest
7954 {
7955 #[inline(always)]
7956 fn new_empty() -> Self {
7957 Self { ind: fidl::new_empty!(RoamResultIndication, D) }
7958 }
7959
7960 #[inline]
7961 unsafe fn decode(
7962 &mut self,
7963 decoder: &mut fidl::encoding::Decoder<'_, D>,
7964 offset: usize,
7965 _depth: fidl::encoding::Depth,
7966 ) -> fidl::Result<()> {
7967 decoder.debug_check_bounds::<Self>(offset);
7968 fidl::decode!(RoamResultIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
7970 Ok(())
7971 }
7972 }
7973
7974 impl fidl::encoding::ValueTypeMarker for MlmeRoamStartIndRequest {
7975 type Borrowed<'a> = &'a Self;
7976 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7977 value
7978 }
7979 }
7980
7981 unsafe impl fidl::encoding::TypeMarker for MlmeRoamStartIndRequest {
7982 type Owned = Self;
7983
7984 #[inline(always)]
7985 fn inline_align(_context: fidl::encoding::Context) -> usize {
7986 8
7987 }
7988
7989 #[inline(always)]
7990 fn inline_size(_context: fidl::encoding::Context) -> usize {
7991 64
7992 }
7993 }
7994
7995 unsafe impl<D: fidl::encoding::ResourceDialect>
7996 fidl::encoding::Encode<MlmeRoamStartIndRequest, D> for &MlmeRoamStartIndRequest
7997 {
7998 #[inline]
7999 unsafe fn encode(
8000 self,
8001 encoder: &mut fidl::encoding::Encoder<'_, D>,
8002 offset: usize,
8003 _depth: fidl::encoding::Depth,
8004 ) -> fidl::Result<()> {
8005 encoder.debug_check_bounds::<MlmeRoamStartIndRequest>(offset);
8006 fidl::encoding::Encode::<MlmeRoamStartIndRequest, D>::encode(
8008 (<RoamStartIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),),
8009 encoder,
8010 offset,
8011 _depth,
8012 )
8013 }
8014 }
8015 unsafe impl<
8016 D: fidl::encoding::ResourceDialect,
8017 T0: fidl::encoding::Encode<RoamStartIndication, D>,
8018 > fidl::encoding::Encode<MlmeRoamStartIndRequest, D> for (T0,)
8019 {
8020 #[inline]
8021 unsafe fn encode(
8022 self,
8023 encoder: &mut fidl::encoding::Encoder<'_, D>,
8024 offset: usize,
8025 depth: fidl::encoding::Depth,
8026 ) -> fidl::Result<()> {
8027 encoder.debug_check_bounds::<MlmeRoamStartIndRequest>(offset);
8028 self.0.encode(encoder, offset + 0, depth)?;
8032 Ok(())
8033 }
8034 }
8035
8036 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8037 for MlmeRoamStartIndRequest
8038 {
8039 #[inline(always)]
8040 fn new_empty() -> Self {
8041 Self { ind: fidl::new_empty!(RoamStartIndication, D) }
8042 }
8043
8044 #[inline]
8045 unsafe fn decode(
8046 &mut self,
8047 decoder: &mut fidl::encoding::Decoder<'_, D>,
8048 offset: usize,
8049 _depth: fidl::encoding::Depth,
8050 ) -> fidl::Result<()> {
8051 decoder.debug_check_bounds::<Self>(offset);
8052 fidl::decode!(RoamStartIndication, D, &mut self.ind, decoder, offset + 0, _depth)?;
8054 Ok(())
8055 }
8056 }
8057
8058 impl fidl::encoding::ValueTypeMarker for MlmeSaeFrameTxRequest {
8059 type Borrowed<'a> = &'a Self;
8060 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8061 value
8062 }
8063 }
8064
8065 unsafe impl fidl::encoding::TypeMarker for MlmeSaeFrameTxRequest {
8066 type Owned = Self;
8067
8068 #[inline(always)]
8069 fn inline_align(_context: fidl::encoding::Context) -> usize {
8070 8
8071 }
8072
8073 #[inline(always)]
8074 fn inline_size(_context: fidl::encoding::Context) -> usize {
8075 32
8076 }
8077 }
8078
8079 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeSaeFrameTxRequest, D>
8080 for &MlmeSaeFrameTxRequest
8081 {
8082 #[inline]
8083 unsafe fn encode(
8084 self,
8085 encoder: &mut fidl::encoding::Encoder<'_, D>,
8086 offset: usize,
8087 _depth: fidl::encoding::Depth,
8088 ) -> fidl::Result<()> {
8089 encoder.debug_check_bounds::<MlmeSaeFrameTxRequest>(offset);
8090 fidl::encoding::Encode::<MlmeSaeFrameTxRequest, D>::encode(
8092 (<SaeFrame as fidl::encoding::ValueTypeMarker>::borrow(&self.frame),),
8093 encoder,
8094 offset,
8095 _depth,
8096 )
8097 }
8098 }
8099 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SaeFrame, D>>
8100 fidl::encoding::Encode<MlmeSaeFrameTxRequest, D> for (T0,)
8101 {
8102 #[inline]
8103 unsafe fn encode(
8104 self,
8105 encoder: &mut fidl::encoding::Encoder<'_, D>,
8106 offset: usize,
8107 depth: fidl::encoding::Depth,
8108 ) -> fidl::Result<()> {
8109 encoder.debug_check_bounds::<MlmeSaeFrameTxRequest>(offset);
8110 self.0.encode(encoder, offset + 0, depth)?;
8114 Ok(())
8115 }
8116 }
8117
8118 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeSaeFrameTxRequest {
8119 #[inline(always)]
8120 fn new_empty() -> Self {
8121 Self { frame: fidl::new_empty!(SaeFrame, D) }
8122 }
8123
8124 #[inline]
8125 unsafe fn decode(
8126 &mut self,
8127 decoder: &mut fidl::encoding::Decoder<'_, D>,
8128 offset: usize,
8129 _depth: fidl::encoding::Depth,
8130 ) -> fidl::Result<()> {
8131 decoder.debug_check_bounds::<Self>(offset);
8132 fidl::decode!(SaeFrame, D, &mut self.frame, decoder, offset + 0, _depth)?;
8134 Ok(())
8135 }
8136 }
8137
8138 impl fidl::encoding::ValueTypeMarker for MlmeSaeHandshakeRespRequest {
8139 type Borrowed<'a> = &'a Self;
8140 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8141 value
8142 }
8143 }
8144
8145 unsafe impl fidl::encoding::TypeMarker for MlmeSaeHandshakeRespRequest {
8146 type Owned = Self;
8147
8148 #[inline(always)]
8149 fn inline_align(_context: fidl::encoding::Context) -> usize {
8150 2
8151 }
8152
8153 #[inline(always)]
8154 fn inline_size(_context: fidl::encoding::Context) -> usize {
8155 8
8156 }
8157 }
8158
8159 unsafe impl<D: fidl::encoding::ResourceDialect>
8160 fidl::encoding::Encode<MlmeSaeHandshakeRespRequest, D> for &MlmeSaeHandshakeRespRequest
8161 {
8162 #[inline]
8163 unsafe fn encode(
8164 self,
8165 encoder: &mut fidl::encoding::Encoder<'_, D>,
8166 offset: usize,
8167 _depth: fidl::encoding::Depth,
8168 ) -> fidl::Result<()> {
8169 encoder.debug_check_bounds::<MlmeSaeHandshakeRespRequest>(offset);
8170 fidl::encoding::Encode::<MlmeSaeHandshakeRespRequest, D>::encode(
8172 (<SaeHandshakeResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
8173 encoder,
8174 offset,
8175 _depth,
8176 )
8177 }
8178 }
8179 unsafe impl<
8180 D: fidl::encoding::ResourceDialect,
8181 T0: fidl::encoding::Encode<SaeHandshakeResponse, D>,
8182 > fidl::encoding::Encode<MlmeSaeHandshakeRespRequest, D> for (T0,)
8183 {
8184 #[inline]
8185 unsafe fn encode(
8186 self,
8187 encoder: &mut fidl::encoding::Encoder<'_, D>,
8188 offset: usize,
8189 depth: fidl::encoding::Depth,
8190 ) -> fidl::Result<()> {
8191 encoder.debug_check_bounds::<MlmeSaeHandshakeRespRequest>(offset);
8192 self.0.encode(encoder, offset + 0, depth)?;
8196 Ok(())
8197 }
8198 }
8199
8200 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8201 for MlmeSaeHandshakeRespRequest
8202 {
8203 #[inline(always)]
8204 fn new_empty() -> Self {
8205 Self { resp: fidl::new_empty!(SaeHandshakeResponse, D) }
8206 }
8207
8208 #[inline]
8209 unsafe fn decode(
8210 &mut self,
8211 decoder: &mut fidl::encoding::Decoder<'_, D>,
8212 offset: usize,
8213 _depth: fidl::encoding::Depth,
8214 ) -> fidl::Result<()> {
8215 decoder.debug_check_bounds::<Self>(offset);
8216 fidl::decode!(SaeHandshakeResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
8218 Ok(())
8219 }
8220 }
8221
8222 impl fidl::encoding::ValueTypeMarker for MlmeSetControlledPortRequest {
8223 type Borrowed<'a> = &'a Self;
8224 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8225 value
8226 }
8227 }
8228
8229 unsafe impl fidl::encoding::TypeMarker for MlmeSetControlledPortRequest {
8230 type Owned = Self;
8231
8232 #[inline(always)]
8233 fn inline_align(_context: fidl::encoding::Context) -> usize {
8234 4
8235 }
8236
8237 #[inline(always)]
8238 fn inline_size(_context: fidl::encoding::Context) -> usize {
8239 12
8240 }
8241 }
8242
8243 unsafe impl<D: fidl::encoding::ResourceDialect>
8244 fidl::encoding::Encode<MlmeSetControlledPortRequest, D> for &MlmeSetControlledPortRequest
8245 {
8246 #[inline]
8247 unsafe fn encode(
8248 self,
8249 encoder: &mut fidl::encoding::Encoder<'_, D>,
8250 offset: usize,
8251 _depth: fidl::encoding::Depth,
8252 ) -> fidl::Result<()> {
8253 encoder.debug_check_bounds::<MlmeSetControlledPortRequest>(offset);
8254 fidl::encoding::Encode::<MlmeSetControlledPortRequest, D>::encode(
8256 (<SetControlledPortRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
8257 encoder,
8258 offset,
8259 _depth,
8260 )
8261 }
8262 }
8263 unsafe impl<
8264 D: fidl::encoding::ResourceDialect,
8265 T0: fidl::encoding::Encode<SetControlledPortRequest, D>,
8266 > fidl::encoding::Encode<MlmeSetControlledPortRequest, D> for (T0,)
8267 {
8268 #[inline]
8269 unsafe fn encode(
8270 self,
8271 encoder: &mut fidl::encoding::Encoder<'_, D>,
8272 offset: usize,
8273 depth: fidl::encoding::Depth,
8274 ) -> fidl::Result<()> {
8275 encoder.debug_check_bounds::<MlmeSetControlledPortRequest>(offset);
8276 self.0.encode(encoder, offset + 0, depth)?;
8280 Ok(())
8281 }
8282 }
8283
8284 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8285 for MlmeSetControlledPortRequest
8286 {
8287 #[inline(always)]
8288 fn new_empty() -> Self {
8289 Self { req: fidl::new_empty!(SetControlledPortRequest, D) }
8290 }
8291
8292 #[inline]
8293 unsafe fn decode(
8294 &mut self,
8295 decoder: &mut fidl::encoding::Decoder<'_, D>,
8296 offset: usize,
8297 _depth: fidl::encoding::Depth,
8298 ) -> fidl::Result<()> {
8299 decoder.debug_check_bounds::<Self>(offset);
8300 fidl::decode!(SetControlledPortRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
8302 Ok(())
8303 }
8304 }
8305
8306 impl fidl::encoding::ValueTypeMarker for MlmeSetKeysConfRequest {
8307 type Borrowed<'a> = &'a Self;
8308 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8309 value
8310 }
8311 }
8312
8313 unsafe impl fidl::encoding::TypeMarker for MlmeSetKeysConfRequest {
8314 type Owned = Self;
8315
8316 #[inline(always)]
8317 fn inline_align(_context: fidl::encoding::Context) -> usize {
8318 8
8319 }
8320
8321 #[inline(always)]
8322 fn inline_size(_context: fidl::encoding::Context) -> usize {
8323 16
8324 }
8325 }
8326
8327 unsafe impl<D: fidl::encoding::ResourceDialect>
8328 fidl::encoding::Encode<MlmeSetKeysConfRequest, D> for &MlmeSetKeysConfRequest
8329 {
8330 #[inline]
8331 unsafe fn encode(
8332 self,
8333 encoder: &mut fidl::encoding::Encoder<'_, D>,
8334 offset: usize,
8335 _depth: fidl::encoding::Depth,
8336 ) -> fidl::Result<()> {
8337 encoder.debug_check_bounds::<MlmeSetKeysConfRequest>(offset);
8338 fidl::encoding::Encode::<MlmeSetKeysConfRequest, D>::encode(
8340 (<SetKeysConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.conf),),
8341 encoder,
8342 offset,
8343 _depth,
8344 )
8345 }
8346 }
8347 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SetKeysConfirm, D>>
8348 fidl::encoding::Encode<MlmeSetKeysConfRequest, D> for (T0,)
8349 {
8350 #[inline]
8351 unsafe fn encode(
8352 self,
8353 encoder: &mut fidl::encoding::Encoder<'_, D>,
8354 offset: usize,
8355 depth: fidl::encoding::Depth,
8356 ) -> fidl::Result<()> {
8357 encoder.debug_check_bounds::<MlmeSetKeysConfRequest>(offset);
8358 self.0.encode(encoder, offset + 0, depth)?;
8362 Ok(())
8363 }
8364 }
8365
8366 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8367 for MlmeSetKeysConfRequest
8368 {
8369 #[inline(always)]
8370 fn new_empty() -> Self {
8371 Self { conf: fidl::new_empty!(SetKeysConfirm, D) }
8372 }
8373
8374 #[inline]
8375 unsafe fn decode(
8376 &mut self,
8377 decoder: &mut fidl::encoding::Decoder<'_, D>,
8378 offset: usize,
8379 _depth: fidl::encoding::Depth,
8380 ) -> fidl::Result<()> {
8381 decoder.debug_check_bounds::<Self>(offset);
8382 fidl::decode!(SetKeysConfirm, D, &mut self.conf, decoder, offset + 0, _depth)?;
8384 Ok(())
8385 }
8386 }
8387
8388 impl fidl::encoding::ValueTypeMarker for MlmeSetKeysReqRequest {
8389 type Borrowed<'a> = &'a Self;
8390 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8391 value
8392 }
8393 }
8394
8395 unsafe impl fidl::encoding::TypeMarker for MlmeSetKeysReqRequest {
8396 type Owned = Self;
8397
8398 #[inline(always)]
8399 fn inline_align(_context: fidl::encoding::Context) -> usize {
8400 8
8401 }
8402
8403 #[inline(always)]
8404 fn inline_size(_context: fidl::encoding::Context) -> usize {
8405 16
8406 }
8407 }
8408
8409 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeSetKeysReqRequest, D>
8410 for &MlmeSetKeysReqRequest
8411 {
8412 #[inline]
8413 unsafe fn encode(
8414 self,
8415 encoder: &mut fidl::encoding::Encoder<'_, D>,
8416 offset: usize,
8417 _depth: fidl::encoding::Depth,
8418 ) -> fidl::Result<()> {
8419 encoder.debug_check_bounds::<MlmeSetKeysReqRequest>(offset);
8420 fidl::encoding::Encode::<MlmeSetKeysReqRequest, D>::encode(
8422 (<SetKeysRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
8423 encoder,
8424 offset,
8425 _depth,
8426 )
8427 }
8428 }
8429 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SetKeysRequest, D>>
8430 fidl::encoding::Encode<MlmeSetKeysReqRequest, D> for (T0,)
8431 {
8432 #[inline]
8433 unsafe fn encode(
8434 self,
8435 encoder: &mut fidl::encoding::Encoder<'_, D>,
8436 offset: usize,
8437 depth: fidl::encoding::Depth,
8438 ) -> fidl::Result<()> {
8439 encoder.debug_check_bounds::<MlmeSetKeysReqRequest>(offset);
8440 self.0.encode(encoder, offset + 0, depth)?;
8444 Ok(())
8445 }
8446 }
8447
8448 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeSetKeysReqRequest {
8449 #[inline(always)]
8450 fn new_empty() -> Self {
8451 Self { req: fidl::new_empty!(SetKeysRequest, D) }
8452 }
8453
8454 #[inline]
8455 unsafe fn decode(
8456 &mut self,
8457 decoder: &mut fidl::encoding::Decoder<'_, D>,
8458 offset: usize,
8459 _depth: fidl::encoding::Depth,
8460 ) -> fidl::Result<()> {
8461 decoder.debug_check_bounds::<Self>(offset);
8462 fidl::decode!(SetKeysRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
8464 Ok(())
8465 }
8466 }
8467
8468 impl fidl::encoding::ValueTypeMarker for MlmeSignalReportRequest {
8469 type Borrowed<'a> = &'a Self;
8470 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8471 value
8472 }
8473 }
8474
8475 unsafe impl fidl::encoding::TypeMarker for MlmeSignalReportRequest {
8476 type Owned = Self;
8477
8478 #[inline(always)]
8479 fn inline_align(_context: fidl::encoding::Context) -> usize {
8480 1
8481 }
8482
8483 #[inline(always)]
8484 fn inline_size(_context: fidl::encoding::Context) -> usize {
8485 2
8486 }
8487 }
8488
8489 unsafe impl<D: fidl::encoding::ResourceDialect>
8490 fidl::encoding::Encode<MlmeSignalReportRequest, D> for &MlmeSignalReportRequest
8491 {
8492 #[inline]
8493 unsafe fn encode(
8494 self,
8495 encoder: &mut fidl::encoding::Encoder<'_, D>,
8496 offset: usize,
8497 _depth: fidl::encoding::Depth,
8498 ) -> fidl::Result<()> {
8499 encoder.debug_check_bounds::<MlmeSignalReportRequest>(offset);
8500 fidl::encoding::Encode::<MlmeSignalReportRequest, D>::encode(
8502 (
8503 <fidl_fuchsia_wlan_internal::SignalReportIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),
8504 ),
8505 encoder, offset, _depth
8506 )
8507 }
8508 }
8509 unsafe impl<
8510 D: fidl::encoding::ResourceDialect,
8511 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal::SignalReportIndication, D>,
8512 > fidl::encoding::Encode<MlmeSignalReportRequest, D> for (T0,)
8513 {
8514 #[inline]
8515 unsafe fn encode(
8516 self,
8517 encoder: &mut fidl::encoding::Encoder<'_, D>,
8518 offset: usize,
8519 depth: fidl::encoding::Depth,
8520 ) -> fidl::Result<()> {
8521 encoder.debug_check_bounds::<MlmeSignalReportRequest>(offset);
8522 self.0.encode(encoder, offset + 0, depth)?;
8526 Ok(())
8527 }
8528 }
8529
8530 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8531 for MlmeSignalReportRequest
8532 {
8533 #[inline(always)]
8534 fn new_empty() -> Self {
8535 Self { ind: fidl::new_empty!(fidl_fuchsia_wlan_internal::SignalReportIndication, D) }
8536 }
8537
8538 #[inline]
8539 unsafe fn decode(
8540 &mut self,
8541 decoder: &mut fidl::encoding::Decoder<'_, D>,
8542 offset: usize,
8543 _depth: fidl::encoding::Depth,
8544 ) -> fidl::Result<()> {
8545 decoder.debug_check_bounds::<Self>(offset);
8546 fidl::decode!(
8548 fidl_fuchsia_wlan_internal::SignalReportIndication,
8549 D,
8550 &mut self.ind,
8551 decoder,
8552 offset + 0,
8553 _depth
8554 )?;
8555 Ok(())
8556 }
8557 }
8558
8559 impl fidl::encoding::ValueTypeMarker for MlmeStartCaptureFramesRequest {
8560 type Borrowed<'a> = &'a Self;
8561 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8562 value
8563 }
8564 }
8565
8566 unsafe impl fidl::encoding::TypeMarker for MlmeStartCaptureFramesRequest {
8567 type Owned = Self;
8568
8569 #[inline(always)]
8570 fn inline_align(_context: fidl::encoding::Context) -> usize {
8571 4
8572 }
8573
8574 #[inline(always)]
8575 fn inline_size(_context: fidl::encoding::Context) -> usize {
8576 4
8577 }
8578 }
8579
8580 unsafe impl<D: fidl::encoding::ResourceDialect>
8581 fidl::encoding::Encode<MlmeStartCaptureFramesRequest, D>
8582 for &MlmeStartCaptureFramesRequest
8583 {
8584 #[inline]
8585 unsafe fn encode(
8586 self,
8587 encoder: &mut fidl::encoding::Encoder<'_, D>,
8588 offset: usize,
8589 _depth: fidl::encoding::Depth,
8590 ) -> fidl::Result<()> {
8591 encoder.debug_check_bounds::<MlmeStartCaptureFramesRequest>(offset);
8592 fidl::encoding::Encode::<MlmeStartCaptureFramesRequest, D>::encode(
8594 (<StartCaptureFramesRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
8595 encoder,
8596 offset,
8597 _depth,
8598 )
8599 }
8600 }
8601 unsafe impl<
8602 D: fidl::encoding::ResourceDialect,
8603 T0: fidl::encoding::Encode<StartCaptureFramesRequest, D>,
8604 > fidl::encoding::Encode<MlmeStartCaptureFramesRequest, D> for (T0,)
8605 {
8606 #[inline]
8607 unsafe fn encode(
8608 self,
8609 encoder: &mut fidl::encoding::Encoder<'_, D>,
8610 offset: usize,
8611 depth: fidl::encoding::Depth,
8612 ) -> fidl::Result<()> {
8613 encoder.debug_check_bounds::<MlmeStartCaptureFramesRequest>(offset);
8614 self.0.encode(encoder, offset + 0, depth)?;
8618 Ok(())
8619 }
8620 }
8621
8622 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8623 for MlmeStartCaptureFramesRequest
8624 {
8625 #[inline(always)]
8626 fn new_empty() -> Self {
8627 Self { req: fidl::new_empty!(StartCaptureFramesRequest, D) }
8628 }
8629
8630 #[inline]
8631 unsafe fn decode(
8632 &mut self,
8633 decoder: &mut fidl::encoding::Decoder<'_, D>,
8634 offset: usize,
8635 _depth: fidl::encoding::Depth,
8636 ) -> fidl::Result<()> {
8637 decoder.debug_check_bounds::<Self>(offset);
8638 fidl::decode!(
8640 StartCaptureFramesRequest,
8641 D,
8642 &mut self.req,
8643 decoder,
8644 offset + 0,
8645 _depth
8646 )?;
8647 Ok(())
8648 }
8649 }
8650
8651 impl fidl::encoding::ValueTypeMarker for MlmeStartCaptureFramesResponse {
8652 type Borrowed<'a> = &'a Self;
8653 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8654 value
8655 }
8656 }
8657
8658 unsafe impl fidl::encoding::TypeMarker for MlmeStartCaptureFramesResponse {
8659 type Owned = Self;
8660
8661 #[inline(always)]
8662 fn inline_align(_context: fidl::encoding::Context) -> usize {
8663 4
8664 }
8665
8666 #[inline(always)]
8667 fn inline_size(_context: fidl::encoding::Context) -> usize {
8668 8
8669 }
8670 }
8671
8672 unsafe impl<D: fidl::encoding::ResourceDialect>
8673 fidl::encoding::Encode<MlmeStartCaptureFramesResponse, D>
8674 for &MlmeStartCaptureFramesResponse
8675 {
8676 #[inline]
8677 unsafe fn encode(
8678 self,
8679 encoder: &mut fidl::encoding::Encoder<'_, D>,
8680 offset: usize,
8681 _depth: fidl::encoding::Depth,
8682 ) -> fidl::Result<()> {
8683 encoder.debug_check_bounds::<MlmeStartCaptureFramesResponse>(offset);
8684 fidl::encoding::Encode::<MlmeStartCaptureFramesResponse, D>::encode(
8686 (<StartCaptureFramesResponse as fidl::encoding::ValueTypeMarker>::borrow(
8687 &self.resp,
8688 ),),
8689 encoder,
8690 offset,
8691 _depth,
8692 )
8693 }
8694 }
8695 unsafe impl<
8696 D: fidl::encoding::ResourceDialect,
8697 T0: fidl::encoding::Encode<StartCaptureFramesResponse, D>,
8698 > fidl::encoding::Encode<MlmeStartCaptureFramesResponse, D> for (T0,)
8699 {
8700 #[inline]
8701 unsafe fn encode(
8702 self,
8703 encoder: &mut fidl::encoding::Encoder<'_, D>,
8704 offset: usize,
8705 depth: fidl::encoding::Depth,
8706 ) -> fidl::Result<()> {
8707 encoder.debug_check_bounds::<MlmeStartCaptureFramesResponse>(offset);
8708 self.0.encode(encoder, offset + 0, depth)?;
8712 Ok(())
8713 }
8714 }
8715
8716 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8717 for MlmeStartCaptureFramesResponse
8718 {
8719 #[inline(always)]
8720 fn new_empty() -> Self {
8721 Self { resp: fidl::new_empty!(StartCaptureFramesResponse, D) }
8722 }
8723
8724 #[inline]
8725 unsafe fn decode(
8726 &mut self,
8727 decoder: &mut fidl::encoding::Decoder<'_, D>,
8728 offset: usize,
8729 _depth: fidl::encoding::Depth,
8730 ) -> fidl::Result<()> {
8731 decoder.debug_check_bounds::<Self>(offset);
8732 fidl::decode!(
8734 StartCaptureFramesResponse,
8735 D,
8736 &mut self.resp,
8737 decoder,
8738 offset + 0,
8739 _depth
8740 )?;
8741 Ok(())
8742 }
8743 }
8744
8745 impl fidl::encoding::ValueTypeMarker for MlmeStartConfRequest {
8746 type Borrowed<'a> = &'a Self;
8747 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8748 value
8749 }
8750 }
8751
8752 unsafe impl fidl::encoding::TypeMarker for MlmeStartConfRequest {
8753 type Owned = Self;
8754
8755 #[inline(always)]
8756 fn inline_align(_context: fidl::encoding::Context) -> usize {
8757 4
8758 }
8759
8760 #[inline(always)]
8761 fn inline_size(_context: fidl::encoding::Context) -> usize {
8762 4
8763 }
8764 }
8765
8766 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeStartConfRequest, D>
8767 for &MlmeStartConfRequest
8768 {
8769 #[inline]
8770 unsafe fn encode(
8771 self,
8772 encoder: &mut fidl::encoding::Encoder<'_, D>,
8773 offset: usize,
8774 _depth: fidl::encoding::Depth,
8775 ) -> fidl::Result<()> {
8776 encoder.debug_check_bounds::<MlmeStartConfRequest>(offset);
8777 fidl::encoding::Encode::<MlmeStartConfRequest, D>::encode(
8779 (<StartConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
8780 encoder,
8781 offset,
8782 _depth,
8783 )
8784 }
8785 }
8786 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StartConfirm, D>>
8787 fidl::encoding::Encode<MlmeStartConfRequest, D> for (T0,)
8788 {
8789 #[inline]
8790 unsafe fn encode(
8791 self,
8792 encoder: &mut fidl::encoding::Encoder<'_, D>,
8793 offset: usize,
8794 depth: fidl::encoding::Depth,
8795 ) -> fidl::Result<()> {
8796 encoder.debug_check_bounds::<MlmeStartConfRequest>(offset);
8797 self.0.encode(encoder, offset + 0, depth)?;
8801 Ok(())
8802 }
8803 }
8804
8805 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeStartConfRequest {
8806 #[inline(always)]
8807 fn new_empty() -> Self {
8808 Self { resp: fidl::new_empty!(StartConfirm, D) }
8809 }
8810
8811 #[inline]
8812 unsafe fn decode(
8813 &mut self,
8814 decoder: &mut fidl::encoding::Decoder<'_, D>,
8815 offset: usize,
8816 _depth: fidl::encoding::Depth,
8817 ) -> fidl::Result<()> {
8818 decoder.debug_check_bounds::<Self>(offset);
8819 fidl::decode!(StartConfirm, D, &mut self.resp, decoder, offset + 0, _depth)?;
8821 Ok(())
8822 }
8823 }
8824
8825 impl fidl::encoding::ValueTypeMarker for MlmeStartReqRequest {
8826 type Borrowed<'a> = &'a Self;
8827 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8828 value
8829 }
8830 }
8831
8832 unsafe impl fidl::encoding::TypeMarker for MlmeStartReqRequest {
8833 type Owned = Self;
8834
8835 #[inline(always)]
8836 fn inline_align(_context: fidl::encoding::Context) -> usize {
8837 8
8838 }
8839
8840 #[inline(always)]
8841 fn inline_size(_context: fidl::encoding::Context) -> usize {
8842 96
8843 }
8844 }
8845
8846 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeStartReqRequest, D>
8847 for &MlmeStartReqRequest
8848 {
8849 #[inline]
8850 unsafe fn encode(
8851 self,
8852 encoder: &mut fidl::encoding::Encoder<'_, D>,
8853 offset: usize,
8854 _depth: fidl::encoding::Depth,
8855 ) -> fidl::Result<()> {
8856 encoder.debug_check_bounds::<MlmeStartReqRequest>(offset);
8857 fidl::encoding::Encode::<MlmeStartReqRequest, D>::encode(
8859 (<StartRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
8860 encoder,
8861 offset,
8862 _depth,
8863 )
8864 }
8865 }
8866 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StartRequest, D>>
8867 fidl::encoding::Encode<MlmeStartReqRequest, D> for (T0,)
8868 {
8869 #[inline]
8870 unsafe fn encode(
8871 self,
8872 encoder: &mut fidl::encoding::Encoder<'_, D>,
8873 offset: usize,
8874 depth: fidl::encoding::Depth,
8875 ) -> fidl::Result<()> {
8876 encoder.debug_check_bounds::<MlmeStartReqRequest>(offset);
8877 self.0.encode(encoder, offset + 0, depth)?;
8881 Ok(())
8882 }
8883 }
8884
8885 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeStartReqRequest {
8886 #[inline(always)]
8887 fn new_empty() -> Self {
8888 Self { req: fidl::new_empty!(StartRequest, D) }
8889 }
8890
8891 #[inline]
8892 unsafe fn decode(
8893 &mut self,
8894 decoder: &mut fidl::encoding::Decoder<'_, D>,
8895 offset: usize,
8896 _depth: fidl::encoding::Depth,
8897 ) -> fidl::Result<()> {
8898 decoder.debug_check_bounds::<Self>(offset);
8899 fidl::decode!(StartRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
8901 Ok(())
8902 }
8903 }
8904
8905 impl fidl::encoding::ValueTypeMarker for MlmeStartScanRequest {
8906 type Borrowed<'a> = &'a Self;
8907 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8908 value
8909 }
8910 }
8911
8912 unsafe impl fidl::encoding::TypeMarker for MlmeStartScanRequest {
8913 type Owned = Self;
8914
8915 #[inline(always)]
8916 fn inline_align(_context: fidl::encoding::Context) -> usize {
8917 8
8918 }
8919
8920 #[inline(always)]
8921 fn inline_size(_context: fidl::encoding::Context) -> usize {
8922 64
8923 }
8924 }
8925
8926 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeStartScanRequest, D>
8927 for &MlmeStartScanRequest
8928 {
8929 #[inline]
8930 unsafe fn encode(
8931 self,
8932 encoder: &mut fidl::encoding::Encoder<'_, D>,
8933 offset: usize,
8934 _depth: fidl::encoding::Depth,
8935 ) -> fidl::Result<()> {
8936 encoder.debug_check_bounds::<MlmeStartScanRequest>(offset);
8937 fidl::encoding::Encode::<MlmeStartScanRequest, D>::encode(
8939 (<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
8940 encoder,
8941 offset,
8942 _depth,
8943 )
8944 }
8945 }
8946 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ScanRequest, D>>
8947 fidl::encoding::Encode<MlmeStartScanRequest, D> for (T0,)
8948 {
8949 #[inline]
8950 unsafe fn encode(
8951 self,
8952 encoder: &mut fidl::encoding::Encoder<'_, D>,
8953 offset: usize,
8954 depth: fidl::encoding::Depth,
8955 ) -> fidl::Result<()> {
8956 encoder.debug_check_bounds::<MlmeStartScanRequest>(offset);
8957 self.0.encode(encoder, offset + 0, depth)?;
8961 Ok(())
8962 }
8963 }
8964
8965 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeStartScanRequest {
8966 #[inline(always)]
8967 fn new_empty() -> Self {
8968 Self { req: fidl::new_empty!(ScanRequest, D) }
8969 }
8970
8971 #[inline]
8972 unsafe fn decode(
8973 &mut self,
8974 decoder: &mut fidl::encoding::Decoder<'_, D>,
8975 offset: usize,
8976 _depth: fidl::encoding::Depth,
8977 ) -> fidl::Result<()> {
8978 decoder.debug_check_bounds::<Self>(offset);
8979 fidl::decode!(ScanRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
8981 Ok(())
8982 }
8983 }
8984
8985 impl fidl::encoding::ValueTypeMarker for MlmeStopConfRequest {
8986 type Borrowed<'a> = &'a Self;
8987 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8988 value
8989 }
8990 }
8991
8992 unsafe impl fidl::encoding::TypeMarker for MlmeStopConfRequest {
8993 type Owned = Self;
8994
8995 #[inline(always)]
8996 fn inline_align(_context: fidl::encoding::Context) -> usize {
8997 4
8998 }
8999
9000 #[inline(always)]
9001 fn inline_size(_context: fidl::encoding::Context) -> usize {
9002 4
9003 }
9004 }
9005
9006 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeStopConfRequest, D>
9007 for &MlmeStopConfRequest
9008 {
9009 #[inline]
9010 unsafe fn encode(
9011 self,
9012 encoder: &mut fidl::encoding::Encoder<'_, D>,
9013 offset: usize,
9014 _depth: fidl::encoding::Depth,
9015 ) -> fidl::Result<()> {
9016 encoder.debug_check_bounds::<MlmeStopConfRequest>(offset);
9017 fidl::encoding::Encode::<MlmeStopConfRequest, D>::encode(
9019 (<StopConfirm as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
9020 encoder,
9021 offset,
9022 _depth,
9023 )
9024 }
9025 }
9026 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StopConfirm, D>>
9027 fidl::encoding::Encode<MlmeStopConfRequest, D> for (T0,)
9028 {
9029 #[inline]
9030 unsafe fn encode(
9031 self,
9032 encoder: &mut fidl::encoding::Encoder<'_, D>,
9033 offset: usize,
9034 depth: fidl::encoding::Depth,
9035 ) -> fidl::Result<()> {
9036 encoder.debug_check_bounds::<MlmeStopConfRequest>(offset);
9037 self.0.encode(encoder, offset + 0, depth)?;
9041 Ok(())
9042 }
9043 }
9044
9045 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeStopConfRequest {
9046 #[inline(always)]
9047 fn new_empty() -> Self {
9048 Self { resp: fidl::new_empty!(StopConfirm, D) }
9049 }
9050
9051 #[inline]
9052 unsafe fn decode(
9053 &mut self,
9054 decoder: &mut fidl::encoding::Decoder<'_, D>,
9055 offset: usize,
9056 _depth: fidl::encoding::Depth,
9057 ) -> fidl::Result<()> {
9058 decoder.debug_check_bounds::<Self>(offset);
9059 fidl::decode!(StopConfirm, D, &mut self.resp, decoder, offset + 0, _depth)?;
9061 Ok(())
9062 }
9063 }
9064
9065 impl fidl::encoding::ValueTypeMarker for MlmeStopReqRequest {
9066 type Borrowed<'a> = &'a Self;
9067 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9068 value
9069 }
9070 }
9071
9072 unsafe impl fidl::encoding::TypeMarker for MlmeStopReqRequest {
9073 type Owned = Self;
9074
9075 #[inline(always)]
9076 fn inline_align(_context: fidl::encoding::Context) -> usize {
9077 8
9078 }
9079
9080 #[inline(always)]
9081 fn inline_size(_context: fidl::encoding::Context) -> usize {
9082 16
9083 }
9084 }
9085
9086 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MlmeStopReqRequest, D>
9087 for &MlmeStopReqRequest
9088 {
9089 #[inline]
9090 unsafe fn encode(
9091 self,
9092 encoder: &mut fidl::encoding::Encoder<'_, D>,
9093 offset: usize,
9094 _depth: fidl::encoding::Depth,
9095 ) -> fidl::Result<()> {
9096 encoder.debug_check_bounds::<MlmeStopReqRequest>(offset);
9097 fidl::encoding::Encode::<MlmeStopReqRequest, D>::encode(
9099 (<StopRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
9100 encoder,
9101 offset,
9102 _depth,
9103 )
9104 }
9105 }
9106 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StopRequest, D>>
9107 fidl::encoding::Encode<MlmeStopReqRequest, D> for (T0,)
9108 {
9109 #[inline]
9110 unsafe fn encode(
9111 self,
9112 encoder: &mut fidl::encoding::Encoder<'_, D>,
9113 offset: usize,
9114 depth: fidl::encoding::Depth,
9115 ) -> fidl::Result<()> {
9116 encoder.debug_check_bounds::<MlmeStopReqRequest>(offset);
9117 self.0.encode(encoder, offset + 0, depth)?;
9121 Ok(())
9122 }
9123 }
9124
9125 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MlmeStopReqRequest {
9126 #[inline(always)]
9127 fn new_empty() -> Self {
9128 Self { req: fidl::new_empty!(StopRequest, D) }
9129 }
9130
9131 #[inline]
9132 unsafe fn decode(
9133 &mut self,
9134 decoder: &mut fidl::encoding::Decoder<'_, D>,
9135 offset: usize,
9136 _depth: fidl::encoding::Depth,
9137 ) -> fidl::Result<()> {
9138 decoder.debug_check_bounds::<Self>(offset);
9139 fidl::decode!(StopRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
9141 Ok(())
9142 }
9143 }
9144
9145 impl fidl::encoding::ValueTypeMarker for NegotiatedCapabilities {
9146 type Borrowed<'a> = &'a Self;
9147 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9148 value
9149 }
9150 }
9151
9152 unsafe impl fidl::encoding::TypeMarker for NegotiatedCapabilities {
9153 type Owned = Self;
9154
9155 #[inline(always)]
9156 fn inline_align(_context: fidl::encoding::Context) -> usize {
9157 8
9158 }
9159
9160 #[inline(always)]
9161 fn inline_size(_context: fidl::encoding::Context) -> usize {
9162 56
9163 }
9164 }
9165
9166 unsafe impl<D: fidl::encoding::ResourceDialect>
9167 fidl::encoding::Encode<NegotiatedCapabilities, D> for &NegotiatedCapabilities
9168 {
9169 #[inline]
9170 unsafe fn encode(
9171 self,
9172 encoder: &mut fidl::encoding::Encoder<'_, D>,
9173 offset: usize,
9174 _depth: fidl::encoding::Depth,
9175 ) -> fidl::Result<()> {
9176 encoder.debug_check_bounds::<NegotiatedCapabilities>(offset);
9177 fidl::encoding::Encode::<NegotiatedCapabilities, D>::encode(
9179 (
9180 <fidl_fuchsia_wlan_common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
9181 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_info),
9182 <fidl::encoding::Vector<u8, 14> as fidl::encoding::ValueTypeMarker>::borrow(&self.rates),
9183 <fidl::encoding::Boxed<WmmParameter> as fidl::encoding::ValueTypeMarker>::borrow(&self.wmm_param),
9184 <fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities> as fidl::encoding::ValueTypeMarker>::borrow(&self.ht_cap),
9185 <fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities> as fidl::encoding::ValueTypeMarker>::borrow(&self.vht_cap),
9186 ),
9187 encoder, offset, _depth
9188 )
9189 }
9190 }
9191 unsafe impl<
9192 D: fidl::encoding::ResourceDialect,
9193 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanChannel, D>,
9194 T1: fidl::encoding::Encode<u16, D>,
9195 T2: fidl::encoding::Encode<fidl::encoding::Vector<u8, 14>, D>,
9196 T3: fidl::encoding::Encode<fidl::encoding::Boxed<WmmParameter>, D>,
9197 T4: fidl::encoding::Encode<
9198 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
9199 D,
9200 >,
9201 T5: fidl::encoding::Encode<
9202 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
9203 D,
9204 >,
9205 > fidl::encoding::Encode<NegotiatedCapabilities, D> for (T0, T1, T2, T3, T4, T5)
9206 {
9207 #[inline]
9208 unsafe fn encode(
9209 self,
9210 encoder: &mut fidl::encoding::Encoder<'_, D>,
9211 offset: usize,
9212 depth: fidl::encoding::Depth,
9213 ) -> fidl::Result<()> {
9214 encoder.debug_check_bounds::<NegotiatedCapabilities>(offset);
9215 unsafe {
9218 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9219 (ptr as *mut u64).write_unaligned(0);
9220 }
9221 self.0.encode(encoder, offset + 0, depth)?;
9223 self.1.encode(encoder, offset + 12, depth)?;
9224 self.2.encode(encoder, offset + 16, depth)?;
9225 self.3.encode(encoder, offset + 32, depth)?;
9226 self.4.encode(encoder, offset + 40, depth)?;
9227 self.5.encode(encoder, offset + 48, depth)?;
9228 Ok(())
9229 }
9230 }
9231
9232 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9233 for NegotiatedCapabilities
9234 {
9235 #[inline(always)]
9236 fn new_empty() -> Self {
9237 Self {
9238 channel: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanChannel, D),
9239 capability_info: fidl::new_empty!(u16, D),
9240 rates: fidl::new_empty!(fidl::encoding::Vector<u8, 14>, D),
9241 wmm_param: fidl::new_empty!(fidl::encoding::Boxed<WmmParameter>, D),
9242 ht_cap: fidl::new_empty!(
9243 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
9244 D
9245 ),
9246 vht_cap: fidl::new_empty!(
9247 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
9248 D
9249 ),
9250 }
9251 }
9252
9253 #[inline]
9254 unsafe fn decode(
9255 &mut self,
9256 decoder: &mut fidl::encoding::Decoder<'_, D>,
9257 offset: usize,
9258 _depth: fidl::encoding::Depth,
9259 ) -> fidl::Result<()> {
9260 decoder.debug_check_bounds::<Self>(offset);
9261 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9263 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9264 let mask = 0xffff000000000000u64;
9265 let maskedval = padval & mask;
9266 if maskedval != 0 {
9267 return Err(fidl::Error::NonZeroPadding {
9268 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9269 });
9270 }
9271 fidl::decode!(
9272 fidl_fuchsia_wlan_common::WlanChannel,
9273 D,
9274 &mut self.channel,
9275 decoder,
9276 offset + 0,
9277 _depth
9278 )?;
9279 fidl::decode!(u16, D, &mut self.capability_info, decoder, offset + 12, _depth)?;
9280 fidl::decode!(fidl::encoding::Vector<u8, 14>, D, &mut self.rates, decoder, offset + 16, _depth)?;
9281 fidl::decode!(
9282 fidl::encoding::Boxed<WmmParameter>,
9283 D,
9284 &mut self.wmm_param,
9285 decoder,
9286 offset + 32,
9287 _depth
9288 )?;
9289 fidl::decode!(
9290 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::HtCapabilities>,
9291 D,
9292 &mut self.ht_cap,
9293 decoder,
9294 offset + 40,
9295 _depth
9296 )?;
9297 fidl::decode!(
9298 fidl::encoding::Boxed<fidl_fuchsia_wlan_ieee80211::VhtCapabilities>,
9299 D,
9300 &mut self.vht_cap,
9301 decoder,
9302 offset + 48,
9303 _depth
9304 )?;
9305 Ok(())
9306 }
9307 }
9308
9309 impl fidl::encoding::ValueTypeMarker for PmkInfo {
9310 type Borrowed<'a> = &'a Self;
9311 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9312 value
9313 }
9314 }
9315
9316 unsafe impl fidl::encoding::TypeMarker for PmkInfo {
9317 type Owned = Self;
9318
9319 #[inline(always)]
9320 fn inline_align(_context: fidl::encoding::Context) -> usize {
9321 8
9322 }
9323
9324 #[inline(always)]
9325 fn inline_size(_context: fidl::encoding::Context) -> usize {
9326 32
9327 }
9328 }
9329
9330 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PmkInfo, D> for &PmkInfo {
9331 #[inline]
9332 unsafe fn encode(
9333 self,
9334 encoder: &mut fidl::encoding::Encoder<'_, D>,
9335 offset: usize,
9336 _depth: fidl::encoding::Depth,
9337 ) -> fidl::Result<()> {
9338 encoder.debug_check_bounds::<PmkInfo>(offset);
9339 fidl::encoding::Encode::<PmkInfo, D>::encode(
9341 (
9342 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.pmk),
9343 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.pmkid),
9344 ),
9345 encoder, offset, _depth
9346 )
9347 }
9348 }
9349 unsafe impl<
9350 D: fidl::encoding::ResourceDialect,
9351 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
9352 T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
9353 > fidl::encoding::Encode<PmkInfo, D> for (T0, T1)
9354 {
9355 #[inline]
9356 unsafe fn encode(
9357 self,
9358 encoder: &mut fidl::encoding::Encoder<'_, D>,
9359 offset: usize,
9360 depth: fidl::encoding::Depth,
9361 ) -> fidl::Result<()> {
9362 encoder.debug_check_bounds::<PmkInfo>(offset);
9363 self.0.encode(encoder, offset + 0, depth)?;
9367 self.1.encode(encoder, offset + 16, depth)?;
9368 Ok(())
9369 }
9370 }
9371
9372 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PmkInfo {
9373 #[inline(always)]
9374 fn new_empty() -> Self {
9375 Self {
9376 pmk: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
9377 pmkid: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
9378 }
9379 }
9380
9381 #[inline]
9382 unsafe fn decode(
9383 &mut self,
9384 decoder: &mut fidl::encoding::Decoder<'_, D>,
9385 offset: usize,
9386 _depth: fidl::encoding::Depth,
9387 ) -> fidl::Result<()> {
9388 decoder.debug_check_bounds::<Self>(offset);
9389 fidl::decode!(
9391 fidl::encoding::UnboundedVector<u8>,
9392 D,
9393 &mut self.pmk,
9394 decoder,
9395 offset + 0,
9396 _depth
9397 )?;
9398 fidl::decode!(
9399 fidl::encoding::UnboundedVector<u8>,
9400 D,
9401 &mut self.pmkid,
9402 decoder,
9403 offset + 16,
9404 _depth
9405 )?;
9406 Ok(())
9407 }
9408 }
9409
9410 impl fidl::encoding::ValueTypeMarker for ReconnectRequest {
9411 type Borrowed<'a> = &'a Self;
9412 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9413 value
9414 }
9415 }
9416
9417 unsafe impl fidl::encoding::TypeMarker for ReconnectRequest {
9418 type Owned = Self;
9419
9420 #[inline(always)]
9421 fn inline_align(_context: fidl::encoding::Context) -> usize {
9422 1
9423 }
9424
9425 #[inline(always)]
9426 fn inline_size(_context: fidl::encoding::Context) -> usize {
9427 6
9428 }
9429 #[inline(always)]
9430 fn encode_is_copy() -> bool {
9431 true
9432 }
9433
9434 #[inline(always)]
9435 fn decode_is_copy() -> bool {
9436 true
9437 }
9438 }
9439
9440 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReconnectRequest, D>
9441 for &ReconnectRequest
9442 {
9443 #[inline]
9444 unsafe fn encode(
9445 self,
9446 encoder: &mut fidl::encoding::Encoder<'_, D>,
9447 offset: usize,
9448 _depth: fidl::encoding::Depth,
9449 ) -> fidl::Result<()> {
9450 encoder.debug_check_bounds::<ReconnectRequest>(offset);
9451 unsafe {
9452 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9454 (buf_ptr as *mut ReconnectRequest)
9455 .write_unaligned((self as *const ReconnectRequest).read());
9456 }
9459 Ok(())
9460 }
9461 }
9462 unsafe impl<
9463 D: fidl::encoding::ResourceDialect,
9464 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
9465 > fidl::encoding::Encode<ReconnectRequest, D> for (T0,)
9466 {
9467 #[inline]
9468 unsafe fn encode(
9469 self,
9470 encoder: &mut fidl::encoding::Encoder<'_, D>,
9471 offset: usize,
9472 depth: fidl::encoding::Depth,
9473 ) -> fidl::Result<()> {
9474 encoder.debug_check_bounds::<ReconnectRequest>(offset);
9475 self.0.encode(encoder, offset + 0, depth)?;
9479 Ok(())
9480 }
9481 }
9482
9483 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReconnectRequest {
9484 #[inline(always)]
9485 fn new_empty() -> Self {
9486 Self { peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D) }
9487 }
9488
9489 #[inline]
9490 unsafe fn decode(
9491 &mut self,
9492 decoder: &mut fidl::encoding::Decoder<'_, D>,
9493 offset: usize,
9494 _depth: fidl::encoding::Depth,
9495 ) -> fidl::Result<()> {
9496 decoder.debug_check_bounds::<Self>(offset);
9497 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9498 unsafe {
9501 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
9502 }
9503 Ok(())
9504 }
9505 }
9506
9507 impl fidl::encoding::ValueTypeMarker for ResetRequest {
9508 type Borrowed<'a> = &'a Self;
9509 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9510 value
9511 }
9512 }
9513
9514 unsafe impl fidl::encoding::TypeMarker for ResetRequest {
9515 type Owned = Self;
9516
9517 #[inline(always)]
9518 fn inline_align(_context: fidl::encoding::Context) -> usize {
9519 1
9520 }
9521
9522 #[inline(always)]
9523 fn inline_size(_context: fidl::encoding::Context) -> usize {
9524 7
9525 }
9526 }
9527
9528 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ResetRequest, D>
9529 for &ResetRequest
9530 {
9531 #[inline]
9532 unsafe fn encode(
9533 self,
9534 encoder: &mut fidl::encoding::Encoder<'_, D>,
9535 offset: usize,
9536 _depth: fidl::encoding::Depth,
9537 ) -> fidl::Result<()> {
9538 encoder.debug_check_bounds::<ResetRequest>(offset);
9539 fidl::encoding::Encode::<ResetRequest, D>::encode(
9541 (
9542 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
9543 &self.sta_address,
9544 ),
9545 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.set_default_mib),
9546 ),
9547 encoder,
9548 offset,
9549 _depth,
9550 )
9551 }
9552 }
9553 unsafe impl<
9554 D: fidl::encoding::ResourceDialect,
9555 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
9556 T1: fidl::encoding::Encode<bool, D>,
9557 > fidl::encoding::Encode<ResetRequest, D> for (T0, T1)
9558 {
9559 #[inline]
9560 unsafe fn encode(
9561 self,
9562 encoder: &mut fidl::encoding::Encoder<'_, D>,
9563 offset: usize,
9564 depth: fidl::encoding::Depth,
9565 ) -> fidl::Result<()> {
9566 encoder.debug_check_bounds::<ResetRequest>(offset);
9567 self.0.encode(encoder, offset + 0, depth)?;
9571 self.1.encode(encoder, offset + 6, depth)?;
9572 Ok(())
9573 }
9574 }
9575
9576 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResetRequest {
9577 #[inline(always)]
9578 fn new_empty() -> Self {
9579 Self {
9580 sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
9581 set_default_mib: fidl::new_empty!(bool, D),
9582 }
9583 }
9584
9585 #[inline]
9586 unsafe fn decode(
9587 &mut self,
9588 decoder: &mut fidl::encoding::Decoder<'_, D>,
9589 offset: usize,
9590 _depth: fidl::encoding::Depth,
9591 ) -> fidl::Result<()> {
9592 decoder.debug_check_bounds::<Self>(offset);
9593 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.sta_address, decoder, offset + 0, _depth)?;
9595 fidl::decode!(bool, D, &mut self.set_default_mib, decoder, offset + 6, _depth)?;
9596 Ok(())
9597 }
9598 }
9599
9600 impl fidl::encoding::ValueTypeMarker for RoamConfirm {
9601 type Borrowed<'a> = &'a Self;
9602 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9603 value
9604 }
9605 }
9606
9607 unsafe impl fidl::encoding::TypeMarker for RoamConfirm {
9608 type Owned = Self;
9609
9610 #[inline(always)]
9611 fn inline_align(_context: fidl::encoding::Context) -> usize {
9612 8
9613 }
9614
9615 #[inline(always)]
9616 fn inline_size(_context: fidl::encoding::Context) -> usize {
9617 32
9618 }
9619 }
9620
9621 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamConfirm, D>
9622 for &RoamConfirm
9623 {
9624 #[inline]
9625 unsafe fn encode(
9626 self,
9627 encoder: &mut fidl::encoding::Encoder<'_, D>,
9628 offset: usize,
9629 _depth: fidl::encoding::Depth,
9630 ) -> fidl::Result<()> {
9631 encoder.debug_check_bounds::<RoamConfirm>(offset);
9632 fidl::encoding::Encode::<RoamConfirm, D>::encode(
9634 (
9635 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bssid),
9636 <fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
9637 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.original_association_maintained),
9638 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.target_bss_authenticated),
9639 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.association_id),
9640 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.association_ies),
9641 ),
9642 encoder, offset, _depth
9643 )
9644 }
9645 }
9646 unsafe impl<
9647 D: fidl::encoding::ResourceDialect,
9648 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
9649 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::StatusCode, D>,
9650 T2: fidl::encoding::Encode<bool, D>,
9651 T3: fidl::encoding::Encode<bool, D>,
9652 T4: fidl::encoding::Encode<u16, D>,
9653 T5: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
9654 > fidl::encoding::Encode<RoamConfirm, D> for (T0, T1, T2, T3, T4, T5)
9655 {
9656 #[inline]
9657 unsafe fn encode(
9658 self,
9659 encoder: &mut fidl::encoding::Encoder<'_, D>,
9660 offset: usize,
9661 depth: fidl::encoding::Depth,
9662 ) -> fidl::Result<()> {
9663 encoder.debug_check_bounds::<RoamConfirm>(offset);
9664 unsafe {
9667 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9668 (ptr as *mut u64).write_unaligned(0);
9669 }
9670 self.0.encode(encoder, offset + 0, depth)?;
9672 self.1.encode(encoder, offset + 6, depth)?;
9673 self.2.encode(encoder, offset + 8, depth)?;
9674 self.3.encode(encoder, offset + 9, depth)?;
9675 self.4.encode(encoder, offset + 10, depth)?;
9676 self.5.encode(encoder, offset + 16, depth)?;
9677 Ok(())
9678 }
9679 }
9680
9681 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamConfirm {
9682 #[inline(always)]
9683 fn new_empty() -> Self {
9684 Self {
9685 selected_bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
9686 status_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
9687 original_association_maintained: fidl::new_empty!(bool, D),
9688 target_bss_authenticated: fidl::new_empty!(bool, D),
9689 association_id: fidl::new_empty!(u16, D),
9690 association_ies: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
9691 }
9692 }
9693
9694 #[inline]
9695 unsafe fn decode(
9696 &mut self,
9697 decoder: &mut fidl::encoding::Decoder<'_, D>,
9698 offset: usize,
9699 _depth: fidl::encoding::Depth,
9700 ) -> fidl::Result<()> {
9701 decoder.debug_check_bounds::<Self>(offset);
9702 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9704 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9705 let mask = 0xffffffff00000000u64;
9706 let maskedval = padval & mask;
9707 if maskedval != 0 {
9708 return Err(fidl::Error::NonZeroPadding {
9709 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9710 });
9711 }
9712 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.selected_bssid, decoder, offset + 0, _depth)?;
9713 fidl::decode!(
9714 fidl_fuchsia_wlan_ieee80211::StatusCode,
9715 D,
9716 &mut self.status_code,
9717 decoder,
9718 offset + 6,
9719 _depth
9720 )?;
9721 fidl::decode!(
9722 bool,
9723 D,
9724 &mut self.original_association_maintained,
9725 decoder,
9726 offset + 8,
9727 _depth
9728 )?;
9729 fidl::decode!(
9730 bool,
9731 D,
9732 &mut self.target_bss_authenticated,
9733 decoder,
9734 offset + 9,
9735 _depth
9736 )?;
9737 fidl::decode!(u16, D, &mut self.association_id, decoder, offset + 10, _depth)?;
9738 fidl::decode!(
9739 fidl::encoding::UnboundedVector<u8>,
9740 D,
9741 &mut self.association_ies,
9742 decoder,
9743 offset + 16,
9744 _depth
9745 )?;
9746 Ok(())
9747 }
9748 }
9749
9750 impl fidl::encoding::ValueTypeMarker for RoamRequest {
9751 type Borrowed<'a> = &'a Self;
9752 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9753 value
9754 }
9755 }
9756
9757 unsafe impl fidl::encoding::TypeMarker for RoamRequest {
9758 type Owned = Self;
9759
9760 #[inline(always)]
9761 fn inline_align(_context: fidl::encoding::Context) -> usize {
9762 8
9763 }
9764
9765 #[inline(always)]
9766 fn inline_size(_context: fidl::encoding::Context) -> usize {
9767 48
9768 }
9769 }
9770
9771 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamRequest, D>
9772 for &RoamRequest
9773 {
9774 #[inline]
9775 unsafe fn encode(
9776 self,
9777 encoder: &mut fidl::encoding::Encoder<'_, D>,
9778 offset: usize,
9779 _depth: fidl::encoding::Depth,
9780 ) -> fidl::Result<()> {
9781 encoder.debug_check_bounds::<RoamRequest>(offset);
9782 fidl::encoding::Encode::<RoamRequest, D>::encode(
9784 (
9785 <fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bss),
9786 ),
9787 encoder, offset, _depth
9788 )
9789 }
9790 }
9791 unsafe impl<
9792 D: fidl::encoding::ResourceDialect,
9793 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssDescription, D>,
9794 > fidl::encoding::Encode<RoamRequest, D> for (T0,)
9795 {
9796 #[inline]
9797 unsafe fn encode(
9798 self,
9799 encoder: &mut fidl::encoding::Encoder<'_, D>,
9800 offset: usize,
9801 depth: fidl::encoding::Depth,
9802 ) -> fidl::Result<()> {
9803 encoder.debug_check_bounds::<RoamRequest>(offset);
9804 self.0.encode(encoder, offset + 0, depth)?;
9808 Ok(())
9809 }
9810 }
9811
9812 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamRequest {
9813 #[inline(always)]
9814 fn new_empty() -> Self {
9815 Self { selected_bss: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D) }
9816 }
9817
9818 #[inline]
9819 unsafe fn decode(
9820 &mut self,
9821 decoder: &mut fidl::encoding::Decoder<'_, D>,
9822 offset: usize,
9823 _depth: fidl::encoding::Depth,
9824 ) -> fidl::Result<()> {
9825 decoder.debug_check_bounds::<Self>(offset);
9826 fidl::decode!(
9828 fidl_fuchsia_wlan_common::BssDescription,
9829 D,
9830 &mut self.selected_bss,
9831 decoder,
9832 offset + 0,
9833 _depth
9834 )?;
9835 Ok(())
9836 }
9837 }
9838
9839 impl fidl::encoding::ValueTypeMarker for RoamResultIndication {
9840 type Borrowed<'a> = &'a Self;
9841 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9842 value
9843 }
9844 }
9845
9846 unsafe impl fidl::encoding::TypeMarker for RoamResultIndication {
9847 type Owned = Self;
9848
9849 #[inline(always)]
9850 fn inline_align(_context: fidl::encoding::Context) -> usize {
9851 8
9852 }
9853
9854 #[inline(always)]
9855 fn inline_size(_context: fidl::encoding::Context) -> usize {
9856 32
9857 }
9858 }
9859
9860 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamResultIndication, D>
9861 for &RoamResultIndication
9862 {
9863 #[inline]
9864 unsafe fn encode(
9865 self,
9866 encoder: &mut fidl::encoding::Encoder<'_, D>,
9867 offset: usize,
9868 _depth: fidl::encoding::Depth,
9869 ) -> fidl::Result<()> {
9870 encoder.debug_check_bounds::<RoamResultIndication>(offset);
9871 fidl::encoding::Encode::<RoamResultIndication, D>::encode(
9873 (
9874 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bssid),
9875 <fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
9876 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.original_association_maintained),
9877 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.target_bss_authenticated),
9878 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.association_id),
9879 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.association_ies),
9880 ),
9881 encoder, offset, _depth
9882 )
9883 }
9884 }
9885 unsafe impl<
9886 D: fidl::encoding::ResourceDialect,
9887 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
9888 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::StatusCode, D>,
9889 T2: fidl::encoding::Encode<bool, D>,
9890 T3: fidl::encoding::Encode<bool, D>,
9891 T4: fidl::encoding::Encode<u16, D>,
9892 T5: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
9893 > fidl::encoding::Encode<RoamResultIndication, D> for (T0, T1, T2, T3, T4, T5)
9894 {
9895 #[inline]
9896 unsafe fn encode(
9897 self,
9898 encoder: &mut fidl::encoding::Encoder<'_, D>,
9899 offset: usize,
9900 depth: fidl::encoding::Depth,
9901 ) -> fidl::Result<()> {
9902 encoder.debug_check_bounds::<RoamResultIndication>(offset);
9903 unsafe {
9906 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9907 (ptr as *mut u64).write_unaligned(0);
9908 }
9909 self.0.encode(encoder, offset + 0, depth)?;
9911 self.1.encode(encoder, offset + 6, depth)?;
9912 self.2.encode(encoder, offset + 8, depth)?;
9913 self.3.encode(encoder, offset + 9, depth)?;
9914 self.4.encode(encoder, offset + 10, depth)?;
9915 self.5.encode(encoder, offset + 16, depth)?;
9916 Ok(())
9917 }
9918 }
9919
9920 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamResultIndication {
9921 #[inline(always)]
9922 fn new_empty() -> Self {
9923 Self {
9924 selected_bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
9925 status_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
9926 original_association_maintained: fidl::new_empty!(bool, D),
9927 target_bss_authenticated: fidl::new_empty!(bool, D),
9928 association_id: fidl::new_empty!(u16, D),
9929 association_ies: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
9930 }
9931 }
9932
9933 #[inline]
9934 unsafe fn decode(
9935 &mut self,
9936 decoder: &mut fidl::encoding::Decoder<'_, D>,
9937 offset: usize,
9938 _depth: fidl::encoding::Depth,
9939 ) -> fidl::Result<()> {
9940 decoder.debug_check_bounds::<Self>(offset);
9941 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
9943 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9944 let mask = 0xffffffff00000000u64;
9945 let maskedval = padval & mask;
9946 if maskedval != 0 {
9947 return Err(fidl::Error::NonZeroPadding {
9948 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9949 });
9950 }
9951 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.selected_bssid, decoder, offset + 0, _depth)?;
9952 fidl::decode!(
9953 fidl_fuchsia_wlan_ieee80211::StatusCode,
9954 D,
9955 &mut self.status_code,
9956 decoder,
9957 offset + 6,
9958 _depth
9959 )?;
9960 fidl::decode!(
9961 bool,
9962 D,
9963 &mut self.original_association_maintained,
9964 decoder,
9965 offset + 8,
9966 _depth
9967 )?;
9968 fidl::decode!(
9969 bool,
9970 D,
9971 &mut self.target_bss_authenticated,
9972 decoder,
9973 offset + 9,
9974 _depth
9975 )?;
9976 fidl::decode!(u16, D, &mut self.association_id, decoder, offset + 10, _depth)?;
9977 fidl::decode!(
9978 fidl::encoding::UnboundedVector<u8>,
9979 D,
9980 &mut self.association_ies,
9981 decoder,
9982 offset + 16,
9983 _depth
9984 )?;
9985 Ok(())
9986 }
9987 }
9988
9989 impl fidl::encoding::ValueTypeMarker for RoamStartIndication {
9990 type Borrowed<'a> = &'a Self;
9991 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9992 value
9993 }
9994 }
9995
9996 unsafe impl fidl::encoding::TypeMarker for RoamStartIndication {
9997 type Owned = Self;
9998
9999 #[inline(always)]
10000 fn inline_align(_context: fidl::encoding::Context) -> usize {
10001 8
10002 }
10003
10004 #[inline(always)]
10005 fn inline_size(_context: fidl::encoding::Context) -> usize {
10006 64
10007 }
10008 }
10009
10010 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamStartIndication, D>
10011 for &RoamStartIndication
10012 {
10013 #[inline]
10014 unsafe fn encode(
10015 self,
10016 encoder: &mut fidl::encoding::Encoder<'_, D>,
10017 offset: usize,
10018 _depth: fidl::encoding::Depth,
10019 ) -> fidl::Result<()> {
10020 encoder.debug_check_bounds::<RoamStartIndication>(offset);
10021 fidl::encoding::Encode::<RoamStartIndication, D>::encode(
10023 (
10024 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bssid),
10025 <fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.selected_bss),
10026 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.original_association_maintained),
10027 ),
10028 encoder, offset, _depth
10029 )
10030 }
10031 }
10032 unsafe impl<
10033 D: fidl::encoding::ResourceDialect,
10034 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
10035 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssDescription, D>,
10036 T2: fidl::encoding::Encode<bool, D>,
10037 > fidl::encoding::Encode<RoamStartIndication, D> for (T0, T1, T2)
10038 {
10039 #[inline]
10040 unsafe fn encode(
10041 self,
10042 encoder: &mut fidl::encoding::Encoder<'_, D>,
10043 offset: usize,
10044 depth: fidl::encoding::Depth,
10045 ) -> fidl::Result<()> {
10046 encoder.debug_check_bounds::<RoamStartIndication>(offset);
10047 unsafe {
10050 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10051 (ptr as *mut u64).write_unaligned(0);
10052 }
10053 unsafe {
10054 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(56);
10055 (ptr as *mut u64).write_unaligned(0);
10056 }
10057 self.0.encode(encoder, offset + 0, depth)?;
10059 self.1.encode(encoder, offset + 8, depth)?;
10060 self.2.encode(encoder, offset + 56, depth)?;
10061 Ok(())
10062 }
10063 }
10064
10065 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamStartIndication {
10066 #[inline(always)]
10067 fn new_empty() -> Self {
10068 Self {
10069 selected_bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
10070 selected_bss: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D),
10071 original_association_maintained: fidl::new_empty!(bool, D),
10072 }
10073 }
10074
10075 #[inline]
10076 unsafe fn decode(
10077 &mut self,
10078 decoder: &mut fidl::encoding::Decoder<'_, D>,
10079 offset: usize,
10080 _depth: fidl::encoding::Depth,
10081 ) -> fidl::Result<()> {
10082 decoder.debug_check_bounds::<Self>(offset);
10083 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10085 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10086 let mask = 0xffff000000000000u64;
10087 let maskedval = padval & mask;
10088 if maskedval != 0 {
10089 return Err(fidl::Error::NonZeroPadding {
10090 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10091 });
10092 }
10093 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(56) };
10094 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10095 let mask = 0xffffffffffffff00u64;
10096 let maskedval = padval & mask;
10097 if maskedval != 0 {
10098 return Err(fidl::Error::NonZeroPadding {
10099 padding_start: offset + 56 + ((mask as u64).trailing_zeros() / 8) as usize,
10100 });
10101 }
10102 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.selected_bssid, decoder, offset + 0, _depth)?;
10103 fidl::decode!(
10104 fidl_fuchsia_wlan_common::BssDescription,
10105 D,
10106 &mut self.selected_bss,
10107 decoder,
10108 offset + 8,
10109 _depth
10110 )?;
10111 fidl::decode!(
10112 bool,
10113 D,
10114 &mut self.original_association_maintained,
10115 decoder,
10116 offset + 56,
10117 _depth
10118 )?;
10119 Ok(())
10120 }
10121 }
10122
10123 impl fidl::encoding::ValueTypeMarker for SaeFrame {
10124 type Borrowed<'a> = &'a Self;
10125 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10126 value
10127 }
10128 }
10129
10130 unsafe impl fidl::encoding::TypeMarker for SaeFrame {
10131 type Owned = Self;
10132
10133 #[inline(always)]
10134 fn inline_align(_context: fidl::encoding::Context) -> usize {
10135 8
10136 }
10137
10138 #[inline(always)]
10139 fn inline_size(_context: fidl::encoding::Context) -> usize {
10140 32
10141 }
10142 }
10143
10144 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SaeFrame, D> for &SaeFrame {
10145 #[inline]
10146 unsafe fn encode(
10147 self,
10148 encoder: &mut fidl::encoding::Encoder<'_, D>,
10149 offset: usize,
10150 _depth: fidl::encoding::Depth,
10151 ) -> fidl::Result<()> {
10152 encoder.debug_check_bounds::<SaeFrame>(offset);
10153 fidl::encoding::Encode::<SaeFrame, D>::encode(
10155 (
10156 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
10157 <fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
10158 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.seq_num),
10159 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.sae_fields),
10160 ),
10161 encoder, offset, _depth
10162 )
10163 }
10164 }
10165 unsafe impl<
10166 D: fidl::encoding::ResourceDialect,
10167 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
10168 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::StatusCode, D>,
10169 T2: fidl::encoding::Encode<u16, D>,
10170 T3: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
10171 > fidl::encoding::Encode<SaeFrame, D> for (T0, T1, T2, T3)
10172 {
10173 #[inline]
10174 unsafe fn encode(
10175 self,
10176 encoder: &mut fidl::encoding::Encoder<'_, D>,
10177 offset: usize,
10178 depth: fidl::encoding::Depth,
10179 ) -> fidl::Result<()> {
10180 encoder.debug_check_bounds::<SaeFrame>(offset);
10181 unsafe {
10184 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
10185 (ptr as *mut u64).write_unaligned(0);
10186 }
10187 self.0.encode(encoder, offset + 0, depth)?;
10189 self.1.encode(encoder, offset + 6, depth)?;
10190 self.2.encode(encoder, offset + 8, depth)?;
10191 self.3.encode(encoder, offset + 16, depth)?;
10192 Ok(())
10193 }
10194 }
10195
10196 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SaeFrame {
10197 #[inline(always)]
10198 fn new_empty() -> Self {
10199 Self {
10200 peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
10201 status_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
10202 seq_num: fidl::new_empty!(u16, D),
10203 sae_fields: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
10204 }
10205 }
10206
10207 #[inline]
10208 unsafe fn decode(
10209 &mut self,
10210 decoder: &mut fidl::encoding::Decoder<'_, D>,
10211 offset: usize,
10212 _depth: fidl::encoding::Depth,
10213 ) -> fidl::Result<()> {
10214 decoder.debug_check_bounds::<Self>(offset);
10215 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
10217 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10218 let mask = 0xffffffffffff0000u64;
10219 let maskedval = padval & mask;
10220 if maskedval != 0 {
10221 return Err(fidl::Error::NonZeroPadding {
10222 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
10223 });
10224 }
10225 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
10226 fidl::decode!(
10227 fidl_fuchsia_wlan_ieee80211::StatusCode,
10228 D,
10229 &mut self.status_code,
10230 decoder,
10231 offset + 6,
10232 _depth
10233 )?;
10234 fidl::decode!(u16, D, &mut self.seq_num, decoder, offset + 8, _depth)?;
10235 fidl::decode!(
10236 fidl::encoding::UnboundedVector<u8>,
10237 D,
10238 &mut self.sae_fields,
10239 decoder,
10240 offset + 16,
10241 _depth
10242 )?;
10243 Ok(())
10244 }
10245 }
10246
10247 impl fidl::encoding::ValueTypeMarker for SaeHandshakeIndication {
10248 type Borrowed<'a> = &'a Self;
10249 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10250 value
10251 }
10252 }
10253
10254 unsafe impl fidl::encoding::TypeMarker for SaeHandshakeIndication {
10255 type Owned = Self;
10256
10257 #[inline(always)]
10258 fn inline_align(_context: fidl::encoding::Context) -> usize {
10259 1
10260 }
10261
10262 #[inline(always)]
10263 fn inline_size(_context: fidl::encoding::Context) -> usize {
10264 6
10265 }
10266 #[inline(always)]
10267 fn encode_is_copy() -> bool {
10268 true
10269 }
10270
10271 #[inline(always)]
10272 fn decode_is_copy() -> bool {
10273 true
10274 }
10275 }
10276
10277 unsafe impl<D: fidl::encoding::ResourceDialect>
10278 fidl::encoding::Encode<SaeHandshakeIndication, D> for &SaeHandshakeIndication
10279 {
10280 #[inline]
10281 unsafe fn encode(
10282 self,
10283 encoder: &mut fidl::encoding::Encoder<'_, D>,
10284 offset: usize,
10285 _depth: fidl::encoding::Depth,
10286 ) -> fidl::Result<()> {
10287 encoder.debug_check_bounds::<SaeHandshakeIndication>(offset);
10288 unsafe {
10289 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
10291 (buf_ptr as *mut SaeHandshakeIndication)
10292 .write_unaligned((self as *const SaeHandshakeIndication).read());
10293 }
10296 Ok(())
10297 }
10298 }
10299 unsafe impl<
10300 D: fidl::encoding::ResourceDialect,
10301 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
10302 > fidl::encoding::Encode<SaeHandshakeIndication, D> for (T0,)
10303 {
10304 #[inline]
10305 unsafe fn encode(
10306 self,
10307 encoder: &mut fidl::encoding::Encoder<'_, D>,
10308 offset: usize,
10309 depth: fidl::encoding::Depth,
10310 ) -> fidl::Result<()> {
10311 encoder.debug_check_bounds::<SaeHandshakeIndication>(offset);
10312 self.0.encode(encoder, offset + 0, depth)?;
10316 Ok(())
10317 }
10318 }
10319
10320 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10321 for SaeHandshakeIndication
10322 {
10323 #[inline(always)]
10324 fn new_empty() -> Self {
10325 Self { peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D) }
10326 }
10327
10328 #[inline]
10329 unsafe fn decode(
10330 &mut self,
10331 decoder: &mut fidl::encoding::Decoder<'_, D>,
10332 offset: usize,
10333 _depth: fidl::encoding::Depth,
10334 ) -> fidl::Result<()> {
10335 decoder.debug_check_bounds::<Self>(offset);
10336 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
10337 unsafe {
10340 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
10341 }
10342 Ok(())
10343 }
10344 }
10345
10346 impl fidl::encoding::ValueTypeMarker for SaeHandshakeResponse {
10347 type Borrowed<'a> = &'a Self;
10348 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10349 value
10350 }
10351 }
10352
10353 unsafe impl fidl::encoding::TypeMarker for SaeHandshakeResponse {
10354 type Owned = Self;
10355
10356 #[inline(always)]
10357 fn inline_align(_context: fidl::encoding::Context) -> usize {
10358 2
10359 }
10360
10361 #[inline(always)]
10362 fn inline_size(_context: fidl::encoding::Context) -> usize {
10363 8
10364 }
10365 }
10366
10367 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SaeHandshakeResponse, D>
10368 for &SaeHandshakeResponse
10369 {
10370 #[inline]
10371 unsafe fn encode(
10372 self,
10373 encoder: &mut fidl::encoding::Encoder<'_, D>,
10374 offset: usize,
10375 _depth: fidl::encoding::Depth,
10376 ) -> fidl::Result<()> {
10377 encoder.debug_check_bounds::<SaeHandshakeResponse>(offset);
10378 fidl::encoding::Encode::<SaeHandshakeResponse, D>::encode(
10380 (
10381 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.peer_sta_address),
10382 <fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
10383 ),
10384 encoder, offset, _depth
10385 )
10386 }
10387 }
10388 unsafe impl<
10389 D: fidl::encoding::ResourceDialect,
10390 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
10391 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::StatusCode, D>,
10392 > fidl::encoding::Encode<SaeHandshakeResponse, D> for (T0, T1)
10393 {
10394 #[inline]
10395 unsafe fn encode(
10396 self,
10397 encoder: &mut fidl::encoding::Encoder<'_, D>,
10398 offset: usize,
10399 depth: fidl::encoding::Depth,
10400 ) -> fidl::Result<()> {
10401 encoder.debug_check_bounds::<SaeHandshakeResponse>(offset);
10402 self.0.encode(encoder, offset + 0, depth)?;
10406 self.1.encode(encoder, offset + 6, depth)?;
10407 Ok(())
10408 }
10409 }
10410
10411 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SaeHandshakeResponse {
10412 #[inline(always)]
10413 fn new_empty() -> Self {
10414 Self {
10415 peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
10416 status_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
10417 }
10418 }
10419
10420 #[inline]
10421 unsafe fn decode(
10422 &mut self,
10423 decoder: &mut fidl::encoding::Decoder<'_, D>,
10424 offset: usize,
10425 _depth: fidl::encoding::Depth,
10426 ) -> fidl::Result<()> {
10427 decoder.debug_check_bounds::<Self>(offset);
10428 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
10430 fidl::decode!(
10431 fidl_fuchsia_wlan_ieee80211::StatusCode,
10432 D,
10433 &mut self.status_code,
10434 decoder,
10435 offset + 6,
10436 _depth
10437 )?;
10438 Ok(())
10439 }
10440 }
10441
10442 impl fidl::encoding::ValueTypeMarker for ScanEnd {
10443 type Borrowed<'a> = &'a Self;
10444 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10445 value
10446 }
10447 }
10448
10449 unsafe impl fidl::encoding::TypeMarker for ScanEnd {
10450 type Owned = Self;
10451
10452 #[inline(always)]
10453 fn inline_align(_context: fidl::encoding::Context) -> usize {
10454 8
10455 }
10456
10457 #[inline(always)]
10458 fn inline_size(_context: fidl::encoding::Context) -> usize {
10459 16
10460 }
10461 }
10462
10463 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanEnd, D> for &ScanEnd {
10464 #[inline]
10465 unsafe fn encode(
10466 self,
10467 encoder: &mut fidl::encoding::Encoder<'_, D>,
10468 offset: usize,
10469 _depth: fidl::encoding::Depth,
10470 ) -> fidl::Result<()> {
10471 encoder.debug_check_bounds::<ScanEnd>(offset);
10472 fidl::encoding::Encode::<ScanEnd, D>::encode(
10474 (
10475 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.txn_id),
10476 <ScanResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),
10477 ),
10478 encoder,
10479 offset,
10480 _depth,
10481 )
10482 }
10483 }
10484 unsafe impl<
10485 D: fidl::encoding::ResourceDialect,
10486 T0: fidl::encoding::Encode<u64, D>,
10487 T1: fidl::encoding::Encode<ScanResultCode, D>,
10488 > fidl::encoding::Encode<ScanEnd, D> for (T0, T1)
10489 {
10490 #[inline]
10491 unsafe fn encode(
10492 self,
10493 encoder: &mut fidl::encoding::Encoder<'_, D>,
10494 offset: usize,
10495 depth: fidl::encoding::Depth,
10496 ) -> fidl::Result<()> {
10497 encoder.debug_check_bounds::<ScanEnd>(offset);
10498 unsafe {
10501 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
10502 (ptr as *mut u64).write_unaligned(0);
10503 }
10504 self.0.encode(encoder, offset + 0, depth)?;
10506 self.1.encode(encoder, offset + 8, depth)?;
10507 Ok(())
10508 }
10509 }
10510
10511 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanEnd {
10512 #[inline(always)]
10513 fn new_empty() -> Self {
10514 Self { txn_id: fidl::new_empty!(u64, D), code: fidl::new_empty!(ScanResultCode, D) }
10515 }
10516
10517 #[inline]
10518 unsafe fn decode(
10519 &mut self,
10520 decoder: &mut fidl::encoding::Decoder<'_, D>,
10521 offset: usize,
10522 _depth: fidl::encoding::Depth,
10523 ) -> fidl::Result<()> {
10524 decoder.debug_check_bounds::<Self>(offset);
10525 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
10527 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10528 let mask = 0xffffffff00000000u64;
10529 let maskedval = padval & mask;
10530 if maskedval != 0 {
10531 return Err(fidl::Error::NonZeroPadding {
10532 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
10533 });
10534 }
10535 fidl::decode!(u64, D, &mut self.txn_id, decoder, offset + 0, _depth)?;
10536 fidl::decode!(ScanResultCode, D, &mut self.code, decoder, offset + 8, _depth)?;
10537 Ok(())
10538 }
10539 }
10540
10541 impl fidl::encoding::ValueTypeMarker for ScanRequest {
10542 type Borrowed<'a> = &'a Self;
10543 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10544 value
10545 }
10546 }
10547
10548 unsafe impl fidl::encoding::TypeMarker for ScanRequest {
10549 type Owned = Self;
10550
10551 #[inline(always)]
10552 fn inline_align(_context: fidl::encoding::Context) -> usize {
10553 8
10554 }
10555
10556 #[inline(always)]
10557 fn inline_size(_context: fidl::encoding::Context) -> usize {
10558 64
10559 }
10560 }
10561
10562 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanRequest, D>
10563 for &ScanRequest
10564 {
10565 #[inline]
10566 unsafe fn encode(
10567 self,
10568 encoder: &mut fidl::encoding::Encoder<'_, D>,
10569 offset: usize,
10570 _depth: fidl::encoding::Depth,
10571 ) -> fidl::Result<()> {
10572 encoder.debug_check_bounds::<ScanRequest>(offset);
10573 fidl::encoding::Encode::<ScanRequest, D>::encode(
10575 (
10576 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.txn_id),
10577 <ScanTypes as fidl::encoding::ValueTypeMarker>::borrow(&self.scan_type),
10578 <fidl::encoding::Vector<u8, 256> as fidl::encoding::ValueTypeMarker>::borrow(&self.channel_list),
10579 <fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid_list),
10580 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.probe_delay),
10581 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.min_channel_time),
10582 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.max_channel_time),
10583 ),
10584 encoder, offset, _depth
10585 )
10586 }
10587 }
10588 unsafe impl<
10589 D: fidl::encoding::ResourceDialect,
10590 T0: fidl::encoding::Encode<u64, D>,
10591 T1: fidl::encoding::Encode<ScanTypes, D>,
10592 T2: fidl::encoding::Encode<fidl::encoding::Vector<u8, 256>, D>,
10593 T3: fidl::encoding::Encode<
10594 fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
10595 D,
10596 >,
10597 T4: fidl::encoding::Encode<u32, D>,
10598 T5: fidl::encoding::Encode<u32, D>,
10599 T6: fidl::encoding::Encode<u32, D>,
10600 > fidl::encoding::Encode<ScanRequest, D> for (T0, T1, T2, T3, T4, T5, T6)
10601 {
10602 #[inline]
10603 unsafe fn encode(
10604 self,
10605 encoder: &mut fidl::encoding::Encoder<'_, D>,
10606 offset: usize,
10607 depth: fidl::encoding::Depth,
10608 ) -> fidl::Result<()> {
10609 encoder.debug_check_bounds::<ScanRequest>(offset);
10610 unsafe {
10613 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
10614 (ptr as *mut u64).write_unaligned(0);
10615 }
10616 unsafe {
10617 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(56);
10618 (ptr as *mut u64).write_unaligned(0);
10619 }
10620 self.0.encode(encoder, offset + 0, depth)?;
10622 self.1.encode(encoder, offset + 8, depth)?;
10623 self.2.encode(encoder, offset + 16, depth)?;
10624 self.3.encode(encoder, offset + 32, depth)?;
10625 self.4.encode(encoder, offset + 48, depth)?;
10626 self.5.encode(encoder, offset + 52, depth)?;
10627 self.6.encode(encoder, offset + 56, depth)?;
10628 Ok(())
10629 }
10630 }
10631
10632 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanRequest {
10633 #[inline(always)]
10634 fn new_empty() -> Self {
10635 Self {
10636 txn_id: fidl::new_empty!(u64, D),
10637 scan_type: fidl::new_empty!(ScanTypes, D),
10638 channel_list: fidl::new_empty!(fidl::encoding::Vector<u8, 256>, D),
10639 ssid_list: fidl::new_empty!(
10640 fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
10641 D
10642 ),
10643 probe_delay: fidl::new_empty!(u32, D),
10644 min_channel_time: fidl::new_empty!(u32, D),
10645 max_channel_time: fidl::new_empty!(u32, D),
10646 }
10647 }
10648
10649 #[inline]
10650 unsafe fn decode(
10651 &mut self,
10652 decoder: &mut fidl::encoding::Decoder<'_, D>,
10653 offset: usize,
10654 _depth: fidl::encoding::Depth,
10655 ) -> fidl::Result<()> {
10656 decoder.debug_check_bounds::<Self>(offset);
10657 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
10659 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10660 let mask = 0xffffffff00000000u64;
10661 let maskedval = padval & mask;
10662 if maskedval != 0 {
10663 return Err(fidl::Error::NonZeroPadding {
10664 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
10665 });
10666 }
10667 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(56) };
10668 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10669 let mask = 0xffffffff00000000u64;
10670 let maskedval = padval & mask;
10671 if maskedval != 0 {
10672 return Err(fidl::Error::NonZeroPadding {
10673 padding_start: offset + 56 + ((mask as u64).trailing_zeros() / 8) as usize,
10674 });
10675 }
10676 fidl::decode!(u64, D, &mut self.txn_id, decoder, offset + 0, _depth)?;
10677 fidl::decode!(ScanTypes, D, &mut self.scan_type, decoder, offset + 8, _depth)?;
10678 fidl::decode!(fidl::encoding::Vector<u8, 256>, D, &mut self.channel_list, decoder, offset + 16, _depth)?;
10679 fidl::decode!(
10680 fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
10681 D,
10682 &mut self.ssid_list,
10683 decoder,
10684 offset + 32,
10685 _depth
10686 )?;
10687 fidl::decode!(u32, D, &mut self.probe_delay, decoder, offset + 48, _depth)?;
10688 fidl::decode!(u32, D, &mut self.min_channel_time, decoder, offset + 52, _depth)?;
10689 fidl::decode!(u32, D, &mut self.max_channel_time, decoder, offset + 56, _depth)?;
10690 Ok(())
10691 }
10692 }
10693
10694 impl fidl::encoding::ValueTypeMarker for ScanResult {
10695 type Borrowed<'a> = &'a Self;
10696 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10697 value
10698 }
10699 }
10700
10701 unsafe impl fidl::encoding::TypeMarker for ScanResult {
10702 type Owned = Self;
10703
10704 #[inline(always)]
10705 fn inline_align(_context: fidl::encoding::Context) -> usize {
10706 8
10707 }
10708
10709 #[inline(always)]
10710 fn inline_size(_context: fidl::encoding::Context) -> usize {
10711 64
10712 }
10713 }
10714
10715 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanResult, D>
10716 for &ScanResult
10717 {
10718 #[inline]
10719 unsafe fn encode(
10720 self,
10721 encoder: &mut fidl::encoding::Encoder<'_, D>,
10722 offset: usize,
10723 _depth: fidl::encoding::Depth,
10724 ) -> fidl::Result<()> {
10725 encoder.debug_check_bounds::<ScanResult>(offset);
10726 fidl::encoding::Encode::<ScanResult, D>::encode(
10728 (
10729 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.txn_id),
10730 <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.timestamp_nanos),
10731 <fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss),
10732 ),
10733 encoder, offset, _depth
10734 )
10735 }
10736 }
10737 unsafe impl<
10738 D: fidl::encoding::ResourceDialect,
10739 T0: fidl::encoding::Encode<u64, D>,
10740 T1: fidl::encoding::Encode<i64, D>,
10741 T2: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssDescription, D>,
10742 > fidl::encoding::Encode<ScanResult, D> for (T0, T1, T2)
10743 {
10744 #[inline]
10745 unsafe fn encode(
10746 self,
10747 encoder: &mut fidl::encoding::Encoder<'_, D>,
10748 offset: usize,
10749 depth: fidl::encoding::Depth,
10750 ) -> fidl::Result<()> {
10751 encoder.debug_check_bounds::<ScanResult>(offset);
10752 self.0.encode(encoder, offset + 0, depth)?;
10756 self.1.encode(encoder, offset + 8, depth)?;
10757 self.2.encode(encoder, offset + 16, depth)?;
10758 Ok(())
10759 }
10760 }
10761
10762 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanResult {
10763 #[inline(always)]
10764 fn new_empty() -> Self {
10765 Self {
10766 txn_id: fidl::new_empty!(u64, D),
10767 timestamp_nanos: fidl::new_empty!(i64, D),
10768 bss: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D),
10769 }
10770 }
10771
10772 #[inline]
10773 unsafe fn decode(
10774 &mut self,
10775 decoder: &mut fidl::encoding::Decoder<'_, D>,
10776 offset: usize,
10777 _depth: fidl::encoding::Depth,
10778 ) -> fidl::Result<()> {
10779 decoder.debug_check_bounds::<Self>(offset);
10780 fidl::decode!(u64, D, &mut self.txn_id, decoder, offset + 0, _depth)?;
10782 fidl::decode!(i64, D, &mut self.timestamp_nanos, decoder, offset + 8, _depth)?;
10783 fidl::decode!(
10784 fidl_fuchsia_wlan_common::BssDescription,
10785 D,
10786 &mut self.bss,
10787 decoder,
10788 offset + 16,
10789 _depth
10790 )?;
10791 Ok(())
10792 }
10793 }
10794
10795 impl fidl::encoding::ValueTypeMarker for SetControlledPortRequest {
10796 type Borrowed<'a> = &'a Self;
10797 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10798 value
10799 }
10800 }
10801
10802 unsafe impl fidl::encoding::TypeMarker for SetControlledPortRequest {
10803 type Owned = Self;
10804
10805 #[inline(always)]
10806 fn inline_align(_context: fidl::encoding::Context) -> usize {
10807 4
10808 }
10809
10810 #[inline(always)]
10811 fn inline_size(_context: fidl::encoding::Context) -> usize {
10812 12
10813 }
10814 }
10815
10816 unsafe impl<D: fidl::encoding::ResourceDialect>
10817 fidl::encoding::Encode<SetControlledPortRequest, D> for &SetControlledPortRequest
10818 {
10819 #[inline]
10820 unsafe fn encode(
10821 self,
10822 encoder: &mut fidl::encoding::Encoder<'_, D>,
10823 offset: usize,
10824 _depth: fidl::encoding::Depth,
10825 ) -> fidl::Result<()> {
10826 encoder.debug_check_bounds::<SetControlledPortRequest>(offset);
10827 fidl::encoding::Encode::<SetControlledPortRequest, D>::encode(
10829 (
10830 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(
10831 &self.peer_sta_address,
10832 ),
10833 <ControlledPortState as fidl::encoding::ValueTypeMarker>::borrow(&self.state),
10834 ),
10835 encoder,
10836 offset,
10837 _depth,
10838 )
10839 }
10840 }
10841 unsafe impl<
10842 D: fidl::encoding::ResourceDialect,
10843 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
10844 T1: fidl::encoding::Encode<ControlledPortState, D>,
10845 > fidl::encoding::Encode<SetControlledPortRequest, D> for (T0, T1)
10846 {
10847 #[inline]
10848 unsafe fn encode(
10849 self,
10850 encoder: &mut fidl::encoding::Encoder<'_, D>,
10851 offset: usize,
10852 depth: fidl::encoding::Depth,
10853 ) -> fidl::Result<()> {
10854 encoder.debug_check_bounds::<SetControlledPortRequest>(offset);
10855 unsafe {
10858 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
10859 (ptr as *mut u32).write_unaligned(0);
10860 }
10861 self.0.encode(encoder, offset + 0, depth)?;
10863 self.1.encode(encoder, offset + 8, depth)?;
10864 Ok(())
10865 }
10866 }
10867
10868 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10869 for SetControlledPortRequest
10870 {
10871 #[inline(always)]
10872 fn new_empty() -> Self {
10873 Self {
10874 peer_sta_address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
10875 state: fidl::new_empty!(ControlledPortState, D),
10876 }
10877 }
10878
10879 #[inline]
10880 unsafe fn decode(
10881 &mut self,
10882 decoder: &mut fidl::encoding::Decoder<'_, D>,
10883 offset: usize,
10884 _depth: fidl::encoding::Depth,
10885 ) -> fidl::Result<()> {
10886 decoder.debug_check_bounds::<Self>(offset);
10887 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
10889 let padval = unsafe { (ptr as *const u32).read_unaligned() };
10890 let mask = 0xffff0000u32;
10891 let maskedval = padval & mask;
10892 if maskedval != 0 {
10893 return Err(fidl::Error::NonZeroPadding {
10894 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
10895 });
10896 }
10897 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.peer_sta_address, decoder, offset + 0, _depth)?;
10898 fidl::decode!(ControlledPortState, D, &mut self.state, decoder, offset + 8, _depth)?;
10899 Ok(())
10900 }
10901 }
10902
10903 impl fidl::encoding::ValueTypeMarker for SetKeyDescriptor {
10904 type Borrowed<'a> = &'a Self;
10905 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10906 value
10907 }
10908 }
10909
10910 unsafe impl fidl::encoding::TypeMarker for SetKeyDescriptor {
10911 type Owned = Self;
10912
10913 #[inline(always)]
10914 fn inline_align(_context: fidl::encoding::Context) -> usize {
10915 8
10916 }
10917
10918 #[inline(always)]
10919 fn inline_size(_context: fidl::encoding::Context) -> usize {
10920 48
10921 }
10922 }
10923
10924 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetKeyDescriptor, D>
10925 for &SetKeyDescriptor
10926 {
10927 #[inline]
10928 unsafe fn encode(
10929 self,
10930 encoder: &mut fidl::encoding::Encoder<'_, D>,
10931 offset: usize,
10932 _depth: fidl::encoding::Depth,
10933 ) -> fidl::Result<()> {
10934 encoder.debug_check_bounds::<SetKeyDescriptor>(offset);
10935 fidl::encoding::Encode::<SetKeyDescriptor, D>::encode(
10937 (
10938 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key),
10939 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.key_id),
10940 <KeyType as fidl::encoding::ValueTypeMarker>::borrow(&self.key_type),
10941 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.address),
10942 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.rsc),
10943 <fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.cipher_suite_oui),
10944 <fidl_fuchsia_wlan_ieee80211::CipherSuiteType as fidl::encoding::ValueTypeMarker>::borrow(&self.cipher_suite_type),
10945 ),
10946 encoder, offset, _depth
10947 )
10948 }
10949 }
10950 unsafe impl<
10951 D: fidl::encoding::ResourceDialect,
10952 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
10953 T1: fidl::encoding::Encode<u16, D>,
10954 T2: fidl::encoding::Encode<KeyType, D>,
10955 T3: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
10956 T4: fidl::encoding::Encode<u64, D>,
10957 T5: fidl::encoding::Encode<fidl::encoding::Array<u8, 3>, D>,
10958 T6: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::CipherSuiteType, D>,
10959 > fidl::encoding::Encode<SetKeyDescriptor, D> for (T0, T1, T2, T3, T4, T5, T6)
10960 {
10961 #[inline]
10962 unsafe fn encode(
10963 self,
10964 encoder: &mut fidl::encoding::Encoder<'_, D>,
10965 offset: usize,
10966 depth: fidl::encoding::Depth,
10967 ) -> fidl::Result<()> {
10968 encoder.debug_check_bounds::<SetKeyDescriptor>(offset);
10969 unsafe {
10972 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
10973 (ptr as *mut u64).write_unaligned(0);
10974 }
10975 unsafe {
10976 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
10977 (ptr as *mut u64).write_unaligned(0);
10978 }
10979 unsafe {
10980 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
10981 (ptr as *mut u64).write_unaligned(0);
10982 }
10983 self.0.encode(encoder, offset + 0, depth)?;
10985 self.1.encode(encoder, offset + 16, depth)?;
10986 self.2.encode(encoder, offset + 20, depth)?;
10987 self.3.encode(encoder, offset + 24, depth)?;
10988 self.4.encode(encoder, offset + 32, depth)?;
10989 self.5.encode(encoder, offset + 40, depth)?;
10990 self.6.encode(encoder, offset + 44, depth)?;
10991 Ok(())
10992 }
10993 }
10994
10995 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetKeyDescriptor {
10996 #[inline(always)]
10997 fn new_empty() -> Self {
10998 Self {
10999 key: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
11000 key_id: fidl::new_empty!(u16, D),
11001 key_type: fidl::new_empty!(KeyType, D),
11002 address: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
11003 rsc: fidl::new_empty!(u64, D),
11004 cipher_suite_oui: fidl::new_empty!(fidl::encoding::Array<u8, 3>, D),
11005 cipher_suite_type: fidl::new_empty!(
11006 fidl_fuchsia_wlan_ieee80211::CipherSuiteType,
11007 D
11008 ),
11009 }
11010 }
11011
11012 #[inline]
11013 unsafe fn decode(
11014 &mut self,
11015 decoder: &mut fidl::encoding::Decoder<'_, D>,
11016 offset: usize,
11017 _depth: fidl::encoding::Depth,
11018 ) -> fidl::Result<()> {
11019 decoder.debug_check_bounds::<Self>(offset);
11020 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
11022 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11023 let mask = 0xffff0000u64;
11024 let maskedval = padval & mask;
11025 if maskedval != 0 {
11026 return Err(fidl::Error::NonZeroPadding {
11027 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
11028 });
11029 }
11030 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
11031 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11032 let mask = 0xffff000000000000u64;
11033 let maskedval = padval & mask;
11034 if maskedval != 0 {
11035 return Err(fidl::Error::NonZeroPadding {
11036 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
11037 });
11038 }
11039 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
11040 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11041 let mask = 0xff000000u64;
11042 let maskedval = padval & mask;
11043 if maskedval != 0 {
11044 return Err(fidl::Error::NonZeroPadding {
11045 padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
11046 });
11047 }
11048 fidl::decode!(
11049 fidl::encoding::UnboundedVector<u8>,
11050 D,
11051 &mut self.key,
11052 decoder,
11053 offset + 0,
11054 _depth
11055 )?;
11056 fidl::decode!(u16, D, &mut self.key_id, decoder, offset + 16, _depth)?;
11057 fidl::decode!(KeyType, D, &mut self.key_type, decoder, offset + 20, _depth)?;
11058 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.address, decoder, offset + 24, _depth)?;
11059 fidl::decode!(u64, D, &mut self.rsc, decoder, offset + 32, _depth)?;
11060 fidl::decode!(fidl::encoding::Array<u8, 3>, D, &mut self.cipher_suite_oui, decoder, offset + 40, _depth)?;
11061 fidl::decode!(
11062 fidl_fuchsia_wlan_ieee80211::CipherSuiteType,
11063 D,
11064 &mut self.cipher_suite_type,
11065 decoder,
11066 offset + 44,
11067 _depth
11068 )?;
11069 Ok(())
11070 }
11071 }
11072
11073 impl fidl::encoding::ValueTypeMarker for SetKeyResult {
11074 type Borrowed<'a> = &'a Self;
11075 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11076 value
11077 }
11078 }
11079
11080 unsafe impl fidl::encoding::TypeMarker for SetKeyResult {
11081 type Owned = Self;
11082
11083 #[inline(always)]
11084 fn inline_align(_context: fidl::encoding::Context) -> usize {
11085 4
11086 }
11087
11088 #[inline(always)]
11089 fn inline_size(_context: fidl::encoding::Context) -> usize {
11090 8
11091 }
11092 }
11093
11094 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetKeyResult, D>
11095 for &SetKeyResult
11096 {
11097 #[inline]
11098 unsafe fn encode(
11099 self,
11100 encoder: &mut fidl::encoding::Encoder<'_, D>,
11101 offset: usize,
11102 _depth: fidl::encoding::Depth,
11103 ) -> fidl::Result<()> {
11104 encoder.debug_check_bounds::<SetKeyResult>(offset);
11105 unsafe {
11106 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11108 (buf_ptr as *mut SetKeyResult)
11109 .write_unaligned((self as *const SetKeyResult).read());
11110 let padding_ptr = buf_ptr.offset(0) as *mut u32;
11113 let padding_mask = 0xffff0000u32;
11114 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
11115 }
11116 Ok(())
11117 }
11118 }
11119 unsafe impl<
11120 D: fidl::encoding::ResourceDialect,
11121 T0: fidl::encoding::Encode<u16, D>,
11122 T1: fidl::encoding::Encode<i32, D>,
11123 > fidl::encoding::Encode<SetKeyResult, D> for (T0, T1)
11124 {
11125 #[inline]
11126 unsafe fn encode(
11127 self,
11128 encoder: &mut fidl::encoding::Encoder<'_, D>,
11129 offset: usize,
11130 depth: fidl::encoding::Depth,
11131 ) -> fidl::Result<()> {
11132 encoder.debug_check_bounds::<SetKeyResult>(offset);
11133 unsafe {
11136 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
11137 (ptr as *mut u32).write_unaligned(0);
11138 }
11139 self.0.encode(encoder, offset + 0, depth)?;
11141 self.1.encode(encoder, offset + 4, depth)?;
11142 Ok(())
11143 }
11144 }
11145
11146 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetKeyResult {
11147 #[inline(always)]
11148 fn new_empty() -> Self {
11149 Self { key_id: fidl::new_empty!(u16, D), status: fidl::new_empty!(i32, D) }
11150 }
11151
11152 #[inline]
11153 unsafe fn decode(
11154 &mut self,
11155 decoder: &mut fidl::encoding::Decoder<'_, D>,
11156 offset: usize,
11157 _depth: fidl::encoding::Depth,
11158 ) -> fidl::Result<()> {
11159 decoder.debug_check_bounds::<Self>(offset);
11160 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11161 let ptr = unsafe { buf_ptr.offset(0) };
11163 let padval = unsafe { (ptr as *const u32).read_unaligned() };
11164 let mask = 0xffff0000u32;
11165 let maskedval = padval & mask;
11166 if maskedval != 0 {
11167 return Err(fidl::Error::NonZeroPadding {
11168 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
11169 });
11170 }
11171 unsafe {
11173 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
11174 }
11175 Ok(())
11176 }
11177 }
11178
11179 impl fidl::encoding::ValueTypeMarker for SetKeysConfirm {
11180 type Borrowed<'a> = &'a Self;
11181 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11182 value
11183 }
11184 }
11185
11186 unsafe impl fidl::encoding::TypeMarker for SetKeysConfirm {
11187 type Owned = Self;
11188
11189 #[inline(always)]
11190 fn inline_align(_context: fidl::encoding::Context) -> usize {
11191 8
11192 }
11193
11194 #[inline(always)]
11195 fn inline_size(_context: fidl::encoding::Context) -> usize {
11196 16
11197 }
11198 }
11199
11200 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetKeysConfirm, D>
11201 for &SetKeysConfirm
11202 {
11203 #[inline]
11204 unsafe fn encode(
11205 self,
11206 encoder: &mut fidl::encoding::Encoder<'_, D>,
11207 offset: usize,
11208 _depth: fidl::encoding::Depth,
11209 ) -> fidl::Result<()> {
11210 encoder.debug_check_bounds::<SetKeysConfirm>(offset);
11211 fidl::encoding::Encode::<SetKeysConfirm, D>::encode(
11213 (
11214 <fidl::encoding::UnboundedVector<SetKeyResult> as fidl::encoding::ValueTypeMarker>::borrow(&self.results),
11215 ),
11216 encoder, offset, _depth
11217 )
11218 }
11219 }
11220 unsafe impl<
11221 D: fidl::encoding::ResourceDialect,
11222 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<SetKeyResult>, D>,
11223 > fidl::encoding::Encode<SetKeysConfirm, D> for (T0,)
11224 {
11225 #[inline]
11226 unsafe fn encode(
11227 self,
11228 encoder: &mut fidl::encoding::Encoder<'_, D>,
11229 offset: usize,
11230 depth: fidl::encoding::Depth,
11231 ) -> fidl::Result<()> {
11232 encoder.debug_check_bounds::<SetKeysConfirm>(offset);
11233 self.0.encode(encoder, offset + 0, depth)?;
11237 Ok(())
11238 }
11239 }
11240
11241 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetKeysConfirm {
11242 #[inline(always)]
11243 fn new_empty() -> Self {
11244 Self { results: fidl::new_empty!(fidl::encoding::UnboundedVector<SetKeyResult>, D) }
11245 }
11246
11247 #[inline]
11248 unsafe fn decode(
11249 &mut self,
11250 decoder: &mut fidl::encoding::Decoder<'_, D>,
11251 offset: usize,
11252 _depth: fidl::encoding::Depth,
11253 ) -> fidl::Result<()> {
11254 decoder.debug_check_bounds::<Self>(offset);
11255 fidl::decode!(
11257 fidl::encoding::UnboundedVector<SetKeyResult>,
11258 D,
11259 &mut self.results,
11260 decoder,
11261 offset + 0,
11262 _depth
11263 )?;
11264 Ok(())
11265 }
11266 }
11267
11268 impl fidl::encoding::ValueTypeMarker for SetKeysRequest {
11269 type Borrowed<'a> = &'a Self;
11270 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11271 value
11272 }
11273 }
11274
11275 unsafe impl fidl::encoding::TypeMarker for SetKeysRequest {
11276 type Owned = Self;
11277
11278 #[inline(always)]
11279 fn inline_align(_context: fidl::encoding::Context) -> usize {
11280 8
11281 }
11282
11283 #[inline(always)]
11284 fn inline_size(_context: fidl::encoding::Context) -> usize {
11285 16
11286 }
11287 }
11288
11289 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetKeysRequest, D>
11290 for &SetKeysRequest
11291 {
11292 #[inline]
11293 unsafe fn encode(
11294 self,
11295 encoder: &mut fidl::encoding::Encoder<'_, D>,
11296 offset: usize,
11297 _depth: fidl::encoding::Depth,
11298 ) -> fidl::Result<()> {
11299 encoder.debug_check_bounds::<SetKeysRequest>(offset);
11300 fidl::encoding::Encode::<SetKeysRequest, D>::encode(
11302 (
11303 <fidl::encoding::UnboundedVector<SetKeyDescriptor> as fidl::encoding::ValueTypeMarker>::borrow(&self.keylist),
11304 ),
11305 encoder, offset, _depth
11306 )
11307 }
11308 }
11309 unsafe impl<
11310 D: fidl::encoding::ResourceDialect,
11311 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<SetKeyDescriptor>, D>,
11312 > fidl::encoding::Encode<SetKeysRequest, D> for (T0,)
11313 {
11314 #[inline]
11315 unsafe fn encode(
11316 self,
11317 encoder: &mut fidl::encoding::Encoder<'_, D>,
11318 offset: usize,
11319 depth: fidl::encoding::Depth,
11320 ) -> fidl::Result<()> {
11321 encoder.debug_check_bounds::<SetKeysRequest>(offset);
11322 self.0.encode(encoder, offset + 0, depth)?;
11326 Ok(())
11327 }
11328 }
11329
11330 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetKeysRequest {
11331 #[inline(always)]
11332 fn new_empty() -> Self {
11333 Self { keylist: fidl::new_empty!(fidl::encoding::UnboundedVector<SetKeyDescriptor>, D) }
11334 }
11335
11336 #[inline]
11337 unsafe fn decode(
11338 &mut self,
11339 decoder: &mut fidl::encoding::Decoder<'_, D>,
11340 offset: usize,
11341 _depth: fidl::encoding::Depth,
11342 ) -> fidl::Result<()> {
11343 decoder.debug_check_bounds::<Self>(offset);
11344 fidl::decode!(
11346 fidl::encoding::UnboundedVector<SetKeyDescriptor>,
11347 D,
11348 &mut self.keylist,
11349 decoder,
11350 offset + 0,
11351 _depth
11352 )?;
11353 Ok(())
11354 }
11355 }
11356
11357 impl fidl::encoding::ValueTypeMarker for StartCaptureFramesRequest {
11358 type Borrowed<'a> = &'a Self;
11359 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11360 value
11361 }
11362 }
11363
11364 unsafe impl fidl::encoding::TypeMarker for StartCaptureFramesRequest {
11365 type Owned = Self;
11366
11367 #[inline(always)]
11368 fn inline_align(_context: fidl::encoding::Context) -> usize {
11369 4
11370 }
11371
11372 #[inline(always)]
11373 fn inline_size(_context: fidl::encoding::Context) -> usize {
11374 4
11375 }
11376 }
11377
11378 unsafe impl<D: fidl::encoding::ResourceDialect>
11379 fidl::encoding::Encode<StartCaptureFramesRequest, D> for &StartCaptureFramesRequest
11380 {
11381 #[inline]
11382 unsafe fn encode(
11383 self,
11384 encoder: &mut fidl::encoding::Encoder<'_, D>,
11385 offset: usize,
11386 _depth: fidl::encoding::Depth,
11387 ) -> fidl::Result<()> {
11388 encoder.debug_check_bounds::<StartCaptureFramesRequest>(offset);
11389 fidl::encoding::Encode::<StartCaptureFramesRequest, D>::encode(
11391 (<MgmtFrameCaptureFlags as fidl::encoding::ValueTypeMarker>::borrow(
11392 &self.mgmt_frame_flags,
11393 ),),
11394 encoder,
11395 offset,
11396 _depth,
11397 )
11398 }
11399 }
11400 unsafe impl<
11401 D: fidl::encoding::ResourceDialect,
11402 T0: fidl::encoding::Encode<MgmtFrameCaptureFlags, D>,
11403 > fidl::encoding::Encode<StartCaptureFramesRequest, D> for (T0,)
11404 {
11405 #[inline]
11406 unsafe fn encode(
11407 self,
11408 encoder: &mut fidl::encoding::Encoder<'_, D>,
11409 offset: usize,
11410 depth: fidl::encoding::Depth,
11411 ) -> fidl::Result<()> {
11412 encoder.debug_check_bounds::<StartCaptureFramesRequest>(offset);
11413 self.0.encode(encoder, offset + 0, depth)?;
11417 Ok(())
11418 }
11419 }
11420
11421 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11422 for StartCaptureFramesRequest
11423 {
11424 #[inline(always)]
11425 fn new_empty() -> Self {
11426 Self { mgmt_frame_flags: fidl::new_empty!(MgmtFrameCaptureFlags, D) }
11427 }
11428
11429 #[inline]
11430 unsafe fn decode(
11431 &mut self,
11432 decoder: &mut fidl::encoding::Decoder<'_, D>,
11433 offset: usize,
11434 _depth: fidl::encoding::Depth,
11435 ) -> fidl::Result<()> {
11436 decoder.debug_check_bounds::<Self>(offset);
11437 fidl::decode!(
11439 MgmtFrameCaptureFlags,
11440 D,
11441 &mut self.mgmt_frame_flags,
11442 decoder,
11443 offset + 0,
11444 _depth
11445 )?;
11446 Ok(())
11447 }
11448 }
11449
11450 impl fidl::encoding::ValueTypeMarker for StartCaptureFramesResponse {
11451 type Borrowed<'a> = &'a Self;
11452 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11453 value
11454 }
11455 }
11456
11457 unsafe impl fidl::encoding::TypeMarker for StartCaptureFramesResponse {
11458 type Owned = Self;
11459
11460 #[inline(always)]
11461 fn inline_align(_context: fidl::encoding::Context) -> usize {
11462 4
11463 }
11464
11465 #[inline(always)]
11466 fn inline_size(_context: fidl::encoding::Context) -> usize {
11467 8
11468 }
11469 }
11470
11471 unsafe impl<D: fidl::encoding::ResourceDialect>
11472 fidl::encoding::Encode<StartCaptureFramesResponse, D> for &StartCaptureFramesResponse
11473 {
11474 #[inline]
11475 unsafe fn encode(
11476 self,
11477 encoder: &mut fidl::encoding::Encoder<'_, D>,
11478 offset: usize,
11479 _depth: fidl::encoding::Depth,
11480 ) -> fidl::Result<()> {
11481 encoder.debug_check_bounds::<StartCaptureFramesResponse>(offset);
11482 fidl::encoding::Encode::<StartCaptureFramesResponse, D>::encode(
11484 (
11485 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.status),
11486 <MgmtFrameCaptureFlags as fidl::encoding::ValueTypeMarker>::borrow(
11487 &self.supported_mgmt_frames,
11488 ),
11489 ),
11490 encoder,
11491 offset,
11492 _depth,
11493 )
11494 }
11495 }
11496 unsafe impl<
11497 D: fidl::encoding::ResourceDialect,
11498 T0: fidl::encoding::Encode<i32, D>,
11499 T1: fidl::encoding::Encode<MgmtFrameCaptureFlags, D>,
11500 > fidl::encoding::Encode<StartCaptureFramesResponse, D> for (T0, T1)
11501 {
11502 #[inline]
11503 unsafe fn encode(
11504 self,
11505 encoder: &mut fidl::encoding::Encoder<'_, D>,
11506 offset: usize,
11507 depth: fidl::encoding::Depth,
11508 ) -> fidl::Result<()> {
11509 encoder.debug_check_bounds::<StartCaptureFramesResponse>(offset);
11510 self.0.encode(encoder, offset + 0, depth)?;
11514 self.1.encode(encoder, offset + 4, depth)?;
11515 Ok(())
11516 }
11517 }
11518
11519 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11520 for StartCaptureFramesResponse
11521 {
11522 #[inline(always)]
11523 fn new_empty() -> Self {
11524 Self {
11525 status: fidl::new_empty!(i32, D),
11526 supported_mgmt_frames: fidl::new_empty!(MgmtFrameCaptureFlags, D),
11527 }
11528 }
11529
11530 #[inline]
11531 unsafe fn decode(
11532 &mut self,
11533 decoder: &mut fidl::encoding::Decoder<'_, D>,
11534 offset: usize,
11535 _depth: fidl::encoding::Depth,
11536 ) -> fidl::Result<()> {
11537 decoder.debug_check_bounds::<Self>(offset);
11538 fidl::decode!(i32, D, &mut self.status, decoder, offset + 0, _depth)?;
11540 fidl::decode!(
11541 MgmtFrameCaptureFlags,
11542 D,
11543 &mut self.supported_mgmt_frames,
11544 decoder,
11545 offset + 4,
11546 _depth
11547 )?;
11548 Ok(())
11549 }
11550 }
11551
11552 impl fidl::encoding::ValueTypeMarker for StartConfirm {
11553 type Borrowed<'a> = &'a Self;
11554 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11555 value
11556 }
11557 }
11558
11559 unsafe impl fidl::encoding::TypeMarker for StartConfirm {
11560 type Owned = Self;
11561
11562 #[inline(always)]
11563 fn inline_align(_context: fidl::encoding::Context) -> usize {
11564 4
11565 }
11566
11567 #[inline(always)]
11568 fn inline_size(_context: fidl::encoding::Context) -> usize {
11569 4
11570 }
11571 }
11572
11573 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StartConfirm, D>
11574 for &StartConfirm
11575 {
11576 #[inline]
11577 unsafe fn encode(
11578 self,
11579 encoder: &mut fidl::encoding::Encoder<'_, D>,
11580 offset: usize,
11581 _depth: fidl::encoding::Depth,
11582 ) -> fidl::Result<()> {
11583 encoder.debug_check_bounds::<StartConfirm>(offset);
11584 fidl::encoding::Encode::<StartConfirm, D>::encode(
11586 (<StartResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.result_code),),
11587 encoder,
11588 offset,
11589 _depth,
11590 )
11591 }
11592 }
11593 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StartResultCode, D>>
11594 fidl::encoding::Encode<StartConfirm, D> for (T0,)
11595 {
11596 #[inline]
11597 unsafe fn encode(
11598 self,
11599 encoder: &mut fidl::encoding::Encoder<'_, D>,
11600 offset: usize,
11601 depth: fidl::encoding::Depth,
11602 ) -> fidl::Result<()> {
11603 encoder.debug_check_bounds::<StartConfirm>(offset);
11604 self.0.encode(encoder, offset + 0, depth)?;
11608 Ok(())
11609 }
11610 }
11611
11612 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartConfirm {
11613 #[inline(always)]
11614 fn new_empty() -> Self {
11615 Self { result_code: fidl::new_empty!(StartResultCode, D) }
11616 }
11617
11618 #[inline]
11619 unsafe fn decode(
11620 &mut self,
11621 decoder: &mut fidl::encoding::Decoder<'_, D>,
11622 offset: usize,
11623 _depth: fidl::encoding::Depth,
11624 ) -> fidl::Result<()> {
11625 decoder.debug_check_bounds::<Self>(offset);
11626 fidl::decode!(StartResultCode, D, &mut self.result_code, decoder, offset + 0, _depth)?;
11628 Ok(())
11629 }
11630 }
11631
11632 impl fidl::encoding::ValueTypeMarker for StartRequest {
11633 type Borrowed<'a> = &'a Self;
11634 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11635 value
11636 }
11637 }
11638
11639 unsafe impl fidl::encoding::TypeMarker for StartRequest {
11640 type Owned = Self;
11641
11642 #[inline(always)]
11643 fn inline_align(_context: fidl::encoding::Context) -> usize {
11644 8
11645 }
11646
11647 #[inline(always)]
11648 fn inline_size(_context: fidl::encoding::Context) -> usize {
11649 96
11650 }
11651 }
11652
11653 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StartRequest, D>
11654 for &StartRequest
11655 {
11656 #[inline]
11657 unsafe fn encode(
11658 self,
11659 encoder: &mut fidl::encoding::Encoder<'_, D>,
11660 offset: usize,
11661 _depth: fidl::encoding::Depth,
11662 ) -> fidl::Result<()> {
11663 encoder.debug_check_bounds::<StartRequest>(offset);
11664 fidl::encoding::Encode::<StartRequest, D>::encode(
11666 (
11667 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
11668 <fidl_fuchsia_wlan_common::BssType as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_type),
11669 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.beacon_period),
11670 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.dtim_period),
11671 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
11672 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_info),
11673 <fidl::encoding::Vector<u8, 14> as fidl::encoding::ValueTypeMarker>::borrow(&self.rates),
11674 <Country as fidl::encoding::ValueTypeMarker>::borrow(&self.country),
11675 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.mesh_id),
11676 <fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>> as fidl::encoding::ValueTypeMarker>::borrow(&self.rsne),
11677 <fidl_fuchsia_wlan_common::WlanPhyType as fidl::encoding::ValueTypeMarker>::borrow(&self.phy),
11678 <fidl_fuchsia_wlan_common::ChannelBandwidth as fidl::encoding::ValueTypeMarker>::borrow(&self.channel_bandwidth),
11679 ),
11680 encoder, offset, _depth
11681 )
11682 }
11683 }
11684 unsafe impl<
11685 D: fidl::encoding::ResourceDialect,
11686 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
11687 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssType, D>,
11688 T2: fidl::encoding::Encode<u16, D>,
11689 T3: fidl::encoding::Encode<u8, D>,
11690 T4: fidl::encoding::Encode<u8, D>,
11691 T5: fidl::encoding::Encode<u16, D>,
11692 T6: fidl::encoding::Encode<fidl::encoding::Vector<u8, 14>, D>,
11693 T7: fidl::encoding::Encode<Country, D>,
11694 T8: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
11695 T9: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>, D>,
11696 T10: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanPhyType, D>,
11697 T11: fidl::encoding::Encode<fidl_fuchsia_wlan_common::ChannelBandwidth, D>,
11698 > fidl::encoding::Encode<StartRequest, D>
11699 for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
11700 {
11701 #[inline]
11702 unsafe fn encode(
11703 self,
11704 encoder: &mut fidl::encoding::Encoder<'_, D>,
11705 offset: usize,
11706 depth: fidl::encoding::Depth,
11707 ) -> fidl::Result<()> {
11708 encoder.debug_check_bounds::<StartRequest>(offset);
11709 unsafe {
11712 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
11713 (ptr as *mut u64).write_unaligned(0);
11714 }
11715 unsafe {
11716 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
11717 (ptr as *mut u64).write_unaligned(0);
11718 }
11719 self.0.encode(encoder, offset + 0, depth)?;
11721 self.1.encode(encoder, offset + 16, depth)?;
11722 self.2.encode(encoder, offset + 20, depth)?;
11723 self.3.encode(encoder, offset + 22, depth)?;
11724 self.4.encode(encoder, offset + 23, depth)?;
11725 self.5.encode(encoder, offset + 24, depth)?;
11726 self.6.encode(encoder, offset + 32, depth)?;
11727 self.7.encode(encoder, offset + 48, depth)?;
11728 self.8.encode(encoder, offset + 56, depth)?;
11729 self.9.encode(encoder, offset + 72, depth)?;
11730 self.10.encode(encoder, offset + 88, depth)?;
11731 self.11.encode(encoder, offset + 92, depth)?;
11732 Ok(())
11733 }
11734 }
11735
11736 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartRequest {
11737 #[inline(always)]
11738 fn new_empty() -> Self {
11739 Self {
11740 ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
11741 bss_type: fidl::new_empty!(fidl_fuchsia_wlan_common::BssType, D),
11742 beacon_period: fidl::new_empty!(u16, D),
11743 dtim_period: fidl::new_empty!(u8, D),
11744 channel: fidl::new_empty!(u8, D),
11745 capability_info: fidl::new_empty!(u16, D),
11746 rates: fidl::new_empty!(fidl::encoding::Vector<u8, 14>, D),
11747 country: fidl::new_empty!(Country, D),
11748 mesh_id: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
11749 rsne: fidl::new_empty!(
11750 fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>,
11751 D
11752 ),
11753 phy: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanPhyType, D),
11754 channel_bandwidth: fidl::new_empty!(fidl_fuchsia_wlan_common::ChannelBandwidth, D),
11755 }
11756 }
11757
11758 #[inline]
11759 unsafe fn decode(
11760 &mut self,
11761 decoder: &mut fidl::encoding::Decoder<'_, D>,
11762 offset: usize,
11763 _depth: fidl::encoding::Depth,
11764 ) -> fidl::Result<()> {
11765 decoder.debug_check_bounds::<Self>(offset);
11766 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
11768 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11769 let mask = 0xffffffffffff0000u64;
11770 let maskedval = padval & mask;
11771 if maskedval != 0 {
11772 return Err(fidl::Error::NonZeroPadding {
11773 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
11774 });
11775 }
11776 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
11777 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11778 let mask = 0xffffffffff000000u64;
11779 let maskedval = padval & mask;
11780 if maskedval != 0 {
11781 return Err(fidl::Error::NonZeroPadding {
11782 padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
11783 });
11784 }
11785 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
11786 fidl::decode!(
11787 fidl_fuchsia_wlan_common::BssType,
11788 D,
11789 &mut self.bss_type,
11790 decoder,
11791 offset + 16,
11792 _depth
11793 )?;
11794 fidl::decode!(u16, D, &mut self.beacon_period, decoder, offset + 20, _depth)?;
11795 fidl::decode!(u8, D, &mut self.dtim_period, decoder, offset + 22, _depth)?;
11796 fidl::decode!(u8, D, &mut self.channel, decoder, offset + 23, _depth)?;
11797 fidl::decode!(u16, D, &mut self.capability_info, decoder, offset + 24, _depth)?;
11798 fidl::decode!(fidl::encoding::Vector<u8, 14>, D, &mut self.rates, decoder, offset + 32, _depth)?;
11799 fidl::decode!(Country, D, &mut self.country, decoder, offset + 48, _depth)?;
11800 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.mesh_id, decoder, offset + 56, _depth)?;
11801 fidl::decode!(
11802 fidl::encoding::Optional<fidl::encoding::Vector<u8, 257>>,
11803 D,
11804 &mut self.rsne,
11805 decoder,
11806 offset + 72,
11807 _depth
11808 )?;
11809 fidl::decode!(
11810 fidl_fuchsia_wlan_common::WlanPhyType,
11811 D,
11812 &mut self.phy,
11813 decoder,
11814 offset + 88,
11815 _depth
11816 )?;
11817 fidl::decode!(
11818 fidl_fuchsia_wlan_common::ChannelBandwidth,
11819 D,
11820 &mut self.channel_bandwidth,
11821 decoder,
11822 offset + 92,
11823 _depth
11824 )?;
11825 Ok(())
11826 }
11827 }
11828
11829 impl fidl::encoding::ValueTypeMarker for StopConfirm {
11830 type Borrowed<'a> = &'a Self;
11831 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11832 value
11833 }
11834 }
11835
11836 unsafe impl fidl::encoding::TypeMarker for StopConfirm {
11837 type Owned = Self;
11838
11839 #[inline(always)]
11840 fn inline_align(_context: fidl::encoding::Context) -> usize {
11841 4
11842 }
11843
11844 #[inline(always)]
11845 fn inline_size(_context: fidl::encoding::Context) -> usize {
11846 4
11847 }
11848 }
11849
11850 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StopConfirm, D>
11851 for &StopConfirm
11852 {
11853 #[inline]
11854 unsafe fn encode(
11855 self,
11856 encoder: &mut fidl::encoding::Encoder<'_, D>,
11857 offset: usize,
11858 _depth: fidl::encoding::Depth,
11859 ) -> fidl::Result<()> {
11860 encoder.debug_check_bounds::<StopConfirm>(offset);
11861 fidl::encoding::Encode::<StopConfirm, D>::encode(
11863 (<StopResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.result_code),),
11864 encoder,
11865 offset,
11866 _depth,
11867 )
11868 }
11869 }
11870 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StopResultCode, D>>
11871 fidl::encoding::Encode<StopConfirm, D> for (T0,)
11872 {
11873 #[inline]
11874 unsafe fn encode(
11875 self,
11876 encoder: &mut fidl::encoding::Encoder<'_, D>,
11877 offset: usize,
11878 depth: fidl::encoding::Depth,
11879 ) -> fidl::Result<()> {
11880 encoder.debug_check_bounds::<StopConfirm>(offset);
11881 self.0.encode(encoder, offset + 0, depth)?;
11885 Ok(())
11886 }
11887 }
11888
11889 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopConfirm {
11890 #[inline(always)]
11891 fn new_empty() -> Self {
11892 Self { result_code: fidl::new_empty!(StopResultCode, D) }
11893 }
11894
11895 #[inline]
11896 unsafe fn decode(
11897 &mut self,
11898 decoder: &mut fidl::encoding::Decoder<'_, D>,
11899 offset: usize,
11900 _depth: fidl::encoding::Depth,
11901 ) -> fidl::Result<()> {
11902 decoder.debug_check_bounds::<Self>(offset);
11903 fidl::decode!(StopResultCode, D, &mut self.result_code, decoder, offset + 0, _depth)?;
11905 Ok(())
11906 }
11907 }
11908
11909 impl fidl::encoding::ValueTypeMarker for StopRequest {
11910 type Borrowed<'a> = &'a Self;
11911 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11912 value
11913 }
11914 }
11915
11916 unsafe impl fidl::encoding::TypeMarker for StopRequest {
11917 type Owned = Self;
11918
11919 #[inline(always)]
11920 fn inline_align(_context: fidl::encoding::Context) -> usize {
11921 8
11922 }
11923
11924 #[inline(always)]
11925 fn inline_size(_context: fidl::encoding::Context) -> usize {
11926 16
11927 }
11928 }
11929
11930 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StopRequest, D>
11931 for &StopRequest
11932 {
11933 #[inline]
11934 unsafe fn encode(
11935 self,
11936 encoder: &mut fidl::encoding::Encoder<'_, D>,
11937 offset: usize,
11938 _depth: fidl::encoding::Depth,
11939 ) -> fidl::Result<()> {
11940 encoder.debug_check_bounds::<StopRequest>(offset);
11941 fidl::encoding::Encode::<StopRequest, D>::encode(
11943 (<fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
11944 &self.ssid,
11945 ),),
11946 encoder,
11947 offset,
11948 _depth,
11949 )
11950 }
11951 }
11952 unsafe impl<
11953 D: fidl::encoding::ResourceDialect,
11954 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
11955 > fidl::encoding::Encode<StopRequest, D> for (T0,)
11956 {
11957 #[inline]
11958 unsafe fn encode(
11959 self,
11960 encoder: &mut fidl::encoding::Encoder<'_, D>,
11961 offset: usize,
11962 depth: fidl::encoding::Depth,
11963 ) -> fidl::Result<()> {
11964 encoder.debug_check_bounds::<StopRequest>(offset);
11965 self.0.encode(encoder, offset + 0, depth)?;
11969 Ok(())
11970 }
11971 }
11972
11973 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopRequest {
11974 #[inline(always)]
11975 fn new_empty() -> Self {
11976 Self { ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D) }
11977 }
11978
11979 #[inline]
11980 unsafe fn decode(
11981 &mut self,
11982 decoder: &mut fidl::encoding::Decoder<'_, D>,
11983 offset: usize,
11984 _depth: fidl::encoding::Depth,
11985 ) -> fidl::Result<()> {
11986 decoder.debug_check_bounds::<Self>(offset);
11987 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
11989 Ok(())
11990 }
11991 }
11992
11993 impl fidl::encoding::ValueTypeMarker for WmmParameter {
11994 type Borrowed<'a> = &'a Self;
11995 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11996 value
11997 }
11998 }
11999
12000 unsafe impl fidl::encoding::TypeMarker for WmmParameter {
12001 type Owned = Self;
12002
12003 #[inline(always)]
12004 fn inline_align(_context: fidl::encoding::Context) -> usize {
12005 1
12006 }
12007
12008 #[inline(always)]
12009 fn inline_size(_context: fidl::encoding::Context) -> usize {
12010 18
12011 }
12012 #[inline(always)]
12013 fn encode_is_copy() -> bool {
12014 true
12015 }
12016
12017 #[inline(always)]
12018 fn decode_is_copy() -> bool {
12019 true
12020 }
12021 }
12022
12023 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<WmmParameter, D>
12024 for &WmmParameter
12025 {
12026 #[inline]
12027 unsafe fn encode(
12028 self,
12029 encoder: &mut fidl::encoding::Encoder<'_, D>,
12030 offset: usize,
12031 _depth: fidl::encoding::Depth,
12032 ) -> fidl::Result<()> {
12033 encoder.debug_check_bounds::<WmmParameter>(offset);
12034 unsafe {
12035 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12037 (buf_ptr as *mut WmmParameter)
12038 .write_unaligned((self as *const WmmParameter).read());
12039 }
12042 Ok(())
12043 }
12044 }
12045 unsafe impl<
12046 D: fidl::encoding::ResourceDialect,
12047 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 18>, D>,
12048 > fidl::encoding::Encode<WmmParameter, D> for (T0,)
12049 {
12050 #[inline]
12051 unsafe fn encode(
12052 self,
12053 encoder: &mut fidl::encoding::Encoder<'_, D>,
12054 offset: usize,
12055 depth: fidl::encoding::Depth,
12056 ) -> fidl::Result<()> {
12057 encoder.debug_check_bounds::<WmmParameter>(offset);
12058 self.0.encode(encoder, offset + 0, depth)?;
12062 Ok(())
12063 }
12064 }
12065
12066 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WmmParameter {
12067 #[inline(always)]
12068 fn new_empty() -> Self {
12069 Self { bytes: fidl::new_empty!(fidl::encoding::Array<u8, 18>, D) }
12070 }
12071
12072 #[inline]
12073 unsafe fn decode(
12074 &mut self,
12075 decoder: &mut fidl::encoding::Decoder<'_, D>,
12076 offset: usize,
12077 _depth: fidl::encoding::Depth,
12078 ) -> fidl::Result<()> {
12079 decoder.debug_check_bounds::<Self>(offset);
12080 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12081 unsafe {
12084 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 18);
12085 }
12086 Ok(())
12087 }
12088 }
12089
12090 impl fidl::encoding::ValueTypeMarker for GetIfaceHistogramStatsResponse {
12091 type Borrowed<'a> = &'a Self;
12092 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12093 value
12094 }
12095 }
12096
12097 unsafe impl fidl::encoding::TypeMarker for GetIfaceHistogramStatsResponse {
12098 type Owned = Self;
12099
12100 #[inline(always)]
12101 fn inline_align(_context: fidl::encoding::Context) -> usize {
12102 8
12103 }
12104
12105 #[inline(always)]
12106 fn inline_size(_context: fidl::encoding::Context) -> usize {
12107 16
12108 }
12109 }
12110
12111 unsafe impl<D: fidl::encoding::ResourceDialect>
12112 fidl::encoding::Encode<GetIfaceHistogramStatsResponse, D>
12113 for &GetIfaceHistogramStatsResponse
12114 {
12115 #[inline]
12116 unsafe fn encode(
12117 self,
12118 encoder: &mut fidl::encoding::Encoder<'_, D>,
12119 offset: usize,
12120 _depth: fidl::encoding::Depth,
12121 ) -> fidl::Result<()> {
12122 encoder.debug_check_bounds::<GetIfaceHistogramStatsResponse>(offset);
12123 encoder.write_num::<u64>(self.ordinal(), offset);
12124 match self {
12125 GetIfaceHistogramStatsResponse::Stats(ref val) => {
12126 fidl::encoding::encode_in_envelope::<fidl_fuchsia_wlan_stats::IfaceHistogramStats, D>(
12127 <fidl_fuchsia_wlan_stats::IfaceHistogramStats as fidl::encoding::ValueTypeMarker>::borrow(val),
12128 encoder, offset + 8, _depth
12129 )
12130 }
12131 GetIfaceHistogramStatsResponse::ErrorStatus(ref val) => {
12132 fidl::encoding::encode_in_envelope::<i32, D>(
12133 <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
12134 encoder, offset + 8, _depth
12135 )
12136 }
12137 }
12138 }
12139 }
12140
12141 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12142 for GetIfaceHistogramStatsResponse
12143 {
12144 #[inline(always)]
12145 fn new_empty() -> Self {
12146 Self::Stats(fidl::new_empty!(fidl_fuchsia_wlan_stats::IfaceHistogramStats, D))
12147 }
12148
12149 #[inline]
12150 unsafe fn decode(
12151 &mut self,
12152 decoder: &mut fidl::encoding::Decoder<'_, D>,
12153 offset: usize,
12154 mut depth: fidl::encoding::Depth,
12155 ) -> fidl::Result<()> {
12156 decoder.debug_check_bounds::<Self>(offset);
12157 #[allow(unused_variables)]
12158 let next_out_of_line = decoder.next_out_of_line();
12159 let handles_before = decoder.remaining_handles();
12160 let (ordinal, inlined, num_bytes, num_handles) =
12161 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12162
12163 let member_inline_size = match ordinal {
12164 1 => <fidl_fuchsia_wlan_stats::IfaceHistogramStats as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12165 2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12166 _ => return Err(fidl::Error::UnknownUnionTag),
12167 };
12168
12169 if inlined != (member_inline_size <= 4) {
12170 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12171 }
12172 let _inner_offset;
12173 if inlined {
12174 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12175 _inner_offset = offset + 8;
12176 } else {
12177 depth.increment()?;
12178 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12179 }
12180 match ordinal {
12181 1 => {
12182 #[allow(irrefutable_let_patterns)]
12183 if let GetIfaceHistogramStatsResponse::Stats(_) = self {
12184 } else {
12186 *self = GetIfaceHistogramStatsResponse::Stats(fidl::new_empty!(
12188 fidl_fuchsia_wlan_stats::IfaceHistogramStats,
12189 D
12190 ));
12191 }
12192 #[allow(irrefutable_let_patterns)]
12193 if let GetIfaceHistogramStatsResponse::Stats(ref mut val) = self {
12194 fidl::decode!(
12195 fidl_fuchsia_wlan_stats::IfaceHistogramStats,
12196 D,
12197 val,
12198 decoder,
12199 _inner_offset,
12200 depth
12201 )?;
12202 } else {
12203 unreachable!()
12204 }
12205 }
12206 2 => {
12207 #[allow(irrefutable_let_patterns)]
12208 if let GetIfaceHistogramStatsResponse::ErrorStatus(_) = self {
12209 } else {
12211 *self =
12213 GetIfaceHistogramStatsResponse::ErrorStatus(fidl::new_empty!(i32, D));
12214 }
12215 #[allow(irrefutable_let_patterns)]
12216 if let GetIfaceHistogramStatsResponse::ErrorStatus(ref mut val) = self {
12217 fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
12218 } else {
12219 unreachable!()
12220 }
12221 }
12222 ordinal => panic!("unexpected ordinal {:?}", ordinal),
12223 }
12224 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
12225 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12226 }
12227 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12228 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12229 }
12230 Ok(())
12231 }
12232 }
12233
12234 impl fidl::encoding::ValueTypeMarker for GetIfaceStatsResponse {
12235 type Borrowed<'a> = &'a Self;
12236 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12237 value
12238 }
12239 }
12240
12241 unsafe impl fidl::encoding::TypeMarker for GetIfaceStatsResponse {
12242 type Owned = Self;
12243
12244 #[inline(always)]
12245 fn inline_align(_context: fidl::encoding::Context) -> usize {
12246 8
12247 }
12248
12249 #[inline(always)]
12250 fn inline_size(_context: fidl::encoding::Context) -> usize {
12251 16
12252 }
12253 }
12254
12255 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GetIfaceStatsResponse, D>
12256 for &GetIfaceStatsResponse
12257 {
12258 #[inline]
12259 unsafe fn encode(
12260 self,
12261 encoder: &mut fidl::encoding::Encoder<'_, D>,
12262 offset: usize,
12263 _depth: fidl::encoding::Depth,
12264 ) -> fidl::Result<()> {
12265 encoder.debug_check_bounds::<GetIfaceStatsResponse>(offset);
12266 encoder.write_num::<u64>(self.ordinal(), offset);
12267 match self {
12268 GetIfaceStatsResponse::Stats(ref val) => {
12269 fidl::encoding::encode_in_envelope::<fidl_fuchsia_wlan_stats::IfaceStats, D>(
12270 <fidl_fuchsia_wlan_stats::IfaceStats as fidl::encoding::ValueTypeMarker>::borrow(val),
12271 encoder, offset + 8, _depth
12272 )
12273 }
12274 GetIfaceStatsResponse::ErrorStatus(ref val) => {
12275 fidl::encoding::encode_in_envelope::<i32, D>(
12276 <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
12277 encoder, offset + 8, _depth
12278 )
12279 }
12280 }
12281 }
12282 }
12283
12284 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetIfaceStatsResponse {
12285 #[inline(always)]
12286 fn new_empty() -> Self {
12287 Self::Stats(fidl::new_empty!(fidl_fuchsia_wlan_stats::IfaceStats, D))
12288 }
12289
12290 #[inline]
12291 unsafe fn decode(
12292 &mut self,
12293 decoder: &mut fidl::encoding::Decoder<'_, D>,
12294 offset: usize,
12295 mut depth: fidl::encoding::Depth,
12296 ) -> fidl::Result<()> {
12297 decoder.debug_check_bounds::<Self>(offset);
12298 #[allow(unused_variables)]
12299 let next_out_of_line = decoder.next_out_of_line();
12300 let handles_before = decoder.remaining_handles();
12301 let (ordinal, inlined, num_bytes, num_handles) =
12302 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12303
12304 let member_inline_size = match ordinal {
12305 1 => {
12306 <fidl_fuchsia_wlan_stats::IfaceStats as fidl::encoding::TypeMarker>::inline_size(
12307 decoder.context,
12308 )
12309 }
12310 2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12311 _ => return Err(fidl::Error::UnknownUnionTag),
12312 };
12313
12314 if inlined != (member_inline_size <= 4) {
12315 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12316 }
12317 let _inner_offset;
12318 if inlined {
12319 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12320 _inner_offset = offset + 8;
12321 } else {
12322 depth.increment()?;
12323 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12324 }
12325 match ordinal {
12326 1 => {
12327 #[allow(irrefutable_let_patterns)]
12328 if let GetIfaceStatsResponse::Stats(_) = self {
12329 } else {
12331 *self = GetIfaceStatsResponse::Stats(fidl::new_empty!(
12333 fidl_fuchsia_wlan_stats::IfaceStats,
12334 D
12335 ));
12336 }
12337 #[allow(irrefutable_let_patterns)]
12338 if let GetIfaceStatsResponse::Stats(ref mut val) = self {
12339 fidl::decode!(
12340 fidl_fuchsia_wlan_stats::IfaceStats,
12341 D,
12342 val,
12343 decoder,
12344 _inner_offset,
12345 depth
12346 )?;
12347 } else {
12348 unreachable!()
12349 }
12350 }
12351 2 => {
12352 #[allow(irrefutable_let_patterns)]
12353 if let GetIfaceStatsResponse::ErrorStatus(_) = self {
12354 } else {
12356 *self = GetIfaceStatsResponse::ErrorStatus(fidl::new_empty!(i32, D));
12358 }
12359 #[allow(irrefutable_let_patterns)]
12360 if let GetIfaceStatsResponse::ErrorStatus(ref mut val) = self {
12361 fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
12362 } else {
12363 unreachable!()
12364 }
12365 }
12366 ordinal => panic!("unexpected ordinal {:?}", ordinal),
12367 }
12368 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
12369 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12370 }
12371 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12372 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12373 }
12374 Ok(())
12375 }
12376 }
12377}