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