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