1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
14#[repr(u32)]
15pub enum DisconnectMlmeEventName {
16 DeauthenticateIndication = 1,
17 DisassociateIndication = 2,
18 RoamStartIndication = 3,
19 RoamResultIndication = 4,
20 SaeHandshakeResponse = 5,
21 RoamRequest = 6,
22 RoamConfirmation = 7,
23}
24
25impl DisconnectMlmeEventName {
26 #[inline]
27 pub fn from_primitive(prim: u32) -> Option<Self> {
28 match prim {
29 1 => Some(Self::DeauthenticateIndication),
30 2 => Some(Self::DisassociateIndication),
31 3 => Some(Self::RoamStartIndication),
32 4 => Some(Self::RoamResultIndication),
33 5 => Some(Self::SaeHandshakeResponse),
34 6 => Some(Self::RoamRequest),
35 7 => Some(Self::RoamConfirmation),
36 _ => None,
37 }
38 }
39
40 #[inline]
41 pub const fn into_primitive(self) -> u32 {
42 self as u32
43 }
44
45 #[deprecated = "Strict enums should not use `is_unknown`"]
46 #[inline]
47 pub fn is_unknown(&self) -> bool {
48 false
49 }
50}
51
52#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
54#[repr(u32)]
55pub enum Protection {
56 Unknown = 0,
57 Open = 1,
58 Wep = 2,
59 Wpa1 = 3,
60 Wpa1Wpa2PersonalTkipOnly = 4,
61 Wpa2PersonalTkipOnly = 5,
62 Wpa1Wpa2Personal = 6,
63 Wpa2Personal = 7,
64 Wpa2Wpa3Personal = 8,
65 Wpa3Personal = 9,
66 Wpa2Enterprise = 10,
67 Wpa3Enterprise = 11,
68}
69
70impl Protection {
71 #[inline]
72 pub fn from_primitive(prim: u32) -> Option<Self> {
73 match prim {
74 0 => Some(Self::Unknown),
75 1 => Some(Self::Open),
76 2 => Some(Self::Wep),
77 3 => Some(Self::Wpa1),
78 4 => Some(Self::Wpa1Wpa2PersonalTkipOnly),
79 5 => Some(Self::Wpa2PersonalTkipOnly),
80 6 => Some(Self::Wpa1Wpa2Personal),
81 7 => Some(Self::Wpa2Personal),
82 8 => Some(Self::Wpa2Wpa3Personal),
83 9 => Some(Self::Wpa3Personal),
84 10 => Some(Self::Wpa2Enterprise),
85 11 => Some(Self::Wpa3Enterprise),
86 _ => None,
87 }
88 }
89
90 #[inline]
91 pub const fn into_primitive(self) -> u32 {
92 self as u32
93 }
94
95 #[deprecated = "Strict enums should not use `is_unknown`"]
96 #[inline]
97 pub fn is_unknown(&self) -> bool {
98 false
99 }
100}
101
102#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
103#[repr(u32)]
104pub enum ScanErrorCode {
105 NotSupported = 1,
106 InternalError = 2,
107 InternalMlmeError = 3,
108 ShouldWait = 4,
109 CanceledByDriverOrFirmware = 5,
110}
111
112impl ScanErrorCode {
113 #[inline]
114 pub fn from_primitive(prim: u32) -> Option<Self> {
115 match prim {
116 1 => Some(Self::NotSupported),
117 2 => Some(Self::InternalError),
118 3 => Some(Self::InternalMlmeError),
119 4 => Some(Self::ShouldWait),
120 5 => Some(Self::CanceledByDriverOrFirmware),
121 _ => None,
122 }
123 }
124
125 #[inline]
126 pub const fn into_primitive(self) -> u32 {
127 self as u32
128 }
129
130 #[deprecated = "Strict enums should not use `is_unknown`"]
131 #[inline]
132 pub fn is_unknown(&self) -> bool {
133 false
134 }
135}
136
137#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
138#[repr(u32)]
139pub enum StartApResultCode {
140 Success = 0,
141 AlreadyStarted = 1,
142 InternalError = 2,
143 Canceled = 3,
144 TimedOut = 4,
145 PreviousStartInProgress = 5,
146 InvalidArguments = 6,
147}
148
149impl StartApResultCode {
150 #[inline]
151 pub fn from_primitive(prim: u32) -> Option<Self> {
152 match prim {
153 0 => Some(Self::Success),
154 1 => Some(Self::AlreadyStarted),
155 2 => Some(Self::InternalError),
156 3 => Some(Self::Canceled),
157 4 => Some(Self::TimedOut),
158 5 => Some(Self::PreviousStartInProgress),
159 6 => Some(Self::InvalidArguments),
160 _ => None,
161 }
162 }
163
164 #[inline]
165 pub const fn into_primitive(self) -> u32 {
166 self as u32
167 }
168
169 #[deprecated = "Strict enums should not use `is_unknown`"]
170 #[inline]
171 pub fn is_unknown(&self) -> bool {
172 false
173 }
174}
175
176#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
177#[repr(u32)]
178pub enum StopApResultCode {
179 Success = 0,
180 InternalError = 1,
181 TimedOut = 2,
182}
183
184impl StopApResultCode {
185 #[inline]
186 pub fn from_primitive(prim: u32) -> Option<Self> {
187 match prim {
188 0 => Some(Self::Success),
189 1 => Some(Self::InternalError),
190 2 => Some(Self::TimedOut),
191 _ => None,
192 }
193 }
194
195 #[inline]
196 pub const fn into_primitive(self) -> u32 {
197 self as u32
198 }
199
200 #[deprecated = "Strict enums should not use `is_unknown`"]
201 #[inline]
202 pub fn is_unknown(&self) -> bool {
203 false
204 }
205}
206
207#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
208#[repr(u32)]
209pub enum UserDisconnectReason {
210 Unknown = 0,
211 FailedToConnect = 1,
212 FidlConnectRequest = 2,
213 FidlStopClientConnectionsRequest = 3,
214 ProactiveNetworkSwitch = 4,
215 DisconnectDetectedFromSme = 5,
216 RegulatoryRegionChange = 6,
217 Startup = 7,
218 NetworkUnsaved = 8,
219 NetworkConfigUpdated = 9,
220 Recovery = 10,
221 WlanstackUnitTesting = 124,
222 WlanSmeUnitTesting = 125,
223 WlanServiceUtilTesting = 126,
224 WlanDevTool = 127,
225}
226
227impl UserDisconnectReason {
228 #[inline]
229 pub fn from_primitive(prim: u32) -> Option<Self> {
230 match prim {
231 0 => Some(Self::Unknown),
232 1 => Some(Self::FailedToConnect),
233 2 => Some(Self::FidlConnectRequest),
234 3 => Some(Self::FidlStopClientConnectionsRequest),
235 4 => Some(Self::ProactiveNetworkSwitch),
236 5 => Some(Self::DisconnectDetectedFromSme),
237 6 => Some(Self::RegulatoryRegionChange),
238 7 => Some(Self::Startup),
239 8 => Some(Self::NetworkUnsaved),
240 9 => Some(Self::NetworkConfigUpdated),
241 10 => Some(Self::Recovery),
242 124 => Some(Self::WlanstackUnitTesting),
243 125 => Some(Self::WlanSmeUnitTesting),
244 126 => Some(Self::WlanServiceUtilTesting),
245 127 => Some(Self::WlanDevTool),
246 _ => None,
247 }
248 }
249
250 #[inline]
251 pub const fn into_primitive(self) -> u32 {
252 self as u32
253 }
254
255 #[deprecated = "Strict enums should not use `is_unknown`"]
256 #[inline]
257 pub fn is_unknown(&self) -> bool {
258 false
259 }
260}
261
262#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
263pub struct ActiveScanRequest {
264 pub ssids: Vec<Vec<u8>>,
271 pub channels: Vec<u8>,
273}
274
275impl fidl::Persistable for ActiveScanRequest {}
276
277#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
278pub struct Ap {
279 pub ssid: Vec<u8>,
280 pub channel: u8,
281 pub num_clients: u16,
282}
283
284impl fidl::Persistable for Ap {}
285
286#[derive(Clone, Debug, PartialEq)]
287pub struct ApConfig {
288 pub ssid: Vec<u8>,
289 pub password: Vec<u8>,
290 pub radio_cfg: RadioConfig,
291}
292
293impl fidl::Persistable for ApConfig {}
294
295#[derive(Clone, Debug, PartialEq)]
296pub struct ApSmeStartRequest {
297 pub config: ApConfig,
298}
299
300impl fidl::Persistable for ApSmeStartRequest {}
301
302#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
303pub struct ApSmeStartResponse {
304 pub code: StartApResultCode,
305}
306
307impl fidl::Persistable for ApSmeStartResponse {}
308
309#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
310pub struct ApSmeStatusResponse {
311 pub resp: ApStatusResponse,
312}
313
314impl fidl::Persistable for ApSmeStatusResponse {}
315
316#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
317pub struct ApSmeStopResponse {
318 pub code: StopApResultCode,
319}
320
321impl fidl::Persistable for ApSmeStopResponse {}
322
323#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
324pub struct ApStatusResponse {
325 pub running_ap: Option<Box<Ap>>,
326}
327
328impl fidl::Persistable for ApStatusResponse {}
329
330#[derive(Debug, PartialEq)]
331pub struct ClientSmeConnectRequest {
332 pub req: ConnectRequest,
333 pub txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
334}
335
336impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ClientSmeConnectRequest {}
337
338#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
339pub struct ClientSmeDisconnectRequest {
340 pub reason: UserDisconnectReason,
341}
342
343impl fidl::Persistable for ClientSmeDisconnectRequest {}
344
345#[derive(Clone, Debug, PartialEq)]
346pub struct ClientSmeRoamRequest {
347 pub req: RoamRequest,
348}
349
350impl fidl::Persistable for ClientSmeRoamRequest {}
351
352#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
353pub struct ClientSmeScanForControllerRequest {
354 pub req: ScanRequest,
355}
356
357impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
358 for ClientSmeScanForControllerRequest
359{
360}
361
362#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
363pub struct ClientSmeScanRequest {
364 pub req: ScanRequest,
365}
366
367impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ClientSmeScanRequest {}
368
369#[derive(Clone, Debug, PartialEq)]
370pub struct ClientSmeStatusResponse {
371 pub resp: ClientStatusResponse,
372}
373
374impl fidl::Persistable for ClientSmeStatusResponse {}
375
376#[derive(Debug, PartialEq)]
377pub struct ClientSmeScanForControllerResponse {
378 pub scan_results: Vec<ScanResult>,
379}
380
381impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
382 for ClientSmeScanForControllerResponse
383{
384}
385
386#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
387pub struct ClientSmeScanResponse {
388 pub scan_results: fidl::Vmo,
389}
390
391impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ClientSmeScanResponse {}
392
393#[derive(Clone, Debug, PartialEq)]
394pub struct ClientSmeWmmStatusResponse {
395 pub resp: fidl_fuchsia_wlan_internal::WmmStatusResponse,
396}
397
398impl fidl::Persistable for ClientSmeWmmStatusResponse {}
399
400#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
401pub struct Compatible {
402 pub mutual_security_protocols: Vec<fidl_fuchsia_wlan_common_security::Protocol>,
403}
404
405impl fidl::Persistable for Compatible {}
406
407#[derive(Clone, Debug, PartialEq)]
408pub struct ConnectRequest {
409 pub ssid: Vec<u8>,
410 pub bss_description: fidl_fuchsia_wlan_common::BssDescription,
411 pub multiple_bss_candidates: bool,
413 pub authentication: fidl_fuchsia_wlan_common_security::Authentication,
417 pub deprecated_scan_type: fidl_fuchsia_wlan_common::ScanType,
421}
422
423impl fidl::Persistable for ConnectRequest {}
424
425#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
426pub struct ConnectResult {
427 pub code: fidl_fuchsia_wlan_ieee80211::StatusCode,
428 pub is_credential_rejected: bool,
431 pub is_reconnect: bool,
434}
435
436impl fidl::Persistable for ConnectResult {}
437
438#[derive(Clone, Debug, PartialEq)]
439pub struct ConnectTransactionOnChannelSwitchedRequest {
440 pub info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
441}
442
443impl fidl::Persistable for ConnectTransactionOnChannelSwitchedRequest {}
444
445#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
446pub struct ConnectTransactionOnConnectResultRequest {
447 pub result: ConnectResult,
448}
449
450impl fidl::Persistable for ConnectTransactionOnConnectResultRequest {}
451
452#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
453pub struct ConnectTransactionOnDisconnectRequest {
454 pub info: DisconnectInfo,
455}
456
457impl fidl::Persistable for ConnectTransactionOnDisconnectRequest {}
458
459#[derive(Clone, Debug, PartialEq)]
460pub struct ConnectTransactionOnRoamResultRequest {
461 pub result: RoamResult,
462}
463
464impl fidl::Persistable for ConnectTransactionOnRoamResultRequest {}
465
466#[derive(Clone, Debug, PartialEq)]
467pub struct ConnectTransactionOnSignalReportRequest {
468 pub ind: fidl_fuchsia_wlan_internal::SignalReportIndication,
469}
470
471impl fidl::Persistable for ConnectTransactionOnSignalReportRequest {}
472
473#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
474pub struct DisconnectCause {
475 pub mlme_event_name: DisconnectMlmeEventName,
476 pub reason_code: fidl_fuchsia_wlan_ieee80211::ReasonCode,
477}
478
479impl fidl::Persistable for DisconnectCause {}
480
481#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
482pub struct DisconnectInfo {
483 pub is_sme_reconnecting: bool,
485 pub disconnect_source: DisconnectSource,
487}
488
489impl fidl::Persistable for DisconnectInfo {}
490
491#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
492pub struct DisjointSecurityProtocol {
493 pub protocol: fidl_fuchsia_wlan_common_security::Protocol,
494 pub role: fidl_fuchsia_wlan_common::WlanMacRole,
495}
496
497impl fidl::Persistable for DisjointSecurityProtocol {}
498
499#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
501pub struct Empty;
502
503impl fidl::Persistable for Empty {}
504
505#[derive(Clone, Debug, PartialEq)]
506pub struct FeatureSupportQueryDiscoverySupportResponse {
507 pub resp: fidl_fuchsia_wlan_common::DiscoverySupport,
508}
509
510impl fidl::Persistable for FeatureSupportQueryDiscoverySupportResponse {}
511
512#[derive(Clone, Debug, PartialEq)]
513pub struct FeatureSupportQueryMacSublayerSupportResponse {
514 pub resp: fidl_fuchsia_wlan_common::MacSublayerSupport,
515}
516
517impl fidl::Persistable for FeatureSupportQueryMacSublayerSupportResponse {}
518
519#[derive(Clone, Debug, PartialEq)]
520pub struct FeatureSupportQuerySecuritySupportResponse {
521 pub resp: fidl_fuchsia_wlan_common::SecuritySupport,
522}
523
524impl fidl::Persistable for FeatureSupportQuerySecuritySupportResponse {}
525
526#[derive(Clone, Debug, PartialEq)]
527pub struct FeatureSupportQuerySpectrumManagementSupportResponse {
528 pub resp: fidl_fuchsia_wlan_common::SpectrumManagementSupport,
529}
530
531impl fidl::Persistable for FeatureSupportQuerySpectrumManagementSupportResponse {}
532
533#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
534pub struct GenericSmeGetApSmeRequest {
535 pub sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
536}
537
538impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for GenericSmeGetApSmeRequest {}
539
540#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
541pub struct GenericSmeGetClientSmeRequest {
542 pub sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
543}
544
545impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
546 for GenericSmeGetClientSmeRequest
547{
548}
549
550#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
551pub struct GenericSmeGetFeatureSupportRequest {
552 pub feature_support_server: fidl::endpoints::ServerEnd<FeatureSupportMarker>,
553}
554
555impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
556 for GenericSmeGetFeatureSupportRequest
557{
558}
559
560#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
561pub struct GenericSmeGetSmeTelemetryRequest {
562 pub telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
563}
564
565impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
566 for GenericSmeGetSmeTelemetryRequest
567{
568}
569
570#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
571pub struct GenericSmeQuery {
572 pub role: fidl_fuchsia_wlan_common::WlanMacRole,
573 pub sta_addr: [u8; 6],
574}
575
576impl fidl::Persistable for GenericSmeQuery {}
577
578#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
579pub struct GenericSmeQueryResponse {
580 pub resp: GenericSmeQuery,
581}
582
583impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for GenericSmeQueryResponse {}
584
585#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
586pub struct Incompatible {
587 pub description: String,
588 pub disjoint_security_protocols: Option<Vec<DisjointSecurityProtocol>>,
589}
590
591impl fidl::Persistable for Incompatible {}
592
593#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
594pub struct LegacyPrivacySupport {
595 pub wep_supported: bool,
596 pub wpa1_supported: bool,
597}
598
599impl fidl::Persistable for LegacyPrivacySupport {}
600
601#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
602pub struct PassiveScanRequest;
603
604impl fidl::Persistable for PassiveScanRequest {}
605
606#[derive(Clone, Debug, PartialEq)]
607pub struct RadioConfig {
608 pub phy: fidl_fuchsia_wlan_common::WlanPhyType,
609 pub channel: fidl_fuchsia_wlan_common::WlanChannel,
610}
611
612impl fidl::Persistable for RadioConfig {}
613
614#[derive(Clone, Debug, PartialEq)]
615pub struct RoamRequest {
616 pub bss_description: fidl_fuchsia_wlan_common::BssDescription,
617}
618
619impl fidl::Persistable for RoamRequest {}
620
621#[derive(Clone, Debug, PartialEq)]
623pub struct RoamResult {
624 pub bssid: [u8; 6],
626 pub status_code: fidl_fuchsia_wlan_ieee80211::StatusCode,
627 pub original_association_maintained: bool,
632 pub bss_description: Option<Box<fidl_fuchsia_wlan_common::BssDescription>>,
633 pub disconnect_info: Option<Box<DisconnectInfo>>,
636 pub is_credential_rejected: bool,
639}
640
641impl fidl::Persistable for RoamResult {}
642
643#[derive(Clone, Debug, PartialEq)]
644pub struct ScanResult {
645 pub compatibility: Compatibility,
646 pub timestamp_nanos: i64,
647 pub bss_description: fidl_fuchsia_wlan_common::BssDescription,
648}
649
650impl fidl::Persistable for ScanResult {}
651
652#[derive(Clone, Debug, PartialEq)]
653pub struct ScanResultVector {
654 pub results: Vec<ScanResult>,
655}
656
657impl fidl::Persistable for ScanResultVector {}
658
659#[derive(Clone, Debug, PartialEq)]
660pub struct ServingApInfo {
661 pub bssid: [u8; 6],
662 pub ssid: Vec<u8>,
663 pub rssi_dbm: i8,
664 pub snr_db: i8,
665 pub channel: fidl_fuchsia_wlan_common::WlanChannel,
666 pub protection: Protection,
667}
668
669impl fidl::Persistable for ServingApInfo {}
670
671#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
672pub struct TelemetryCloneInspectVmoResponse {
673 pub inspect_vmo: fidl::Vmo,
674}
675
676impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
677 for TelemetryCloneInspectVmoResponse
678{
679}
680
681#[derive(Clone, Debug, PartialEq)]
682pub struct TelemetryGetCounterStatsResponse {
683 pub stats: fidl_fuchsia_wlan_stats::IfaceCounterStats,
684}
685
686impl fidl::Persistable for TelemetryGetCounterStatsResponse {}
687
688#[derive(Clone, Debug, PartialEq)]
689pub struct TelemetryGetHistogramStatsResponse {
690 pub stats: fidl_fuchsia_wlan_stats::IfaceHistogramStats,
691}
692
693impl fidl::Persistable for TelemetryGetHistogramStatsResponse {}
694
695#[derive(Clone, Debug, PartialEq)]
696pub struct TelemetryQueryTelemetrySupportResponse {
697 pub resp: fidl_fuchsia_wlan_stats::TelemetrySupport,
698}
699
700impl fidl::Persistable for TelemetryQueryTelemetrySupportResponse {}
701
702#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
703pub struct UsmeBootstrapStartRequest {
704 pub generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
705 pub legacy_privacy_support: LegacyPrivacySupport,
706}
707
708impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UsmeBootstrapStartRequest {}
709
710#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
711pub struct UsmeBootstrapStartResponse {
712 pub inspect_vmo: fidl::Vmo,
713}
714
715impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
716 for UsmeBootstrapStartResponse
717{
718}
719
720#[derive(Clone, Debug, PartialEq)]
721pub enum ClientStatusResponse {
722 Connected(ServingApInfo),
723 Connecting(Vec<u8>),
724 Idle(Empty),
725 Roaming([u8; 6]),
726}
727
728impl ClientStatusResponse {
729 #[inline]
730 pub fn ordinal(&self) -> u64 {
731 match *self {
732 Self::Connected(_) => 1,
733 Self::Connecting(_) => 2,
734 Self::Idle(_) => 3,
735 Self::Roaming(_) => 4,
736 }
737 }
738
739 #[deprecated = "Strict unions should not use `is_unknown`"]
740 #[inline]
741 pub fn is_unknown(&self) -> bool {
742 false
743 }
744}
745
746impl fidl::Persistable for ClientStatusResponse {}
747
748#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
749pub enum Compatibility {
750 Compatible(Compatible),
751 Incompatible(Incompatible),
752}
753
754impl Compatibility {
755 #[inline]
756 pub fn ordinal(&self) -> u64 {
757 match *self {
758 Self::Compatible(_) => 1,
759 Self::Incompatible(_) => 2,
760 }
761 }
762
763 #[deprecated = "Strict unions should not use `is_unknown`"]
764 #[inline]
765 pub fn is_unknown(&self) -> bool {
766 false
767 }
768}
769
770impl fidl::Persistable for Compatibility {}
771
772#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
773pub enum DisconnectSource {
774 Ap(DisconnectCause),
775 User(UserDisconnectReason),
776 Mlme(DisconnectCause),
777}
778
779impl DisconnectSource {
780 #[inline]
781 pub fn ordinal(&self) -> u64 {
782 match *self {
783 Self::Ap(_) => 1,
784 Self::User(_) => 2,
785 Self::Mlme(_) => 3,
786 }
787 }
788
789 #[deprecated = "Strict unions should not use `is_unknown`"]
790 #[inline]
791 pub fn is_unknown(&self) -> bool {
792 false
793 }
794}
795
796impl fidl::Persistable for DisconnectSource {}
797
798#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
799pub enum ScanRequest {
800 Active(ActiveScanRequest),
801 Passive(PassiveScanRequest),
802}
803
804impl ScanRequest {
805 #[inline]
806 pub fn ordinal(&self) -> u64 {
807 match *self {
808 Self::Active(_) => 1,
809 Self::Passive(_) => 2,
810 }
811 }
812
813 #[deprecated = "Strict unions should not use `is_unknown`"]
814 #[inline]
815 pub fn is_unknown(&self) -> bool {
816 false
817 }
818}
819
820impl fidl::Persistable for ScanRequest {}
821
822#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
823pub struct ApSmeMarker;
824
825impl fidl::endpoints::ProtocolMarker for ApSmeMarker {
826 type Proxy = ApSmeProxy;
827 type RequestStream = ApSmeRequestStream;
828 #[cfg(target_os = "fuchsia")]
829 type SynchronousProxy = ApSmeSynchronousProxy;
830
831 const DEBUG_NAME: &'static str = "(anonymous) ApSme";
832}
833
834pub trait ApSmeProxyInterface: Send + Sync {
835 type StartResponseFut: std::future::Future<Output = Result<StartApResultCode, fidl::Error>>
836 + Send;
837 fn r#start(&self, config: &ApConfig) -> Self::StartResponseFut;
838 type StopResponseFut: std::future::Future<Output = Result<StopApResultCode, fidl::Error>> + Send;
839 fn r#stop(&self) -> Self::StopResponseFut;
840 type StatusResponseFut: std::future::Future<Output = Result<ApStatusResponse, fidl::Error>>
841 + Send;
842 fn r#status(&self) -> Self::StatusResponseFut;
843}
844#[derive(Debug)]
845#[cfg(target_os = "fuchsia")]
846pub struct ApSmeSynchronousProxy {
847 client: fidl::client::sync::Client,
848}
849
850#[cfg(target_os = "fuchsia")]
851impl fidl::endpoints::SynchronousProxy for ApSmeSynchronousProxy {
852 type Proxy = ApSmeProxy;
853 type Protocol = ApSmeMarker;
854
855 fn from_channel(inner: fidl::Channel) -> Self {
856 Self::new(inner)
857 }
858
859 fn into_channel(self) -> fidl::Channel {
860 self.client.into_channel()
861 }
862
863 fn as_channel(&self) -> &fidl::Channel {
864 self.client.as_channel()
865 }
866}
867
868#[cfg(target_os = "fuchsia")]
869impl ApSmeSynchronousProxy {
870 pub fn new(channel: fidl::Channel) -> Self {
871 let protocol_name = <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
872 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
873 }
874
875 pub fn into_channel(self) -> fidl::Channel {
876 self.client.into_channel()
877 }
878
879 pub fn wait_for_event(
882 &self,
883 deadline: zx::MonotonicInstant,
884 ) -> Result<ApSmeEvent, fidl::Error> {
885 ApSmeEvent::decode(self.client.wait_for_event(deadline)?)
886 }
887
888 pub fn r#start(
889 &self,
890 mut config: &ApConfig,
891 ___deadline: zx::MonotonicInstant,
892 ) -> Result<StartApResultCode, fidl::Error> {
893 let _response = self.client.send_query::<ApSmeStartRequest, ApSmeStartResponse>(
894 (config,),
895 0x33fa134ceda8624d,
896 fidl::encoding::DynamicFlags::empty(),
897 ___deadline,
898 )?;
899 Ok(_response.code)
900 }
901
902 pub fn r#stop(
903 &self,
904 ___deadline: zx::MonotonicInstant,
905 ) -> Result<StopApResultCode, fidl::Error> {
906 let _response = self.client.send_query::<fidl::encoding::EmptyPayload, ApSmeStopResponse>(
907 (),
908 0x56423f5b49a2e851,
909 fidl::encoding::DynamicFlags::empty(),
910 ___deadline,
911 )?;
912 Ok(_response.code)
913 }
914
915 pub fn r#status(
916 &self,
917 ___deadline: zx::MonotonicInstant,
918 ) -> Result<ApStatusResponse, fidl::Error> {
919 let _response =
920 self.client.send_query::<fidl::encoding::EmptyPayload, ApSmeStatusResponse>(
921 (),
922 0x51c688ac7a101606,
923 fidl::encoding::DynamicFlags::empty(),
924 ___deadline,
925 )?;
926 Ok(_response.resp)
927 }
928}
929
930#[derive(Debug, Clone)]
931pub struct ApSmeProxy {
932 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
933}
934
935impl fidl::endpoints::Proxy for ApSmeProxy {
936 type Protocol = ApSmeMarker;
937
938 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
939 Self::new(inner)
940 }
941
942 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
943 self.client.into_channel().map_err(|client| Self { client })
944 }
945
946 fn as_channel(&self) -> &::fidl::AsyncChannel {
947 self.client.as_channel()
948 }
949}
950
951impl ApSmeProxy {
952 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
954 let protocol_name = <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
955 Self { client: fidl::client::Client::new(channel, protocol_name) }
956 }
957
958 pub fn take_event_stream(&self) -> ApSmeEventStream {
964 ApSmeEventStream { event_receiver: self.client.take_event_receiver() }
965 }
966
967 pub fn r#start(
968 &self,
969 mut config: &ApConfig,
970 ) -> fidl::client::QueryResponseFut<
971 StartApResultCode,
972 fidl::encoding::DefaultFuchsiaResourceDialect,
973 > {
974 ApSmeProxyInterface::r#start(self, config)
975 }
976
977 pub fn r#stop(
978 &self,
979 ) -> fidl::client::QueryResponseFut<
980 StopApResultCode,
981 fidl::encoding::DefaultFuchsiaResourceDialect,
982 > {
983 ApSmeProxyInterface::r#stop(self)
984 }
985
986 pub fn r#status(
987 &self,
988 ) -> fidl::client::QueryResponseFut<
989 ApStatusResponse,
990 fidl::encoding::DefaultFuchsiaResourceDialect,
991 > {
992 ApSmeProxyInterface::r#status(self)
993 }
994}
995
996impl ApSmeProxyInterface for ApSmeProxy {
997 type StartResponseFut = fidl::client::QueryResponseFut<
998 StartApResultCode,
999 fidl::encoding::DefaultFuchsiaResourceDialect,
1000 >;
1001 fn r#start(&self, mut config: &ApConfig) -> Self::StartResponseFut {
1002 fn _decode(
1003 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1004 ) -> Result<StartApResultCode, fidl::Error> {
1005 let _response = fidl::client::decode_transaction_body::<
1006 ApSmeStartResponse,
1007 fidl::encoding::DefaultFuchsiaResourceDialect,
1008 0x33fa134ceda8624d,
1009 >(_buf?)?;
1010 Ok(_response.code)
1011 }
1012 self.client.send_query_and_decode::<ApSmeStartRequest, StartApResultCode>(
1013 (config,),
1014 0x33fa134ceda8624d,
1015 fidl::encoding::DynamicFlags::empty(),
1016 _decode,
1017 )
1018 }
1019
1020 type StopResponseFut = fidl::client::QueryResponseFut<
1021 StopApResultCode,
1022 fidl::encoding::DefaultFuchsiaResourceDialect,
1023 >;
1024 fn r#stop(&self) -> Self::StopResponseFut {
1025 fn _decode(
1026 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1027 ) -> Result<StopApResultCode, fidl::Error> {
1028 let _response = fidl::client::decode_transaction_body::<
1029 ApSmeStopResponse,
1030 fidl::encoding::DefaultFuchsiaResourceDialect,
1031 0x56423f5b49a2e851,
1032 >(_buf?)?;
1033 Ok(_response.code)
1034 }
1035 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, StopApResultCode>(
1036 (),
1037 0x56423f5b49a2e851,
1038 fidl::encoding::DynamicFlags::empty(),
1039 _decode,
1040 )
1041 }
1042
1043 type StatusResponseFut = fidl::client::QueryResponseFut<
1044 ApStatusResponse,
1045 fidl::encoding::DefaultFuchsiaResourceDialect,
1046 >;
1047 fn r#status(&self) -> Self::StatusResponseFut {
1048 fn _decode(
1049 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1050 ) -> Result<ApStatusResponse, fidl::Error> {
1051 let _response = fidl::client::decode_transaction_body::<
1052 ApSmeStatusResponse,
1053 fidl::encoding::DefaultFuchsiaResourceDialect,
1054 0x51c688ac7a101606,
1055 >(_buf?)?;
1056 Ok(_response.resp)
1057 }
1058 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ApStatusResponse>(
1059 (),
1060 0x51c688ac7a101606,
1061 fidl::encoding::DynamicFlags::empty(),
1062 _decode,
1063 )
1064 }
1065}
1066
1067pub struct ApSmeEventStream {
1068 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1069}
1070
1071impl std::marker::Unpin for ApSmeEventStream {}
1072
1073impl futures::stream::FusedStream for ApSmeEventStream {
1074 fn is_terminated(&self) -> bool {
1075 self.event_receiver.is_terminated()
1076 }
1077}
1078
1079impl futures::Stream for ApSmeEventStream {
1080 type Item = Result<ApSmeEvent, fidl::Error>;
1081
1082 fn poll_next(
1083 mut self: std::pin::Pin<&mut Self>,
1084 cx: &mut std::task::Context<'_>,
1085 ) -> std::task::Poll<Option<Self::Item>> {
1086 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1087 &mut self.event_receiver,
1088 cx
1089 )?) {
1090 Some(buf) => std::task::Poll::Ready(Some(ApSmeEvent::decode(buf))),
1091 None => std::task::Poll::Ready(None),
1092 }
1093 }
1094}
1095
1096#[derive(Debug)]
1097pub enum ApSmeEvent {}
1098
1099impl ApSmeEvent {
1100 fn decode(
1102 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1103 ) -> Result<ApSmeEvent, fidl::Error> {
1104 let (bytes, _handles) = buf.split_mut();
1105 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1106 debug_assert_eq!(tx_header.tx_id, 0);
1107 match tx_header.ordinal {
1108 _ => Err(fidl::Error::UnknownOrdinal {
1109 ordinal: tx_header.ordinal,
1110 protocol_name: <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1111 }),
1112 }
1113 }
1114}
1115
1116pub struct ApSmeRequestStream {
1118 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1119 is_terminated: bool,
1120}
1121
1122impl std::marker::Unpin for ApSmeRequestStream {}
1123
1124impl futures::stream::FusedStream for ApSmeRequestStream {
1125 fn is_terminated(&self) -> bool {
1126 self.is_terminated
1127 }
1128}
1129
1130impl fidl::endpoints::RequestStream for ApSmeRequestStream {
1131 type Protocol = ApSmeMarker;
1132 type ControlHandle = ApSmeControlHandle;
1133
1134 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1135 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1136 }
1137
1138 fn control_handle(&self) -> Self::ControlHandle {
1139 ApSmeControlHandle { inner: self.inner.clone() }
1140 }
1141
1142 fn into_inner(
1143 self,
1144 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1145 {
1146 (self.inner, self.is_terminated)
1147 }
1148
1149 fn from_inner(
1150 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1151 is_terminated: bool,
1152 ) -> Self {
1153 Self { inner, is_terminated }
1154 }
1155}
1156
1157impl futures::Stream for ApSmeRequestStream {
1158 type Item = Result<ApSmeRequest, fidl::Error>;
1159
1160 fn poll_next(
1161 mut self: std::pin::Pin<&mut Self>,
1162 cx: &mut std::task::Context<'_>,
1163 ) -> std::task::Poll<Option<Self::Item>> {
1164 let this = &mut *self;
1165 if this.inner.check_shutdown(cx) {
1166 this.is_terminated = true;
1167 return std::task::Poll::Ready(None);
1168 }
1169 if this.is_terminated {
1170 panic!("polled ApSmeRequestStream after completion");
1171 }
1172 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1173 |bytes, handles| {
1174 match this.inner.channel().read_etc(cx, bytes, handles) {
1175 std::task::Poll::Ready(Ok(())) => {}
1176 std::task::Poll::Pending => return std::task::Poll::Pending,
1177 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1178 this.is_terminated = true;
1179 return std::task::Poll::Ready(None);
1180 }
1181 std::task::Poll::Ready(Err(e)) => {
1182 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1183 e.into(),
1184 ))))
1185 }
1186 }
1187
1188 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1190
1191 std::task::Poll::Ready(Some(match header.ordinal {
1192 0x33fa134ceda8624d => {
1193 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1194 let mut req = fidl::new_empty!(
1195 ApSmeStartRequest,
1196 fidl::encoding::DefaultFuchsiaResourceDialect
1197 );
1198 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ApSmeStartRequest>(&header, _body_bytes, handles, &mut req)?;
1199 let control_handle = ApSmeControlHandle { inner: this.inner.clone() };
1200 Ok(ApSmeRequest::Start {
1201 config: req.config,
1202
1203 responder: ApSmeStartResponder {
1204 control_handle: std::mem::ManuallyDrop::new(control_handle),
1205 tx_id: header.tx_id,
1206 },
1207 })
1208 }
1209 0x56423f5b49a2e851 => {
1210 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1211 let mut req = fidl::new_empty!(
1212 fidl::encoding::EmptyPayload,
1213 fidl::encoding::DefaultFuchsiaResourceDialect
1214 );
1215 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1216 let control_handle = ApSmeControlHandle { inner: this.inner.clone() };
1217 Ok(ApSmeRequest::Stop {
1218 responder: ApSmeStopResponder {
1219 control_handle: std::mem::ManuallyDrop::new(control_handle),
1220 tx_id: header.tx_id,
1221 },
1222 })
1223 }
1224 0x51c688ac7a101606 => {
1225 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1226 let mut req = fidl::new_empty!(
1227 fidl::encoding::EmptyPayload,
1228 fidl::encoding::DefaultFuchsiaResourceDialect
1229 );
1230 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1231 let control_handle = ApSmeControlHandle { inner: this.inner.clone() };
1232 Ok(ApSmeRequest::Status {
1233 responder: ApSmeStatusResponder {
1234 control_handle: std::mem::ManuallyDrop::new(control_handle),
1235 tx_id: header.tx_id,
1236 },
1237 })
1238 }
1239 _ => Err(fidl::Error::UnknownOrdinal {
1240 ordinal: header.ordinal,
1241 protocol_name: <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1242 }),
1243 }))
1244 },
1245 )
1246 }
1247}
1248
1249#[derive(Debug)]
1250pub enum ApSmeRequest {
1251 Start { config: ApConfig, responder: ApSmeStartResponder },
1252 Stop { responder: ApSmeStopResponder },
1253 Status { responder: ApSmeStatusResponder },
1254}
1255
1256impl ApSmeRequest {
1257 #[allow(irrefutable_let_patterns)]
1258 pub fn into_start(self) -> Option<(ApConfig, ApSmeStartResponder)> {
1259 if let ApSmeRequest::Start { config, responder } = self {
1260 Some((config, responder))
1261 } else {
1262 None
1263 }
1264 }
1265
1266 #[allow(irrefutable_let_patterns)]
1267 pub fn into_stop(self) -> Option<(ApSmeStopResponder)> {
1268 if let ApSmeRequest::Stop { responder } = self {
1269 Some((responder))
1270 } else {
1271 None
1272 }
1273 }
1274
1275 #[allow(irrefutable_let_patterns)]
1276 pub fn into_status(self) -> Option<(ApSmeStatusResponder)> {
1277 if let ApSmeRequest::Status { responder } = self {
1278 Some((responder))
1279 } else {
1280 None
1281 }
1282 }
1283
1284 pub fn method_name(&self) -> &'static str {
1286 match *self {
1287 ApSmeRequest::Start { .. } => "start",
1288 ApSmeRequest::Stop { .. } => "stop",
1289 ApSmeRequest::Status { .. } => "status",
1290 }
1291 }
1292}
1293
1294#[derive(Debug, Clone)]
1295pub struct ApSmeControlHandle {
1296 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1297}
1298
1299impl fidl::endpoints::ControlHandle for ApSmeControlHandle {
1300 fn shutdown(&self) {
1301 self.inner.shutdown()
1302 }
1303 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1304 self.inner.shutdown_with_epitaph(status)
1305 }
1306
1307 fn is_closed(&self) -> bool {
1308 self.inner.channel().is_closed()
1309 }
1310 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1311 self.inner.channel().on_closed()
1312 }
1313
1314 #[cfg(target_os = "fuchsia")]
1315 fn signal_peer(
1316 &self,
1317 clear_mask: zx::Signals,
1318 set_mask: zx::Signals,
1319 ) -> Result<(), zx_status::Status> {
1320 use fidl::Peered;
1321 self.inner.channel().signal_peer(clear_mask, set_mask)
1322 }
1323}
1324
1325impl ApSmeControlHandle {}
1326
1327#[must_use = "FIDL methods require a response to be sent"]
1328#[derive(Debug)]
1329pub struct ApSmeStartResponder {
1330 control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
1331 tx_id: u32,
1332}
1333
1334impl std::ops::Drop for ApSmeStartResponder {
1338 fn drop(&mut self) {
1339 self.control_handle.shutdown();
1340 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1342 }
1343}
1344
1345impl fidl::endpoints::Responder for ApSmeStartResponder {
1346 type ControlHandle = ApSmeControlHandle;
1347
1348 fn control_handle(&self) -> &ApSmeControlHandle {
1349 &self.control_handle
1350 }
1351
1352 fn drop_without_shutdown(mut self) {
1353 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1355 std::mem::forget(self);
1357 }
1358}
1359
1360impl ApSmeStartResponder {
1361 pub fn send(self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
1365 let _result = self.send_raw(code);
1366 if _result.is_err() {
1367 self.control_handle.shutdown();
1368 }
1369 self.drop_without_shutdown();
1370 _result
1371 }
1372
1373 pub fn send_no_shutdown_on_err(self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
1375 let _result = self.send_raw(code);
1376 self.drop_without_shutdown();
1377 _result
1378 }
1379
1380 fn send_raw(&self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
1381 self.control_handle.inner.send::<ApSmeStartResponse>(
1382 (code,),
1383 self.tx_id,
1384 0x33fa134ceda8624d,
1385 fidl::encoding::DynamicFlags::empty(),
1386 )
1387 }
1388}
1389
1390#[must_use = "FIDL methods require a response to be sent"]
1391#[derive(Debug)]
1392pub struct ApSmeStopResponder {
1393 control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
1394 tx_id: u32,
1395}
1396
1397impl std::ops::Drop for ApSmeStopResponder {
1401 fn drop(&mut self) {
1402 self.control_handle.shutdown();
1403 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1405 }
1406}
1407
1408impl fidl::endpoints::Responder for ApSmeStopResponder {
1409 type ControlHandle = ApSmeControlHandle;
1410
1411 fn control_handle(&self) -> &ApSmeControlHandle {
1412 &self.control_handle
1413 }
1414
1415 fn drop_without_shutdown(mut self) {
1416 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1418 std::mem::forget(self);
1420 }
1421}
1422
1423impl ApSmeStopResponder {
1424 pub fn send(self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
1428 let _result = self.send_raw(code);
1429 if _result.is_err() {
1430 self.control_handle.shutdown();
1431 }
1432 self.drop_without_shutdown();
1433 _result
1434 }
1435
1436 pub fn send_no_shutdown_on_err(self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
1438 let _result = self.send_raw(code);
1439 self.drop_without_shutdown();
1440 _result
1441 }
1442
1443 fn send_raw(&self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
1444 self.control_handle.inner.send::<ApSmeStopResponse>(
1445 (code,),
1446 self.tx_id,
1447 0x56423f5b49a2e851,
1448 fidl::encoding::DynamicFlags::empty(),
1449 )
1450 }
1451}
1452
1453#[must_use = "FIDL methods require a response to be sent"]
1454#[derive(Debug)]
1455pub struct ApSmeStatusResponder {
1456 control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
1457 tx_id: u32,
1458}
1459
1460impl std::ops::Drop for ApSmeStatusResponder {
1464 fn drop(&mut self) {
1465 self.control_handle.shutdown();
1466 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1468 }
1469}
1470
1471impl fidl::endpoints::Responder for ApSmeStatusResponder {
1472 type ControlHandle = ApSmeControlHandle;
1473
1474 fn control_handle(&self) -> &ApSmeControlHandle {
1475 &self.control_handle
1476 }
1477
1478 fn drop_without_shutdown(mut self) {
1479 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1481 std::mem::forget(self);
1483 }
1484}
1485
1486impl ApSmeStatusResponder {
1487 pub fn send(self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
1491 let _result = self.send_raw(resp);
1492 if _result.is_err() {
1493 self.control_handle.shutdown();
1494 }
1495 self.drop_without_shutdown();
1496 _result
1497 }
1498
1499 pub fn send_no_shutdown_on_err(self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
1501 let _result = self.send_raw(resp);
1502 self.drop_without_shutdown();
1503 _result
1504 }
1505
1506 fn send_raw(&self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
1507 self.control_handle.inner.send::<ApSmeStatusResponse>(
1508 (resp,),
1509 self.tx_id,
1510 0x51c688ac7a101606,
1511 fidl::encoding::DynamicFlags::empty(),
1512 )
1513 }
1514}
1515
1516#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1517pub struct ClientSmeMarker;
1518
1519impl fidl::endpoints::ProtocolMarker for ClientSmeMarker {
1520 type Proxy = ClientSmeProxy;
1521 type RequestStream = ClientSmeRequestStream;
1522 #[cfg(target_os = "fuchsia")]
1523 type SynchronousProxy = ClientSmeSynchronousProxy;
1524
1525 const DEBUG_NAME: &'static str = "(anonymous) ClientSme";
1526}
1527pub type ClientSmeScanResult = Result<fidl::Vmo, ScanErrorCode>;
1528pub type ClientSmeWmmStatusResult = Result<fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>;
1529pub type ClientSmeScanForControllerResult = Result<Vec<ScanResult>, ScanErrorCode>;
1530
1531pub trait ClientSmeProxyInterface: Send + Sync {
1532 type ScanResponseFut: std::future::Future<Output = Result<ClientSmeScanResult, fidl::Error>>
1533 + Send;
1534 fn r#scan(&self, req: &ScanRequest) -> Self::ScanResponseFut;
1535 fn r#connect(
1536 &self,
1537 req: &ConnectRequest,
1538 txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1539 ) -> Result<(), fidl::Error>;
1540 fn r#roam(&self, req: &RoamRequest) -> Result<(), fidl::Error>;
1541 type DisconnectResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
1542 fn r#disconnect(&self, reason: UserDisconnectReason) -> Self::DisconnectResponseFut;
1543 type StatusResponseFut: std::future::Future<Output = Result<ClientStatusResponse, fidl::Error>>
1544 + Send;
1545 fn r#status(&self) -> Self::StatusResponseFut;
1546 type WmmStatusResponseFut: std::future::Future<Output = Result<ClientSmeWmmStatusResult, fidl::Error>>
1547 + Send;
1548 fn r#wmm_status(&self) -> Self::WmmStatusResponseFut;
1549 type ScanForControllerResponseFut: std::future::Future<Output = Result<ClientSmeScanForControllerResult, fidl::Error>>
1550 + Send;
1551 fn r#scan_for_controller(&self, req: &ScanRequest) -> Self::ScanForControllerResponseFut;
1552}
1553#[derive(Debug)]
1554#[cfg(target_os = "fuchsia")]
1555pub struct ClientSmeSynchronousProxy {
1556 client: fidl::client::sync::Client,
1557}
1558
1559#[cfg(target_os = "fuchsia")]
1560impl fidl::endpoints::SynchronousProxy for ClientSmeSynchronousProxy {
1561 type Proxy = ClientSmeProxy;
1562 type Protocol = ClientSmeMarker;
1563
1564 fn from_channel(inner: fidl::Channel) -> Self {
1565 Self::new(inner)
1566 }
1567
1568 fn into_channel(self) -> fidl::Channel {
1569 self.client.into_channel()
1570 }
1571
1572 fn as_channel(&self) -> &fidl::Channel {
1573 self.client.as_channel()
1574 }
1575}
1576
1577#[cfg(target_os = "fuchsia")]
1578impl ClientSmeSynchronousProxy {
1579 pub fn new(channel: fidl::Channel) -> Self {
1580 let protocol_name = <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1581 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1582 }
1583
1584 pub fn into_channel(self) -> fidl::Channel {
1585 self.client.into_channel()
1586 }
1587
1588 pub fn wait_for_event(
1591 &self,
1592 deadline: zx::MonotonicInstant,
1593 ) -> Result<ClientSmeEvent, fidl::Error> {
1594 ClientSmeEvent::decode(self.client.wait_for_event(deadline)?)
1595 }
1596
1597 pub fn r#scan(
1598 &self,
1599 mut req: &ScanRequest,
1600 ___deadline: zx::MonotonicInstant,
1601 ) -> Result<ClientSmeScanResult, fidl::Error> {
1602 let _response = self.client.send_query::<ClientSmeScanRequest, fidl::encoding::ResultType<
1603 ClientSmeScanResponse,
1604 ScanErrorCode,
1605 >>(
1606 (req,),
1607 0xded0ce3b1685822,
1608 fidl::encoding::DynamicFlags::empty(),
1609 ___deadline,
1610 )?;
1611 Ok(_response.map(|x| x.scan_results))
1612 }
1613
1614 pub fn r#connect(
1615 &self,
1616 mut req: &ConnectRequest,
1617 mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1618 ) -> Result<(), fidl::Error> {
1619 self.client.send::<ClientSmeConnectRequest>(
1620 (req, txn),
1621 0x250a0f6fe9f85351,
1622 fidl::encoding::DynamicFlags::empty(),
1623 )
1624 }
1625
1626 pub fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1627 self.client.send::<ClientSmeRoamRequest>(
1628 (req,),
1629 0x107ead7d84723921,
1630 fidl::encoding::DynamicFlags::empty(),
1631 )
1632 }
1633
1634 pub fn r#disconnect(
1635 &self,
1636 mut reason: UserDisconnectReason,
1637 ___deadline: zx::MonotonicInstant,
1638 ) -> Result<(), fidl::Error> {
1639 let _response =
1640 self.client.send_query::<ClientSmeDisconnectRequest, fidl::encoding::EmptyPayload>(
1641 (reason,),
1642 0x39a578de9a107304,
1643 fidl::encoding::DynamicFlags::empty(),
1644 ___deadline,
1645 )?;
1646 Ok(_response)
1647 }
1648
1649 pub fn r#status(
1650 &self,
1651 ___deadline: zx::MonotonicInstant,
1652 ) -> Result<ClientStatusResponse, fidl::Error> {
1653 let _response =
1654 self.client.send_query::<fidl::encoding::EmptyPayload, ClientSmeStatusResponse>(
1655 (),
1656 0xda00b607470faf2,
1657 fidl::encoding::DynamicFlags::empty(),
1658 ___deadline,
1659 )?;
1660 Ok(_response.resp)
1661 }
1662
1663 pub fn r#wmm_status(
1664 &self,
1665 ___deadline: zx::MonotonicInstant,
1666 ) -> Result<ClientSmeWmmStatusResult, fidl::Error> {
1667 let _response = self.client.send_query::<
1668 fidl::encoding::EmptyPayload,
1669 fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>,
1670 >(
1671 (),
1672 0x3d0ccc75f6baa9e3,
1673 fidl::encoding::DynamicFlags::empty(),
1674 ___deadline,
1675 )?;
1676 Ok(_response.map(|x| x.resp))
1677 }
1678
1679 pub fn r#scan_for_controller(
1680 &self,
1681 mut req: &ScanRequest,
1682 ___deadline: zx::MonotonicInstant,
1683 ) -> Result<ClientSmeScanForControllerResult, fidl::Error> {
1684 let _response = self.client.send_query::<
1685 ClientSmeScanForControllerRequest,
1686 fidl::encoding::ResultType<ClientSmeScanForControllerResponse, ScanErrorCode>,
1687 >(
1688 (req,),
1689 0x21f00ab22ff79a12,
1690 fidl::encoding::DynamicFlags::empty(),
1691 ___deadline,
1692 )?;
1693 Ok(_response.map(|x| x.scan_results))
1694 }
1695}
1696
1697#[derive(Debug, Clone)]
1698pub struct ClientSmeProxy {
1699 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1700}
1701
1702impl fidl::endpoints::Proxy for ClientSmeProxy {
1703 type Protocol = ClientSmeMarker;
1704
1705 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1706 Self::new(inner)
1707 }
1708
1709 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1710 self.client.into_channel().map_err(|client| Self { client })
1711 }
1712
1713 fn as_channel(&self) -> &::fidl::AsyncChannel {
1714 self.client.as_channel()
1715 }
1716}
1717
1718impl ClientSmeProxy {
1719 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1721 let protocol_name = <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1722 Self { client: fidl::client::Client::new(channel, protocol_name) }
1723 }
1724
1725 pub fn take_event_stream(&self) -> ClientSmeEventStream {
1731 ClientSmeEventStream { event_receiver: self.client.take_event_receiver() }
1732 }
1733
1734 pub fn r#scan(
1735 &self,
1736 mut req: &ScanRequest,
1737 ) -> fidl::client::QueryResponseFut<
1738 ClientSmeScanResult,
1739 fidl::encoding::DefaultFuchsiaResourceDialect,
1740 > {
1741 ClientSmeProxyInterface::r#scan(self, req)
1742 }
1743
1744 pub fn r#connect(
1745 &self,
1746 mut req: &ConnectRequest,
1747 mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1748 ) -> Result<(), fidl::Error> {
1749 ClientSmeProxyInterface::r#connect(self, req, txn)
1750 }
1751
1752 pub fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1753 ClientSmeProxyInterface::r#roam(self, req)
1754 }
1755
1756 pub fn r#disconnect(
1757 &self,
1758 mut reason: UserDisconnectReason,
1759 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
1760 ClientSmeProxyInterface::r#disconnect(self, reason)
1761 }
1762
1763 pub fn r#status(
1764 &self,
1765 ) -> fidl::client::QueryResponseFut<
1766 ClientStatusResponse,
1767 fidl::encoding::DefaultFuchsiaResourceDialect,
1768 > {
1769 ClientSmeProxyInterface::r#status(self)
1770 }
1771
1772 pub fn r#wmm_status(
1773 &self,
1774 ) -> fidl::client::QueryResponseFut<
1775 ClientSmeWmmStatusResult,
1776 fidl::encoding::DefaultFuchsiaResourceDialect,
1777 > {
1778 ClientSmeProxyInterface::r#wmm_status(self)
1779 }
1780
1781 pub fn r#scan_for_controller(
1782 &self,
1783 mut req: &ScanRequest,
1784 ) -> fidl::client::QueryResponseFut<
1785 ClientSmeScanForControllerResult,
1786 fidl::encoding::DefaultFuchsiaResourceDialect,
1787 > {
1788 ClientSmeProxyInterface::r#scan_for_controller(self, req)
1789 }
1790}
1791
1792impl ClientSmeProxyInterface for ClientSmeProxy {
1793 type ScanResponseFut = fidl::client::QueryResponseFut<
1794 ClientSmeScanResult,
1795 fidl::encoding::DefaultFuchsiaResourceDialect,
1796 >;
1797 fn r#scan(&self, mut req: &ScanRequest) -> Self::ScanResponseFut {
1798 fn _decode(
1799 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1800 ) -> Result<ClientSmeScanResult, fidl::Error> {
1801 let _response = fidl::client::decode_transaction_body::<
1802 fidl::encoding::ResultType<ClientSmeScanResponse, ScanErrorCode>,
1803 fidl::encoding::DefaultFuchsiaResourceDialect,
1804 0xded0ce3b1685822,
1805 >(_buf?)?;
1806 Ok(_response.map(|x| x.scan_results))
1807 }
1808 self.client.send_query_and_decode::<ClientSmeScanRequest, ClientSmeScanResult>(
1809 (req,),
1810 0xded0ce3b1685822,
1811 fidl::encoding::DynamicFlags::empty(),
1812 _decode,
1813 )
1814 }
1815
1816 fn r#connect(
1817 &self,
1818 mut req: &ConnectRequest,
1819 mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1820 ) -> Result<(), fidl::Error> {
1821 self.client.send::<ClientSmeConnectRequest>(
1822 (req, txn),
1823 0x250a0f6fe9f85351,
1824 fidl::encoding::DynamicFlags::empty(),
1825 )
1826 }
1827
1828 fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1829 self.client.send::<ClientSmeRoamRequest>(
1830 (req,),
1831 0x107ead7d84723921,
1832 fidl::encoding::DynamicFlags::empty(),
1833 )
1834 }
1835
1836 type DisconnectResponseFut =
1837 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1838 fn r#disconnect(&self, mut reason: UserDisconnectReason) -> Self::DisconnectResponseFut {
1839 fn _decode(
1840 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1841 ) -> Result<(), fidl::Error> {
1842 let _response = fidl::client::decode_transaction_body::<
1843 fidl::encoding::EmptyPayload,
1844 fidl::encoding::DefaultFuchsiaResourceDialect,
1845 0x39a578de9a107304,
1846 >(_buf?)?;
1847 Ok(_response)
1848 }
1849 self.client.send_query_and_decode::<ClientSmeDisconnectRequest, ()>(
1850 (reason,),
1851 0x39a578de9a107304,
1852 fidl::encoding::DynamicFlags::empty(),
1853 _decode,
1854 )
1855 }
1856
1857 type StatusResponseFut = fidl::client::QueryResponseFut<
1858 ClientStatusResponse,
1859 fidl::encoding::DefaultFuchsiaResourceDialect,
1860 >;
1861 fn r#status(&self) -> Self::StatusResponseFut {
1862 fn _decode(
1863 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1864 ) -> Result<ClientStatusResponse, fidl::Error> {
1865 let _response = fidl::client::decode_transaction_body::<
1866 ClientSmeStatusResponse,
1867 fidl::encoding::DefaultFuchsiaResourceDialect,
1868 0xda00b607470faf2,
1869 >(_buf?)?;
1870 Ok(_response.resp)
1871 }
1872 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ClientStatusResponse>(
1873 (),
1874 0xda00b607470faf2,
1875 fidl::encoding::DynamicFlags::empty(),
1876 _decode,
1877 )
1878 }
1879
1880 type WmmStatusResponseFut = fidl::client::QueryResponseFut<
1881 ClientSmeWmmStatusResult,
1882 fidl::encoding::DefaultFuchsiaResourceDialect,
1883 >;
1884 fn r#wmm_status(&self) -> Self::WmmStatusResponseFut {
1885 fn _decode(
1886 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1887 ) -> Result<ClientSmeWmmStatusResult, fidl::Error> {
1888 let _response = fidl::client::decode_transaction_body::<
1889 fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>,
1890 fidl::encoding::DefaultFuchsiaResourceDialect,
1891 0x3d0ccc75f6baa9e3,
1892 >(_buf?)?;
1893 Ok(_response.map(|x| x.resp))
1894 }
1895 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ClientSmeWmmStatusResult>(
1896 (),
1897 0x3d0ccc75f6baa9e3,
1898 fidl::encoding::DynamicFlags::empty(),
1899 _decode,
1900 )
1901 }
1902
1903 type ScanForControllerResponseFut = fidl::client::QueryResponseFut<
1904 ClientSmeScanForControllerResult,
1905 fidl::encoding::DefaultFuchsiaResourceDialect,
1906 >;
1907 fn r#scan_for_controller(&self, mut req: &ScanRequest) -> Self::ScanForControllerResponseFut {
1908 fn _decode(
1909 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1910 ) -> Result<ClientSmeScanForControllerResult, fidl::Error> {
1911 let _response = fidl::client::decode_transaction_body::<
1912 fidl::encoding::ResultType<ClientSmeScanForControllerResponse, ScanErrorCode>,
1913 fidl::encoding::DefaultFuchsiaResourceDialect,
1914 0x21f00ab22ff79a12,
1915 >(_buf?)?;
1916 Ok(_response.map(|x| x.scan_results))
1917 }
1918 self.client.send_query_and_decode::<
1919 ClientSmeScanForControllerRequest,
1920 ClientSmeScanForControllerResult,
1921 >(
1922 (req,),
1923 0x21f00ab22ff79a12,
1924 fidl::encoding::DynamicFlags::empty(),
1925 _decode,
1926 )
1927 }
1928}
1929
1930pub struct ClientSmeEventStream {
1931 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1932}
1933
1934impl std::marker::Unpin for ClientSmeEventStream {}
1935
1936impl futures::stream::FusedStream for ClientSmeEventStream {
1937 fn is_terminated(&self) -> bool {
1938 self.event_receiver.is_terminated()
1939 }
1940}
1941
1942impl futures::Stream for ClientSmeEventStream {
1943 type Item = Result<ClientSmeEvent, fidl::Error>;
1944
1945 fn poll_next(
1946 mut self: std::pin::Pin<&mut Self>,
1947 cx: &mut std::task::Context<'_>,
1948 ) -> std::task::Poll<Option<Self::Item>> {
1949 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1950 &mut self.event_receiver,
1951 cx
1952 )?) {
1953 Some(buf) => std::task::Poll::Ready(Some(ClientSmeEvent::decode(buf))),
1954 None => std::task::Poll::Ready(None),
1955 }
1956 }
1957}
1958
1959#[derive(Debug)]
1960pub enum ClientSmeEvent {}
1961
1962impl ClientSmeEvent {
1963 fn decode(
1965 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1966 ) -> Result<ClientSmeEvent, fidl::Error> {
1967 let (bytes, _handles) = buf.split_mut();
1968 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1969 debug_assert_eq!(tx_header.tx_id, 0);
1970 match tx_header.ordinal {
1971 _ => Err(fidl::Error::UnknownOrdinal {
1972 ordinal: tx_header.ordinal,
1973 protocol_name: <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1974 }),
1975 }
1976 }
1977}
1978
1979pub struct ClientSmeRequestStream {
1981 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1982 is_terminated: bool,
1983}
1984
1985impl std::marker::Unpin for ClientSmeRequestStream {}
1986
1987impl futures::stream::FusedStream for ClientSmeRequestStream {
1988 fn is_terminated(&self) -> bool {
1989 self.is_terminated
1990 }
1991}
1992
1993impl fidl::endpoints::RequestStream for ClientSmeRequestStream {
1994 type Protocol = ClientSmeMarker;
1995 type ControlHandle = ClientSmeControlHandle;
1996
1997 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1998 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1999 }
2000
2001 fn control_handle(&self) -> Self::ControlHandle {
2002 ClientSmeControlHandle { inner: self.inner.clone() }
2003 }
2004
2005 fn into_inner(
2006 self,
2007 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2008 {
2009 (self.inner, self.is_terminated)
2010 }
2011
2012 fn from_inner(
2013 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2014 is_terminated: bool,
2015 ) -> Self {
2016 Self { inner, is_terminated }
2017 }
2018}
2019
2020impl futures::Stream for ClientSmeRequestStream {
2021 type Item = Result<ClientSmeRequest, fidl::Error>;
2022
2023 fn poll_next(
2024 mut self: std::pin::Pin<&mut Self>,
2025 cx: &mut std::task::Context<'_>,
2026 ) -> std::task::Poll<Option<Self::Item>> {
2027 let this = &mut *self;
2028 if this.inner.check_shutdown(cx) {
2029 this.is_terminated = true;
2030 return std::task::Poll::Ready(None);
2031 }
2032 if this.is_terminated {
2033 panic!("polled ClientSmeRequestStream after completion");
2034 }
2035 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2036 |bytes, handles| {
2037 match this.inner.channel().read_etc(cx, bytes, handles) {
2038 std::task::Poll::Ready(Ok(())) => {}
2039 std::task::Poll::Pending => return std::task::Poll::Pending,
2040 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2041 this.is_terminated = true;
2042 return std::task::Poll::Ready(None);
2043 }
2044 std::task::Poll::Ready(Err(e)) => {
2045 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2046 e.into(),
2047 ))))
2048 }
2049 }
2050
2051 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2053
2054 std::task::Poll::Ready(Some(match header.ordinal {
2055 0xded0ce3b1685822 => {
2056 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2057 let mut req = fidl::new_empty!(
2058 ClientSmeScanRequest,
2059 fidl::encoding::DefaultFuchsiaResourceDialect
2060 );
2061 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeScanRequest>(&header, _body_bytes, handles, &mut req)?;
2062 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2063 Ok(ClientSmeRequest::Scan {
2064 req: req.req,
2065
2066 responder: ClientSmeScanResponder {
2067 control_handle: std::mem::ManuallyDrop::new(control_handle),
2068 tx_id: header.tx_id,
2069 },
2070 })
2071 }
2072 0x250a0f6fe9f85351 => {
2073 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2074 let mut req = fidl::new_empty!(
2075 ClientSmeConnectRequest,
2076 fidl::encoding::DefaultFuchsiaResourceDialect
2077 );
2078 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeConnectRequest>(&header, _body_bytes, handles, &mut req)?;
2079 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2080 Ok(ClientSmeRequest::Connect { req: req.req, txn: req.txn, control_handle })
2081 }
2082 0x107ead7d84723921 => {
2083 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2084 let mut req = fidl::new_empty!(
2085 ClientSmeRoamRequest,
2086 fidl::encoding::DefaultFuchsiaResourceDialect
2087 );
2088 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeRoamRequest>(&header, _body_bytes, handles, &mut req)?;
2089 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2090 Ok(ClientSmeRequest::Roam { req: req.req, control_handle })
2091 }
2092 0x39a578de9a107304 => {
2093 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2094 let mut req = fidl::new_empty!(
2095 ClientSmeDisconnectRequest,
2096 fidl::encoding::DefaultFuchsiaResourceDialect
2097 );
2098 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeDisconnectRequest>(&header, _body_bytes, handles, &mut req)?;
2099 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2100 Ok(ClientSmeRequest::Disconnect {
2101 reason: req.reason,
2102
2103 responder: ClientSmeDisconnectResponder {
2104 control_handle: std::mem::ManuallyDrop::new(control_handle),
2105 tx_id: header.tx_id,
2106 },
2107 })
2108 }
2109 0xda00b607470faf2 => {
2110 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2111 let mut req = fidl::new_empty!(
2112 fidl::encoding::EmptyPayload,
2113 fidl::encoding::DefaultFuchsiaResourceDialect
2114 );
2115 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2116 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2117 Ok(ClientSmeRequest::Status {
2118 responder: ClientSmeStatusResponder {
2119 control_handle: std::mem::ManuallyDrop::new(control_handle),
2120 tx_id: header.tx_id,
2121 },
2122 })
2123 }
2124 0x3d0ccc75f6baa9e3 => {
2125 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2126 let mut req = fidl::new_empty!(
2127 fidl::encoding::EmptyPayload,
2128 fidl::encoding::DefaultFuchsiaResourceDialect
2129 );
2130 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2131 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2132 Ok(ClientSmeRequest::WmmStatus {
2133 responder: ClientSmeWmmStatusResponder {
2134 control_handle: std::mem::ManuallyDrop::new(control_handle),
2135 tx_id: header.tx_id,
2136 },
2137 })
2138 }
2139 0x21f00ab22ff79a12 => {
2140 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2141 let mut req = fidl::new_empty!(
2142 ClientSmeScanForControllerRequest,
2143 fidl::encoding::DefaultFuchsiaResourceDialect
2144 );
2145 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeScanForControllerRequest>(&header, _body_bytes, handles, &mut req)?;
2146 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2147 Ok(ClientSmeRequest::ScanForController {
2148 req: req.req,
2149
2150 responder: ClientSmeScanForControllerResponder {
2151 control_handle: std::mem::ManuallyDrop::new(control_handle),
2152 tx_id: header.tx_id,
2153 },
2154 })
2155 }
2156 _ => Err(fidl::Error::UnknownOrdinal {
2157 ordinal: header.ordinal,
2158 protocol_name:
2159 <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2160 }),
2161 }))
2162 },
2163 )
2164 }
2165}
2166
2167#[derive(Debug)]
2168pub enum ClientSmeRequest {
2169 Scan {
2170 req: ScanRequest,
2171 responder: ClientSmeScanResponder,
2172 },
2173 Connect {
2174 req: ConnectRequest,
2175 txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
2176 control_handle: ClientSmeControlHandle,
2177 },
2178 Roam {
2179 req: RoamRequest,
2180 control_handle: ClientSmeControlHandle,
2181 },
2182 Disconnect {
2183 reason: UserDisconnectReason,
2184 responder: ClientSmeDisconnectResponder,
2185 },
2186 Status {
2187 responder: ClientSmeStatusResponder,
2188 },
2189 WmmStatus {
2190 responder: ClientSmeWmmStatusResponder,
2191 },
2192 ScanForController {
2193 req: ScanRequest,
2194 responder: ClientSmeScanForControllerResponder,
2195 },
2196}
2197
2198impl ClientSmeRequest {
2199 #[allow(irrefutable_let_patterns)]
2200 pub fn into_scan(self) -> Option<(ScanRequest, ClientSmeScanResponder)> {
2201 if let ClientSmeRequest::Scan { req, responder } = self {
2202 Some((req, responder))
2203 } else {
2204 None
2205 }
2206 }
2207
2208 #[allow(irrefutable_let_patterns)]
2209 pub fn into_connect(
2210 self,
2211 ) -> Option<(
2212 ConnectRequest,
2213 Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
2214 ClientSmeControlHandle,
2215 )> {
2216 if let ClientSmeRequest::Connect { req, txn, control_handle } = self {
2217 Some((req, txn, control_handle))
2218 } else {
2219 None
2220 }
2221 }
2222
2223 #[allow(irrefutable_let_patterns)]
2224 pub fn into_roam(self) -> Option<(RoamRequest, ClientSmeControlHandle)> {
2225 if let ClientSmeRequest::Roam { req, control_handle } = self {
2226 Some((req, control_handle))
2227 } else {
2228 None
2229 }
2230 }
2231
2232 #[allow(irrefutable_let_patterns)]
2233 pub fn into_disconnect(self) -> Option<(UserDisconnectReason, ClientSmeDisconnectResponder)> {
2234 if let ClientSmeRequest::Disconnect { reason, responder } = self {
2235 Some((reason, responder))
2236 } else {
2237 None
2238 }
2239 }
2240
2241 #[allow(irrefutable_let_patterns)]
2242 pub fn into_status(self) -> Option<(ClientSmeStatusResponder)> {
2243 if let ClientSmeRequest::Status { responder } = self {
2244 Some((responder))
2245 } else {
2246 None
2247 }
2248 }
2249
2250 #[allow(irrefutable_let_patterns)]
2251 pub fn into_wmm_status(self) -> Option<(ClientSmeWmmStatusResponder)> {
2252 if let ClientSmeRequest::WmmStatus { responder } = self {
2253 Some((responder))
2254 } else {
2255 None
2256 }
2257 }
2258
2259 #[allow(irrefutable_let_patterns)]
2260 pub fn into_scan_for_controller(
2261 self,
2262 ) -> Option<(ScanRequest, ClientSmeScanForControllerResponder)> {
2263 if let ClientSmeRequest::ScanForController { req, responder } = self {
2264 Some((req, responder))
2265 } else {
2266 None
2267 }
2268 }
2269
2270 pub fn method_name(&self) -> &'static str {
2272 match *self {
2273 ClientSmeRequest::Scan { .. } => "scan",
2274 ClientSmeRequest::Connect { .. } => "connect",
2275 ClientSmeRequest::Roam { .. } => "roam",
2276 ClientSmeRequest::Disconnect { .. } => "disconnect",
2277 ClientSmeRequest::Status { .. } => "status",
2278 ClientSmeRequest::WmmStatus { .. } => "wmm_status",
2279 ClientSmeRequest::ScanForController { .. } => "scan_for_controller",
2280 }
2281 }
2282}
2283
2284#[derive(Debug, Clone)]
2285pub struct ClientSmeControlHandle {
2286 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2287}
2288
2289impl fidl::endpoints::ControlHandle for ClientSmeControlHandle {
2290 fn shutdown(&self) {
2291 self.inner.shutdown()
2292 }
2293 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2294 self.inner.shutdown_with_epitaph(status)
2295 }
2296
2297 fn is_closed(&self) -> bool {
2298 self.inner.channel().is_closed()
2299 }
2300 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2301 self.inner.channel().on_closed()
2302 }
2303
2304 #[cfg(target_os = "fuchsia")]
2305 fn signal_peer(
2306 &self,
2307 clear_mask: zx::Signals,
2308 set_mask: zx::Signals,
2309 ) -> Result<(), zx_status::Status> {
2310 use fidl::Peered;
2311 self.inner.channel().signal_peer(clear_mask, set_mask)
2312 }
2313}
2314
2315impl ClientSmeControlHandle {}
2316
2317#[must_use = "FIDL methods require a response to be sent"]
2318#[derive(Debug)]
2319pub struct ClientSmeScanResponder {
2320 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2321 tx_id: u32,
2322}
2323
2324impl std::ops::Drop for ClientSmeScanResponder {
2328 fn drop(&mut self) {
2329 self.control_handle.shutdown();
2330 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2332 }
2333}
2334
2335impl fidl::endpoints::Responder for ClientSmeScanResponder {
2336 type ControlHandle = ClientSmeControlHandle;
2337
2338 fn control_handle(&self) -> &ClientSmeControlHandle {
2339 &self.control_handle
2340 }
2341
2342 fn drop_without_shutdown(mut self) {
2343 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2345 std::mem::forget(self);
2347 }
2348}
2349
2350impl ClientSmeScanResponder {
2351 pub fn send(self, mut result: Result<fidl::Vmo, ScanErrorCode>) -> Result<(), fidl::Error> {
2355 let _result = self.send_raw(result);
2356 if _result.is_err() {
2357 self.control_handle.shutdown();
2358 }
2359 self.drop_without_shutdown();
2360 _result
2361 }
2362
2363 pub fn send_no_shutdown_on_err(
2365 self,
2366 mut result: Result<fidl::Vmo, ScanErrorCode>,
2367 ) -> Result<(), fidl::Error> {
2368 let _result = self.send_raw(result);
2369 self.drop_without_shutdown();
2370 _result
2371 }
2372
2373 fn send_raw(&self, mut result: Result<fidl::Vmo, ScanErrorCode>) -> Result<(), fidl::Error> {
2374 self.control_handle
2375 .inner
2376 .send::<fidl::encoding::ResultType<ClientSmeScanResponse, ScanErrorCode>>(
2377 result.map(|scan_results| (scan_results,)),
2378 self.tx_id,
2379 0xded0ce3b1685822,
2380 fidl::encoding::DynamicFlags::empty(),
2381 )
2382 }
2383}
2384
2385#[must_use = "FIDL methods require a response to be sent"]
2386#[derive(Debug)]
2387pub struct ClientSmeDisconnectResponder {
2388 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2389 tx_id: u32,
2390}
2391
2392impl std::ops::Drop for ClientSmeDisconnectResponder {
2396 fn drop(&mut self) {
2397 self.control_handle.shutdown();
2398 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2400 }
2401}
2402
2403impl fidl::endpoints::Responder for ClientSmeDisconnectResponder {
2404 type ControlHandle = ClientSmeControlHandle;
2405
2406 fn control_handle(&self) -> &ClientSmeControlHandle {
2407 &self.control_handle
2408 }
2409
2410 fn drop_without_shutdown(mut self) {
2411 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2413 std::mem::forget(self);
2415 }
2416}
2417
2418impl ClientSmeDisconnectResponder {
2419 pub fn send(self) -> Result<(), fidl::Error> {
2423 let _result = self.send_raw();
2424 if _result.is_err() {
2425 self.control_handle.shutdown();
2426 }
2427 self.drop_without_shutdown();
2428 _result
2429 }
2430
2431 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
2433 let _result = self.send_raw();
2434 self.drop_without_shutdown();
2435 _result
2436 }
2437
2438 fn send_raw(&self) -> Result<(), fidl::Error> {
2439 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
2440 (),
2441 self.tx_id,
2442 0x39a578de9a107304,
2443 fidl::encoding::DynamicFlags::empty(),
2444 )
2445 }
2446}
2447
2448#[must_use = "FIDL methods require a response to be sent"]
2449#[derive(Debug)]
2450pub struct ClientSmeStatusResponder {
2451 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2452 tx_id: u32,
2453}
2454
2455impl std::ops::Drop for ClientSmeStatusResponder {
2459 fn drop(&mut self) {
2460 self.control_handle.shutdown();
2461 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2463 }
2464}
2465
2466impl fidl::endpoints::Responder for ClientSmeStatusResponder {
2467 type ControlHandle = ClientSmeControlHandle;
2468
2469 fn control_handle(&self) -> &ClientSmeControlHandle {
2470 &self.control_handle
2471 }
2472
2473 fn drop_without_shutdown(mut self) {
2474 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2476 std::mem::forget(self);
2478 }
2479}
2480
2481impl ClientSmeStatusResponder {
2482 pub fn send(self, mut resp: &ClientStatusResponse) -> Result<(), fidl::Error> {
2486 let _result = self.send_raw(resp);
2487 if _result.is_err() {
2488 self.control_handle.shutdown();
2489 }
2490 self.drop_without_shutdown();
2491 _result
2492 }
2493
2494 pub fn send_no_shutdown_on_err(
2496 self,
2497 mut resp: &ClientStatusResponse,
2498 ) -> Result<(), fidl::Error> {
2499 let _result = self.send_raw(resp);
2500 self.drop_without_shutdown();
2501 _result
2502 }
2503
2504 fn send_raw(&self, mut resp: &ClientStatusResponse) -> Result<(), fidl::Error> {
2505 self.control_handle.inner.send::<ClientSmeStatusResponse>(
2506 (resp,),
2507 self.tx_id,
2508 0xda00b607470faf2,
2509 fidl::encoding::DynamicFlags::empty(),
2510 )
2511 }
2512}
2513
2514#[must_use = "FIDL methods require a response to be sent"]
2515#[derive(Debug)]
2516pub struct ClientSmeWmmStatusResponder {
2517 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2518 tx_id: u32,
2519}
2520
2521impl std::ops::Drop for ClientSmeWmmStatusResponder {
2525 fn drop(&mut self) {
2526 self.control_handle.shutdown();
2527 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2529 }
2530}
2531
2532impl fidl::endpoints::Responder for ClientSmeWmmStatusResponder {
2533 type ControlHandle = ClientSmeControlHandle;
2534
2535 fn control_handle(&self) -> &ClientSmeControlHandle {
2536 &self.control_handle
2537 }
2538
2539 fn drop_without_shutdown(mut self) {
2540 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2542 std::mem::forget(self);
2544 }
2545}
2546
2547impl ClientSmeWmmStatusResponder {
2548 pub fn send(
2552 self,
2553 mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
2554 ) -> Result<(), fidl::Error> {
2555 let _result = self.send_raw(result);
2556 if _result.is_err() {
2557 self.control_handle.shutdown();
2558 }
2559 self.drop_without_shutdown();
2560 _result
2561 }
2562
2563 pub fn send_no_shutdown_on_err(
2565 self,
2566 mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
2567 ) -> Result<(), fidl::Error> {
2568 let _result = self.send_raw(result);
2569 self.drop_without_shutdown();
2570 _result
2571 }
2572
2573 fn send_raw(
2574 &self,
2575 mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
2576 ) -> Result<(), fidl::Error> {
2577 self.control_handle
2578 .inner
2579 .send::<fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>>(
2580 result.map(|resp| (resp,)),
2581 self.tx_id,
2582 0x3d0ccc75f6baa9e3,
2583 fidl::encoding::DynamicFlags::empty(),
2584 )
2585 }
2586}
2587
2588#[must_use = "FIDL methods require a response to be sent"]
2589#[derive(Debug)]
2590pub struct ClientSmeScanForControllerResponder {
2591 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2592 tx_id: u32,
2593}
2594
2595impl std::ops::Drop for ClientSmeScanForControllerResponder {
2599 fn drop(&mut self) {
2600 self.control_handle.shutdown();
2601 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2603 }
2604}
2605
2606impl fidl::endpoints::Responder for ClientSmeScanForControllerResponder {
2607 type ControlHandle = ClientSmeControlHandle;
2608
2609 fn control_handle(&self) -> &ClientSmeControlHandle {
2610 &self.control_handle
2611 }
2612
2613 fn drop_without_shutdown(mut self) {
2614 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2616 std::mem::forget(self);
2618 }
2619}
2620
2621impl ClientSmeScanForControllerResponder {
2622 pub fn send(self, mut result: Result<&[ScanResult], ScanErrorCode>) -> Result<(), fidl::Error> {
2626 let _result = self.send_raw(result);
2627 if _result.is_err() {
2628 self.control_handle.shutdown();
2629 }
2630 self.drop_without_shutdown();
2631 _result
2632 }
2633
2634 pub fn send_no_shutdown_on_err(
2636 self,
2637 mut result: Result<&[ScanResult], ScanErrorCode>,
2638 ) -> Result<(), fidl::Error> {
2639 let _result = self.send_raw(result);
2640 self.drop_without_shutdown();
2641 _result
2642 }
2643
2644 fn send_raw(
2645 &self,
2646 mut result: Result<&[ScanResult], ScanErrorCode>,
2647 ) -> Result<(), fidl::Error> {
2648 self.control_handle.inner.send::<fidl::encoding::ResultType<
2649 ClientSmeScanForControllerResponse,
2650 ScanErrorCode,
2651 >>(
2652 result.map(|scan_results| (scan_results,)),
2653 self.tx_id,
2654 0x21f00ab22ff79a12,
2655 fidl::encoding::DynamicFlags::empty(),
2656 )
2657 }
2658}
2659
2660#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2661pub struct ConnectTransactionMarker;
2662
2663impl fidl::endpoints::ProtocolMarker for ConnectTransactionMarker {
2664 type Proxy = ConnectTransactionProxy;
2665 type RequestStream = ConnectTransactionRequestStream;
2666 #[cfg(target_os = "fuchsia")]
2667 type SynchronousProxy = ConnectTransactionSynchronousProxy;
2668
2669 const DEBUG_NAME: &'static str = "(anonymous) ConnectTransaction";
2670}
2671
2672pub trait ConnectTransactionProxyInterface: Send + Sync {}
2673#[derive(Debug)]
2674#[cfg(target_os = "fuchsia")]
2675pub struct ConnectTransactionSynchronousProxy {
2676 client: fidl::client::sync::Client,
2677}
2678
2679#[cfg(target_os = "fuchsia")]
2680impl fidl::endpoints::SynchronousProxy for ConnectTransactionSynchronousProxy {
2681 type Proxy = ConnectTransactionProxy;
2682 type Protocol = ConnectTransactionMarker;
2683
2684 fn from_channel(inner: fidl::Channel) -> Self {
2685 Self::new(inner)
2686 }
2687
2688 fn into_channel(self) -> fidl::Channel {
2689 self.client.into_channel()
2690 }
2691
2692 fn as_channel(&self) -> &fidl::Channel {
2693 self.client.as_channel()
2694 }
2695}
2696
2697#[cfg(target_os = "fuchsia")]
2698impl ConnectTransactionSynchronousProxy {
2699 pub fn new(channel: fidl::Channel) -> Self {
2700 let protocol_name =
2701 <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2702 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2703 }
2704
2705 pub fn into_channel(self) -> fidl::Channel {
2706 self.client.into_channel()
2707 }
2708
2709 pub fn wait_for_event(
2712 &self,
2713 deadline: zx::MonotonicInstant,
2714 ) -> Result<ConnectTransactionEvent, fidl::Error> {
2715 ConnectTransactionEvent::decode(self.client.wait_for_event(deadline)?)
2716 }
2717}
2718
2719#[derive(Debug, Clone)]
2720pub struct ConnectTransactionProxy {
2721 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2722}
2723
2724impl fidl::endpoints::Proxy for ConnectTransactionProxy {
2725 type Protocol = ConnectTransactionMarker;
2726
2727 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2728 Self::new(inner)
2729 }
2730
2731 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2732 self.client.into_channel().map_err(|client| Self { client })
2733 }
2734
2735 fn as_channel(&self) -> &::fidl::AsyncChannel {
2736 self.client.as_channel()
2737 }
2738}
2739
2740impl ConnectTransactionProxy {
2741 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2743 let protocol_name =
2744 <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2745 Self { client: fidl::client::Client::new(channel, protocol_name) }
2746 }
2747
2748 pub fn take_event_stream(&self) -> ConnectTransactionEventStream {
2754 ConnectTransactionEventStream { event_receiver: self.client.take_event_receiver() }
2755 }
2756}
2757
2758impl ConnectTransactionProxyInterface for ConnectTransactionProxy {}
2759
2760pub struct ConnectTransactionEventStream {
2761 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2762}
2763
2764impl std::marker::Unpin for ConnectTransactionEventStream {}
2765
2766impl futures::stream::FusedStream for ConnectTransactionEventStream {
2767 fn is_terminated(&self) -> bool {
2768 self.event_receiver.is_terminated()
2769 }
2770}
2771
2772impl futures::Stream for ConnectTransactionEventStream {
2773 type Item = Result<ConnectTransactionEvent, fidl::Error>;
2774
2775 fn poll_next(
2776 mut self: std::pin::Pin<&mut Self>,
2777 cx: &mut std::task::Context<'_>,
2778 ) -> std::task::Poll<Option<Self::Item>> {
2779 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2780 &mut self.event_receiver,
2781 cx
2782 )?) {
2783 Some(buf) => std::task::Poll::Ready(Some(ConnectTransactionEvent::decode(buf))),
2784 None => std::task::Poll::Ready(None),
2785 }
2786 }
2787}
2788
2789#[derive(Debug)]
2790pub enum ConnectTransactionEvent {
2791 OnConnectResult { result: ConnectResult },
2792 OnDisconnect { info: DisconnectInfo },
2793 OnRoamResult { result: RoamResult },
2794 OnSignalReport { ind: fidl_fuchsia_wlan_internal::SignalReportIndication },
2795 OnChannelSwitched { info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo },
2796}
2797
2798impl ConnectTransactionEvent {
2799 #[allow(irrefutable_let_patterns)]
2800 pub fn into_on_connect_result(self) -> Option<ConnectResult> {
2801 if let ConnectTransactionEvent::OnConnectResult { result } = self {
2802 Some((result))
2803 } else {
2804 None
2805 }
2806 }
2807 #[allow(irrefutable_let_patterns)]
2808 pub fn into_on_disconnect(self) -> Option<DisconnectInfo> {
2809 if let ConnectTransactionEvent::OnDisconnect { info } = self {
2810 Some((info))
2811 } else {
2812 None
2813 }
2814 }
2815 #[allow(irrefutable_let_patterns)]
2816 pub fn into_on_roam_result(self) -> Option<RoamResult> {
2817 if let ConnectTransactionEvent::OnRoamResult { result } = self {
2818 Some((result))
2819 } else {
2820 None
2821 }
2822 }
2823 #[allow(irrefutable_let_patterns)]
2824 pub fn into_on_signal_report(
2825 self,
2826 ) -> Option<fidl_fuchsia_wlan_internal::SignalReportIndication> {
2827 if let ConnectTransactionEvent::OnSignalReport { ind } = self {
2828 Some((ind))
2829 } else {
2830 None
2831 }
2832 }
2833 #[allow(irrefutable_let_patterns)]
2834 pub fn into_on_channel_switched(self) -> Option<fidl_fuchsia_wlan_internal::ChannelSwitchInfo> {
2835 if let ConnectTransactionEvent::OnChannelSwitched { info } = self {
2836 Some((info))
2837 } else {
2838 None
2839 }
2840 }
2841
2842 fn decode(
2844 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2845 ) -> Result<ConnectTransactionEvent, fidl::Error> {
2846 let (bytes, _handles) = buf.split_mut();
2847 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2848 debug_assert_eq!(tx_header.tx_id, 0);
2849 match tx_header.ordinal {
2850 0x48d2cf407da489a7 => {
2851 let mut out = fidl::new_empty!(
2852 ConnectTransactionOnConnectResultRequest,
2853 fidl::encoding::DefaultFuchsiaResourceDialect
2854 );
2855 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnConnectResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2856 Ok((ConnectTransactionEvent::OnConnectResult { result: out.result }))
2857 }
2858 0x40dea7b1449cc733 => {
2859 let mut out = fidl::new_empty!(
2860 ConnectTransactionOnDisconnectRequest,
2861 fidl::encoding::DefaultFuchsiaResourceDialect
2862 );
2863 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnDisconnectRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2864 Ok((ConnectTransactionEvent::OnDisconnect { info: out.info }))
2865 }
2866 0x656267da4ccf2a41 => {
2867 let mut out = fidl::new_empty!(
2868 ConnectTransactionOnRoamResultRequest,
2869 fidl::encoding::DefaultFuchsiaResourceDialect
2870 );
2871 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnRoamResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2872 Ok((ConnectTransactionEvent::OnRoamResult { result: out.result }))
2873 }
2874 0x5e968bd5e267e262 => {
2875 let mut out = fidl::new_empty!(
2876 ConnectTransactionOnSignalReportRequest,
2877 fidl::encoding::DefaultFuchsiaResourceDialect
2878 );
2879 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnSignalReportRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2880 Ok((ConnectTransactionEvent::OnSignalReport { ind: out.ind }))
2881 }
2882 0x5f5153778cd70512 => {
2883 let mut out = fidl::new_empty!(
2884 ConnectTransactionOnChannelSwitchedRequest,
2885 fidl::encoding::DefaultFuchsiaResourceDialect
2886 );
2887 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnChannelSwitchedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2888 Ok((ConnectTransactionEvent::OnChannelSwitched { info: out.info }))
2889 }
2890 _ => Err(fidl::Error::UnknownOrdinal {
2891 ordinal: tx_header.ordinal,
2892 protocol_name:
2893 <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2894 }),
2895 }
2896 }
2897}
2898
2899pub struct ConnectTransactionRequestStream {
2901 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2902 is_terminated: bool,
2903}
2904
2905impl std::marker::Unpin for ConnectTransactionRequestStream {}
2906
2907impl futures::stream::FusedStream for ConnectTransactionRequestStream {
2908 fn is_terminated(&self) -> bool {
2909 self.is_terminated
2910 }
2911}
2912
2913impl fidl::endpoints::RequestStream for ConnectTransactionRequestStream {
2914 type Protocol = ConnectTransactionMarker;
2915 type ControlHandle = ConnectTransactionControlHandle;
2916
2917 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2918 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2919 }
2920
2921 fn control_handle(&self) -> Self::ControlHandle {
2922 ConnectTransactionControlHandle { inner: self.inner.clone() }
2923 }
2924
2925 fn into_inner(
2926 self,
2927 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2928 {
2929 (self.inner, self.is_terminated)
2930 }
2931
2932 fn from_inner(
2933 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2934 is_terminated: bool,
2935 ) -> Self {
2936 Self { inner, is_terminated }
2937 }
2938}
2939
2940impl futures::Stream for ConnectTransactionRequestStream {
2941 type Item = Result<ConnectTransactionRequest, fidl::Error>;
2942
2943 fn poll_next(
2944 mut self: std::pin::Pin<&mut Self>,
2945 cx: &mut std::task::Context<'_>,
2946 ) -> std::task::Poll<Option<Self::Item>> {
2947 let this = &mut *self;
2948 if this.inner.check_shutdown(cx) {
2949 this.is_terminated = true;
2950 return std::task::Poll::Ready(None);
2951 }
2952 if this.is_terminated {
2953 panic!("polled ConnectTransactionRequestStream after completion");
2954 }
2955 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2956 |bytes, handles| {
2957 match this.inner.channel().read_etc(cx, bytes, handles) {
2958 std::task::Poll::Ready(Ok(())) => {}
2959 std::task::Poll::Pending => return std::task::Poll::Pending,
2960 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2961 this.is_terminated = true;
2962 return std::task::Poll::Ready(None);
2963 }
2964 std::task::Poll::Ready(Err(e)) => {
2965 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2966 e.into(),
2967 ))))
2968 }
2969 }
2970
2971 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2973
2974 std::task::Poll::Ready(Some(match header.ordinal {
2975 _ => Err(fidl::Error::UnknownOrdinal {
2976 ordinal: header.ordinal,
2977 protocol_name: <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2978 }),
2979 }))
2980 },
2981 )
2982 }
2983}
2984
2985#[derive(Debug)]
2986pub enum ConnectTransactionRequest {}
2987
2988impl ConnectTransactionRequest {
2989 pub fn method_name(&self) -> &'static str {
2991 match *self {}
2992 }
2993}
2994
2995#[derive(Debug, Clone)]
2996pub struct ConnectTransactionControlHandle {
2997 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2998}
2999
3000impl fidl::endpoints::ControlHandle for ConnectTransactionControlHandle {
3001 fn shutdown(&self) {
3002 self.inner.shutdown()
3003 }
3004 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3005 self.inner.shutdown_with_epitaph(status)
3006 }
3007
3008 fn is_closed(&self) -> bool {
3009 self.inner.channel().is_closed()
3010 }
3011 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3012 self.inner.channel().on_closed()
3013 }
3014
3015 #[cfg(target_os = "fuchsia")]
3016 fn signal_peer(
3017 &self,
3018 clear_mask: zx::Signals,
3019 set_mask: zx::Signals,
3020 ) -> Result<(), zx_status::Status> {
3021 use fidl::Peered;
3022 self.inner.channel().signal_peer(clear_mask, set_mask)
3023 }
3024}
3025
3026impl ConnectTransactionControlHandle {
3027 pub fn send_on_connect_result(&self, mut result: &ConnectResult) -> Result<(), fidl::Error> {
3028 self.inner.send::<ConnectTransactionOnConnectResultRequest>(
3029 (result,),
3030 0,
3031 0x48d2cf407da489a7,
3032 fidl::encoding::DynamicFlags::empty(),
3033 )
3034 }
3035
3036 pub fn send_on_disconnect(&self, mut info: &DisconnectInfo) -> Result<(), fidl::Error> {
3037 self.inner.send::<ConnectTransactionOnDisconnectRequest>(
3038 (info,),
3039 0,
3040 0x40dea7b1449cc733,
3041 fidl::encoding::DynamicFlags::empty(),
3042 )
3043 }
3044
3045 pub fn send_on_roam_result(&self, mut result: &RoamResult) -> Result<(), fidl::Error> {
3046 self.inner.send::<ConnectTransactionOnRoamResultRequest>(
3047 (result,),
3048 0,
3049 0x656267da4ccf2a41,
3050 fidl::encoding::DynamicFlags::empty(),
3051 )
3052 }
3053
3054 pub fn send_on_signal_report(
3055 &self,
3056 mut ind: &fidl_fuchsia_wlan_internal::SignalReportIndication,
3057 ) -> Result<(), fidl::Error> {
3058 self.inner.send::<ConnectTransactionOnSignalReportRequest>(
3059 (ind,),
3060 0,
3061 0x5e968bd5e267e262,
3062 fidl::encoding::DynamicFlags::empty(),
3063 )
3064 }
3065
3066 pub fn send_on_channel_switched(
3067 &self,
3068 mut info: &fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
3069 ) -> Result<(), fidl::Error> {
3070 self.inner.send::<ConnectTransactionOnChannelSwitchedRequest>(
3071 (info,),
3072 0,
3073 0x5f5153778cd70512,
3074 fidl::encoding::DynamicFlags::empty(),
3075 )
3076 }
3077}
3078
3079#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3080pub struct FeatureSupportMarker;
3081
3082impl fidl::endpoints::ProtocolMarker for FeatureSupportMarker {
3083 type Proxy = FeatureSupportProxy;
3084 type RequestStream = FeatureSupportRequestStream;
3085 #[cfg(target_os = "fuchsia")]
3086 type SynchronousProxy = FeatureSupportSynchronousProxy;
3087
3088 const DEBUG_NAME: &'static str = "(anonymous) FeatureSupport";
3089}
3090pub type FeatureSupportQueryDiscoverySupportResult =
3091 Result<fidl_fuchsia_wlan_common::DiscoverySupport, i32>;
3092pub type FeatureSupportQueryMacSublayerSupportResult =
3093 Result<fidl_fuchsia_wlan_common::MacSublayerSupport, i32>;
3094pub type FeatureSupportQuerySecuritySupportResult =
3095 Result<fidl_fuchsia_wlan_common::SecuritySupport, i32>;
3096pub type FeatureSupportQuerySpectrumManagementSupportResult =
3097 Result<fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>;
3098
3099pub trait FeatureSupportProxyInterface: Send + Sync {
3100 type QueryDiscoverySupportResponseFut: std::future::Future<Output = Result<FeatureSupportQueryDiscoverySupportResult, fidl::Error>>
3101 + Send;
3102 fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut;
3103 type QueryMacSublayerSupportResponseFut: std::future::Future<
3104 Output = Result<FeatureSupportQueryMacSublayerSupportResult, fidl::Error>,
3105 > + Send;
3106 fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut;
3107 type QuerySecuritySupportResponseFut: std::future::Future<Output = Result<FeatureSupportQuerySecuritySupportResult, fidl::Error>>
3108 + Send;
3109 fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut;
3110 type QuerySpectrumManagementSupportResponseFut: std::future::Future<
3111 Output = Result<FeatureSupportQuerySpectrumManagementSupportResult, fidl::Error>,
3112 > + Send;
3113 fn r#query_spectrum_management_support(
3114 &self,
3115 ) -> Self::QuerySpectrumManagementSupportResponseFut;
3116}
3117#[derive(Debug)]
3118#[cfg(target_os = "fuchsia")]
3119pub struct FeatureSupportSynchronousProxy {
3120 client: fidl::client::sync::Client,
3121}
3122
3123#[cfg(target_os = "fuchsia")]
3124impl fidl::endpoints::SynchronousProxy for FeatureSupportSynchronousProxy {
3125 type Proxy = FeatureSupportProxy;
3126 type Protocol = FeatureSupportMarker;
3127
3128 fn from_channel(inner: fidl::Channel) -> Self {
3129 Self::new(inner)
3130 }
3131
3132 fn into_channel(self) -> fidl::Channel {
3133 self.client.into_channel()
3134 }
3135
3136 fn as_channel(&self) -> &fidl::Channel {
3137 self.client.as_channel()
3138 }
3139}
3140
3141#[cfg(target_os = "fuchsia")]
3142impl FeatureSupportSynchronousProxy {
3143 pub fn new(channel: fidl::Channel) -> Self {
3144 let protocol_name = <FeatureSupportMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3145 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3146 }
3147
3148 pub fn into_channel(self) -> fidl::Channel {
3149 self.client.into_channel()
3150 }
3151
3152 pub fn wait_for_event(
3155 &self,
3156 deadline: zx::MonotonicInstant,
3157 ) -> Result<FeatureSupportEvent, fidl::Error> {
3158 FeatureSupportEvent::decode(self.client.wait_for_event(deadline)?)
3159 }
3160
3161 pub fn r#query_discovery_support(
3164 &self,
3165 ___deadline: zx::MonotonicInstant,
3166 ) -> Result<FeatureSupportQueryDiscoverySupportResult, fidl::Error> {
3167 let _response =
3168 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
3169 FeatureSupportQueryDiscoverySupportResponse,
3170 i32,
3171 >>(
3172 (),
3173 0x8317f5bfb5191e7,
3174 fidl::encoding::DynamicFlags::empty(),
3175 ___deadline,
3176 )?;
3177 Ok(_response.map(|x| x.resp))
3178 }
3179
3180 pub fn r#query_mac_sublayer_support(
3183 &self,
3184 ___deadline: zx::MonotonicInstant,
3185 ) -> Result<FeatureSupportQueryMacSublayerSupportResult, fidl::Error> {
3186 let _response =
3187 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
3188 FeatureSupportQueryMacSublayerSupportResponse,
3189 i32,
3190 >>(
3191 (),
3192 0x729802eded7088c1,
3193 fidl::encoding::DynamicFlags::empty(),
3194 ___deadline,
3195 )?;
3196 Ok(_response.map(|x| x.resp))
3197 }
3198
3199 pub fn r#query_security_support(
3203 &self,
3204 ___deadline: zx::MonotonicInstant,
3205 ) -> Result<FeatureSupportQuerySecuritySupportResult, fidl::Error> {
3206 let _response =
3207 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
3208 FeatureSupportQuerySecuritySupportResponse,
3209 i32,
3210 >>(
3211 (),
3212 0x678db06e0a1e7247,
3213 fidl::encoding::DynamicFlags::empty(),
3214 ___deadline,
3215 )?;
3216 Ok(_response.map(|x| x.resp))
3217 }
3218
3219 pub fn r#query_spectrum_management_support(
3222 &self,
3223 ___deadline: zx::MonotonicInstant,
3224 ) -> Result<FeatureSupportQuerySpectrumManagementSupportResult, fidl::Error> {
3225 let _response =
3226 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
3227 FeatureSupportQuerySpectrumManagementSupportResponse,
3228 i32,
3229 >>(
3230 (),
3231 0x746ca39af18429f5,
3232 fidl::encoding::DynamicFlags::empty(),
3233 ___deadline,
3234 )?;
3235 Ok(_response.map(|x| x.resp))
3236 }
3237}
3238
3239#[derive(Debug, Clone)]
3240pub struct FeatureSupportProxy {
3241 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3242}
3243
3244impl fidl::endpoints::Proxy for FeatureSupportProxy {
3245 type Protocol = FeatureSupportMarker;
3246
3247 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3248 Self::new(inner)
3249 }
3250
3251 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3252 self.client.into_channel().map_err(|client| Self { client })
3253 }
3254
3255 fn as_channel(&self) -> &::fidl::AsyncChannel {
3256 self.client.as_channel()
3257 }
3258}
3259
3260impl FeatureSupportProxy {
3261 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3263 let protocol_name = <FeatureSupportMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3264 Self { client: fidl::client::Client::new(channel, protocol_name) }
3265 }
3266
3267 pub fn take_event_stream(&self) -> FeatureSupportEventStream {
3273 FeatureSupportEventStream { event_receiver: self.client.take_event_receiver() }
3274 }
3275
3276 pub fn r#query_discovery_support(
3279 &self,
3280 ) -> fidl::client::QueryResponseFut<
3281 FeatureSupportQueryDiscoverySupportResult,
3282 fidl::encoding::DefaultFuchsiaResourceDialect,
3283 > {
3284 FeatureSupportProxyInterface::r#query_discovery_support(self)
3285 }
3286
3287 pub fn r#query_mac_sublayer_support(
3290 &self,
3291 ) -> fidl::client::QueryResponseFut<
3292 FeatureSupportQueryMacSublayerSupportResult,
3293 fidl::encoding::DefaultFuchsiaResourceDialect,
3294 > {
3295 FeatureSupportProxyInterface::r#query_mac_sublayer_support(self)
3296 }
3297
3298 pub fn r#query_security_support(
3302 &self,
3303 ) -> fidl::client::QueryResponseFut<
3304 FeatureSupportQuerySecuritySupportResult,
3305 fidl::encoding::DefaultFuchsiaResourceDialect,
3306 > {
3307 FeatureSupportProxyInterface::r#query_security_support(self)
3308 }
3309
3310 pub fn r#query_spectrum_management_support(
3313 &self,
3314 ) -> fidl::client::QueryResponseFut<
3315 FeatureSupportQuerySpectrumManagementSupportResult,
3316 fidl::encoding::DefaultFuchsiaResourceDialect,
3317 > {
3318 FeatureSupportProxyInterface::r#query_spectrum_management_support(self)
3319 }
3320}
3321
3322impl FeatureSupportProxyInterface for FeatureSupportProxy {
3323 type QueryDiscoverySupportResponseFut = fidl::client::QueryResponseFut<
3324 FeatureSupportQueryDiscoverySupportResult,
3325 fidl::encoding::DefaultFuchsiaResourceDialect,
3326 >;
3327 fn r#query_discovery_support(&self) -> Self::QueryDiscoverySupportResponseFut {
3328 fn _decode(
3329 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3330 ) -> Result<FeatureSupportQueryDiscoverySupportResult, fidl::Error> {
3331 let _response = fidl::client::decode_transaction_body::<
3332 fidl::encoding::ResultType<FeatureSupportQueryDiscoverySupportResponse, i32>,
3333 fidl::encoding::DefaultFuchsiaResourceDialect,
3334 0x8317f5bfb5191e7,
3335 >(_buf?)?;
3336 Ok(_response.map(|x| x.resp))
3337 }
3338 self.client.send_query_and_decode::<
3339 fidl::encoding::EmptyPayload,
3340 FeatureSupportQueryDiscoverySupportResult,
3341 >(
3342 (),
3343 0x8317f5bfb5191e7,
3344 fidl::encoding::DynamicFlags::empty(),
3345 _decode,
3346 )
3347 }
3348
3349 type QueryMacSublayerSupportResponseFut = fidl::client::QueryResponseFut<
3350 FeatureSupportQueryMacSublayerSupportResult,
3351 fidl::encoding::DefaultFuchsiaResourceDialect,
3352 >;
3353 fn r#query_mac_sublayer_support(&self) -> Self::QueryMacSublayerSupportResponseFut {
3354 fn _decode(
3355 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3356 ) -> Result<FeatureSupportQueryMacSublayerSupportResult, fidl::Error> {
3357 let _response = fidl::client::decode_transaction_body::<
3358 fidl::encoding::ResultType<FeatureSupportQueryMacSublayerSupportResponse, i32>,
3359 fidl::encoding::DefaultFuchsiaResourceDialect,
3360 0x729802eded7088c1,
3361 >(_buf?)?;
3362 Ok(_response.map(|x| x.resp))
3363 }
3364 self.client.send_query_and_decode::<
3365 fidl::encoding::EmptyPayload,
3366 FeatureSupportQueryMacSublayerSupportResult,
3367 >(
3368 (),
3369 0x729802eded7088c1,
3370 fidl::encoding::DynamicFlags::empty(),
3371 _decode,
3372 )
3373 }
3374
3375 type QuerySecuritySupportResponseFut = fidl::client::QueryResponseFut<
3376 FeatureSupportQuerySecuritySupportResult,
3377 fidl::encoding::DefaultFuchsiaResourceDialect,
3378 >;
3379 fn r#query_security_support(&self) -> Self::QuerySecuritySupportResponseFut {
3380 fn _decode(
3381 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3382 ) -> Result<FeatureSupportQuerySecuritySupportResult, fidl::Error> {
3383 let _response = fidl::client::decode_transaction_body::<
3384 fidl::encoding::ResultType<FeatureSupportQuerySecuritySupportResponse, i32>,
3385 fidl::encoding::DefaultFuchsiaResourceDialect,
3386 0x678db06e0a1e7247,
3387 >(_buf?)?;
3388 Ok(_response.map(|x| x.resp))
3389 }
3390 self.client.send_query_and_decode::<
3391 fidl::encoding::EmptyPayload,
3392 FeatureSupportQuerySecuritySupportResult,
3393 >(
3394 (),
3395 0x678db06e0a1e7247,
3396 fidl::encoding::DynamicFlags::empty(),
3397 _decode,
3398 )
3399 }
3400
3401 type QuerySpectrumManagementSupportResponseFut = fidl::client::QueryResponseFut<
3402 FeatureSupportQuerySpectrumManagementSupportResult,
3403 fidl::encoding::DefaultFuchsiaResourceDialect,
3404 >;
3405 fn r#query_spectrum_management_support(
3406 &self,
3407 ) -> Self::QuerySpectrumManagementSupportResponseFut {
3408 fn _decode(
3409 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3410 ) -> Result<FeatureSupportQuerySpectrumManagementSupportResult, fidl::Error> {
3411 let _response = fidl::client::decode_transaction_body::<
3412 fidl::encoding::ResultType<
3413 FeatureSupportQuerySpectrumManagementSupportResponse,
3414 i32,
3415 >,
3416 fidl::encoding::DefaultFuchsiaResourceDialect,
3417 0x746ca39af18429f5,
3418 >(_buf?)?;
3419 Ok(_response.map(|x| x.resp))
3420 }
3421 self.client.send_query_and_decode::<
3422 fidl::encoding::EmptyPayload,
3423 FeatureSupportQuerySpectrumManagementSupportResult,
3424 >(
3425 (),
3426 0x746ca39af18429f5,
3427 fidl::encoding::DynamicFlags::empty(),
3428 _decode,
3429 )
3430 }
3431}
3432
3433pub struct FeatureSupportEventStream {
3434 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3435}
3436
3437impl std::marker::Unpin for FeatureSupportEventStream {}
3438
3439impl futures::stream::FusedStream for FeatureSupportEventStream {
3440 fn is_terminated(&self) -> bool {
3441 self.event_receiver.is_terminated()
3442 }
3443}
3444
3445impl futures::Stream for FeatureSupportEventStream {
3446 type Item = Result<FeatureSupportEvent, fidl::Error>;
3447
3448 fn poll_next(
3449 mut self: std::pin::Pin<&mut Self>,
3450 cx: &mut std::task::Context<'_>,
3451 ) -> std::task::Poll<Option<Self::Item>> {
3452 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3453 &mut self.event_receiver,
3454 cx
3455 )?) {
3456 Some(buf) => std::task::Poll::Ready(Some(FeatureSupportEvent::decode(buf))),
3457 None => std::task::Poll::Ready(None),
3458 }
3459 }
3460}
3461
3462#[derive(Debug)]
3463pub enum FeatureSupportEvent {}
3464
3465impl FeatureSupportEvent {
3466 fn decode(
3468 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3469 ) -> Result<FeatureSupportEvent, fidl::Error> {
3470 let (bytes, _handles) = buf.split_mut();
3471 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3472 debug_assert_eq!(tx_header.tx_id, 0);
3473 match tx_header.ordinal {
3474 _ => Err(fidl::Error::UnknownOrdinal {
3475 ordinal: tx_header.ordinal,
3476 protocol_name:
3477 <FeatureSupportMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3478 }),
3479 }
3480 }
3481}
3482
3483pub struct FeatureSupportRequestStream {
3485 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3486 is_terminated: bool,
3487}
3488
3489impl std::marker::Unpin for FeatureSupportRequestStream {}
3490
3491impl futures::stream::FusedStream for FeatureSupportRequestStream {
3492 fn is_terminated(&self) -> bool {
3493 self.is_terminated
3494 }
3495}
3496
3497impl fidl::endpoints::RequestStream for FeatureSupportRequestStream {
3498 type Protocol = FeatureSupportMarker;
3499 type ControlHandle = FeatureSupportControlHandle;
3500
3501 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3502 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3503 }
3504
3505 fn control_handle(&self) -> Self::ControlHandle {
3506 FeatureSupportControlHandle { inner: self.inner.clone() }
3507 }
3508
3509 fn into_inner(
3510 self,
3511 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3512 {
3513 (self.inner, self.is_terminated)
3514 }
3515
3516 fn from_inner(
3517 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3518 is_terminated: bool,
3519 ) -> Self {
3520 Self { inner, is_terminated }
3521 }
3522}
3523
3524impl futures::Stream for FeatureSupportRequestStream {
3525 type Item = Result<FeatureSupportRequest, fidl::Error>;
3526
3527 fn poll_next(
3528 mut self: std::pin::Pin<&mut Self>,
3529 cx: &mut std::task::Context<'_>,
3530 ) -> std::task::Poll<Option<Self::Item>> {
3531 let this = &mut *self;
3532 if this.inner.check_shutdown(cx) {
3533 this.is_terminated = true;
3534 return std::task::Poll::Ready(None);
3535 }
3536 if this.is_terminated {
3537 panic!("polled FeatureSupportRequestStream after completion");
3538 }
3539 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3540 |bytes, handles| {
3541 match this.inner.channel().read_etc(cx, bytes, handles) {
3542 std::task::Poll::Ready(Ok(())) => {}
3543 std::task::Poll::Pending => return std::task::Poll::Pending,
3544 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3545 this.is_terminated = true;
3546 return std::task::Poll::Ready(None);
3547 }
3548 std::task::Poll::Ready(Err(e)) => {
3549 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3550 e.into(),
3551 ))))
3552 }
3553 }
3554
3555 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3557
3558 std::task::Poll::Ready(Some(match header.ordinal {
3559 0x8317f5bfb5191e7 => {
3560 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3561 let mut req = fidl::new_empty!(
3562 fidl::encoding::EmptyPayload,
3563 fidl::encoding::DefaultFuchsiaResourceDialect
3564 );
3565 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3566 let control_handle =
3567 FeatureSupportControlHandle { inner: this.inner.clone() };
3568 Ok(FeatureSupportRequest::QueryDiscoverySupport {
3569 responder: FeatureSupportQueryDiscoverySupportResponder {
3570 control_handle: std::mem::ManuallyDrop::new(control_handle),
3571 tx_id: header.tx_id,
3572 },
3573 })
3574 }
3575 0x729802eded7088c1 => {
3576 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3577 let mut req = fidl::new_empty!(
3578 fidl::encoding::EmptyPayload,
3579 fidl::encoding::DefaultFuchsiaResourceDialect
3580 );
3581 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3582 let control_handle =
3583 FeatureSupportControlHandle { inner: this.inner.clone() };
3584 Ok(FeatureSupportRequest::QueryMacSublayerSupport {
3585 responder: FeatureSupportQueryMacSublayerSupportResponder {
3586 control_handle: std::mem::ManuallyDrop::new(control_handle),
3587 tx_id: header.tx_id,
3588 },
3589 })
3590 }
3591 0x678db06e0a1e7247 => {
3592 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3593 let mut req = fidl::new_empty!(
3594 fidl::encoding::EmptyPayload,
3595 fidl::encoding::DefaultFuchsiaResourceDialect
3596 );
3597 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3598 let control_handle =
3599 FeatureSupportControlHandle { inner: this.inner.clone() };
3600 Ok(FeatureSupportRequest::QuerySecuritySupport {
3601 responder: FeatureSupportQuerySecuritySupportResponder {
3602 control_handle: std::mem::ManuallyDrop::new(control_handle),
3603 tx_id: header.tx_id,
3604 },
3605 })
3606 }
3607 0x746ca39af18429f5 => {
3608 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3609 let mut req = fidl::new_empty!(
3610 fidl::encoding::EmptyPayload,
3611 fidl::encoding::DefaultFuchsiaResourceDialect
3612 );
3613 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3614 let control_handle =
3615 FeatureSupportControlHandle { inner: this.inner.clone() };
3616 Ok(FeatureSupportRequest::QuerySpectrumManagementSupport {
3617 responder: FeatureSupportQuerySpectrumManagementSupportResponder {
3618 control_handle: std::mem::ManuallyDrop::new(control_handle),
3619 tx_id: header.tx_id,
3620 },
3621 })
3622 }
3623 _ => Err(fidl::Error::UnknownOrdinal {
3624 ordinal: header.ordinal,
3625 protocol_name:
3626 <FeatureSupportMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3627 }),
3628 }))
3629 },
3630 )
3631 }
3632}
3633
3634#[derive(Debug)]
3635pub enum FeatureSupportRequest {
3636 QueryDiscoverySupport { responder: FeatureSupportQueryDiscoverySupportResponder },
3639 QueryMacSublayerSupport { responder: FeatureSupportQueryMacSublayerSupportResponder },
3642 QuerySecuritySupport { responder: FeatureSupportQuerySecuritySupportResponder },
3646 QuerySpectrumManagementSupport {
3649 responder: FeatureSupportQuerySpectrumManagementSupportResponder,
3650 },
3651}
3652
3653impl FeatureSupportRequest {
3654 #[allow(irrefutable_let_patterns)]
3655 pub fn into_query_discovery_support(
3656 self,
3657 ) -> Option<(FeatureSupportQueryDiscoverySupportResponder)> {
3658 if let FeatureSupportRequest::QueryDiscoverySupport { responder } = self {
3659 Some((responder))
3660 } else {
3661 None
3662 }
3663 }
3664
3665 #[allow(irrefutable_let_patterns)]
3666 pub fn into_query_mac_sublayer_support(
3667 self,
3668 ) -> Option<(FeatureSupportQueryMacSublayerSupportResponder)> {
3669 if let FeatureSupportRequest::QueryMacSublayerSupport { responder } = self {
3670 Some((responder))
3671 } else {
3672 None
3673 }
3674 }
3675
3676 #[allow(irrefutable_let_patterns)]
3677 pub fn into_query_security_support(
3678 self,
3679 ) -> Option<(FeatureSupportQuerySecuritySupportResponder)> {
3680 if let FeatureSupportRequest::QuerySecuritySupport { responder } = self {
3681 Some((responder))
3682 } else {
3683 None
3684 }
3685 }
3686
3687 #[allow(irrefutable_let_patterns)]
3688 pub fn into_query_spectrum_management_support(
3689 self,
3690 ) -> Option<(FeatureSupportQuerySpectrumManagementSupportResponder)> {
3691 if let FeatureSupportRequest::QuerySpectrumManagementSupport { responder } = self {
3692 Some((responder))
3693 } else {
3694 None
3695 }
3696 }
3697
3698 pub fn method_name(&self) -> &'static str {
3700 match *self {
3701 FeatureSupportRequest::QueryDiscoverySupport { .. } => "query_discovery_support",
3702 FeatureSupportRequest::QueryMacSublayerSupport { .. } => "query_mac_sublayer_support",
3703 FeatureSupportRequest::QuerySecuritySupport { .. } => "query_security_support",
3704 FeatureSupportRequest::QuerySpectrumManagementSupport { .. } => {
3705 "query_spectrum_management_support"
3706 }
3707 }
3708 }
3709}
3710
3711#[derive(Debug, Clone)]
3712pub struct FeatureSupportControlHandle {
3713 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3714}
3715
3716impl fidl::endpoints::ControlHandle for FeatureSupportControlHandle {
3717 fn shutdown(&self) {
3718 self.inner.shutdown()
3719 }
3720 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3721 self.inner.shutdown_with_epitaph(status)
3722 }
3723
3724 fn is_closed(&self) -> bool {
3725 self.inner.channel().is_closed()
3726 }
3727 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3728 self.inner.channel().on_closed()
3729 }
3730
3731 #[cfg(target_os = "fuchsia")]
3732 fn signal_peer(
3733 &self,
3734 clear_mask: zx::Signals,
3735 set_mask: zx::Signals,
3736 ) -> Result<(), zx_status::Status> {
3737 use fidl::Peered;
3738 self.inner.channel().signal_peer(clear_mask, set_mask)
3739 }
3740}
3741
3742impl FeatureSupportControlHandle {}
3743
3744#[must_use = "FIDL methods require a response to be sent"]
3745#[derive(Debug)]
3746pub struct FeatureSupportQueryDiscoverySupportResponder {
3747 control_handle: std::mem::ManuallyDrop<FeatureSupportControlHandle>,
3748 tx_id: u32,
3749}
3750
3751impl std::ops::Drop for FeatureSupportQueryDiscoverySupportResponder {
3755 fn drop(&mut self) {
3756 self.control_handle.shutdown();
3757 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3759 }
3760}
3761
3762impl fidl::endpoints::Responder for FeatureSupportQueryDiscoverySupportResponder {
3763 type ControlHandle = FeatureSupportControlHandle;
3764
3765 fn control_handle(&self) -> &FeatureSupportControlHandle {
3766 &self.control_handle
3767 }
3768
3769 fn drop_without_shutdown(mut self) {
3770 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3772 std::mem::forget(self);
3774 }
3775}
3776
3777impl FeatureSupportQueryDiscoverySupportResponder {
3778 pub fn send(
3782 self,
3783 mut result: Result<&fidl_fuchsia_wlan_common::DiscoverySupport, i32>,
3784 ) -> Result<(), fidl::Error> {
3785 let _result = self.send_raw(result);
3786 if _result.is_err() {
3787 self.control_handle.shutdown();
3788 }
3789 self.drop_without_shutdown();
3790 _result
3791 }
3792
3793 pub fn send_no_shutdown_on_err(
3795 self,
3796 mut result: Result<&fidl_fuchsia_wlan_common::DiscoverySupport, i32>,
3797 ) -> Result<(), fidl::Error> {
3798 let _result = self.send_raw(result);
3799 self.drop_without_shutdown();
3800 _result
3801 }
3802
3803 fn send_raw(
3804 &self,
3805 mut result: Result<&fidl_fuchsia_wlan_common::DiscoverySupport, i32>,
3806 ) -> Result<(), fidl::Error> {
3807 self.control_handle.inner.send::<fidl::encoding::ResultType<
3808 FeatureSupportQueryDiscoverySupportResponse,
3809 i32,
3810 >>(
3811 result.map(|resp| (resp,)),
3812 self.tx_id,
3813 0x8317f5bfb5191e7,
3814 fidl::encoding::DynamicFlags::empty(),
3815 )
3816 }
3817}
3818
3819#[must_use = "FIDL methods require a response to be sent"]
3820#[derive(Debug)]
3821pub struct FeatureSupportQueryMacSublayerSupportResponder {
3822 control_handle: std::mem::ManuallyDrop<FeatureSupportControlHandle>,
3823 tx_id: u32,
3824}
3825
3826impl std::ops::Drop for FeatureSupportQueryMacSublayerSupportResponder {
3830 fn drop(&mut self) {
3831 self.control_handle.shutdown();
3832 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3834 }
3835}
3836
3837impl fidl::endpoints::Responder for FeatureSupportQueryMacSublayerSupportResponder {
3838 type ControlHandle = FeatureSupportControlHandle;
3839
3840 fn control_handle(&self) -> &FeatureSupportControlHandle {
3841 &self.control_handle
3842 }
3843
3844 fn drop_without_shutdown(mut self) {
3845 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3847 std::mem::forget(self);
3849 }
3850}
3851
3852impl FeatureSupportQueryMacSublayerSupportResponder {
3853 pub fn send(
3857 self,
3858 mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
3859 ) -> Result<(), fidl::Error> {
3860 let _result = self.send_raw(result);
3861 if _result.is_err() {
3862 self.control_handle.shutdown();
3863 }
3864 self.drop_without_shutdown();
3865 _result
3866 }
3867
3868 pub fn send_no_shutdown_on_err(
3870 self,
3871 mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
3872 ) -> Result<(), fidl::Error> {
3873 let _result = self.send_raw(result);
3874 self.drop_without_shutdown();
3875 _result
3876 }
3877
3878 fn send_raw(
3879 &self,
3880 mut result: Result<&fidl_fuchsia_wlan_common::MacSublayerSupport, i32>,
3881 ) -> Result<(), fidl::Error> {
3882 self.control_handle.inner.send::<fidl::encoding::ResultType<
3883 FeatureSupportQueryMacSublayerSupportResponse,
3884 i32,
3885 >>(
3886 result.map(|resp| (resp,)),
3887 self.tx_id,
3888 0x729802eded7088c1,
3889 fidl::encoding::DynamicFlags::empty(),
3890 )
3891 }
3892}
3893
3894#[must_use = "FIDL methods require a response to be sent"]
3895#[derive(Debug)]
3896pub struct FeatureSupportQuerySecuritySupportResponder {
3897 control_handle: std::mem::ManuallyDrop<FeatureSupportControlHandle>,
3898 tx_id: u32,
3899}
3900
3901impl std::ops::Drop for FeatureSupportQuerySecuritySupportResponder {
3905 fn drop(&mut self) {
3906 self.control_handle.shutdown();
3907 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3909 }
3910}
3911
3912impl fidl::endpoints::Responder for FeatureSupportQuerySecuritySupportResponder {
3913 type ControlHandle = FeatureSupportControlHandle;
3914
3915 fn control_handle(&self) -> &FeatureSupportControlHandle {
3916 &self.control_handle
3917 }
3918
3919 fn drop_without_shutdown(mut self) {
3920 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3922 std::mem::forget(self);
3924 }
3925}
3926
3927impl FeatureSupportQuerySecuritySupportResponder {
3928 pub fn send(
3932 self,
3933 mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
3934 ) -> Result<(), fidl::Error> {
3935 let _result = self.send_raw(result);
3936 if _result.is_err() {
3937 self.control_handle.shutdown();
3938 }
3939 self.drop_without_shutdown();
3940 _result
3941 }
3942
3943 pub fn send_no_shutdown_on_err(
3945 self,
3946 mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
3947 ) -> Result<(), fidl::Error> {
3948 let _result = self.send_raw(result);
3949 self.drop_without_shutdown();
3950 _result
3951 }
3952
3953 fn send_raw(
3954 &self,
3955 mut result: Result<&fidl_fuchsia_wlan_common::SecuritySupport, i32>,
3956 ) -> Result<(), fidl::Error> {
3957 self.control_handle.inner.send::<fidl::encoding::ResultType<
3958 FeatureSupportQuerySecuritySupportResponse,
3959 i32,
3960 >>(
3961 result.map(|resp| (resp,)),
3962 self.tx_id,
3963 0x678db06e0a1e7247,
3964 fidl::encoding::DynamicFlags::empty(),
3965 )
3966 }
3967}
3968
3969#[must_use = "FIDL methods require a response to be sent"]
3970#[derive(Debug)]
3971pub struct FeatureSupportQuerySpectrumManagementSupportResponder {
3972 control_handle: std::mem::ManuallyDrop<FeatureSupportControlHandle>,
3973 tx_id: u32,
3974}
3975
3976impl std::ops::Drop for FeatureSupportQuerySpectrumManagementSupportResponder {
3980 fn drop(&mut self) {
3981 self.control_handle.shutdown();
3982 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3984 }
3985}
3986
3987impl fidl::endpoints::Responder for FeatureSupportQuerySpectrumManagementSupportResponder {
3988 type ControlHandle = FeatureSupportControlHandle;
3989
3990 fn control_handle(&self) -> &FeatureSupportControlHandle {
3991 &self.control_handle
3992 }
3993
3994 fn drop_without_shutdown(mut self) {
3995 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3997 std::mem::forget(self);
3999 }
4000}
4001
4002impl FeatureSupportQuerySpectrumManagementSupportResponder {
4003 pub fn send(
4007 self,
4008 mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
4009 ) -> Result<(), fidl::Error> {
4010 let _result = self.send_raw(result);
4011 if _result.is_err() {
4012 self.control_handle.shutdown();
4013 }
4014 self.drop_without_shutdown();
4015 _result
4016 }
4017
4018 pub fn send_no_shutdown_on_err(
4020 self,
4021 mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
4022 ) -> Result<(), fidl::Error> {
4023 let _result = self.send_raw(result);
4024 self.drop_without_shutdown();
4025 _result
4026 }
4027
4028 fn send_raw(
4029 &self,
4030 mut result: Result<&fidl_fuchsia_wlan_common::SpectrumManagementSupport, i32>,
4031 ) -> Result<(), fidl::Error> {
4032 self.control_handle.inner.send::<fidl::encoding::ResultType<
4033 FeatureSupportQuerySpectrumManagementSupportResponse,
4034 i32,
4035 >>(
4036 result.map(|resp| (resp,)),
4037 self.tx_id,
4038 0x746ca39af18429f5,
4039 fidl::encoding::DynamicFlags::empty(),
4040 )
4041 }
4042}
4043
4044#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4045pub struct GenericSmeMarker;
4046
4047impl fidl::endpoints::ProtocolMarker for GenericSmeMarker {
4048 type Proxy = GenericSmeProxy;
4049 type RequestStream = GenericSmeRequestStream;
4050 #[cfg(target_os = "fuchsia")]
4051 type SynchronousProxy = GenericSmeSynchronousProxy;
4052
4053 const DEBUG_NAME: &'static str = "(anonymous) GenericSme";
4054}
4055pub type GenericSmeGetClientSmeResult = Result<(), i32>;
4056pub type GenericSmeGetApSmeResult = Result<(), i32>;
4057pub type GenericSmeGetSmeTelemetryResult = Result<(), i32>;
4058pub type GenericSmeGetFeatureSupportResult = Result<(), i32>;
4059
4060pub trait GenericSmeProxyInterface: Send + Sync {
4061 type QueryResponseFut: std::future::Future<Output = Result<GenericSmeQuery, fidl::Error>> + Send;
4062 fn r#query(&self) -> Self::QueryResponseFut;
4063 type GetClientSmeResponseFut: std::future::Future<Output = Result<GenericSmeGetClientSmeResult, fidl::Error>>
4064 + Send;
4065 fn r#get_client_sme(
4066 &self,
4067 sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
4068 ) -> Self::GetClientSmeResponseFut;
4069 type GetApSmeResponseFut: std::future::Future<Output = Result<GenericSmeGetApSmeResult, fidl::Error>>
4070 + Send;
4071 fn r#get_ap_sme(
4072 &self,
4073 sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
4074 ) -> Self::GetApSmeResponseFut;
4075 type GetSmeTelemetryResponseFut: std::future::Future<Output = Result<GenericSmeGetSmeTelemetryResult, fidl::Error>>
4076 + Send;
4077 fn r#get_sme_telemetry(
4078 &self,
4079 telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
4080 ) -> Self::GetSmeTelemetryResponseFut;
4081 type GetFeatureSupportResponseFut: std::future::Future<Output = Result<GenericSmeGetFeatureSupportResult, fidl::Error>>
4082 + Send;
4083 fn r#get_feature_support(
4084 &self,
4085 feature_support_server: fidl::endpoints::ServerEnd<FeatureSupportMarker>,
4086 ) -> Self::GetFeatureSupportResponseFut;
4087}
4088#[derive(Debug)]
4089#[cfg(target_os = "fuchsia")]
4090pub struct GenericSmeSynchronousProxy {
4091 client: fidl::client::sync::Client,
4092}
4093
4094#[cfg(target_os = "fuchsia")]
4095impl fidl::endpoints::SynchronousProxy for GenericSmeSynchronousProxy {
4096 type Proxy = GenericSmeProxy;
4097 type Protocol = GenericSmeMarker;
4098
4099 fn from_channel(inner: fidl::Channel) -> Self {
4100 Self::new(inner)
4101 }
4102
4103 fn into_channel(self) -> fidl::Channel {
4104 self.client.into_channel()
4105 }
4106
4107 fn as_channel(&self) -> &fidl::Channel {
4108 self.client.as_channel()
4109 }
4110}
4111
4112#[cfg(target_os = "fuchsia")]
4113impl GenericSmeSynchronousProxy {
4114 pub fn new(channel: fidl::Channel) -> Self {
4115 let protocol_name = <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4116 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4117 }
4118
4119 pub fn into_channel(self) -> fidl::Channel {
4120 self.client.into_channel()
4121 }
4122
4123 pub fn wait_for_event(
4126 &self,
4127 deadline: zx::MonotonicInstant,
4128 ) -> Result<GenericSmeEvent, fidl::Error> {
4129 GenericSmeEvent::decode(self.client.wait_for_event(deadline)?)
4130 }
4131
4132 pub fn r#query(
4136 &self,
4137 ___deadline: zx::MonotonicInstant,
4138 ) -> Result<GenericSmeQuery, fidl::Error> {
4139 let _response =
4140 self.client.send_query::<fidl::encoding::EmptyPayload, GenericSmeQueryResponse>(
4141 (),
4142 0x6ef4a820c153e249,
4143 fidl::encoding::DynamicFlags::empty(),
4144 ___deadline,
4145 )?;
4146 Ok(_response.resp)
4147 }
4148
4149 pub fn r#get_client_sme(
4156 &self,
4157 mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
4158 ___deadline: zx::MonotonicInstant,
4159 ) -> Result<GenericSmeGetClientSmeResult, fidl::Error> {
4160 let _response = self.client.send_query::<
4161 GenericSmeGetClientSmeRequest,
4162 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4163 >(
4164 (sme_server,),
4165 0x2439ad714c642f15,
4166 fidl::encoding::DynamicFlags::empty(),
4167 ___deadline,
4168 )?;
4169 Ok(_response.map(|x| x))
4170 }
4171
4172 pub fn r#get_ap_sme(
4179 &self,
4180 mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
4181 ___deadline: zx::MonotonicInstant,
4182 ) -> Result<GenericSmeGetApSmeResult, fidl::Error> {
4183 let _response = self.client.send_query::<
4184 GenericSmeGetApSmeRequest,
4185 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4186 >(
4187 (sme_server,),
4188 0x4d2a40be2b44ad6c,
4189 fidl::encoding::DynamicFlags::empty(),
4190 ___deadline,
4191 )?;
4192 Ok(_response.map(|x| x))
4193 }
4194
4195 pub fn r#get_sme_telemetry(
4203 &self,
4204 mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
4205 ___deadline: zx::MonotonicInstant,
4206 ) -> Result<GenericSmeGetSmeTelemetryResult, fidl::Error> {
4207 let _response = self.client.send_query::<
4208 GenericSmeGetSmeTelemetryRequest,
4209 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4210 >(
4211 (telemetry_server,),
4212 0x7ea015b3060fa,
4213 fidl::encoding::DynamicFlags::empty(),
4214 ___deadline,
4215 )?;
4216 Ok(_response.map(|x| x))
4217 }
4218
4219 pub fn r#get_feature_support(
4226 &self,
4227 mut feature_support_server: fidl::endpoints::ServerEnd<FeatureSupportMarker>,
4228 ___deadline: zx::MonotonicInstant,
4229 ) -> Result<GenericSmeGetFeatureSupportResult, fidl::Error> {
4230 let _response = self.client.send_query::<
4231 GenericSmeGetFeatureSupportRequest,
4232 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4233 >(
4234 (feature_support_server,),
4235 0x4692c6e50be1bbdd,
4236 fidl::encoding::DynamicFlags::empty(),
4237 ___deadline,
4238 )?;
4239 Ok(_response.map(|x| x))
4240 }
4241}
4242
4243#[derive(Debug, Clone)]
4244pub struct GenericSmeProxy {
4245 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4246}
4247
4248impl fidl::endpoints::Proxy for GenericSmeProxy {
4249 type Protocol = GenericSmeMarker;
4250
4251 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4252 Self::new(inner)
4253 }
4254
4255 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4256 self.client.into_channel().map_err(|client| Self { client })
4257 }
4258
4259 fn as_channel(&self) -> &::fidl::AsyncChannel {
4260 self.client.as_channel()
4261 }
4262}
4263
4264impl GenericSmeProxy {
4265 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4267 let protocol_name = <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4268 Self { client: fidl::client::Client::new(channel, protocol_name) }
4269 }
4270
4271 pub fn take_event_stream(&self) -> GenericSmeEventStream {
4277 GenericSmeEventStream { event_receiver: self.client.take_event_receiver() }
4278 }
4279
4280 pub fn r#query(
4284 &self,
4285 ) -> fidl::client::QueryResponseFut<
4286 GenericSmeQuery,
4287 fidl::encoding::DefaultFuchsiaResourceDialect,
4288 > {
4289 GenericSmeProxyInterface::r#query(self)
4290 }
4291
4292 pub fn r#get_client_sme(
4299 &self,
4300 mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
4301 ) -> fidl::client::QueryResponseFut<
4302 GenericSmeGetClientSmeResult,
4303 fidl::encoding::DefaultFuchsiaResourceDialect,
4304 > {
4305 GenericSmeProxyInterface::r#get_client_sme(self, sme_server)
4306 }
4307
4308 pub fn r#get_ap_sme(
4315 &self,
4316 mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
4317 ) -> fidl::client::QueryResponseFut<
4318 GenericSmeGetApSmeResult,
4319 fidl::encoding::DefaultFuchsiaResourceDialect,
4320 > {
4321 GenericSmeProxyInterface::r#get_ap_sme(self, sme_server)
4322 }
4323
4324 pub fn r#get_sme_telemetry(
4332 &self,
4333 mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
4334 ) -> fidl::client::QueryResponseFut<
4335 GenericSmeGetSmeTelemetryResult,
4336 fidl::encoding::DefaultFuchsiaResourceDialect,
4337 > {
4338 GenericSmeProxyInterface::r#get_sme_telemetry(self, telemetry_server)
4339 }
4340
4341 pub fn r#get_feature_support(
4348 &self,
4349 mut feature_support_server: fidl::endpoints::ServerEnd<FeatureSupportMarker>,
4350 ) -> fidl::client::QueryResponseFut<
4351 GenericSmeGetFeatureSupportResult,
4352 fidl::encoding::DefaultFuchsiaResourceDialect,
4353 > {
4354 GenericSmeProxyInterface::r#get_feature_support(self, feature_support_server)
4355 }
4356}
4357
4358impl GenericSmeProxyInterface for GenericSmeProxy {
4359 type QueryResponseFut = fidl::client::QueryResponseFut<
4360 GenericSmeQuery,
4361 fidl::encoding::DefaultFuchsiaResourceDialect,
4362 >;
4363 fn r#query(&self) -> Self::QueryResponseFut {
4364 fn _decode(
4365 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4366 ) -> Result<GenericSmeQuery, fidl::Error> {
4367 let _response = fidl::client::decode_transaction_body::<
4368 GenericSmeQueryResponse,
4369 fidl::encoding::DefaultFuchsiaResourceDialect,
4370 0x6ef4a820c153e249,
4371 >(_buf?)?;
4372 Ok(_response.resp)
4373 }
4374 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, GenericSmeQuery>(
4375 (),
4376 0x6ef4a820c153e249,
4377 fidl::encoding::DynamicFlags::empty(),
4378 _decode,
4379 )
4380 }
4381
4382 type GetClientSmeResponseFut = fidl::client::QueryResponseFut<
4383 GenericSmeGetClientSmeResult,
4384 fidl::encoding::DefaultFuchsiaResourceDialect,
4385 >;
4386 fn r#get_client_sme(
4387 &self,
4388 mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
4389 ) -> Self::GetClientSmeResponseFut {
4390 fn _decode(
4391 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4392 ) -> Result<GenericSmeGetClientSmeResult, fidl::Error> {
4393 let _response = fidl::client::decode_transaction_body::<
4394 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4395 fidl::encoding::DefaultFuchsiaResourceDialect,
4396 0x2439ad714c642f15,
4397 >(_buf?)?;
4398 Ok(_response.map(|x| x))
4399 }
4400 self.client
4401 .send_query_and_decode::<GenericSmeGetClientSmeRequest, GenericSmeGetClientSmeResult>(
4402 (sme_server,),
4403 0x2439ad714c642f15,
4404 fidl::encoding::DynamicFlags::empty(),
4405 _decode,
4406 )
4407 }
4408
4409 type GetApSmeResponseFut = fidl::client::QueryResponseFut<
4410 GenericSmeGetApSmeResult,
4411 fidl::encoding::DefaultFuchsiaResourceDialect,
4412 >;
4413 fn r#get_ap_sme(
4414 &self,
4415 mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
4416 ) -> Self::GetApSmeResponseFut {
4417 fn _decode(
4418 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4419 ) -> Result<GenericSmeGetApSmeResult, fidl::Error> {
4420 let _response = fidl::client::decode_transaction_body::<
4421 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4422 fidl::encoding::DefaultFuchsiaResourceDialect,
4423 0x4d2a40be2b44ad6c,
4424 >(_buf?)?;
4425 Ok(_response.map(|x| x))
4426 }
4427 self.client.send_query_and_decode::<GenericSmeGetApSmeRequest, GenericSmeGetApSmeResult>(
4428 (sme_server,),
4429 0x4d2a40be2b44ad6c,
4430 fidl::encoding::DynamicFlags::empty(),
4431 _decode,
4432 )
4433 }
4434
4435 type GetSmeTelemetryResponseFut = fidl::client::QueryResponseFut<
4436 GenericSmeGetSmeTelemetryResult,
4437 fidl::encoding::DefaultFuchsiaResourceDialect,
4438 >;
4439 fn r#get_sme_telemetry(
4440 &self,
4441 mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
4442 ) -> Self::GetSmeTelemetryResponseFut {
4443 fn _decode(
4444 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4445 ) -> Result<GenericSmeGetSmeTelemetryResult, fidl::Error> {
4446 let _response = fidl::client::decode_transaction_body::<
4447 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4448 fidl::encoding::DefaultFuchsiaResourceDialect,
4449 0x7ea015b3060fa,
4450 >(_buf?)?;
4451 Ok(_response.map(|x| x))
4452 }
4453 self.client.send_query_and_decode::<
4454 GenericSmeGetSmeTelemetryRequest,
4455 GenericSmeGetSmeTelemetryResult,
4456 >(
4457 (telemetry_server,),
4458 0x7ea015b3060fa,
4459 fidl::encoding::DynamicFlags::empty(),
4460 _decode,
4461 )
4462 }
4463
4464 type GetFeatureSupportResponseFut = fidl::client::QueryResponseFut<
4465 GenericSmeGetFeatureSupportResult,
4466 fidl::encoding::DefaultFuchsiaResourceDialect,
4467 >;
4468 fn r#get_feature_support(
4469 &self,
4470 mut feature_support_server: fidl::endpoints::ServerEnd<FeatureSupportMarker>,
4471 ) -> Self::GetFeatureSupportResponseFut {
4472 fn _decode(
4473 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4474 ) -> Result<GenericSmeGetFeatureSupportResult, fidl::Error> {
4475 let _response = fidl::client::decode_transaction_body::<
4476 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4477 fidl::encoding::DefaultFuchsiaResourceDialect,
4478 0x4692c6e50be1bbdd,
4479 >(_buf?)?;
4480 Ok(_response.map(|x| x))
4481 }
4482 self.client.send_query_and_decode::<
4483 GenericSmeGetFeatureSupportRequest,
4484 GenericSmeGetFeatureSupportResult,
4485 >(
4486 (feature_support_server,),
4487 0x4692c6e50be1bbdd,
4488 fidl::encoding::DynamicFlags::empty(),
4489 _decode,
4490 )
4491 }
4492}
4493
4494pub struct GenericSmeEventStream {
4495 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4496}
4497
4498impl std::marker::Unpin for GenericSmeEventStream {}
4499
4500impl futures::stream::FusedStream for GenericSmeEventStream {
4501 fn is_terminated(&self) -> bool {
4502 self.event_receiver.is_terminated()
4503 }
4504}
4505
4506impl futures::Stream for GenericSmeEventStream {
4507 type Item = Result<GenericSmeEvent, fidl::Error>;
4508
4509 fn poll_next(
4510 mut self: std::pin::Pin<&mut Self>,
4511 cx: &mut std::task::Context<'_>,
4512 ) -> std::task::Poll<Option<Self::Item>> {
4513 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4514 &mut self.event_receiver,
4515 cx
4516 )?) {
4517 Some(buf) => std::task::Poll::Ready(Some(GenericSmeEvent::decode(buf))),
4518 None => std::task::Poll::Ready(None),
4519 }
4520 }
4521}
4522
4523#[derive(Debug)]
4524pub enum GenericSmeEvent {}
4525
4526impl GenericSmeEvent {
4527 fn decode(
4529 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4530 ) -> Result<GenericSmeEvent, fidl::Error> {
4531 let (bytes, _handles) = buf.split_mut();
4532 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4533 debug_assert_eq!(tx_header.tx_id, 0);
4534 match tx_header.ordinal {
4535 _ => Err(fidl::Error::UnknownOrdinal {
4536 ordinal: tx_header.ordinal,
4537 protocol_name: <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4538 }),
4539 }
4540 }
4541}
4542
4543pub struct GenericSmeRequestStream {
4545 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4546 is_terminated: bool,
4547}
4548
4549impl std::marker::Unpin for GenericSmeRequestStream {}
4550
4551impl futures::stream::FusedStream for GenericSmeRequestStream {
4552 fn is_terminated(&self) -> bool {
4553 self.is_terminated
4554 }
4555}
4556
4557impl fidl::endpoints::RequestStream for GenericSmeRequestStream {
4558 type Protocol = GenericSmeMarker;
4559 type ControlHandle = GenericSmeControlHandle;
4560
4561 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4562 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4563 }
4564
4565 fn control_handle(&self) -> Self::ControlHandle {
4566 GenericSmeControlHandle { inner: self.inner.clone() }
4567 }
4568
4569 fn into_inner(
4570 self,
4571 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4572 {
4573 (self.inner, self.is_terminated)
4574 }
4575
4576 fn from_inner(
4577 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4578 is_terminated: bool,
4579 ) -> Self {
4580 Self { inner, is_terminated }
4581 }
4582}
4583
4584impl futures::Stream for GenericSmeRequestStream {
4585 type Item = Result<GenericSmeRequest, fidl::Error>;
4586
4587 fn poll_next(
4588 mut self: std::pin::Pin<&mut Self>,
4589 cx: &mut std::task::Context<'_>,
4590 ) -> std::task::Poll<Option<Self::Item>> {
4591 let this = &mut *self;
4592 if this.inner.check_shutdown(cx) {
4593 this.is_terminated = true;
4594 return std::task::Poll::Ready(None);
4595 }
4596 if this.is_terminated {
4597 panic!("polled GenericSmeRequestStream after completion");
4598 }
4599 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4600 |bytes, handles| {
4601 match this.inner.channel().read_etc(cx, bytes, handles) {
4602 std::task::Poll::Ready(Ok(())) => {}
4603 std::task::Poll::Pending => return std::task::Poll::Pending,
4604 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4605 this.is_terminated = true;
4606 return std::task::Poll::Ready(None);
4607 }
4608 std::task::Poll::Ready(Err(e)) => {
4609 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4610 e.into(),
4611 ))))
4612 }
4613 }
4614
4615 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4617
4618 std::task::Poll::Ready(Some(match header.ordinal {
4619 0x6ef4a820c153e249 => {
4620 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4621 let mut req = fidl::new_empty!(
4622 fidl::encoding::EmptyPayload,
4623 fidl::encoding::DefaultFuchsiaResourceDialect
4624 );
4625 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4626 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
4627 Ok(GenericSmeRequest::Query {
4628 responder: GenericSmeQueryResponder {
4629 control_handle: std::mem::ManuallyDrop::new(control_handle),
4630 tx_id: header.tx_id,
4631 },
4632 })
4633 }
4634 0x2439ad714c642f15 => {
4635 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4636 let mut req = fidl::new_empty!(
4637 GenericSmeGetClientSmeRequest,
4638 fidl::encoding::DefaultFuchsiaResourceDialect
4639 );
4640 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetClientSmeRequest>(&header, _body_bytes, handles, &mut req)?;
4641 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
4642 Ok(GenericSmeRequest::GetClientSme {
4643 sme_server: req.sme_server,
4644
4645 responder: GenericSmeGetClientSmeResponder {
4646 control_handle: std::mem::ManuallyDrop::new(control_handle),
4647 tx_id: header.tx_id,
4648 },
4649 })
4650 }
4651 0x4d2a40be2b44ad6c => {
4652 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4653 let mut req = fidl::new_empty!(
4654 GenericSmeGetApSmeRequest,
4655 fidl::encoding::DefaultFuchsiaResourceDialect
4656 );
4657 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetApSmeRequest>(&header, _body_bytes, handles, &mut req)?;
4658 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
4659 Ok(GenericSmeRequest::GetApSme {
4660 sme_server: req.sme_server,
4661
4662 responder: GenericSmeGetApSmeResponder {
4663 control_handle: std::mem::ManuallyDrop::new(control_handle),
4664 tx_id: header.tx_id,
4665 },
4666 })
4667 }
4668 0x7ea015b3060fa => {
4669 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4670 let mut req = fidl::new_empty!(
4671 GenericSmeGetSmeTelemetryRequest,
4672 fidl::encoding::DefaultFuchsiaResourceDialect
4673 );
4674 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetSmeTelemetryRequest>(&header, _body_bytes, handles, &mut req)?;
4675 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
4676 Ok(GenericSmeRequest::GetSmeTelemetry {
4677 telemetry_server: req.telemetry_server,
4678
4679 responder: GenericSmeGetSmeTelemetryResponder {
4680 control_handle: std::mem::ManuallyDrop::new(control_handle),
4681 tx_id: header.tx_id,
4682 },
4683 })
4684 }
4685 0x4692c6e50be1bbdd => {
4686 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4687 let mut req = fidl::new_empty!(
4688 GenericSmeGetFeatureSupportRequest,
4689 fidl::encoding::DefaultFuchsiaResourceDialect
4690 );
4691 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetFeatureSupportRequest>(&header, _body_bytes, handles, &mut req)?;
4692 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
4693 Ok(GenericSmeRequest::GetFeatureSupport {
4694 feature_support_server: req.feature_support_server,
4695
4696 responder: GenericSmeGetFeatureSupportResponder {
4697 control_handle: std::mem::ManuallyDrop::new(control_handle),
4698 tx_id: header.tx_id,
4699 },
4700 })
4701 }
4702 _ => Err(fidl::Error::UnknownOrdinal {
4703 ordinal: header.ordinal,
4704 protocol_name:
4705 <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4706 }),
4707 }))
4708 },
4709 )
4710 }
4711}
4712
4713#[derive(Debug)]
4714pub enum GenericSmeRequest {
4715 Query { responder: GenericSmeQueryResponder },
4719 GetClientSme {
4726 sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
4727 responder: GenericSmeGetClientSmeResponder,
4728 },
4729 GetApSme {
4736 sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
4737 responder: GenericSmeGetApSmeResponder,
4738 },
4739 GetSmeTelemetry {
4747 telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
4748 responder: GenericSmeGetSmeTelemetryResponder,
4749 },
4750 GetFeatureSupport {
4757 feature_support_server: fidl::endpoints::ServerEnd<FeatureSupportMarker>,
4758 responder: GenericSmeGetFeatureSupportResponder,
4759 },
4760}
4761
4762impl GenericSmeRequest {
4763 #[allow(irrefutable_let_patterns)]
4764 pub fn into_query(self) -> Option<(GenericSmeQueryResponder)> {
4765 if let GenericSmeRequest::Query { responder } = self {
4766 Some((responder))
4767 } else {
4768 None
4769 }
4770 }
4771
4772 #[allow(irrefutable_let_patterns)]
4773 pub fn into_get_client_sme(
4774 self,
4775 ) -> Option<(fidl::endpoints::ServerEnd<ClientSmeMarker>, GenericSmeGetClientSmeResponder)>
4776 {
4777 if let GenericSmeRequest::GetClientSme { sme_server, responder } = self {
4778 Some((sme_server, responder))
4779 } else {
4780 None
4781 }
4782 }
4783
4784 #[allow(irrefutable_let_patterns)]
4785 pub fn into_get_ap_sme(
4786 self,
4787 ) -> Option<(fidl::endpoints::ServerEnd<ApSmeMarker>, GenericSmeGetApSmeResponder)> {
4788 if let GenericSmeRequest::GetApSme { sme_server, responder } = self {
4789 Some((sme_server, responder))
4790 } else {
4791 None
4792 }
4793 }
4794
4795 #[allow(irrefutable_let_patterns)]
4796 pub fn into_get_sme_telemetry(
4797 self,
4798 ) -> Option<(fidl::endpoints::ServerEnd<TelemetryMarker>, GenericSmeGetSmeTelemetryResponder)>
4799 {
4800 if let GenericSmeRequest::GetSmeTelemetry { telemetry_server, responder } = self {
4801 Some((telemetry_server, responder))
4802 } else {
4803 None
4804 }
4805 }
4806
4807 #[allow(irrefutable_let_patterns)]
4808 pub fn into_get_feature_support(
4809 self,
4810 ) -> Option<(
4811 fidl::endpoints::ServerEnd<FeatureSupportMarker>,
4812 GenericSmeGetFeatureSupportResponder,
4813 )> {
4814 if let GenericSmeRequest::GetFeatureSupport { feature_support_server, responder } = self {
4815 Some((feature_support_server, responder))
4816 } else {
4817 None
4818 }
4819 }
4820
4821 pub fn method_name(&self) -> &'static str {
4823 match *self {
4824 GenericSmeRequest::Query { .. } => "query",
4825 GenericSmeRequest::GetClientSme { .. } => "get_client_sme",
4826 GenericSmeRequest::GetApSme { .. } => "get_ap_sme",
4827 GenericSmeRequest::GetSmeTelemetry { .. } => "get_sme_telemetry",
4828 GenericSmeRequest::GetFeatureSupport { .. } => "get_feature_support",
4829 }
4830 }
4831}
4832
4833#[derive(Debug, Clone)]
4834pub struct GenericSmeControlHandle {
4835 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4836}
4837
4838impl fidl::endpoints::ControlHandle for GenericSmeControlHandle {
4839 fn shutdown(&self) {
4840 self.inner.shutdown()
4841 }
4842 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4843 self.inner.shutdown_with_epitaph(status)
4844 }
4845
4846 fn is_closed(&self) -> bool {
4847 self.inner.channel().is_closed()
4848 }
4849 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4850 self.inner.channel().on_closed()
4851 }
4852
4853 #[cfg(target_os = "fuchsia")]
4854 fn signal_peer(
4855 &self,
4856 clear_mask: zx::Signals,
4857 set_mask: zx::Signals,
4858 ) -> Result<(), zx_status::Status> {
4859 use fidl::Peered;
4860 self.inner.channel().signal_peer(clear_mask, set_mask)
4861 }
4862}
4863
4864impl GenericSmeControlHandle {}
4865
4866#[must_use = "FIDL methods require a response to be sent"]
4867#[derive(Debug)]
4868pub struct GenericSmeQueryResponder {
4869 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4870 tx_id: u32,
4871}
4872
4873impl std::ops::Drop for GenericSmeQueryResponder {
4877 fn drop(&mut self) {
4878 self.control_handle.shutdown();
4879 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4881 }
4882}
4883
4884impl fidl::endpoints::Responder for GenericSmeQueryResponder {
4885 type ControlHandle = GenericSmeControlHandle;
4886
4887 fn control_handle(&self) -> &GenericSmeControlHandle {
4888 &self.control_handle
4889 }
4890
4891 fn drop_without_shutdown(mut self) {
4892 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4894 std::mem::forget(self);
4896 }
4897}
4898
4899impl GenericSmeQueryResponder {
4900 pub fn send(self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
4904 let _result = self.send_raw(resp);
4905 if _result.is_err() {
4906 self.control_handle.shutdown();
4907 }
4908 self.drop_without_shutdown();
4909 _result
4910 }
4911
4912 pub fn send_no_shutdown_on_err(self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
4914 let _result = self.send_raw(resp);
4915 self.drop_without_shutdown();
4916 _result
4917 }
4918
4919 fn send_raw(&self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
4920 self.control_handle.inner.send::<GenericSmeQueryResponse>(
4921 (resp,),
4922 self.tx_id,
4923 0x6ef4a820c153e249,
4924 fidl::encoding::DynamicFlags::empty(),
4925 )
4926 }
4927}
4928
4929#[must_use = "FIDL methods require a response to be sent"]
4930#[derive(Debug)]
4931pub struct GenericSmeGetClientSmeResponder {
4932 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4933 tx_id: u32,
4934}
4935
4936impl std::ops::Drop for GenericSmeGetClientSmeResponder {
4940 fn drop(&mut self) {
4941 self.control_handle.shutdown();
4942 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4944 }
4945}
4946
4947impl fidl::endpoints::Responder for GenericSmeGetClientSmeResponder {
4948 type ControlHandle = GenericSmeControlHandle;
4949
4950 fn control_handle(&self) -> &GenericSmeControlHandle {
4951 &self.control_handle
4952 }
4953
4954 fn drop_without_shutdown(mut self) {
4955 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4957 std::mem::forget(self);
4959 }
4960}
4961
4962impl GenericSmeGetClientSmeResponder {
4963 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4967 let _result = self.send_raw(result);
4968 if _result.is_err() {
4969 self.control_handle.shutdown();
4970 }
4971 self.drop_without_shutdown();
4972 _result
4973 }
4974
4975 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4977 let _result = self.send_raw(result);
4978 self.drop_without_shutdown();
4979 _result
4980 }
4981
4982 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4983 self.control_handle
4984 .inner
4985 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4986 result,
4987 self.tx_id,
4988 0x2439ad714c642f15,
4989 fidl::encoding::DynamicFlags::empty(),
4990 )
4991 }
4992}
4993
4994#[must_use = "FIDL methods require a response to be sent"]
4995#[derive(Debug)]
4996pub struct GenericSmeGetApSmeResponder {
4997 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4998 tx_id: u32,
4999}
5000
5001impl std::ops::Drop for GenericSmeGetApSmeResponder {
5005 fn drop(&mut self) {
5006 self.control_handle.shutdown();
5007 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5009 }
5010}
5011
5012impl fidl::endpoints::Responder for GenericSmeGetApSmeResponder {
5013 type ControlHandle = GenericSmeControlHandle;
5014
5015 fn control_handle(&self) -> &GenericSmeControlHandle {
5016 &self.control_handle
5017 }
5018
5019 fn drop_without_shutdown(mut self) {
5020 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5022 std::mem::forget(self);
5024 }
5025}
5026
5027impl GenericSmeGetApSmeResponder {
5028 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5032 let _result = self.send_raw(result);
5033 if _result.is_err() {
5034 self.control_handle.shutdown();
5035 }
5036 self.drop_without_shutdown();
5037 _result
5038 }
5039
5040 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5042 let _result = self.send_raw(result);
5043 self.drop_without_shutdown();
5044 _result
5045 }
5046
5047 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5048 self.control_handle
5049 .inner
5050 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5051 result,
5052 self.tx_id,
5053 0x4d2a40be2b44ad6c,
5054 fidl::encoding::DynamicFlags::empty(),
5055 )
5056 }
5057}
5058
5059#[must_use = "FIDL methods require a response to be sent"]
5060#[derive(Debug)]
5061pub struct GenericSmeGetSmeTelemetryResponder {
5062 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
5063 tx_id: u32,
5064}
5065
5066impl std::ops::Drop for GenericSmeGetSmeTelemetryResponder {
5070 fn drop(&mut self) {
5071 self.control_handle.shutdown();
5072 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5074 }
5075}
5076
5077impl fidl::endpoints::Responder for GenericSmeGetSmeTelemetryResponder {
5078 type ControlHandle = GenericSmeControlHandle;
5079
5080 fn control_handle(&self) -> &GenericSmeControlHandle {
5081 &self.control_handle
5082 }
5083
5084 fn drop_without_shutdown(mut self) {
5085 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5087 std::mem::forget(self);
5089 }
5090}
5091
5092impl GenericSmeGetSmeTelemetryResponder {
5093 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5097 let _result = self.send_raw(result);
5098 if _result.is_err() {
5099 self.control_handle.shutdown();
5100 }
5101 self.drop_without_shutdown();
5102 _result
5103 }
5104
5105 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5107 let _result = self.send_raw(result);
5108 self.drop_without_shutdown();
5109 _result
5110 }
5111
5112 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5113 self.control_handle
5114 .inner
5115 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5116 result,
5117 self.tx_id,
5118 0x7ea015b3060fa,
5119 fidl::encoding::DynamicFlags::empty(),
5120 )
5121 }
5122}
5123
5124#[must_use = "FIDL methods require a response to be sent"]
5125#[derive(Debug)]
5126pub struct GenericSmeGetFeatureSupportResponder {
5127 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
5128 tx_id: u32,
5129}
5130
5131impl std::ops::Drop for GenericSmeGetFeatureSupportResponder {
5135 fn drop(&mut self) {
5136 self.control_handle.shutdown();
5137 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5139 }
5140}
5141
5142impl fidl::endpoints::Responder for GenericSmeGetFeatureSupportResponder {
5143 type ControlHandle = GenericSmeControlHandle;
5144
5145 fn control_handle(&self) -> &GenericSmeControlHandle {
5146 &self.control_handle
5147 }
5148
5149 fn drop_without_shutdown(mut self) {
5150 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5152 std::mem::forget(self);
5154 }
5155}
5156
5157impl GenericSmeGetFeatureSupportResponder {
5158 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5162 let _result = self.send_raw(result);
5163 if _result.is_err() {
5164 self.control_handle.shutdown();
5165 }
5166 self.drop_without_shutdown();
5167 _result
5168 }
5169
5170 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5172 let _result = self.send_raw(result);
5173 self.drop_without_shutdown();
5174 _result
5175 }
5176
5177 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5178 self.control_handle
5179 .inner
5180 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5181 result,
5182 self.tx_id,
5183 0x4692c6e50be1bbdd,
5184 fidl::encoding::DynamicFlags::empty(),
5185 )
5186 }
5187}
5188
5189#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5190pub struct TelemetryMarker;
5191
5192impl fidl::endpoints::ProtocolMarker for TelemetryMarker {
5193 type Proxy = TelemetryProxy;
5194 type RequestStream = TelemetryRequestStream;
5195 #[cfg(target_os = "fuchsia")]
5196 type SynchronousProxy = TelemetrySynchronousProxy;
5197
5198 const DEBUG_NAME: &'static str = "(anonymous) Telemetry";
5199}
5200pub type TelemetryQueryTelemetrySupportResult =
5201 Result<fidl_fuchsia_wlan_stats::TelemetrySupport, i32>;
5202pub type TelemetryGetCounterStatsResult = Result<fidl_fuchsia_wlan_stats::IfaceCounterStats, i32>;
5203pub type TelemetryGetHistogramStatsResult =
5204 Result<fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>;
5205pub type TelemetryCloneInspectVmoResult = Result<fidl::Vmo, i32>;
5206
5207pub trait TelemetryProxyInterface: Send + Sync {
5208 type QueryTelemetrySupportResponseFut: std::future::Future<Output = Result<TelemetryQueryTelemetrySupportResult, fidl::Error>>
5209 + Send;
5210 fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut;
5211 type GetCounterStatsResponseFut: std::future::Future<Output = Result<TelemetryGetCounterStatsResult, fidl::Error>>
5212 + Send;
5213 fn r#get_counter_stats(&self) -> Self::GetCounterStatsResponseFut;
5214 type GetHistogramStatsResponseFut: std::future::Future<Output = Result<TelemetryGetHistogramStatsResult, fidl::Error>>
5215 + Send;
5216 fn r#get_histogram_stats(&self) -> Self::GetHistogramStatsResponseFut;
5217 type CloneInspectVmoResponseFut: std::future::Future<Output = Result<TelemetryCloneInspectVmoResult, fidl::Error>>
5218 + Send;
5219 fn r#clone_inspect_vmo(&self) -> Self::CloneInspectVmoResponseFut;
5220}
5221#[derive(Debug)]
5222#[cfg(target_os = "fuchsia")]
5223pub struct TelemetrySynchronousProxy {
5224 client: fidl::client::sync::Client,
5225}
5226
5227#[cfg(target_os = "fuchsia")]
5228impl fidl::endpoints::SynchronousProxy for TelemetrySynchronousProxy {
5229 type Proxy = TelemetryProxy;
5230 type Protocol = TelemetryMarker;
5231
5232 fn from_channel(inner: fidl::Channel) -> Self {
5233 Self::new(inner)
5234 }
5235
5236 fn into_channel(self) -> fidl::Channel {
5237 self.client.into_channel()
5238 }
5239
5240 fn as_channel(&self) -> &fidl::Channel {
5241 self.client.as_channel()
5242 }
5243}
5244
5245#[cfg(target_os = "fuchsia")]
5246impl TelemetrySynchronousProxy {
5247 pub fn new(channel: fidl::Channel) -> Self {
5248 let protocol_name = <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5249 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
5250 }
5251
5252 pub fn into_channel(self) -> fidl::Channel {
5253 self.client.into_channel()
5254 }
5255
5256 pub fn wait_for_event(
5259 &self,
5260 deadline: zx::MonotonicInstant,
5261 ) -> Result<TelemetryEvent, fidl::Error> {
5262 TelemetryEvent::decode(self.client.wait_for_event(deadline)?)
5263 }
5264
5265 pub fn r#query_telemetry_support(
5266 &self,
5267 ___deadline: zx::MonotonicInstant,
5268 ) -> Result<TelemetryQueryTelemetrySupportResult, fidl::Error> {
5269 let _response = self.client.send_query::<
5270 fidl::encoding::EmptyPayload,
5271 fidl::encoding::ResultType<TelemetryQueryTelemetrySupportResponse, i32>,
5272 >(
5273 (),
5274 0x69443ad35b204686,
5275 fidl::encoding::DynamicFlags::empty(),
5276 ___deadline,
5277 )?;
5278 Ok(_response.map(|x| x.resp))
5279 }
5280
5281 pub fn r#get_counter_stats(
5282 &self,
5283 ___deadline: zx::MonotonicInstant,
5284 ) -> Result<TelemetryGetCounterStatsResult, fidl::Error> {
5285 let _response = self.client.send_query::<
5286 fidl::encoding::EmptyPayload,
5287 fidl::encoding::ResultType<TelemetryGetCounterStatsResponse, i32>,
5288 >(
5289 (),
5290 0x5bd8302dcf429d48,
5291 fidl::encoding::DynamicFlags::empty(),
5292 ___deadline,
5293 )?;
5294 Ok(_response.map(|x| x.stats))
5295 }
5296
5297 pub fn r#get_histogram_stats(
5298 &self,
5299 ___deadline: zx::MonotonicInstant,
5300 ) -> Result<TelemetryGetHistogramStatsResult, fidl::Error> {
5301 let _response = self.client.send_query::<
5302 fidl::encoding::EmptyPayload,
5303 fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>,
5304 >(
5305 (),
5306 0x46d2b6a23f764564,
5307 fidl::encoding::DynamicFlags::empty(),
5308 ___deadline,
5309 )?;
5310 Ok(_response.map(|x| x.stats))
5311 }
5312
5313 pub fn r#clone_inspect_vmo(
5314 &self,
5315 ___deadline: zx::MonotonicInstant,
5316 ) -> Result<TelemetryCloneInspectVmoResult, fidl::Error> {
5317 let _response = self.client.send_query::<
5318 fidl::encoding::EmptyPayload,
5319 fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>,
5320 >(
5321 (),
5322 0x47153917e84c5a21,
5323 fidl::encoding::DynamicFlags::empty(),
5324 ___deadline,
5325 )?;
5326 Ok(_response.map(|x| x.inspect_vmo))
5327 }
5328}
5329
5330#[derive(Debug, Clone)]
5331pub struct TelemetryProxy {
5332 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5333}
5334
5335impl fidl::endpoints::Proxy for TelemetryProxy {
5336 type Protocol = TelemetryMarker;
5337
5338 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5339 Self::new(inner)
5340 }
5341
5342 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5343 self.client.into_channel().map_err(|client| Self { client })
5344 }
5345
5346 fn as_channel(&self) -> &::fidl::AsyncChannel {
5347 self.client.as_channel()
5348 }
5349}
5350
5351impl TelemetryProxy {
5352 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5354 let protocol_name = <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5355 Self { client: fidl::client::Client::new(channel, protocol_name) }
5356 }
5357
5358 pub fn take_event_stream(&self) -> TelemetryEventStream {
5364 TelemetryEventStream { event_receiver: self.client.take_event_receiver() }
5365 }
5366
5367 pub fn r#query_telemetry_support(
5368 &self,
5369 ) -> fidl::client::QueryResponseFut<
5370 TelemetryQueryTelemetrySupportResult,
5371 fidl::encoding::DefaultFuchsiaResourceDialect,
5372 > {
5373 TelemetryProxyInterface::r#query_telemetry_support(self)
5374 }
5375
5376 pub fn r#get_counter_stats(
5377 &self,
5378 ) -> fidl::client::QueryResponseFut<
5379 TelemetryGetCounterStatsResult,
5380 fidl::encoding::DefaultFuchsiaResourceDialect,
5381 > {
5382 TelemetryProxyInterface::r#get_counter_stats(self)
5383 }
5384
5385 pub fn r#get_histogram_stats(
5386 &self,
5387 ) -> fidl::client::QueryResponseFut<
5388 TelemetryGetHistogramStatsResult,
5389 fidl::encoding::DefaultFuchsiaResourceDialect,
5390 > {
5391 TelemetryProxyInterface::r#get_histogram_stats(self)
5392 }
5393
5394 pub fn r#clone_inspect_vmo(
5395 &self,
5396 ) -> fidl::client::QueryResponseFut<
5397 TelemetryCloneInspectVmoResult,
5398 fidl::encoding::DefaultFuchsiaResourceDialect,
5399 > {
5400 TelemetryProxyInterface::r#clone_inspect_vmo(self)
5401 }
5402}
5403
5404impl TelemetryProxyInterface for TelemetryProxy {
5405 type QueryTelemetrySupportResponseFut = fidl::client::QueryResponseFut<
5406 TelemetryQueryTelemetrySupportResult,
5407 fidl::encoding::DefaultFuchsiaResourceDialect,
5408 >;
5409 fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut {
5410 fn _decode(
5411 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5412 ) -> Result<TelemetryQueryTelemetrySupportResult, fidl::Error> {
5413 let _response = fidl::client::decode_transaction_body::<
5414 fidl::encoding::ResultType<TelemetryQueryTelemetrySupportResponse, i32>,
5415 fidl::encoding::DefaultFuchsiaResourceDialect,
5416 0x69443ad35b204686,
5417 >(_buf?)?;
5418 Ok(_response.map(|x| x.resp))
5419 }
5420 self.client.send_query_and_decode::<
5421 fidl::encoding::EmptyPayload,
5422 TelemetryQueryTelemetrySupportResult,
5423 >(
5424 (),
5425 0x69443ad35b204686,
5426 fidl::encoding::DynamicFlags::empty(),
5427 _decode,
5428 )
5429 }
5430
5431 type GetCounterStatsResponseFut = fidl::client::QueryResponseFut<
5432 TelemetryGetCounterStatsResult,
5433 fidl::encoding::DefaultFuchsiaResourceDialect,
5434 >;
5435 fn r#get_counter_stats(&self) -> Self::GetCounterStatsResponseFut {
5436 fn _decode(
5437 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5438 ) -> Result<TelemetryGetCounterStatsResult, fidl::Error> {
5439 let _response = fidl::client::decode_transaction_body::<
5440 fidl::encoding::ResultType<TelemetryGetCounterStatsResponse, i32>,
5441 fidl::encoding::DefaultFuchsiaResourceDialect,
5442 0x5bd8302dcf429d48,
5443 >(_buf?)?;
5444 Ok(_response.map(|x| x.stats))
5445 }
5446 self.client
5447 .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryGetCounterStatsResult>(
5448 (),
5449 0x5bd8302dcf429d48,
5450 fidl::encoding::DynamicFlags::empty(),
5451 _decode,
5452 )
5453 }
5454
5455 type GetHistogramStatsResponseFut = fidl::client::QueryResponseFut<
5456 TelemetryGetHistogramStatsResult,
5457 fidl::encoding::DefaultFuchsiaResourceDialect,
5458 >;
5459 fn r#get_histogram_stats(&self) -> Self::GetHistogramStatsResponseFut {
5460 fn _decode(
5461 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5462 ) -> Result<TelemetryGetHistogramStatsResult, fidl::Error> {
5463 let _response = fidl::client::decode_transaction_body::<
5464 fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>,
5465 fidl::encoding::DefaultFuchsiaResourceDialect,
5466 0x46d2b6a23f764564,
5467 >(_buf?)?;
5468 Ok(_response.map(|x| x.stats))
5469 }
5470 self.client.send_query_and_decode::<
5471 fidl::encoding::EmptyPayload,
5472 TelemetryGetHistogramStatsResult,
5473 >(
5474 (),
5475 0x46d2b6a23f764564,
5476 fidl::encoding::DynamicFlags::empty(),
5477 _decode,
5478 )
5479 }
5480
5481 type CloneInspectVmoResponseFut = fidl::client::QueryResponseFut<
5482 TelemetryCloneInspectVmoResult,
5483 fidl::encoding::DefaultFuchsiaResourceDialect,
5484 >;
5485 fn r#clone_inspect_vmo(&self) -> Self::CloneInspectVmoResponseFut {
5486 fn _decode(
5487 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5488 ) -> Result<TelemetryCloneInspectVmoResult, fidl::Error> {
5489 let _response = fidl::client::decode_transaction_body::<
5490 fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>,
5491 fidl::encoding::DefaultFuchsiaResourceDialect,
5492 0x47153917e84c5a21,
5493 >(_buf?)?;
5494 Ok(_response.map(|x| x.inspect_vmo))
5495 }
5496 self.client
5497 .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryCloneInspectVmoResult>(
5498 (),
5499 0x47153917e84c5a21,
5500 fidl::encoding::DynamicFlags::empty(),
5501 _decode,
5502 )
5503 }
5504}
5505
5506pub struct TelemetryEventStream {
5507 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5508}
5509
5510impl std::marker::Unpin for TelemetryEventStream {}
5511
5512impl futures::stream::FusedStream for TelemetryEventStream {
5513 fn is_terminated(&self) -> bool {
5514 self.event_receiver.is_terminated()
5515 }
5516}
5517
5518impl futures::Stream for TelemetryEventStream {
5519 type Item = Result<TelemetryEvent, fidl::Error>;
5520
5521 fn poll_next(
5522 mut self: std::pin::Pin<&mut Self>,
5523 cx: &mut std::task::Context<'_>,
5524 ) -> std::task::Poll<Option<Self::Item>> {
5525 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5526 &mut self.event_receiver,
5527 cx
5528 )?) {
5529 Some(buf) => std::task::Poll::Ready(Some(TelemetryEvent::decode(buf))),
5530 None => std::task::Poll::Ready(None),
5531 }
5532 }
5533}
5534
5535#[derive(Debug)]
5536pub enum TelemetryEvent {}
5537
5538impl TelemetryEvent {
5539 fn decode(
5541 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5542 ) -> Result<TelemetryEvent, fidl::Error> {
5543 let (bytes, _handles) = buf.split_mut();
5544 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5545 debug_assert_eq!(tx_header.tx_id, 0);
5546 match tx_header.ordinal {
5547 _ => Err(fidl::Error::UnknownOrdinal {
5548 ordinal: tx_header.ordinal,
5549 protocol_name: <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5550 }),
5551 }
5552 }
5553}
5554
5555pub struct TelemetryRequestStream {
5557 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5558 is_terminated: bool,
5559}
5560
5561impl std::marker::Unpin for TelemetryRequestStream {}
5562
5563impl futures::stream::FusedStream for TelemetryRequestStream {
5564 fn is_terminated(&self) -> bool {
5565 self.is_terminated
5566 }
5567}
5568
5569impl fidl::endpoints::RequestStream for TelemetryRequestStream {
5570 type Protocol = TelemetryMarker;
5571 type ControlHandle = TelemetryControlHandle;
5572
5573 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5574 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5575 }
5576
5577 fn control_handle(&self) -> Self::ControlHandle {
5578 TelemetryControlHandle { inner: self.inner.clone() }
5579 }
5580
5581 fn into_inner(
5582 self,
5583 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5584 {
5585 (self.inner, self.is_terminated)
5586 }
5587
5588 fn from_inner(
5589 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5590 is_terminated: bool,
5591 ) -> Self {
5592 Self { inner, is_terminated }
5593 }
5594}
5595
5596impl futures::Stream for TelemetryRequestStream {
5597 type Item = Result<TelemetryRequest, fidl::Error>;
5598
5599 fn poll_next(
5600 mut self: std::pin::Pin<&mut Self>,
5601 cx: &mut std::task::Context<'_>,
5602 ) -> std::task::Poll<Option<Self::Item>> {
5603 let this = &mut *self;
5604 if this.inner.check_shutdown(cx) {
5605 this.is_terminated = true;
5606 return std::task::Poll::Ready(None);
5607 }
5608 if this.is_terminated {
5609 panic!("polled TelemetryRequestStream after completion");
5610 }
5611 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5612 |bytes, handles| {
5613 match this.inner.channel().read_etc(cx, bytes, handles) {
5614 std::task::Poll::Ready(Ok(())) => {}
5615 std::task::Poll::Pending => return std::task::Poll::Pending,
5616 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5617 this.is_terminated = true;
5618 return std::task::Poll::Ready(None);
5619 }
5620 std::task::Poll::Ready(Err(e)) => {
5621 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5622 e.into(),
5623 ))))
5624 }
5625 }
5626
5627 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5629
5630 std::task::Poll::Ready(Some(match header.ordinal {
5631 0x69443ad35b204686 => {
5632 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5633 let mut req = fidl::new_empty!(
5634 fidl::encoding::EmptyPayload,
5635 fidl::encoding::DefaultFuchsiaResourceDialect
5636 );
5637 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5638 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
5639 Ok(TelemetryRequest::QueryTelemetrySupport {
5640 responder: TelemetryQueryTelemetrySupportResponder {
5641 control_handle: std::mem::ManuallyDrop::new(control_handle),
5642 tx_id: header.tx_id,
5643 },
5644 })
5645 }
5646 0x5bd8302dcf429d48 => {
5647 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5648 let mut req = fidl::new_empty!(
5649 fidl::encoding::EmptyPayload,
5650 fidl::encoding::DefaultFuchsiaResourceDialect
5651 );
5652 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5653 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
5654 Ok(TelemetryRequest::GetCounterStats {
5655 responder: TelemetryGetCounterStatsResponder {
5656 control_handle: std::mem::ManuallyDrop::new(control_handle),
5657 tx_id: header.tx_id,
5658 },
5659 })
5660 }
5661 0x46d2b6a23f764564 => {
5662 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5663 let mut req = fidl::new_empty!(
5664 fidl::encoding::EmptyPayload,
5665 fidl::encoding::DefaultFuchsiaResourceDialect
5666 );
5667 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5668 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
5669 Ok(TelemetryRequest::GetHistogramStats {
5670 responder: TelemetryGetHistogramStatsResponder {
5671 control_handle: std::mem::ManuallyDrop::new(control_handle),
5672 tx_id: header.tx_id,
5673 },
5674 })
5675 }
5676 0x47153917e84c5a21 => {
5677 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5678 let mut req = fidl::new_empty!(
5679 fidl::encoding::EmptyPayload,
5680 fidl::encoding::DefaultFuchsiaResourceDialect
5681 );
5682 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5683 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
5684 Ok(TelemetryRequest::CloneInspectVmo {
5685 responder: TelemetryCloneInspectVmoResponder {
5686 control_handle: std::mem::ManuallyDrop::new(control_handle),
5687 tx_id: header.tx_id,
5688 },
5689 })
5690 }
5691 _ => Err(fidl::Error::UnknownOrdinal {
5692 ordinal: header.ordinal,
5693 protocol_name:
5694 <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5695 }),
5696 }))
5697 },
5698 )
5699 }
5700}
5701
5702#[derive(Debug)]
5703pub enum TelemetryRequest {
5704 QueryTelemetrySupport { responder: TelemetryQueryTelemetrySupportResponder },
5705 GetCounterStats { responder: TelemetryGetCounterStatsResponder },
5706 GetHistogramStats { responder: TelemetryGetHistogramStatsResponder },
5707 CloneInspectVmo { responder: TelemetryCloneInspectVmoResponder },
5708}
5709
5710impl TelemetryRequest {
5711 #[allow(irrefutable_let_patterns)]
5712 pub fn into_query_telemetry_support(self) -> Option<(TelemetryQueryTelemetrySupportResponder)> {
5713 if let TelemetryRequest::QueryTelemetrySupport { responder } = self {
5714 Some((responder))
5715 } else {
5716 None
5717 }
5718 }
5719
5720 #[allow(irrefutable_let_patterns)]
5721 pub fn into_get_counter_stats(self) -> Option<(TelemetryGetCounterStatsResponder)> {
5722 if let TelemetryRequest::GetCounterStats { responder } = self {
5723 Some((responder))
5724 } else {
5725 None
5726 }
5727 }
5728
5729 #[allow(irrefutable_let_patterns)]
5730 pub fn into_get_histogram_stats(self) -> Option<(TelemetryGetHistogramStatsResponder)> {
5731 if let TelemetryRequest::GetHistogramStats { responder } = self {
5732 Some((responder))
5733 } else {
5734 None
5735 }
5736 }
5737
5738 #[allow(irrefutable_let_patterns)]
5739 pub fn into_clone_inspect_vmo(self) -> Option<(TelemetryCloneInspectVmoResponder)> {
5740 if let TelemetryRequest::CloneInspectVmo { responder } = self {
5741 Some((responder))
5742 } else {
5743 None
5744 }
5745 }
5746
5747 pub fn method_name(&self) -> &'static str {
5749 match *self {
5750 TelemetryRequest::QueryTelemetrySupport { .. } => "query_telemetry_support",
5751 TelemetryRequest::GetCounterStats { .. } => "get_counter_stats",
5752 TelemetryRequest::GetHistogramStats { .. } => "get_histogram_stats",
5753 TelemetryRequest::CloneInspectVmo { .. } => "clone_inspect_vmo",
5754 }
5755 }
5756}
5757
5758#[derive(Debug, Clone)]
5759pub struct TelemetryControlHandle {
5760 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5761}
5762
5763impl fidl::endpoints::ControlHandle for TelemetryControlHandle {
5764 fn shutdown(&self) {
5765 self.inner.shutdown()
5766 }
5767 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5768 self.inner.shutdown_with_epitaph(status)
5769 }
5770
5771 fn is_closed(&self) -> bool {
5772 self.inner.channel().is_closed()
5773 }
5774 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5775 self.inner.channel().on_closed()
5776 }
5777
5778 #[cfg(target_os = "fuchsia")]
5779 fn signal_peer(
5780 &self,
5781 clear_mask: zx::Signals,
5782 set_mask: zx::Signals,
5783 ) -> Result<(), zx_status::Status> {
5784 use fidl::Peered;
5785 self.inner.channel().signal_peer(clear_mask, set_mask)
5786 }
5787}
5788
5789impl TelemetryControlHandle {}
5790
5791#[must_use = "FIDL methods require a response to be sent"]
5792#[derive(Debug)]
5793pub struct TelemetryQueryTelemetrySupportResponder {
5794 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
5795 tx_id: u32,
5796}
5797
5798impl std::ops::Drop for TelemetryQueryTelemetrySupportResponder {
5802 fn drop(&mut self) {
5803 self.control_handle.shutdown();
5804 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5806 }
5807}
5808
5809impl fidl::endpoints::Responder for TelemetryQueryTelemetrySupportResponder {
5810 type ControlHandle = TelemetryControlHandle;
5811
5812 fn control_handle(&self) -> &TelemetryControlHandle {
5813 &self.control_handle
5814 }
5815
5816 fn drop_without_shutdown(mut self) {
5817 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5819 std::mem::forget(self);
5821 }
5822}
5823
5824impl TelemetryQueryTelemetrySupportResponder {
5825 pub fn send(
5829 self,
5830 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
5831 ) -> Result<(), fidl::Error> {
5832 let _result = self.send_raw(result);
5833 if _result.is_err() {
5834 self.control_handle.shutdown();
5835 }
5836 self.drop_without_shutdown();
5837 _result
5838 }
5839
5840 pub fn send_no_shutdown_on_err(
5842 self,
5843 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
5844 ) -> Result<(), fidl::Error> {
5845 let _result = self.send_raw(result);
5846 self.drop_without_shutdown();
5847 _result
5848 }
5849
5850 fn send_raw(
5851 &self,
5852 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
5853 ) -> Result<(), fidl::Error> {
5854 self.control_handle.inner.send::<fidl::encoding::ResultType<
5855 TelemetryQueryTelemetrySupportResponse,
5856 i32,
5857 >>(
5858 result.map(|resp| (resp,)),
5859 self.tx_id,
5860 0x69443ad35b204686,
5861 fidl::encoding::DynamicFlags::empty(),
5862 )
5863 }
5864}
5865
5866#[must_use = "FIDL methods require a response to be sent"]
5867#[derive(Debug)]
5868pub struct TelemetryGetCounterStatsResponder {
5869 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
5870 tx_id: u32,
5871}
5872
5873impl std::ops::Drop for TelemetryGetCounterStatsResponder {
5877 fn drop(&mut self) {
5878 self.control_handle.shutdown();
5879 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5881 }
5882}
5883
5884impl fidl::endpoints::Responder for TelemetryGetCounterStatsResponder {
5885 type ControlHandle = TelemetryControlHandle;
5886
5887 fn control_handle(&self) -> &TelemetryControlHandle {
5888 &self.control_handle
5889 }
5890
5891 fn drop_without_shutdown(mut self) {
5892 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5894 std::mem::forget(self);
5896 }
5897}
5898
5899impl TelemetryGetCounterStatsResponder {
5900 pub fn send(
5904 self,
5905 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceCounterStats, i32>,
5906 ) -> Result<(), fidl::Error> {
5907 let _result = self.send_raw(result);
5908 if _result.is_err() {
5909 self.control_handle.shutdown();
5910 }
5911 self.drop_without_shutdown();
5912 _result
5913 }
5914
5915 pub fn send_no_shutdown_on_err(
5917 self,
5918 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceCounterStats, i32>,
5919 ) -> Result<(), fidl::Error> {
5920 let _result = self.send_raw(result);
5921 self.drop_without_shutdown();
5922 _result
5923 }
5924
5925 fn send_raw(
5926 &self,
5927 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceCounterStats, i32>,
5928 ) -> Result<(), fidl::Error> {
5929 self.control_handle
5930 .inner
5931 .send::<fidl::encoding::ResultType<TelemetryGetCounterStatsResponse, i32>>(
5932 result.map(|stats| (stats,)),
5933 self.tx_id,
5934 0x5bd8302dcf429d48,
5935 fidl::encoding::DynamicFlags::empty(),
5936 )
5937 }
5938}
5939
5940#[must_use = "FIDL methods require a response to be sent"]
5941#[derive(Debug)]
5942pub struct TelemetryGetHistogramStatsResponder {
5943 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
5944 tx_id: u32,
5945}
5946
5947impl std::ops::Drop for TelemetryGetHistogramStatsResponder {
5951 fn drop(&mut self) {
5952 self.control_handle.shutdown();
5953 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5955 }
5956}
5957
5958impl fidl::endpoints::Responder for TelemetryGetHistogramStatsResponder {
5959 type ControlHandle = TelemetryControlHandle;
5960
5961 fn control_handle(&self) -> &TelemetryControlHandle {
5962 &self.control_handle
5963 }
5964
5965 fn drop_without_shutdown(mut self) {
5966 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5968 std::mem::forget(self);
5970 }
5971}
5972
5973impl TelemetryGetHistogramStatsResponder {
5974 pub fn send(
5978 self,
5979 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
5980 ) -> Result<(), fidl::Error> {
5981 let _result = self.send_raw(result);
5982 if _result.is_err() {
5983 self.control_handle.shutdown();
5984 }
5985 self.drop_without_shutdown();
5986 _result
5987 }
5988
5989 pub fn send_no_shutdown_on_err(
5991 self,
5992 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
5993 ) -> Result<(), fidl::Error> {
5994 let _result = self.send_raw(result);
5995 self.drop_without_shutdown();
5996 _result
5997 }
5998
5999 fn send_raw(
6000 &self,
6001 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
6002 ) -> Result<(), fidl::Error> {
6003 self.control_handle
6004 .inner
6005 .send::<fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>>(
6006 result.map(|stats| (stats,)),
6007 self.tx_id,
6008 0x46d2b6a23f764564,
6009 fidl::encoding::DynamicFlags::empty(),
6010 )
6011 }
6012}
6013
6014#[must_use = "FIDL methods require a response to be sent"]
6015#[derive(Debug)]
6016pub struct TelemetryCloneInspectVmoResponder {
6017 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
6018 tx_id: u32,
6019}
6020
6021impl std::ops::Drop for TelemetryCloneInspectVmoResponder {
6025 fn drop(&mut self) {
6026 self.control_handle.shutdown();
6027 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6029 }
6030}
6031
6032impl fidl::endpoints::Responder for TelemetryCloneInspectVmoResponder {
6033 type ControlHandle = TelemetryControlHandle;
6034
6035 fn control_handle(&self) -> &TelemetryControlHandle {
6036 &self.control_handle
6037 }
6038
6039 fn drop_without_shutdown(mut self) {
6040 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6042 std::mem::forget(self);
6044 }
6045}
6046
6047impl TelemetryCloneInspectVmoResponder {
6048 pub fn send(self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
6052 let _result = self.send_raw(result);
6053 if _result.is_err() {
6054 self.control_handle.shutdown();
6055 }
6056 self.drop_without_shutdown();
6057 _result
6058 }
6059
6060 pub fn send_no_shutdown_on_err(
6062 self,
6063 mut result: Result<fidl::Vmo, i32>,
6064 ) -> Result<(), fidl::Error> {
6065 let _result = self.send_raw(result);
6066 self.drop_without_shutdown();
6067 _result
6068 }
6069
6070 fn send_raw(&self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
6071 self.control_handle
6072 .inner
6073 .send::<fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>>(
6074 result.map(|inspect_vmo| (inspect_vmo,)),
6075 self.tx_id,
6076 0x47153917e84c5a21,
6077 fidl::encoding::DynamicFlags::empty(),
6078 )
6079 }
6080}
6081
6082#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6083pub struct UsmeBootstrapMarker;
6084
6085impl fidl::endpoints::ProtocolMarker for UsmeBootstrapMarker {
6086 type Proxy = UsmeBootstrapProxy;
6087 type RequestStream = UsmeBootstrapRequestStream;
6088 #[cfg(target_os = "fuchsia")]
6089 type SynchronousProxy = UsmeBootstrapSynchronousProxy;
6090
6091 const DEBUG_NAME: &'static str = "(anonymous) UsmeBootstrap";
6092}
6093
6094pub trait UsmeBootstrapProxyInterface: Send + Sync {
6095 type StartResponseFut: std::future::Future<Output = Result<fidl::Vmo, fidl::Error>> + Send;
6096 fn r#start(
6097 &self,
6098 generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
6099 legacy_privacy_support: &LegacyPrivacySupport,
6100 ) -> Self::StartResponseFut;
6101}
6102#[derive(Debug)]
6103#[cfg(target_os = "fuchsia")]
6104pub struct UsmeBootstrapSynchronousProxy {
6105 client: fidl::client::sync::Client,
6106}
6107
6108#[cfg(target_os = "fuchsia")]
6109impl fidl::endpoints::SynchronousProxy for UsmeBootstrapSynchronousProxy {
6110 type Proxy = UsmeBootstrapProxy;
6111 type Protocol = UsmeBootstrapMarker;
6112
6113 fn from_channel(inner: fidl::Channel) -> Self {
6114 Self::new(inner)
6115 }
6116
6117 fn into_channel(self) -> fidl::Channel {
6118 self.client.into_channel()
6119 }
6120
6121 fn as_channel(&self) -> &fidl::Channel {
6122 self.client.as_channel()
6123 }
6124}
6125
6126#[cfg(target_os = "fuchsia")]
6127impl UsmeBootstrapSynchronousProxy {
6128 pub fn new(channel: fidl::Channel) -> Self {
6129 let protocol_name = <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6130 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6131 }
6132
6133 pub fn into_channel(self) -> fidl::Channel {
6134 self.client.into_channel()
6135 }
6136
6137 pub fn wait_for_event(
6140 &self,
6141 deadline: zx::MonotonicInstant,
6142 ) -> Result<UsmeBootstrapEvent, fidl::Error> {
6143 UsmeBootstrapEvent::decode(self.client.wait_for_event(deadline)?)
6144 }
6145
6146 pub fn r#start(
6147 &self,
6148 mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
6149 mut legacy_privacy_support: &LegacyPrivacySupport,
6150 ___deadline: zx::MonotonicInstant,
6151 ) -> Result<fidl::Vmo, fidl::Error> {
6152 let _response =
6153 self.client.send_query::<UsmeBootstrapStartRequest, UsmeBootstrapStartResponse>(
6154 (generic_sme_server, legacy_privacy_support),
6155 0x58850dfb76c29a0e,
6156 fidl::encoding::DynamicFlags::empty(),
6157 ___deadline,
6158 )?;
6159 Ok(_response.inspect_vmo)
6160 }
6161}
6162
6163#[derive(Debug, Clone)]
6164pub struct UsmeBootstrapProxy {
6165 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6166}
6167
6168impl fidl::endpoints::Proxy for UsmeBootstrapProxy {
6169 type Protocol = UsmeBootstrapMarker;
6170
6171 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6172 Self::new(inner)
6173 }
6174
6175 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6176 self.client.into_channel().map_err(|client| Self { client })
6177 }
6178
6179 fn as_channel(&self) -> &::fidl::AsyncChannel {
6180 self.client.as_channel()
6181 }
6182}
6183
6184impl UsmeBootstrapProxy {
6185 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6187 let protocol_name = <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6188 Self { client: fidl::client::Client::new(channel, protocol_name) }
6189 }
6190
6191 pub fn take_event_stream(&self) -> UsmeBootstrapEventStream {
6197 UsmeBootstrapEventStream { event_receiver: self.client.take_event_receiver() }
6198 }
6199
6200 pub fn r#start(
6201 &self,
6202 mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
6203 mut legacy_privacy_support: &LegacyPrivacySupport,
6204 ) -> fidl::client::QueryResponseFut<fidl::Vmo, fidl::encoding::DefaultFuchsiaResourceDialect>
6205 {
6206 UsmeBootstrapProxyInterface::r#start(self, generic_sme_server, legacy_privacy_support)
6207 }
6208}
6209
6210impl UsmeBootstrapProxyInterface for UsmeBootstrapProxy {
6211 type StartResponseFut =
6212 fidl::client::QueryResponseFut<fidl::Vmo, fidl::encoding::DefaultFuchsiaResourceDialect>;
6213 fn r#start(
6214 &self,
6215 mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
6216 mut legacy_privacy_support: &LegacyPrivacySupport,
6217 ) -> Self::StartResponseFut {
6218 fn _decode(
6219 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6220 ) -> Result<fidl::Vmo, fidl::Error> {
6221 let _response = fidl::client::decode_transaction_body::<
6222 UsmeBootstrapStartResponse,
6223 fidl::encoding::DefaultFuchsiaResourceDialect,
6224 0x58850dfb76c29a0e,
6225 >(_buf?)?;
6226 Ok(_response.inspect_vmo)
6227 }
6228 self.client.send_query_and_decode::<UsmeBootstrapStartRequest, fidl::Vmo>(
6229 (generic_sme_server, legacy_privacy_support),
6230 0x58850dfb76c29a0e,
6231 fidl::encoding::DynamicFlags::empty(),
6232 _decode,
6233 )
6234 }
6235}
6236
6237pub struct UsmeBootstrapEventStream {
6238 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6239}
6240
6241impl std::marker::Unpin for UsmeBootstrapEventStream {}
6242
6243impl futures::stream::FusedStream for UsmeBootstrapEventStream {
6244 fn is_terminated(&self) -> bool {
6245 self.event_receiver.is_terminated()
6246 }
6247}
6248
6249impl futures::Stream for UsmeBootstrapEventStream {
6250 type Item = Result<UsmeBootstrapEvent, fidl::Error>;
6251
6252 fn poll_next(
6253 mut self: std::pin::Pin<&mut Self>,
6254 cx: &mut std::task::Context<'_>,
6255 ) -> std::task::Poll<Option<Self::Item>> {
6256 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6257 &mut self.event_receiver,
6258 cx
6259 )?) {
6260 Some(buf) => std::task::Poll::Ready(Some(UsmeBootstrapEvent::decode(buf))),
6261 None => std::task::Poll::Ready(None),
6262 }
6263 }
6264}
6265
6266#[derive(Debug)]
6267pub enum UsmeBootstrapEvent {}
6268
6269impl UsmeBootstrapEvent {
6270 fn decode(
6272 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6273 ) -> Result<UsmeBootstrapEvent, fidl::Error> {
6274 let (bytes, _handles) = buf.split_mut();
6275 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6276 debug_assert_eq!(tx_header.tx_id, 0);
6277 match tx_header.ordinal {
6278 _ => Err(fidl::Error::UnknownOrdinal {
6279 ordinal: tx_header.ordinal,
6280 protocol_name: <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6281 }),
6282 }
6283 }
6284}
6285
6286pub struct UsmeBootstrapRequestStream {
6288 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6289 is_terminated: bool,
6290}
6291
6292impl std::marker::Unpin for UsmeBootstrapRequestStream {}
6293
6294impl futures::stream::FusedStream for UsmeBootstrapRequestStream {
6295 fn is_terminated(&self) -> bool {
6296 self.is_terminated
6297 }
6298}
6299
6300impl fidl::endpoints::RequestStream for UsmeBootstrapRequestStream {
6301 type Protocol = UsmeBootstrapMarker;
6302 type ControlHandle = UsmeBootstrapControlHandle;
6303
6304 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6305 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6306 }
6307
6308 fn control_handle(&self) -> Self::ControlHandle {
6309 UsmeBootstrapControlHandle { inner: self.inner.clone() }
6310 }
6311
6312 fn into_inner(
6313 self,
6314 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6315 {
6316 (self.inner, self.is_terminated)
6317 }
6318
6319 fn from_inner(
6320 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6321 is_terminated: bool,
6322 ) -> Self {
6323 Self { inner, is_terminated }
6324 }
6325}
6326
6327impl futures::Stream for UsmeBootstrapRequestStream {
6328 type Item = Result<UsmeBootstrapRequest, fidl::Error>;
6329
6330 fn poll_next(
6331 mut self: std::pin::Pin<&mut Self>,
6332 cx: &mut std::task::Context<'_>,
6333 ) -> std::task::Poll<Option<Self::Item>> {
6334 let this = &mut *self;
6335 if this.inner.check_shutdown(cx) {
6336 this.is_terminated = true;
6337 return std::task::Poll::Ready(None);
6338 }
6339 if this.is_terminated {
6340 panic!("polled UsmeBootstrapRequestStream after completion");
6341 }
6342 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6343 |bytes, handles| {
6344 match this.inner.channel().read_etc(cx, bytes, handles) {
6345 std::task::Poll::Ready(Ok(())) => {}
6346 std::task::Poll::Pending => return std::task::Poll::Pending,
6347 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6348 this.is_terminated = true;
6349 return std::task::Poll::Ready(None);
6350 }
6351 std::task::Poll::Ready(Err(e)) => {
6352 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6353 e.into(),
6354 ))))
6355 }
6356 }
6357
6358 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6360
6361 std::task::Poll::Ready(Some(match header.ordinal {
6362 0x58850dfb76c29a0e => {
6363 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6364 let mut req = fidl::new_empty!(
6365 UsmeBootstrapStartRequest,
6366 fidl::encoding::DefaultFuchsiaResourceDialect
6367 );
6368 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UsmeBootstrapStartRequest>(&header, _body_bytes, handles, &mut req)?;
6369 let control_handle =
6370 UsmeBootstrapControlHandle { inner: this.inner.clone() };
6371 Ok(UsmeBootstrapRequest::Start {
6372 generic_sme_server: req.generic_sme_server,
6373 legacy_privacy_support: req.legacy_privacy_support,
6374
6375 responder: UsmeBootstrapStartResponder {
6376 control_handle: std::mem::ManuallyDrop::new(control_handle),
6377 tx_id: header.tx_id,
6378 },
6379 })
6380 }
6381 _ => Err(fidl::Error::UnknownOrdinal {
6382 ordinal: header.ordinal,
6383 protocol_name:
6384 <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6385 }),
6386 }))
6387 },
6388 )
6389 }
6390}
6391
6392#[derive(Debug)]
6393pub enum UsmeBootstrapRequest {
6394 Start {
6395 generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
6396 legacy_privacy_support: LegacyPrivacySupport,
6397 responder: UsmeBootstrapStartResponder,
6398 },
6399}
6400
6401impl UsmeBootstrapRequest {
6402 #[allow(irrefutable_let_patterns)]
6403 pub fn into_start(
6404 self,
6405 ) -> Option<(
6406 fidl::endpoints::ServerEnd<GenericSmeMarker>,
6407 LegacyPrivacySupport,
6408 UsmeBootstrapStartResponder,
6409 )> {
6410 if let UsmeBootstrapRequest::Start {
6411 generic_sme_server,
6412 legacy_privacy_support,
6413 responder,
6414 } = self
6415 {
6416 Some((generic_sme_server, legacy_privacy_support, responder))
6417 } else {
6418 None
6419 }
6420 }
6421
6422 pub fn method_name(&self) -> &'static str {
6424 match *self {
6425 UsmeBootstrapRequest::Start { .. } => "start",
6426 }
6427 }
6428}
6429
6430#[derive(Debug, Clone)]
6431pub struct UsmeBootstrapControlHandle {
6432 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6433}
6434
6435impl fidl::endpoints::ControlHandle for UsmeBootstrapControlHandle {
6436 fn shutdown(&self) {
6437 self.inner.shutdown()
6438 }
6439 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6440 self.inner.shutdown_with_epitaph(status)
6441 }
6442
6443 fn is_closed(&self) -> bool {
6444 self.inner.channel().is_closed()
6445 }
6446 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6447 self.inner.channel().on_closed()
6448 }
6449
6450 #[cfg(target_os = "fuchsia")]
6451 fn signal_peer(
6452 &self,
6453 clear_mask: zx::Signals,
6454 set_mask: zx::Signals,
6455 ) -> Result<(), zx_status::Status> {
6456 use fidl::Peered;
6457 self.inner.channel().signal_peer(clear_mask, set_mask)
6458 }
6459}
6460
6461impl UsmeBootstrapControlHandle {}
6462
6463#[must_use = "FIDL methods require a response to be sent"]
6464#[derive(Debug)]
6465pub struct UsmeBootstrapStartResponder {
6466 control_handle: std::mem::ManuallyDrop<UsmeBootstrapControlHandle>,
6467 tx_id: u32,
6468}
6469
6470impl std::ops::Drop for UsmeBootstrapStartResponder {
6474 fn drop(&mut self) {
6475 self.control_handle.shutdown();
6476 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6478 }
6479}
6480
6481impl fidl::endpoints::Responder for UsmeBootstrapStartResponder {
6482 type ControlHandle = UsmeBootstrapControlHandle;
6483
6484 fn control_handle(&self) -> &UsmeBootstrapControlHandle {
6485 &self.control_handle
6486 }
6487
6488 fn drop_without_shutdown(mut self) {
6489 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6491 std::mem::forget(self);
6493 }
6494}
6495
6496impl UsmeBootstrapStartResponder {
6497 pub fn send(self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
6501 let _result = self.send_raw(inspect_vmo);
6502 if _result.is_err() {
6503 self.control_handle.shutdown();
6504 }
6505 self.drop_without_shutdown();
6506 _result
6507 }
6508
6509 pub fn send_no_shutdown_on_err(self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
6511 let _result = self.send_raw(inspect_vmo);
6512 self.drop_without_shutdown();
6513 _result
6514 }
6515
6516 fn send_raw(&self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
6517 self.control_handle.inner.send::<UsmeBootstrapStartResponse>(
6518 (inspect_vmo,),
6519 self.tx_id,
6520 0x58850dfb76c29a0e,
6521 fidl::encoding::DynamicFlags::empty(),
6522 )
6523 }
6524}
6525
6526mod internal {
6527 use super::*;
6528 unsafe impl fidl::encoding::TypeMarker for DisconnectMlmeEventName {
6529 type Owned = Self;
6530
6531 #[inline(always)]
6532 fn inline_align(_context: fidl::encoding::Context) -> usize {
6533 std::mem::align_of::<u32>()
6534 }
6535
6536 #[inline(always)]
6537 fn inline_size(_context: fidl::encoding::Context) -> usize {
6538 std::mem::size_of::<u32>()
6539 }
6540
6541 #[inline(always)]
6542 fn encode_is_copy() -> bool {
6543 true
6544 }
6545
6546 #[inline(always)]
6547 fn decode_is_copy() -> bool {
6548 false
6549 }
6550 }
6551
6552 impl fidl::encoding::ValueTypeMarker for DisconnectMlmeEventName {
6553 type Borrowed<'a> = Self;
6554 #[inline(always)]
6555 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6556 *value
6557 }
6558 }
6559
6560 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6561 for DisconnectMlmeEventName
6562 {
6563 #[inline]
6564 unsafe fn encode(
6565 self,
6566 encoder: &mut fidl::encoding::Encoder<'_, D>,
6567 offset: usize,
6568 _depth: fidl::encoding::Depth,
6569 ) -> fidl::Result<()> {
6570 encoder.debug_check_bounds::<Self>(offset);
6571 encoder.write_num(self.into_primitive(), offset);
6572 Ok(())
6573 }
6574 }
6575
6576 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6577 for DisconnectMlmeEventName
6578 {
6579 #[inline(always)]
6580 fn new_empty() -> Self {
6581 Self::DeauthenticateIndication
6582 }
6583
6584 #[inline]
6585 unsafe fn decode(
6586 &mut self,
6587 decoder: &mut fidl::encoding::Decoder<'_, D>,
6588 offset: usize,
6589 _depth: fidl::encoding::Depth,
6590 ) -> fidl::Result<()> {
6591 decoder.debug_check_bounds::<Self>(offset);
6592 let prim = decoder.read_num::<u32>(offset);
6593
6594 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6595 Ok(())
6596 }
6597 }
6598 unsafe impl fidl::encoding::TypeMarker for Protection {
6599 type Owned = Self;
6600
6601 #[inline(always)]
6602 fn inline_align(_context: fidl::encoding::Context) -> usize {
6603 std::mem::align_of::<u32>()
6604 }
6605
6606 #[inline(always)]
6607 fn inline_size(_context: fidl::encoding::Context) -> usize {
6608 std::mem::size_of::<u32>()
6609 }
6610
6611 #[inline(always)]
6612 fn encode_is_copy() -> bool {
6613 true
6614 }
6615
6616 #[inline(always)]
6617 fn decode_is_copy() -> bool {
6618 false
6619 }
6620 }
6621
6622 impl fidl::encoding::ValueTypeMarker for Protection {
6623 type Borrowed<'a> = Self;
6624 #[inline(always)]
6625 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6626 *value
6627 }
6628 }
6629
6630 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Protection {
6631 #[inline]
6632 unsafe fn encode(
6633 self,
6634 encoder: &mut fidl::encoding::Encoder<'_, D>,
6635 offset: usize,
6636 _depth: fidl::encoding::Depth,
6637 ) -> fidl::Result<()> {
6638 encoder.debug_check_bounds::<Self>(offset);
6639 encoder.write_num(self.into_primitive(), offset);
6640 Ok(())
6641 }
6642 }
6643
6644 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Protection {
6645 #[inline(always)]
6646 fn new_empty() -> Self {
6647 Self::Unknown
6648 }
6649
6650 #[inline]
6651 unsafe fn decode(
6652 &mut self,
6653 decoder: &mut fidl::encoding::Decoder<'_, D>,
6654 offset: usize,
6655 _depth: fidl::encoding::Depth,
6656 ) -> fidl::Result<()> {
6657 decoder.debug_check_bounds::<Self>(offset);
6658 let prim = decoder.read_num::<u32>(offset);
6659
6660 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6661 Ok(())
6662 }
6663 }
6664 unsafe impl fidl::encoding::TypeMarker for ScanErrorCode {
6665 type Owned = Self;
6666
6667 #[inline(always)]
6668 fn inline_align(_context: fidl::encoding::Context) -> usize {
6669 std::mem::align_of::<u32>()
6670 }
6671
6672 #[inline(always)]
6673 fn inline_size(_context: fidl::encoding::Context) -> usize {
6674 std::mem::size_of::<u32>()
6675 }
6676
6677 #[inline(always)]
6678 fn encode_is_copy() -> bool {
6679 true
6680 }
6681
6682 #[inline(always)]
6683 fn decode_is_copy() -> bool {
6684 false
6685 }
6686 }
6687
6688 impl fidl::encoding::ValueTypeMarker for ScanErrorCode {
6689 type Borrowed<'a> = Self;
6690 #[inline(always)]
6691 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6692 *value
6693 }
6694 }
6695
6696 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ScanErrorCode {
6697 #[inline]
6698 unsafe fn encode(
6699 self,
6700 encoder: &mut fidl::encoding::Encoder<'_, D>,
6701 offset: usize,
6702 _depth: fidl::encoding::Depth,
6703 ) -> fidl::Result<()> {
6704 encoder.debug_check_bounds::<Self>(offset);
6705 encoder.write_num(self.into_primitive(), offset);
6706 Ok(())
6707 }
6708 }
6709
6710 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanErrorCode {
6711 #[inline(always)]
6712 fn new_empty() -> Self {
6713 Self::NotSupported
6714 }
6715
6716 #[inline]
6717 unsafe fn decode(
6718 &mut self,
6719 decoder: &mut fidl::encoding::Decoder<'_, D>,
6720 offset: usize,
6721 _depth: fidl::encoding::Depth,
6722 ) -> fidl::Result<()> {
6723 decoder.debug_check_bounds::<Self>(offset);
6724 let prim = decoder.read_num::<u32>(offset);
6725
6726 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6727 Ok(())
6728 }
6729 }
6730 unsafe impl fidl::encoding::TypeMarker for StartApResultCode {
6731 type Owned = Self;
6732
6733 #[inline(always)]
6734 fn inline_align(_context: fidl::encoding::Context) -> usize {
6735 std::mem::align_of::<u32>()
6736 }
6737
6738 #[inline(always)]
6739 fn inline_size(_context: fidl::encoding::Context) -> usize {
6740 std::mem::size_of::<u32>()
6741 }
6742
6743 #[inline(always)]
6744 fn encode_is_copy() -> bool {
6745 true
6746 }
6747
6748 #[inline(always)]
6749 fn decode_is_copy() -> bool {
6750 false
6751 }
6752 }
6753
6754 impl fidl::encoding::ValueTypeMarker for StartApResultCode {
6755 type Borrowed<'a> = Self;
6756 #[inline(always)]
6757 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6758 *value
6759 }
6760 }
6761
6762 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6763 for StartApResultCode
6764 {
6765 #[inline]
6766 unsafe fn encode(
6767 self,
6768 encoder: &mut fidl::encoding::Encoder<'_, D>,
6769 offset: usize,
6770 _depth: fidl::encoding::Depth,
6771 ) -> fidl::Result<()> {
6772 encoder.debug_check_bounds::<Self>(offset);
6773 encoder.write_num(self.into_primitive(), offset);
6774 Ok(())
6775 }
6776 }
6777
6778 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartApResultCode {
6779 #[inline(always)]
6780 fn new_empty() -> Self {
6781 Self::Success
6782 }
6783
6784 #[inline]
6785 unsafe fn decode(
6786 &mut self,
6787 decoder: &mut fidl::encoding::Decoder<'_, D>,
6788 offset: usize,
6789 _depth: fidl::encoding::Depth,
6790 ) -> fidl::Result<()> {
6791 decoder.debug_check_bounds::<Self>(offset);
6792 let prim = decoder.read_num::<u32>(offset);
6793
6794 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6795 Ok(())
6796 }
6797 }
6798 unsafe impl fidl::encoding::TypeMarker for StopApResultCode {
6799 type Owned = Self;
6800
6801 #[inline(always)]
6802 fn inline_align(_context: fidl::encoding::Context) -> usize {
6803 std::mem::align_of::<u32>()
6804 }
6805
6806 #[inline(always)]
6807 fn inline_size(_context: fidl::encoding::Context) -> usize {
6808 std::mem::size_of::<u32>()
6809 }
6810
6811 #[inline(always)]
6812 fn encode_is_copy() -> bool {
6813 true
6814 }
6815
6816 #[inline(always)]
6817 fn decode_is_copy() -> bool {
6818 false
6819 }
6820 }
6821
6822 impl fidl::encoding::ValueTypeMarker for StopApResultCode {
6823 type Borrowed<'a> = Self;
6824 #[inline(always)]
6825 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6826 *value
6827 }
6828 }
6829
6830 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6831 for StopApResultCode
6832 {
6833 #[inline]
6834 unsafe fn encode(
6835 self,
6836 encoder: &mut fidl::encoding::Encoder<'_, D>,
6837 offset: usize,
6838 _depth: fidl::encoding::Depth,
6839 ) -> fidl::Result<()> {
6840 encoder.debug_check_bounds::<Self>(offset);
6841 encoder.write_num(self.into_primitive(), offset);
6842 Ok(())
6843 }
6844 }
6845
6846 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopApResultCode {
6847 #[inline(always)]
6848 fn new_empty() -> Self {
6849 Self::Success
6850 }
6851
6852 #[inline]
6853 unsafe fn decode(
6854 &mut self,
6855 decoder: &mut fidl::encoding::Decoder<'_, D>,
6856 offset: usize,
6857 _depth: fidl::encoding::Depth,
6858 ) -> fidl::Result<()> {
6859 decoder.debug_check_bounds::<Self>(offset);
6860 let prim = decoder.read_num::<u32>(offset);
6861
6862 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6863 Ok(())
6864 }
6865 }
6866 unsafe impl fidl::encoding::TypeMarker for UserDisconnectReason {
6867 type Owned = Self;
6868
6869 #[inline(always)]
6870 fn inline_align(_context: fidl::encoding::Context) -> usize {
6871 std::mem::align_of::<u32>()
6872 }
6873
6874 #[inline(always)]
6875 fn inline_size(_context: fidl::encoding::Context) -> usize {
6876 std::mem::size_of::<u32>()
6877 }
6878
6879 #[inline(always)]
6880 fn encode_is_copy() -> bool {
6881 true
6882 }
6883
6884 #[inline(always)]
6885 fn decode_is_copy() -> bool {
6886 false
6887 }
6888 }
6889
6890 impl fidl::encoding::ValueTypeMarker for UserDisconnectReason {
6891 type Borrowed<'a> = Self;
6892 #[inline(always)]
6893 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6894 *value
6895 }
6896 }
6897
6898 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6899 for UserDisconnectReason
6900 {
6901 #[inline]
6902 unsafe fn encode(
6903 self,
6904 encoder: &mut fidl::encoding::Encoder<'_, D>,
6905 offset: usize,
6906 _depth: fidl::encoding::Depth,
6907 ) -> fidl::Result<()> {
6908 encoder.debug_check_bounds::<Self>(offset);
6909 encoder.write_num(self.into_primitive(), offset);
6910 Ok(())
6911 }
6912 }
6913
6914 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UserDisconnectReason {
6915 #[inline(always)]
6916 fn new_empty() -> Self {
6917 Self::Unknown
6918 }
6919
6920 #[inline]
6921 unsafe fn decode(
6922 &mut self,
6923 decoder: &mut fidl::encoding::Decoder<'_, D>,
6924 offset: usize,
6925 _depth: fidl::encoding::Depth,
6926 ) -> fidl::Result<()> {
6927 decoder.debug_check_bounds::<Self>(offset);
6928 let prim = decoder.read_num::<u32>(offset);
6929
6930 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6931 Ok(())
6932 }
6933 }
6934
6935 impl fidl::encoding::ValueTypeMarker for ActiveScanRequest {
6936 type Borrowed<'a> = &'a Self;
6937 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6938 value
6939 }
6940 }
6941
6942 unsafe impl fidl::encoding::TypeMarker for ActiveScanRequest {
6943 type Owned = Self;
6944
6945 #[inline(always)]
6946 fn inline_align(_context: fidl::encoding::Context) -> usize {
6947 8
6948 }
6949
6950 #[inline(always)]
6951 fn inline_size(_context: fidl::encoding::Context) -> usize {
6952 32
6953 }
6954 }
6955
6956 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ActiveScanRequest, D>
6957 for &ActiveScanRequest
6958 {
6959 #[inline]
6960 unsafe fn encode(
6961 self,
6962 encoder: &mut fidl::encoding::Encoder<'_, D>,
6963 offset: usize,
6964 _depth: fidl::encoding::Depth,
6965 ) -> fidl::Result<()> {
6966 encoder.debug_check_bounds::<ActiveScanRequest>(offset);
6967 fidl::encoding::Encode::<ActiveScanRequest, D>::encode(
6969 (
6970 <fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssids),
6971 <fidl::encoding::Vector<u8, 500> as fidl::encoding::ValueTypeMarker>::borrow(&self.channels),
6972 ),
6973 encoder, offset, _depth
6974 )
6975 }
6976 }
6977 unsafe impl<
6978 D: fidl::encoding::ResourceDialect,
6979 T0: fidl::encoding::Encode<
6980 fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
6981 D,
6982 >,
6983 T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 500>, D>,
6984 > fidl::encoding::Encode<ActiveScanRequest, D> for (T0, T1)
6985 {
6986 #[inline]
6987 unsafe fn encode(
6988 self,
6989 encoder: &mut fidl::encoding::Encoder<'_, D>,
6990 offset: usize,
6991 depth: fidl::encoding::Depth,
6992 ) -> fidl::Result<()> {
6993 encoder.debug_check_bounds::<ActiveScanRequest>(offset);
6994 self.0.encode(encoder, offset + 0, depth)?;
6998 self.1.encode(encoder, offset + 16, depth)?;
6999 Ok(())
7000 }
7001 }
7002
7003 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ActiveScanRequest {
7004 #[inline(always)]
7005 fn new_empty() -> Self {
7006 Self {
7007 ssids: fidl::new_empty!(
7008 fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
7009 D
7010 ),
7011 channels: fidl::new_empty!(fidl::encoding::Vector<u8, 500>, D),
7012 }
7013 }
7014
7015 #[inline]
7016 unsafe fn decode(
7017 &mut self,
7018 decoder: &mut fidl::encoding::Decoder<'_, D>,
7019 offset: usize,
7020 _depth: fidl::encoding::Depth,
7021 ) -> fidl::Result<()> {
7022 decoder.debug_check_bounds::<Self>(offset);
7023 fidl::decode!(
7025 fidl::encoding::UnboundedVector<fidl::encoding::Vector<u8, 32>>,
7026 D,
7027 &mut self.ssids,
7028 decoder,
7029 offset + 0,
7030 _depth
7031 )?;
7032 fidl::decode!(fidl::encoding::Vector<u8, 500>, D, &mut self.channels, decoder, offset + 16, _depth)?;
7033 Ok(())
7034 }
7035 }
7036
7037 impl fidl::encoding::ValueTypeMarker for Ap {
7038 type Borrowed<'a> = &'a Self;
7039 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7040 value
7041 }
7042 }
7043
7044 unsafe impl fidl::encoding::TypeMarker for Ap {
7045 type Owned = Self;
7046
7047 #[inline(always)]
7048 fn inline_align(_context: fidl::encoding::Context) -> usize {
7049 8
7050 }
7051
7052 #[inline(always)]
7053 fn inline_size(_context: fidl::encoding::Context) -> usize {
7054 24
7055 }
7056 }
7057
7058 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Ap, D> for &Ap {
7059 #[inline]
7060 unsafe fn encode(
7061 self,
7062 encoder: &mut fidl::encoding::Encoder<'_, D>,
7063 offset: usize,
7064 _depth: fidl::encoding::Depth,
7065 ) -> fidl::Result<()> {
7066 encoder.debug_check_bounds::<Ap>(offset);
7067 fidl::encoding::Encode::<Ap, D>::encode(
7069 (
7070 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
7071 &self.ssid,
7072 ),
7073 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
7074 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.num_clients),
7075 ),
7076 encoder,
7077 offset,
7078 _depth,
7079 )
7080 }
7081 }
7082 unsafe impl<
7083 D: fidl::encoding::ResourceDialect,
7084 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
7085 T1: fidl::encoding::Encode<u8, D>,
7086 T2: fidl::encoding::Encode<u16, D>,
7087 > fidl::encoding::Encode<Ap, D> for (T0, T1, T2)
7088 {
7089 #[inline]
7090 unsafe fn encode(
7091 self,
7092 encoder: &mut fidl::encoding::Encoder<'_, D>,
7093 offset: usize,
7094 depth: fidl::encoding::Depth,
7095 ) -> fidl::Result<()> {
7096 encoder.debug_check_bounds::<Ap>(offset);
7097 unsafe {
7100 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
7101 (ptr as *mut u64).write_unaligned(0);
7102 }
7103 self.0.encode(encoder, offset + 0, depth)?;
7105 self.1.encode(encoder, offset + 16, depth)?;
7106 self.2.encode(encoder, offset + 18, depth)?;
7107 Ok(())
7108 }
7109 }
7110
7111 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Ap {
7112 #[inline(always)]
7113 fn new_empty() -> Self {
7114 Self {
7115 ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
7116 channel: fidl::new_empty!(u8, D),
7117 num_clients: fidl::new_empty!(u16, D),
7118 }
7119 }
7120
7121 #[inline]
7122 unsafe fn decode(
7123 &mut self,
7124 decoder: &mut fidl::encoding::Decoder<'_, D>,
7125 offset: usize,
7126 _depth: fidl::encoding::Depth,
7127 ) -> fidl::Result<()> {
7128 decoder.debug_check_bounds::<Self>(offset);
7129 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
7131 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7132 let mask = 0xffffffff0000ff00u64;
7133 let maskedval = padval & mask;
7134 if maskedval != 0 {
7135 return Err(fidl::Error::NonZeroPadding {
7136 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
7137 });
7138 }
7139 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
7140 fidl::decode!(u8, D, &mut self.channel, decoder, offset + 16, _depth)?;
7141 fidl::decode!(u16, D, &mut self.num_clients, decoder, offset + 18, _depth)?;
7142 Ok(())
7143 }
7144 }
7145
7146 impl fidl::encoding::ValueTypeMarker for ApConfig {
7147 type Borrowed<'a> = &'a Self;
7148 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7149 value
7150 }
7151 }
7152
7153 unsafe impl fidl::encoding::TypeMarker for ApConfig {
7154 type Owned = Self;
7155
7156 #[inline(always)]
7157 fn inline_align(_context: fidl::encoding::Context) -> usize {
7158 8
7159 }
7160
7161 #[inline(always)]
7162 fn inline_size(_context: fidl::encoding::Context) -> usize {
7163 48
7164 }
7165 }
7166
7167 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApConfig, D> for &ApConfig {
7168 #[inline]
7169 unsafe fn encode(
7170 self,
7171 encoder: &mut fidl::encoding::Encoder<'_, D>,
7172 offset: usize,
7173 _depth: fidl::encoding::Depth,
7174 ) -> fidl::Result<()> {
7175 encoder.debug_check_bounds::<ApConfig>(offset);
7176 fidl::encoding::Encode::<ApConfig, D>::encode(
7178 (
7179 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
7180 &self.ssid,
7181 ),
7182 <fidl::encoding::Vector<u8, 64> as fidl::encoding::ValueTypeMarker>::borrow(
7183 &self.password,
7184 ),
7185 <RadioConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.radio_cfg),
7186 ),
7187 encoder,
7188 offset,
7189 _depth,
7190 )
7191 }
7192 }
7193 unsafe impl<
7194 D: fidl::encoding::ResourceDialect,
7195 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
7196 T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 64>, D>,
7197 T2: fidl::encoding::Encode<RadioConfig, D>,
7198 > fidl::encoding::Encode<ApConfig, D> for (T0, T1, T2)
7199 {
7200 #[inline]
7201 unsafe fn encode(
7202 self,
7203 encoder: &mut fidl::encoding::Encoder<'_, D>,
7204 offset: usize,
7205 depth: fidl::encoding::Depth,
7206 ) -> fidl::Result<()> {
7207 encoder.debug_check_bounds::<ApConfig>(offset);
7208 self.0.encode(encoder, offset + 0, depth)?;
7212 self.1.encode(encoder, offset + 16, depth)?;
7213 self.2.encode(encoder, offset + 32, depth)?;
7214 Ok(())
7215 }
7216 }
7217
7218 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApConfig {
7219 #[inline(always)]
7220 fn new_empty() -> Self {
7221 Self {
7222 ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
7223 password: fidl::new_empty!(fidl::encoding::Vector<u8, 64>, D),
7224 radio_cfg: fidl::new_empty!(RadioConfig, D),
7225 }
7226 }
7227
7228 #[inline]
7229 unsafe fn decode(
7230 &mut self,
7231 decoder: &mut fidl::encoding::Decoder<'_, D>,
7232 offset: usize,
7233 _depth: fidl::encoding::Depth,
7234 ) -> fidl::Result<()> {
7235 decoder.debug_check_bounds::<Self>(offset);
7236 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
7238 fidl::decode!(fidl::encoding::Vector<u8, 64>, D, &mut self.password, decoder, offset + 16, _depth)?;
7239 fidl::decode!(RadioConfig, D, &mut self.radio_cfg, decoder, offset + 32, _depth)?;
7240 Ok(())
7241 }
7242 }
7243
7244 impl fidl::encoding::ValueTypeMarker for ApSmeStartRequest {
7245 type Borrowed<'a> = &'a Self;
7246 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7247 value
7248 }
7249 }
7250
7251 unsafe impl fidl::encoding::TypeMarker for ApSmeStartRequest {
7252 type Owned = Self;
7253
7254 #[inline(always)]
7255 fn inline_align(_context: fidl::encoding::Context) -> usize {
7256 8
7257 }
7258
7259 #[inline(always)]
7260 fn inline_size(_context: fidl::encoding::Context) -> usize {
7261 48
7262 }
7263 }
7264
7265 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStartRequest, D>
7266 for &ApSmeStartRequest
7267 {
7268 #[inline]
7269 unsafe fn encode(
7270 self,
7271 encoder: &mut fidl::encoding::Encoder<'_, D>,
7272 offset: usize,
7273 _depth: fidl::encoding::Depth,
7274 ) -> fidl::Result<()> {
7275 encoder.debug_check_bounds::<ApSmeStartRequest>(offset);
7276 fidl::encoding::Encode::<ApSmeStartRequest, D>::encode(
7278 (<ApConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.config),),
7279 encoder,
7280 offset,
7281 _depth,
7282 )
7283 }
7284 }
7285 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ApConfig, D>>
7286 fidl::encoding::Encode<ApSmeStartRequest, D> for (T0,)
7287 {
7288 #[inline]
7289 unsafe fn encode(
7290 self,
7291 encoder: &mut fidl::encoding::Encoder<'_, D>,
7292 offset: usize,
7293 depth: fidl::encoding::Depth,
7294 ) -> fidl::Result<()> {
7295 encoder.debug_check_bounds::<ApSmeStartRequest>(offset);
7296 self.0.encode(encoder, offset + 0, depth)?;
7300 Ok(())
7301 }
7302 }
7303
7304 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStartRequest {
7305 #[inline(always)]
7306 fn new_empty() -> Self {
7307 Self { config: fidl::new_empty!(ApConfig, D) }
7308 }
7309
7310 #[inline]
7311 unsafe fn decode(
7312 &mut self,
7313 decoder: &mut fidl::encoding::Decoder<'_, D>,
7314 offset: usize,
7315 _depth: fidl::encoding::Depth,
7316 ) -> fidl::Result<()> {
7317 decoder.debug_check_bounds::<Self>(offset);
7318 fidl::decode!(ApConfig, D, &mut self.config, decoder, offset + 0, _depth)?;
7320 Ok(())
7321 }
7322 }
7323
7324 impl fidl::encoding::ValueTypeMarker for ApSmeStartResponse {
7325 type Borrowed<'a> = &'a Self;
7326 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7327 value
7328 }
7329 }
7330
7331 unsafe impl fidl::encoding::TypeMarker for ApSmeStartResponse {
7332 type Owned = Self;
7333
7334 #[inline(always)]
7335 fn inline_align(_context: fidl::encoding::Context) -> usize {
7336 4
7337 }
7338
7339 #[inline(always)]
7340 fn inline_size(_context: fidl::encoding::Context) -> usize {
7341 4
7342 }
7343 }
7344
7345 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStartResponse, D>
7346 for &ApSmeStartResponse
7347 {
7348 #[inline]
7349 unsafe fn encode(
7350 self,
7351 encoder: &mut fidl::encoding::Encoder<'_, D>,
7352 offset: usize,
7353 _depth: fidl::encoding::Depth,
7354 ) -> fidl::Result<()> {
7355 encoder.debug_check_bounds::<ApSmeStartResponse>(offset);
7356 fidl::encoding::Encode::<ApSmeStartResponse, D>::encode(
7358 (<StartApResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),),
7359 encoder,
7360 offset,
7361 _depth,
7362 )
7363 }
7364 }
7365 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StartApResultCode, D>>
7366 fidl::encoding::Encode<ApSmeStartResponse, D> for (T0,)
7367 {
7368 #[inline]
7369 unsafe fn encode(
7370 self,
7371 encoder: &mut fidl::encoding::Encoder<'_, D>,
7372 offset: usize,
7373 depth: fidl::encoding::Depth,
7374 ) -> fidl::Result<()> {
7375 encoder.debug_check_bounds::<ApSmeStartResponse>(offset);
7376 self.0.encode(encoder, offset + 0, depth)?;
7380 Ok(())
7381 }
7382 }
7383
7384 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStartResponse {
7385 #[inline(always)]
7386 fn new_empty() -> Self {
7387 Self { code: fidl::new_empty!(StartApResultCode, D) }
7388 }
7389
7390 #[inline]
7391 unsafe fn decode(
7392 &mut self,
7393 decoder: &mut fidl::encoding::Decoder<'_, D>,
7394 offset: usize,
7395 _depth: fidl::encoding::Depth,
7396 ) -> fidl::Result<()> {
7397 decoder.debug_check_bounds::<Self>(offset);
7398 fidl::decode!(StartApResultCode, D, &mut self.code, decoder, offset + 0, _depth)?;
7400 Ok(())
7401 }
7402 }
7403
7404 impl fidl::encoding::ValueTypeMarker for ApSmeStatusResponse {
7405 type Borrowed<'a> = &'a Self;
7406 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7407 value
7408 }
7409 }
7410
7411 unsafe impl fidl::encoding::TypeMarker for ApSmeStatusResponse {
7412 type Owned = Self;
7413
7414 #[inline(always)]
7415 fn inline_align(_context: fidl::encoding::Context) -> usize {
7416 8
7417 }
7418
7419 #[inline(always)]
7420 fn inline_size(_context: fidl::encoding::Context) -> usize {
7421 8
7422 }
7423 }
7424
7425 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStatusResponse, D>
7426 for &ApSmeStatusResponse
7427 {
7428 #[inline]
7429 unsafe fn encode(
7430 self,
7431 encoder: &mut fidl::encoding::Encoder<'_, D>,
7432 offset: usize,
7433 _depth: fidl::encoding::Depth,
7434 ) -> fidl::Result<()> {
7435 encoder.debug_check_bounds::<ApSmeStatusResponse>(offset);
7436 fidl::encoding::Encode::<ApSmeStatusResponse, D>::encode(
7438 (<ApStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
7439 encoder,
7440 offset,
7441 _depth,
7442 )
7443 }
7444 }
7445 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ApStatusResponse, D>>
7446 fidl::encoding::Encode<ApSmeStatusResponse, D> for (T0,)
7447 {
7448 #[inline]
7449 unsafe fn encode(
7450 self,
7451 encoder: &mut fidl::encoding::Encoder<'_, D>,
7452 offset: usize,
7453 depth: fidl::encoding::Depth,
7454 ) -> fidl::Result<()> {
7455 encoder.debug_check_bounds::<ApSmeStatusResponse>(offset);
7456 self.0.encode(encoder, offset + 0, depth)?;
7460 Ok(())
7461 }
7462 }
7463
7464 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStatusResponse {
7465 #[inline(always)]
7466 fn new_empty() -> Self {
7467 Self { resp: fidl::new_empty!(ApStatusResponse, D) }
7468 }
7469
7470 #[inline]
7471 unsafe fn decode(
7472 &mut self,
7473 decoder: &mut fidl::encoding::Decoder<'_, D>,
7474 offset: usize,
7475 _depth: fidl::encoding::Depth,
7476 ) -> fidl::Result<()> {
7477 decoder.debug_check_bounds::<Self>(offset);
7478 fidl::decode!(ApStatusResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
7480 Ok(())
7481 }
7482 }
7483
7484 impl fidl::encoding::ValueTypeMarker for ApSmeStopResponse {
7485 type Borrowed<'a> = &'a Self;
7486 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7487 value
7488 }
7489 }
7490
7491 unsafe impl fidl::encoding::TypeMarker for ApSmeStopResponse {
7492 type Owned = Self;
7493
7494 #[inline(always)]
7495 fn inline_align(_context: fidl::encoding::Context) -> usize {
7496 4
7497 }
7498
7499 #[inline(always)]
7500 fn inline_size(_context: fidl::encoding::Context) -> usize {
7501 4
7502 }
7503 }
7504
7505 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApSmeStopResponse, D>
7506 for &ApSmeStopResponse
7507 {
7508 #[inline]
7509 unsafe fn encode(
7510 self,
7511 encoder: &mut fidl::encoding::Encoder<'_, D>,
7512 offset: usize,
7513 _depth: fidl::encoding::Depth,
7514 ) -> fidl::Result<()> {
7515 encoder.debug_check_bounds::<ApSmeStopResponse>(offset);
7516 fidl::encoding::Encode::<ApSmeStopResponse, D>::encode(
7518 (<StopApResultCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),),
7519 encoder,
7520 offset,
7521 _depth,
7522 )
7523 }
7524 }
7525 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StopApResultCode, D>>
7526 fidl::encoding::Encode<ApSmeStopResponse, D> for (T0,)
7527 {
7528 #[inline]
7529 unsafe fn encode(
7530 self,
7531 encoder: &mut fidl::encoding::Encoder<'_, D>,
7532 offset: usize,
7533 depth: fidl::encoding::Depth,
7534 ) -> fidl::Result<()> {
7535 encoder.debug_check_bounds::<ApSmeStopResponse>(offset);
7536 self.0.encode(encoder, offset + 0, depth)?;
7540 Ok(())
7541 }
7542 }
7543
7544 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApSmeStopResponse {
7545 #[inline(always)]
7546 fn new_empty() -> Self {
7547 Self { code: fidl::new_empty!(StopApResultCode, D) }
7548 }
7549
7550 #[inline]
7551 unsafe fn decode(
7552 &mut self,
7553 decoder: &mut fidl::encoding::Decoder<'_, D>,
7554 offset: usize,
7555 _depth: fidl::encoding::Depth,
7556 ) -> fidl::Result<()> {
7557 decoder.debug_check_bounds::<Self>(offset);
7558 fidl::decode!(StopApResultCode, D, &mut self.code, decoder, offset + 0, _depth)?;
7560 Ok(())
7561 }
7562 }
7563
7564 impl fidl::encoding::ValueTypeMarker for ApStatusResponse {
7565 type Borrowed<'a> = &'a Self;
7566 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7567 value
7568 }
7569 }
7570
7571 unsafe impl fidl::encoding::TypeMarker for ApStatusResponse {
7572 type Owned = Self;
7573
7574 #[inline(always)]
7575 fn inline_align(_context: fidl::encoding::Context) -> usize {
7576 8
7577 }
7578
7579 #[inline(always)]
7580 fn inline_size(_context: fidl::encoding::Context) -> usize {
7581 8
7582 }
7583 }
7584
7585 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ApStatusResponse, D>
7586 for &ApStatusResponse
7587 {
7588 #[inline]
7589 unsafe fn encode(
7590 self,
7591 encoder: &mut fidl::encoding::Encoder<'_, D>,
7592 offset: usize,
7593 _depth: fidl::encoding::Depth,
7594 ) -> fidl::Result<()> {
7595 encoder.debug_check_bounds::<ApStatusResponse>(offset);
7596 fidl::encoding::Encode::<ApStatusResponse, D>::encode(
7598 (<fidl::encoding::Boxed<Ap> as fidl::encoding::ValueTypeMarker>::borrow(
7599 &self.running_ap,
7600 ),),
7601 encoder,
7602 offset,
7603 _depth,
7604 )
7605 }
7606 }
7607 unsafe impl<
7608 D: fidl::encoding::ResourceDialect,
7609 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Ap>, D>,
7610 > fidl::encoding::Encode<ApStatusResponse, D> for (T0,)
7611 {
7612 #[inline]
7613 unsafe fn encode(
7614 self,
7615 encoder: &mut fidl::encoding::Encoder<'_, D>,
7616 offset: usize,
7617 depth: fidl::encoding::Depth,
7618 ) -> fidl::Result<()> {
7619 encoder.debug_check_bounds::<ApStatusResponse>(offset);
7620 self.0.encode(encoder, offset + 0, depth)?;
7624 Ok(())
7625 }
7626 }
7627
7628 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ApStatusResponse {
7629 #[inline(always)]
7630 fn new_empty() -> Self {
7631 Self { running_ap: fidl::new_empty!(fidl::encoding::Boxed<Ap>, D) }
7632 }
7633
7634 #[inline]
7635 unsafe fn decode(
7636 &mut self,
7637 decoder: &mut fidl::encoding::Decoder<'_, D>,
7638 offset: usize,
7639 _depth: fidl::encoding::Depth,
7640 ) -> fidl::Result<()> {
7641 decoder.debug_check_bounds::<Self>(offset);
7642 fidl::decode!(
7644 fidl::encoding::Boxed<Ap>,
7645 D,
7646 &mut self.running_ap,
7647 decoder,
7648 offset + 0,
7649 _depth
7650 )?;
7651 Ok(())
7652 }
7653 }
7654
7655 impl fidl::encoding::ResourceTypeMarker for ClientSmeConnectRequest {
7656 type Borrowed<'a> = &'a mut Self;
7657 fn take_or_borrow<'a>(
7658 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7659 ) -> Self::Borrowed<'a> {
7660 value
7661 }
7662 }
7663
7664 unsafe impl fidl::encoding::TypeMarker for ClientSmeConnectRequest {
7665 type Owned = Self;
7666
7667 #[inline(always)]
7668 fn inline_align(_context: fidl::encoding::Context) -> usize {
7669 8
7670 }
7671
7672 #[inline(always)]
7673 fn inline_size(_context: fidl::encoding::Context) -> usize {
7674 112
7675 }
7676 }
7677
7678 unsafe impl
7679 fidl::encoding::Encode<
7680 ClientSmeConnectRequest,
7681 fidl::encoding::DefaultFuchsiaResourceDialect,
7682 > for &mut ClientSmeConnectRequest
7683 {
7684 #[inline]
7685 unsafe fn encode(
7686 self,
7687 encoder: &mut fidl::encoding::Encoder<
7688 '_,
7689 fidl::encoding::DefaultFuchsiaResourceDialect,
7690 >,
7691 offset: usize,
7692 _depth: fidl::encoding::Depth,
7693 ) -> fidl::Result<()> {
7694 encoder.debug_check_bounds::<ClientSmeConnectRequest>(offset);
7695 fidl::encoding::Encode::<
7697 ClientSmeConnectRequest,
7698 fidl::encoding::DefaultFuchsiaResourceDialect,
7699 >::encode(
7700 (
7701 <ConnectRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),
7702 <fidl::encoding::Optional<
7703 fidl::encoding::Endpoint<
7704 fidl::endpoints::ServerEnd<ConnectTransactionMarker>,
7705 >,
7706 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7707 &mut self.txn
7708 ),
7709 ),
7710 encoder,
7711 offset,
7712 _depth,
7713 )
7714 }
7715 }
7716 unsafe impl<
7717 T0: fidl::encoding::Encode<ConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
7718 T1: fidl::encoding::Encode<
7719 fidl::encoding::Optional<
7720 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
7721 >,
7722 fidl::encoding::DefaultFuchsiaResourceDialect,
7723 >,
7724 >
7725 fidl::encoding::Encode<
7726 ClientSmeConnectRequest,
7727 fidl::encoding::DefaultFuchsiaResourceDialect,
7728 > for (T0, T1)
7729 {
7730 #[inline]
7731 unsafe fn encode(
7732 self,
7733 encoder: &mut fidl::encoding::Encoder<
7734 '_,
7735 fidl::encoding::DefaultFuchsiaResourceDialect,
7736 >,
7737 offset: usize,
7738 depth: fidl::encoding::Depth,
7739 ) -> fidl::Result<()> {
7740 encoder.debug_check_bounds::<ClientSmeConnectRequest>(offset);
7741 unsafe {
7744 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(104);
7745 (ptr as *mut u64).write_unaligned(0);
7746 }
7747 self.0.encode(encoder, offset + 0, depth)?;
7749 self.1.encode(encoder, offset + 104, depth)?;
7750 Ok(())
7751 }
7752 }
7753
7754 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7755 for ClientSmeConnectRequest
7756 {
7757 #[inline(always)]
7758 fn new_empty() -> Self {
7759 Self {
7760 req: fidl::new_empty!(
7761 ConnectRequest,
7762 fidl::encoding::DefaultFuchsiaResourceDialect
7763 ),
7764 txn: fidl::new_empty!(
7765 fidl::encoding::Optional<
7766 fidl::encoding::Endpoint<
7767 fidl::endpoints::ServerEnd<ConnectTransactionMarker>,
7768 >,
7769 >,
7770 fidl::encoding::DefaultFuchsiaResourceDialect
7771 ),
7772 }
7773 }
7774
7775 #[inline]
7776 unsafe fn decode(
7777 &mut self,
7778 decoder: &mut fidl::encoding::Decoder<
7779 '_,
7780 fidl::encoding::DefaultFuchsiaResourceDialect,
7781 >,
7782 offset: usize,
7783 _depth: fidl::encoding::Depth,
7784 ) -> fidl::Result<()> {
7785 decoder.debug_check_bounds::<Self>(offset);
7786 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(104) };
7788 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7789 let mask = 0xffffffff00000000u64;
7790 let maskedval = padval & mask;
7791 if maskedval != 0 {
7792 return Err(fidl::Error::NonZeroPadding {
7793 padding_start: offset + 104 + ((mask as u64).trailing_zeros() / 8) as usize,
7794 });
7795 }
7796 fidl::decode!(
7797 ConnectRequest,
7798 fidl::encoding::DefaultFuchsiaResourceDialect,
7799 &mut self.req,
7800 decoder,
7801 offset + 0,
7802 _depth
7803 )?;
7804 fidl::decode!(
7805 fidl::encoding::Optional<
7806 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
7807 >,
7808 fidl::encoding::DefaultFuchsiaResourceDialect,
7809 &mut self.txn,
7810 decoder,
7811 offset + 104,
7812 _depth
7813 )?;
7814 Ok(())
7815 }
7816 }
7817
7818 impl fidl::encoding::ValueTypeMarker for ClientSmeDisconnectRequest {
7819 type Borrowed<'a> = &'a Self;
7820 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7821 value
7822 }
7823 }
7824
7825 unsafe impl fidl::encoding::TypeMarker for ClientSmeDisconnectRequest {
7826 type Owned = Self;
7827
7828 #[inline(always)]
7829 fn inline_align(_context: fidl::encoding::Context) -> usize {
7830 4
7831 }
7832
7833 #[inline(always)]
7834 fn inline_size(_context: fidl::encoding::Context) -> usize {
7835 4
7836 }
7837 }
7838
7839 unsafe impl<D: fidl::encoding::ResourceDialect>
7840 fidl::encoding::Encode<ClientSmeDisconnectRequest, D> for &ClientSmeDisconnectRequest
7841 {
7842 #[inline]
7843 unsafe fn encode(
7844 self,
7845 encoder: &mut fidl::encoding::Encoder<'_, D>,
7846 offset: usize,
7847 _depth: fidl::encoding::Depth,
7848 ) -> fidl::Result<()> {
7849 encoder.debug_check_bounds::<ClientSmeDisconnectRequest>(offset);
7850 fidl::encoding::Encode::<ClientSmeDisconnectRequest, D>::encode(
7852 (<UserDisconnectReason as fidl::encoding::ValueTypeMarker>::borrow(&self.reason),),
7853 encoder,
7854 offset,
7855 _depth,
7856 )
7857 }
7858 }
7859 unsafe impl<
7860 D: fidl::encoding::ResourceDialect,
7861 T0: fidl::encoding::Encode<UserDisconnectReason, D>,
7862 > fidl::encoding::Encode<ClientSmeDisconnectRequest, D> for (T0,)
7863 {
7864 #[inline]
7865 unsafe fn encode(
7866 self,
7867 encoder: &mut fidl::encoding::Encoder<'_, D>,
7868 offset: usize,
7869 depth: fidl::encoding::Depth,
7870 ) -> fidl::Result<()> {
7871 encoder.debug_check_bounds::<ClientSmeDisconnectRequest>(offset);
7872 self.0.encode(encoder, offset + 0, depth)?;
7876 Ok(())
7877 }
7878 }
7879
7880 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7881 for ClientSmeDisconnectRequest
7882 {
7883 #[inline(always)]
7884 fn new_empty() -> Self {
7885 Self { reason: fidl::new_empty!(UserDisconnectReason, D) }
7886 }
7887
7888 #[inline]
7889 unsafe fn decode(
7890 &mut self,
7891 decoder: &mut fidl::encoding::Decoder<'_, D>,
7892 offset: usize,
7893 _depth: fidl::encoding::Depth,
7894 ) -> fidl::Result<()> {
7895 decoder.debug_check_bounds::<Self>(offset);
7896 fidl::decode!(UserDisconnectReason, D, &mut self.reason, decoder, offset + 0, _depth)?;
7898 Ok(())
7899 }
7900 }
7901
7902 impl fidl::encoding::ValueTypeMarker for ClientSmeRoamRequest {
7903 type Borrowed<'a> = &'a Self;
7904 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7905 value
7906 }
7907 }
7908
7909 unsafe impl fidl::encoding::TypeMarker for ClientSmeRoamRequest {
7910 type Owned = Self;
7911
7912 #[inline(always)]
7913 fn inline_align(_context: fidl::encoding::Context) -> usize {
7914 8
7915 }
7916
7917 #[inline(always)]
7918 fn inline_size(_context: fidl::encoding::Context) -> usize {
7919 48
7920 }
7921 }
7922
7923 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ClientSmeRoamRequest, D>
7924 for &ClientSmeRoamRequest
7925 {
7926 #[inline]
7927 unsafe fn encode(
7928 self,
7929 encoder: &mut fidl::encoding::Encoder<'_, D>,
7930 offset: usize,
7931 _depth: fidl::encoding::Depth,
7932 ) -> fidl::Result<()> {
7933 encoder.debug_check_bounds::<ClientSmeRoamRequest>(offset);
7934 fidl::encoding::Encode::<ClientSmeRoamRequest, D>::encode(
7936 (<RoamRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
7937 encoder,
7938 offset,
7939 _depth,
7940 )
7941 }
7942 }
7943 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RoamRequest, D>>
7944 fidl::encoding::Encode<ClientSmeRoamRequest, D> for (T0,)
7945 {
7946 #[inline]
7947 unsafe fn encode(
7948 self,
7949 encoder: &mut fidl::encoding::Encoder<'_, D>,
7950 offset: usize,
7951 depth: fidl::encoding::Depth,
7952 ) -> fidl::Result<()> {
7953 encoder.debug_check_bounds::<ClientSmeRoamRequest>(offset);
7954 self.0.encode(encoder, offset + 0, depth)?;
7958 Ok(())
7959 }
7960 }
7961
7962 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientSmeRoamRequest {
7963 #[inline(always)]
7964 fn new_empty() -> Self {
7965 Self { req: fidl::new_empty!(RoamRequest, D) }
7966 }
7967
7968 #[inline]
7969 unsafe fn decode(
7970 &mut self,
7971 decoder: &mut fidl::encoding::Decoder<'_, D>,
7972 offset: usize,
7973 _depth: fidl::encoding::Depth,
7974 ) -> fidl::Result<()> {
7975 decoder.debug_check_bounds::<Self>(offset);
7976 fidl::decode!(RoamRequest, D, &mut self.req, decoder, offset + 0, _depth)?;
7978 Ok(())
7979 }
7980 }
7981
7982 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanForControllerRequest {
7983 type Borrowed<'a> = &'a mut Self;
7984 fn take_or_borrow<'a>(
7985 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7986 ) -> Self::Borrowed<'a> {
7987 value
7988 }
7989 }
7990
7991 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanForControllerRequest {
7992 type Owned = Self;
7993
7994 #[inline(always)]
7995 fn inline_align(_context: fidl::encoding::Context) -> usize {
7996 8
7997 }
7998
7999 #[inline(always)]
8000 fn inline_size(_context: fidl::encoding::Context) -> usize {
8001 16
8002 }
8003 }
8004
8005 unsafe impl
8006 fidl::encoding::Encode<
8007 ClientSmeScanForControllerRequest,
8008 fidl::encoding::DefaultFuchsiaResourceDialect,
8009 > for &mut ClientSmeScanForControllerRequest
8010 {
8011 #[inline]
8012 unsafe fn encode(
8013 self,
8014 encoder: &mut fidl::encoding::Encoder<
8015 '_,
8016 fidl::encoding::DefaultFuchsiaResourceDialect,
8017 >,
8018 offset: usize,
8019 _depth: fidl::encoding::Depth,
8020 ) -> fidl::Result<()> {
8021 encoder.debug_check_bounds::<ClientSmeScanForControllerRequest>(offset);
8022 fidl::encoding::Encode::<
8024 ClientSmeScanForControllerRequest,
8025 fidl::encoding::DefaultFuchsiaResourceDialect,
8026 >::encode(
8027 (<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
8028 encoder,
8029 offset,
8030 _depth,
8031 )
8032 }
8033 }
8034 unsafe impl<
8035 T0: fidl::encoding::Encode<ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
8036 >
8037 fidl::encoding::Encode<
8038 ClientSmeScanForControllerRequest,
8039 fidl::encoding::DefaultFuchsiaResourceDialect,
8040 > for (T0,)
8041 {
8042 #[inline]
8043 unsafe fn encode(
8044 self,
8045 encoder: &mut fidl::encoding::Encoder<
8046 '_,
8047 fidl::encoding::DefaultFuchsiaResourceDialect,
8048 >,
8049 offset: usize,
8050 depth: fidl::encoding::Depth,
8051 ) -> fidl::Result<()> {
8052 encoder.debug_check_bounds::<ClientSmeScanForControllerRequest>(offset);
8053 self.0.encode(encoder, offset + 0, depth)?;
8057 Ok(())
8058 }
8059 }
8060
8061 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8062 for ClientSmeScanForControllerRequest
8063 {
8064 #[inline(always)]
8065 fn new_empty() -> Self {
8066 Self {
8067 req: fidl::new_empty!(ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect),
8068 }
8069 }
8070
8071 #[inline]
8072 unsafe fn decode(
8073 &mut self,
8074 decoder: &mut fidl::encoding::Decoder<
8075 '_,
8076 fidl::encoding::DefaultFuchsiaResourceDialect,
8077 >,
8078 offset: usize,
8079 _depth: fidl::encoding::Depth,
8080 ) -> fidl::Result<()> {
8081 decoder.debug_check_bounds::<Self>(offset);
8082 fidl::decode!(
8084 ScanRequest,
8085 fidl::encoding::DefaultFuchsiaResourceDialect,
8086 &mut self.req,
8087 decoder,
8088 offset + 0,
8089 _depth
8090 )?;
8091 Ok(())
8092 }
8093 }
8094
8095 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanRequest {
8096 type Borrowed<'a> = &'a mut Self;
8097 fn take_or_borrow<'a>(
8098 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8099 ) -> Self::Borrowed<'a> {
8100 value
8101 }
8102 }
8103
8104 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanRequest {
8105 type Owned = Self;
8106
8107 #[inline(always)]
8108 fn inline_align(_context: fidl::encoding::Context) -> usize {
8109 8
8110 }
8111
8112 #[inline(always)]
8113 fn inline_size(_context: fidl::encoding::Context) -> usize {
8114 16
8115 }
8116 }
8117
8118 unsafe impl
8119 fidl::encoding::Encode<ClientSmeScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
8120 for &mut ClientSmeScanRequest
8121 {
8122 #[inline]
8123 unsafe fn encode(
8124 self,
8125 encoder: &mut fidl::encoding::Encoder<
8126 '_,
8127 fidl::encoding::DefaultFuchsiaResourceDialect,
8128 >,
8129 offset: usize,
8130 _depth: fidl::encoding::Depth,
8131 ) -> fidl::Result<()> {
8132 encoder.debug_check_bounds::<ClientSmeScanRequest>(offset);
8133 fidl::encoding::Encode::<
8135 ClientSmeScanRequest,
8136 fidl::encoding::DefaultFuchsiaResourceDialect,
8137 >::encode(
8138 (<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
8139 encoder,
8140 offset,
8141 _depth,
8142 )
8143 }
8144 }
8145 unsafe impl<
8146 T0: fidl::encoding::Encode<ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
8147 >
8148 fidl::encoding::Encode<ClientSmeScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
8149 for (T0,)
8150 {
8151 #[inline]
8152 unsafe fn encode(
8153 self,
8154 encoder: &mut fidl::encoding::Encoder<
8155 '_,
8156 fidl::encoding::DefaultFuchsiaResourceDialect,
8157 >,
8158 offset: usize,
8159 depth: fidl::encoding::Depth,
8160 ) -> fidl::Result<()> {
8161 encoder.debug_check_bounds::<ClientSmeScanRequest>(offset);
8162 self.0.encode(encoder, offset + 0, depth)?;
8166 Ok(())
8167 }
8168 }
8169
8170 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8171 for ClientSmeScanRequest
8172 {
8173 #[inline(always)]
8174 fn new_empty() -> Self {
8175 Self {
8176 req: fidl::new_empty!(ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect),
8177 }
8178 }
8179
8180 #[inline]
8181 unsafe fn decode(
8182 &mut self,
8183 decoder: &mut fidl::encoding::Decoder<
8184 '_,
8185 fidl::encoding::DefaultFuchsiaResourceDialect,
8186 >,
8187 offset: usize,
8188 _depth: fidl::encoding::Depth,
8189 ) -> fidl::Result<()> {
8190 decoder.debug_check_bounds::<Self>(offset);
8191 fidl::decode!(
8193 ScanRequest,
8194 fidl::encoding::DefaultFuchsiaResourceDialect,
8195 &mut self.req,
8196 decoder,
8197 offset + 0,
8198 _depth
8199 )?;
8200 Ok(())
8201 }
8202 }
8203
8204 impl fidl::encoding::ValueTypeMarker for ClientSmeStatusResponse {
8205 type Borrowed<'a> = &'a Self;
8206 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8207 value
8208 }
8209 }
8210
8211 unsafe impl fidl::encoding::TypeMarker for ClientSmeStatusResponse {
8212 type Owned = Self;
8213
8214 #[inline(always)]
8215 fn inline_align(_context: fidl::encoding::Context) -> usize {
8216 8
8217 }
8218
8219 #[inline(always)]
8220 fn inline_size(_context: fidl::encoding::Context) -> usize {
8221 16
8222 }
8223 }
8224
8225 unsafe impl<D: fidl::encoding::ResourceDialect>
8226 fidl::encoding::Encode<ClientSmeStatusResponse, D> for &ClientSmeStatusResponse
8227 {
8228 #[inline]
8229 unsafe fn encode(
8230 self,
8231 encoder: &mut fidl::encoding::Encoder<'_, D>,
8232 offset: usize,
8233 _depth: fidl::encoding::Depth,
8234 ) -> fidl::Result<()> {
8235 encoder.debug_check_bounds::<ClientSmeStatusResponse>(offset);
8236 fidl::encoding::Encode::<ClientSmeStatusResponse, D>::encode(
8238 (<ClientStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
8239 encoder,
8240 offset,
8241 _depth,
8242 )
8243 }
8244 }
8245 unsafe impl<
8246 D: fidl::encoding::ResourceDialect,
8247 T0: fidl::encoding::Encode<ClientStatusResponse, D>,
8248 > fidl::encoding::Encode<ClientSmeStatusResponse, D> for (T0,)
8249 {
8250 #[inline]
8251 unsafe fn encode(
8252 self,
8253 encoder: &mut fidl::encoding::Encoder<'_, D>,
8254 offset: usize,
8255 depth: fidl::encoding::Depth,
8256 ) -> fidl::Result<()> {
8257 encoder.debug_check_bounds::<ClientSmeStatusResponse>(offset);
8258 self.0.encode(encoder, offset + 0, depth)?;
8262 Ok(())
8263 }
8264 }
8265
8266 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8267 for ClientSmeStatusResponse
8268 {
8269 #[inline(always)]
8270 fn new_empty() -> Self {
8271 Self { resp: fidl::new_empty!(ClientStatusResponse, D) }
8272 }
8273
8274 #[inline]
8275 unsafe fn decode(
8276 &mut self,
8277 decoder: &mut fidl::encoding::Decoder<'_, D>,
8278 offset: usize,
8279 _depth: fidl::encoding::Depth,
8280 ) -> fidl::Result<()> {
8281 decoder.debug_check_bounds::<Self>(offset);
8282 fidl::decode!(ClientStatusResponse, D, &mut self.resp, decoder, offset + 0, _depth)?;
8284 Ok(())
8285 }
8286 }
8287
8288 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanForControllerResponse {
8289 type Borrowed<'a> = &'a mut Self;
8290 fn take_or_borrow<'a>(
8291 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8292 ) -> Self::Borrowed<'a> {
8293 value
8294 }
8295 }
8296
8297 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanForControllerResponse {
8298 type Owned = Self;
8299
8300 #[inline(always)]
8301 fn inline_align(_context: fidl::encoding::Context) -> usize {
8302 8
8303 }
8304
8305 #[inline(always)]
8306 fn inline_size(_context: fidl::encoding::Context) -> usize {
8307 16
8308 }
8309 }
8310
8311 unsafe impl
8312 fidl::encoding::Encode<
8313 ClientSmeScanForControllerResponse,
8314 fidl::encoding::DefaultFuchsiaResourceDialect,
8315 > for &mut ClientSmeScanForControllerResponse
8316 {
8317 #[inline]
8318 unsafe fn encode(
8319 self,
8320 encoder: &mut fidl::encoding::Encoder<
8321 '_,
8322 fidl::encoding::DefaultFuchsiaResourceDialect,
8323 >,
8324 offset: usize,
8325 _depth: fidl::encoding::Depth,
8326 ) -> fidl::Result<()> {
8327 encoder.debug_check_bounds::<ClientSmeScanForControllerResponse>(offset);
8328 fidl::encoding::Encode::<ClientSmeScanForControllerResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8330 (
8331 <fidl::encoding::UnboundedVector<ScanResult> as fidl::encoding::ValueTypeMarker>::borrow(&self.scan_results),
8332 ),
8333 encoder, offset, _depth
8334 )
8335 }
8336 }
8337 unsafe impl<
8338 T0: fidl::encoding::Encode<
8339 fidl::encoding::UnboundedVector<ScanResult>,
8340 fidl::encoding::DefaultFuchsiaResourceDialect,
8341 >,
8342 >
8343 fidl::encoding::Encode<
8344 ClientSmeScanForControllerResponse,
8345 fidl::encoding::DefaultFuchsiaResourceDialect,
8346 > for (T0,)
8347 {
8348 #[inline]
8349 unsafe fn encode(
8350 self,
8351 encoder: &mut fidl::encoding::Encoder<
8352 '_,
8353 fidl::encoding::DefaultFuchsiaResourceDialect,
8354 >,
8355 offset: usize,
8356 depth: fidl::encoding::Depth,
8357 ) -> fidl::Result<()> {
8358 encoder.debug_check_bounds::<ClientSmeScanForControllerResponse>(offset);
8359 self.0.encode(encoder, offset + 0, depth)?;
8363 Ok(())
8364 }
8365 }
8366
8367 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8368 for ClientSmeScanForControllerResponse
8369 {
8370 #[inline(always)]
8371 fn new_empty() -> Self {
8372 Self {
8373 scan_results: fidl::new_empty!(
8374 fidl::encoding::UnboundedVector<ScanResult>,
8375 fidl::encoding::DefaultFuchsiaResourceDialect
8376 ),
8377 }
8378 }
8379
8380 #[inline]
8381 unsafe fn decode(
8382 &mut self,
8383 decoder: &mut fidl::encoding::Decoder<
8384 '_,
8385 fidl::encoding::DefaultFuchsiaResourceDialect,
8386 >,
8387 offset: usize,
8388 _depth: fidl::encoding::Depth,
8389 ) -> fidl::Result<()> {
8390 decoder.debug_check_bounds::<Self>(offset);
8391 fidl::decode!(
8393 fidl::encoding::UnboundedVector<ScanResult>,
8394 fidl::encoding::DefaultFuchsiaResourceDialect,
8395 &mut self.scan_results,
8396 decoder,
8397 offset + 0,
8398 _depth
8399 )?;
8400 Ok(())
8401 }
8402 }
8403
8404 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanResponse {
8405 type Borrowed<'a> = &'a mut Self;
8406 fn take_or_borrow<'a>(
8407 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8408 ) -> Self::Borrowed<'a> {
8409 value
8410 }
8411 }
8412
8413 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanResponse {
8414 type Owned = Self;
8415
8416 #[inline(always)]
8417 fn inline_align(_context: fidl::encoding::Context) -> usize {
8418 4
8419 }
8420
8421 #[inline(always)]
8422 fn inline_size(_context: fidl::encoding::Context) -> usize {
8423 4
8424 }
8425 }
8426
8427 unsafe impl
8428 fidl::encoding::Encode<ClientSmeScanResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
8429 for &mut ClientSmeScanResponse
8430 {
8431 #[inline]
8432 unsafe fn encode(
8433 self,
8434 encoder: &mut fidl::encoding::Encoder<
8435 '_,
8436 fidl::encoding::DefaultFuchsiaResourceDialect,
8437 >,
8438 offset: usize,
8439 _depth: fidl::encoding::Depth,
8440 ) -> fidl::Result<()> {
8441 encoder.debug_check_bounds::<ClientSmeScanResponse>(offset);
8442 fidl::encoding::Encode::<
8444 ClientSmeScanResponse,
8445 fidl::encoding::DefaultFuchsiaResourceDialect,
8446 >::encode(
8447 (<fidl::encoding::HandleType<
8448 fidl::Vmo,
8449 { fidl::ObjectType::VMO.into_raw() },
8450 2147483648,
8451 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8452 &mut self.scan_results
8453 ),),
8454 encoder,
8455 offset,
8456 _depth,
8457 )
8458 }
8459 }
8460 unsafe impl<
8461 T0: fidl::encoding::Encode<
8462 fidl::encoding::HandleType<
8463 fidl::Vmo,
8464 { fidl::ObjectType::VMO.into_raw() },
8465 2147483648,
8466 >,
8467 fidl::encoding::DefaultFuchsiaResourceDialect,
8468 >,
8469 >
8470 fidl::encoding::Encode<ClientSmeScanResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
8471 for (T0,)
8472 {
8473 #[inline]
8474 unsafe fn encode(
8475 self,
8476 encoder: &mut fidl::encoding::Encoder<
8477 '_,
8478 fidl::encoding::DefaultFuchsiaResourceDialect,
8479 >,
8480 offset: usize,
8481 depth: fidl::encoding::Depth,
8482 ) -> fidl::Result<()> {
8483 encoder.debug_check_bounds::<ClientSmeScanResponse>(offset);
8484 self.0.encode(encoder, offset + 0, depth)?;
8488 Ok(())
8489 }
8490 }
8491
8492 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8493 for ClientSmeScanResponse
8494 {
8495 #[inline(always)]
8496 fn new_empty() -> Self {
8497 Self {
8498 scan_results: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
8499 }
8500 }
8501
8502 #[inline]
8503 unsafe fn decode(
8504 &mut self,
8505 decoder: &mut fidl::encoding::Decoder<
8506 '_,
8507 fidl::encoding::DefaultFuchsiaResourceDialect,
8508 >,
8509 offset: usize,
8510 _depth: fidl::encoding::Depth,
8511 ) -> fidl::Result<()> {
8512 decoder.debug_check_bounds::<Self>(offset);
8513 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.scan_results, decoder, offset + 0, _depth)?;
8515 Ok(())
8516 }
8517 }
8518
8519 impl fidl::encoding::ValueTypeMarker for ClientSmeWmmStatusResponse {
8520 type Borrowed<'a> = &'a Self;
8521 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8522 value
8523 }
8524 }
8525
8526 unsafe impl fidl::encoding::TypeMarker for ClientSmeWmmStatusResponse {
8527 type Owned = Self;
8528
8529 #[inline(always)]
8530 fn inline_align(_context: fidl::encoding::Context) -> usize {
8531 2
8532 }
8533
8534 #[inline(always)]
8535 fn inline_size(_context: fidl::encoding::Context) -> usize {
8536 34
8537 }
8538 }
8539
8540 unsafe impl<D: fidl::encoding::ResourceDialect>
8541 fidl::encoding::Encode<ClientSmeWmmStatusResponse, D> for &ClientSmeWmmStatusResponse
8542 {
8543 #[inline]
8544 unsafe fn encode(
8545 self,
8546 encoder: &mut fidl::encoding::Encoder<'_, D>,
8547 offset: usize,
8548 _depth: fidl::encoding::Depth,
8549 ) -> fidl::Result<()> {
8550 encoder.debug_check_bounds::<ClientSmeWmmStatusResponse>(offset);
8551 fidl::encoding::Encode::<ClientSmeWmmStatusResponse, D>::encode(
8553 (
8554 <fidl_fuchsia_wlan_internal::WmmStatusResponse as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
8555 ),
8556 encoder, offset, _depth
8557 )
8558 }
8559 }
8560 unsafe impl<
8561 D: fidl::encoding::ResourceDialect,
8562 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal::WmmStatusResponse, D>,
8563 > fidl::encoding::Encode<ClientSmeWmmStatusResponse, D> for (T0,)
8564 {
8565 #[inline]
8566 unsafe fn encode(
8567 self,
8568 encoder: &mut fidl::encoding::Encoder<'_, D>,
8569 offset: usize,
8570 depth: fidl::encoding::Depth,
8571 ) -> fidl::Result<()> {
8572 encoder.debug_check_bounds::<ClientSmeWmmStatusResponse>(offset);
8573 self.0.encode(encoder, offset + 0, depth)?;
8577 Ok(())
8578 }
8579 }
8580
8581 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8582 for ClientSmeWmmStatusResponse
8583 {
8584 #[inline(always)]
8585 fn new_empty() -> Self {
8586 Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_internal::WmmStatusResponse, D) }
8587 }
8588
8589 #[inline]
8590 unsafe fn decode(
8591 &mut self,
8592 decoder: &mut fidl::encoding::Decoder<'_, D>,
8593 offset: usize,
8594 _depth: fidl::encoding::Depth,
8595 ) -> fidl::Result<()> {
8596 decoder.debug_check_bounds::<Self>(offset);
8597 fidl::decode!(
8599 fidl_fuchsia_wlan_internal::WmmStatusResponse,
8600 D,
8601 &mut self.resp,
8602 decoder,
8603 offset + 0,
8604 _depth
8605 )?;
8606 Ok(())
8607 }
8608 }
8609
8610 impl fidl::encoding::ValueTypeMarker for Compatible {
8611 type Borrowed<'a> = &'a Self;
8612 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8613 value
8614 }
8615 }
8616
8617 unsafe impl fidl::encoding::TypeMarker for Compatible {
8618 type Owned = Self;
8619
8620 #[inline(always)]
8621 fn inline_align(_context: fidl::encoding::Context) -> usize {
8622 8
8623 }
8624
8625 #[inline(always)]
8626 fn inline_size(_context: fidl::encoding::Context) -> usize {
8627 16
8628 }
8629 }
8630
8631 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Compatible, D>
8632 for &Compatible
8633 {
8634 #[inline]
8635 unsafe fn encode(
8636 self,
8637 encoder: &mut fidl::encoding::Encoder<'_, D>,
8638 offset: usize,
8639 _depth: fidl::encoding::Depth,
8640 ) -> fidl::Result<()> {
8641 encoder.debug_check_bounds::<Compatible>(offset);
8642 fidl::encoding::Encode::<Compatible, D>::encode(
8644 (
8645 <fidl::encoding::Vector<fidl_fuchsia_wlan_common_security::Protocol, 16> as fidl::encoding::ValueTypeMarker>::borrow(&self.mutual_security_protocols),
8646 ),
8647 encoder, offset, _depth
8648 )
8649 }
8650 }
8651 unsafe impl<
8652 D: fidl::encoding::ResourceDialect,
8653 T0: fidl::encoding::Encode<
8654 fidl::encoding::Vector<fidl_fuchsia_wlan_common_security::Protocol, 16>,
8655 D,
8656 >,
8657 > fidl::encoding::Encode<Compatible, D> for (T0,)
8658 {
8659 #[inline]
8660 unsafe fn encode(
8661 self,
8662 encoder: &mut fidl::encoding::Encoder<'_, D>,
8663 offset: usize,
8664 depth: fidl::encoding::Depth,
8665 ) -> fidl::Result<()> {
8666 encoder.debug_check_bounds::<Compatible>(offset);
8667 self.0.encode(encoder, offset + 0, depth)?;
8671 Ok(())
8672 }
8673 }
8674
8675 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Compatible {
8676 #[inline(always)]
8677 fn new_empty() -> Self {
8678 Self {
8679 mutual_security_protocols: fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_wlan_common_security::Protocol, 16>, D),
8680 }
8681 }
8682
8683 #[inline]
8684 unsafe fn decode(
8685 &mut self,
8686 decoder: &mut fidl::encoding::Decoder<'_, D>,
8687 offset: usize,
8688 _depth: fidl::encoding::Depth,
8689 ) -> fidl::Result<()> {
8690 decoder.debug_check_bounds::<Self>(offset);
8691 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_wlan_common_security::Protocol, 16>, D, &mut self.mutual_security_protocols, decoder, offset + 0, _depth)?;
8693 Ok(())
8694 }
8695 }
8696
8697 impl fidl::encoding::ValueTypeMarker for ConnectRequest {
8698 type Borrowed<'a> = &'a Self;
8699 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8700 value
8701 }
8702 }
8703
8704 unsafe impl fidl::encoding::TypeMarker for ConnectRequest {
8705 type Owned = Self;
8706
8707 #[inline(always)]
8708 fn inline_align(_context: fidl::encoding::Context) -> usize {
8709 8
8710 }
8711
8712 #[inline(always)]
8713 fn inline_size(_context: fidl::encoding::Context) -> usize {
8714 104
8715 }
8716 }
8717
8718 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ConnectRequest, D>
8719 for &ConnectRequest
8720 {
8721 #[inline]
8722 unsafe fn encode(
8723 self,
8724 encoder: &mut fidl::encoding::Encoder<'_, D>,
8725 offset: usize,
8726 _depth: fidl::encoding::Depth,
8727 ) -> fidl::Result<()> {
8728 encoder.debug_check_bounds::<ConnectRequest>(offset);
8729 fidl::encoding::Encode::<ConnectRequest, D>::encode(
8731 (
8732 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
8733 <fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
8734 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.multiple_bss_candidates),
8735 <fidl_fuchsia_wlan_common_security::Authentication as fidl::encoding::ValueTypeMarker>::borrow(&self.authentication),
8736 <fidl_fuchsia_wlan_common::ScanType as fidl::encoding::ValueTypeMarker>::borrow(&self.deprecated_scan_type),
8737 ),
8738 encoder, offset, _depth
8739 )
8740 }
8741 }
8742 unsafe impl<
8743 D: fidl::encoding::ResourceDialect,
8744 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
8745 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssDescription, D>,
8746 T2: fidl::encoding::Encode<bool, D>,
8747 T3: fidl::encoding::Encode<fidl_fuchsia_wlan_common_security::Authentication, D>,
8748 T4: fidl::encoding::Encode<fidl_fuchsia_wlan_common::ScanType, D>,
8749 > fidl::encoding::Encode<ConnectRequest, D> for (T0, T1, T2, T3, T4)
8750 {
8751 #[inline]
8752 unsafe fn encode(
8753 self,
8754 encoder: &mut fidl::encoding::Encoder<'_, D>,
8755 offset: usize,
8756 depth: fidl::encoding::Depth,
8757 ) -> fidl::Result<()> {
8758 encoder.debug_check_bounds::<ConnectRequest>(offset);
8759 unsafe {
8762 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(64);
8763 (ptr as *mut u64).write_unaligned(0);
8764 }
8765 unsafe {
8766 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(96);
8767 (ptr as *mut u64).write_unaligned(0);
8768 }
8769 self.0.encode(encoder, offset + 0, depth)?;
8771 self.1.encode(encoder, offset + 16, depth)?;
8772 self.2.encode(encoder, offset + 64, depth)?;
8773 self.3.encode(encoder, offset + 72, depth)?;
8774 self.4.encode(encoder, offset + 96, depth)?;
8775 Ok(())
8776 }
8777 }
8778
8779 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectRequest {
8780 #[inline(always)]
8781 fn new_empty() -> Self {
8782 Self {
8783 ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
8784 bss_description: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D),
8785 multiple_bss_candidates: fidl::new_empty!(bool, D),
8786 authentication: fidl::new_empty!(
8787 fidl_fuchsia_wlan_common_security::Authentication,
8788 D
8789 ),
8790 deprecated_scan_type: fidl::new_empty!(fidl_fuchsia_wlan_common::ScanType, D),
8791 }
8792 }
8793
8794 #[inline]
8795 unsafe fn decode(
8796 &mut self,
8797 decoder: &mut fidl::encoding::Decoder<'_, D>,
8798 offset: usize,
8799 _depth: fidl::encoding::Depth,
8800 ) -> fidl::Result<()> {
8801 decoder.debug_check_bounds::<Self>(offset);
8802 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(64) };
8804 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8805 let mask = 0xffffffffffffff00u64;
8806 let maskedval = padval & mask;
8807 if maskedval != 0 {
8808 return Err(fidl::Error::NonZeroPadding {
8809 padding_start: offset + 64 + ((mask as u64).trailing_zeros() / 8) as usize,
8810 });
8811 }
8812 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(96) };
8813 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8814 let mask = 0xffffffff00000000u64;
8815 let maskedval = padval & mask;
8816 if maskedval != 0 {
8817 return Err(fidl::Error::NonZeroPadding {
8818 padding_start: offset + 96 + ((mask as u64).trailing_zeros() / 8) as usize,
8819 });
8820 }
8821 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 0, _depth)?;
8822 fidl::decode!(
8823 fidl_fuchsia_wlan_common::BssDescription,
8824 D,
8825 &mut self.bss_description,
8826 decoder,
8827 offset + 16,
8828 _depth
8829 )?;
8830 fidl::decode!(
8831 bool,
8832 D,
8833 &mut self.multiple_bss_candidates,
8834 decoder,
8835 offset + 64,
8836 _depth
8837 )?;
8838 fidl::decode!(
8839 fidl_fuchsia_wlan_common_security::Authentication,
8840 D,
8841 &mut self.authentication,
8842 decoder,
8843 offset + 72,
8844 _depth
8845 )?;
8846 fidl::decode!(
8847 fidl_fuchsia_wlan_common::ScanType,
8848 D,
8849 &mut self.deprecated_scan_type,
8850 decoder,
8851 offset + 96,
8852 _depth
8853 )?;
8854 Ok(())
8855 }
8856 }
8857
8858 impl fidl::encoding::ValueTypeMarker for ConnectResult {
8859 type Borrowed<'a> = &'a Self;
8860 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8861 value
8862 }
8863 }
8864
8865 unsafe impl fidl::encoding::TypeMarker for ConnectResult {
8866 type Owned = Self;
8867
8868 #[inline(always)]
8869 fn inline_align(_context: fidl::encoding::Context) -> usize {
8870 2
8871 }
8872
8873 #[inline(always)]
8874 fn inline_size(_context: fidl::encoding::Context) -> usize {
8875 4
8876 }
8877 }
8878
8879 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ConnectResult, D>
8880 for &ConnectResult
8881 {
8882 #[inline]
8883 unsafe fn encode(
8884 self,
8885 encoder: &mut fidl::encoding::Encoder<'_, D>,
8886 offset: usize,
8887 _depth: fidl::encoding::Depth,
8888 ) -> fidl::Result<()> {
8889 encoder.debug_check_bounds::<ConnectResult>(offset);
8890 fidl::encoding::Encode::<ConnectResult, D>::encode(
8892 (
8893 <fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.code),
8894 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_credential_rejected),
8895 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_reconnect),
8896 ),
8897 encoder, offset, _depth
8898 )
8899 }
8900 }
8901 unsafe impl<
8902 D: fidl::encoding::ResourceDialect,
8903 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::StatusCode, D>,
8904 T1: fidl::encoding::Encode<bool, D>,
8905 T2: fidl::encoding::Encode<bool, D>,
8906 > fidl::encoding::Encode<ConnectResult, D> for (T0, T1, T2)
8907 {
8908 #[inline]
8909 unsafe fn encode(
8910 self,
8911 encoder: &mut fidl::encoding::Encoder<'_, D>,
8912 offset: usize,
8913 depth: fidl::encoding::Depth,
8914 ) -> fidl::Result<()> {
8915 encoder.debug_check_bounds::<ConnectResult>(offset);
8916 self.0.encode(encoder, offset + 0, depth)?;
8920 self.1.encode(encoder, offset + 2, depth)?;
8921 self.2.encode(encoder, offset + 3, depth)?;
8922 Ok(())
8923 }
8924 }
8925
8926 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConnectResult {
8927 #[inline(always)]
8928 fn new_empty() -> Self {
8929 Self {
8930 code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
8931 is_credential_rejected: fidl::new_empty!(bool, D),
8932 is_reconnect: fidl::new_empty!(bool, D),
8933 }
8934 }
8935
8936 #[inline]
8937 unsafe fn decode(
8938 &mut self,
8939 decoder: &mut fidl::encoding::Decoder<'_, D>,
8940 offset: usize,
8941 _depth: fidl::encoding::Depth,
8942 ) -> fidl::Result<()> {
8943 decoder.debug_check_bounds::<Self>(offset);
8944 fidl::decode!(
8946 fidl_fuchsia_wlan_ieee80211::StatusCode,
8947 D,
8948 &mut self.code,
8949 decoder,
8950 offset + 0,
8951 _depth
8952 )?;
8953 fidl::decode!(bool, D, &mut self.is_credential_rejected, decoder, offset + 2, _depth)?;
8954 fidl::decode!(bool, D, &mut self.is_reconnect, decoder, offset + 3, _depth)?;
8955 Ok(())
8956 }
8957 }
8958
8959 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnChannelSwitchedRequest {
8960 type Borrowed<'a> = &'a Self;
8961 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8962 value
8963 }
8964 }
8965
8966 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnChannelSwitchedRequest {
8967 type Owned = Self;
8968
8969 #[inline(always)]
8970 fn inline_align(_context: fidl::encoding::Context) -> usize {
8971 1
8972 }
8973
8974 #[inline(always)]
8975 fn inline_size(_context: fidl::encoding::Context) -> usize {
8976 1
8977 }
8978 }
8979
8980 unsafe impl<D: fidl::encoding::ResourceDialect>
8981 fidl::encoding::Encode<ConnectTransactionOnChannelSwitchedRequest, D>
8982 for &ConnectTransactionOnChannelSwitchedRequest
8983 {
8984 #[inline]
8985 unsafe fn encode(
8986 self,
8987 encoder: &mut fidl::encoding::Encoder<'_, D>,
8988 offset: usize,
8989 _depth: fidl::encoding::Depth,
8990 ) -> fidl::Result<()> {
8991 encoder.debug_check_bounds::<ConnectTransactionOnChannelSwitchedRequest>(offset);
8992 fidl::encoding::Encode::<ConnectTransactionOnChannelSwitchedRequest, D>::encode(
8994 (
8995 <fidl_fuchsia_wlan_internal::ChannelSwitchInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),
8996 ),
8997 encoder, offset, _depth
8998 )
8999 }
9000 }
9001 unsafe impl<
9002 D: fidl::encoding::ResourceDialect,
9003 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal::ChannelSwitchInfo, D>,
9004 > fidl::encoding::Encode<ConnectTransactionOnChannelSwitchedRequest, D> for (T0,)
9005 {
9006 #[inline]
9007 unsafe fn encode(
9008 self,
9009 encoder: &mut fidl::encoding::Encoder<'_, D>,
9010 offset: usize,
9011 depth: fidl::encoding::Depth,
9012 ) -> fidl::Result<()> {
9013 encoder.debug_check_bounds::<ConnectTransactionOnChannelSwitchedRequest>(offset);
9014 self.0.encode(encoder, offset + 0, depth)?;
9018 Ok(())
9019 }
9020 }
9021
9022 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9023 for ConnectTransactionOnChannelSwitchedRequest
9024 {
9025 #[inline(always)]
9026 fn new_empty() -> Self {
9027 Self { info: fidl::new_empty!(fidl_fuchsia_wlan_internal::ChannelSwitchInfo, D) }
9028 }
9029
9030 #[inline]
9031 unsafe fn decode(
9032 &mut self,
9033 decoder: &mut fidl::encoding::Decoder<'_, D>,
9034 offset: usize,
9035 _depth: fidl::encoding::Depth,
9036 ) -> fidl::Result<()> {
9037 decoder.debug_check_bounds::<Self>(offset);
9038 fidl::decode!(
9040 fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
9041 D,
9042 &mut self.info,
9043 decoder,
9044 offset + 0,
9045 _depth
9046 )?;
9047 Ok(())
9048 }
9049 }
9050
9051 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnConnectResultRequest {
9052 type Borrowed<'a> = &'a Self;
9053 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9054 value
9055 }
9056 }
9057
9058 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnConnectResultRequest {
9059 type Owned = Self;
9060
9061 #[inline(always)]
9062 fn inline_align(_context: fidl::encoding::Context) -> usize {
9063 2
9064 }
9065
9066 #[inline(always)]
9067 fn inline_size(_context: fidl::encoding::Context) -> usize {
9068 4
9069 }
9070 }
9071
9072 unsafe impl<D: fidl::encoding::ResourceDialect>
9073 fidl::encoding::Encode<ConnectTransactionOnConnectResultRequest, D>
9074 for &ConnectTransactionOnConnectResultRequest
9075 {
9076 #[inline]
9077 unsafe fn encode(
9078 self,
9079 encoder: &mut fidl::encoding::Encoder<'_, D>,
9080 offset: usize,
9081 _depth: fidl::encoding::Depth,
9082 ) -> fidl::Result<()> {
9083 encoder.debug_check_bounds::<ConnectTransactionOnConnectResultRequest>(offset);
9084 fidl::encoding::Encode::<ConnectTransactionOnConnectResultRequest, D>::encode(
9086 (<ConnectResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
9087 encoder,
9088 offset,
9089 _depth,
9090 )
9091 }
9092 }
9093 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ConnectResult, D>>
9094 fidl::encoding::Encode<ConnectTransactionOnConnectResultRequest, D> for (T0,)
9095 {
9096 #[inline]
9097 unsafe fn encode(
9098 self,
9099 encoder: &mut fidl::encoding::Encoder<'_, D>,
9100 offset: usize,
9101 depth: fidl::encoding::Depth,
9102 ) -> fidl::Result<()> {
9103 encoder.debug_check_bounds::<ConnectTransactionOnConnectResultRequest>(offset);
9104 self.0.encode(encoder, offset + 0, depth)?;
9108 Ok(())
9109 }
9110 }
9111
9112 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9113 for ConnectTransactionOnConnectResultRequest
9114 {
9115 #[inline(always)]
9116 fn new_empty() -> Self {
9117 Self { result: fidl::new_empty!(ConnectResult, D) }
9118 }
9119
9120 #[inline]
9121 unsafe fn decode(
9122 &mut self,
9123 decoder: &mut fidl::encoding::Decoder<'_, D>,
9124 offset: usize,
9125 _depth: fidl::encoding::Depth,
9126 ) -> fidl::Result<()> {
9127 decoder.debug_check_bounds::<Self>(offset);
9128 fidl::decode!(ConnectResult, D, &mut self.result, decoder, offset + 0, _depth)?;
9130 Ok(())
9131 }
9132 }
9133
9134 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnDisconnectRequest {
9135 type Borrowed<'a> = &'a Self;
9136 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9137 value
9138 }
9139 }
9140
9141 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnDisconnectRequest {
9142 type Owned = Self;
9143
9144 #[inline(always)]
9145 fn inline_align(_context: fidl::encoding::Context) -> usize {
9146 8
9147 }
9148
9149 #[inline(always)]
9150 fn inline_size(_context: fidl::encoding::Context) -> usize {
9151 24
9152 }
9153 }
9154
9155 unsafe impl<D: fidl::encoding::ResourceDialect>
9156 fidl::encoding::Encode<ConnectTransactionOnDisconnectRequest, D>
9157 for &ConnectTransactionOnDisconnectRequest
9158 {
9159 #[inline]
9160 unsafe fn encode(
9161 self,
9162 encoder: &mut fidl::encoding::Encoder<'_, D>,
9163 offset: usize,
9164 _depth: fidl::encoding::Depth,
9165 ) -> fidl::Result<()> {
9166 encoder.debug_check_bounds::<ConnectTransactionOnDisconnectRequest>(offset);
9167 fidl::encoding::Encode::<ConnectTransactionOnDisconnectRequest, D>::encode(
9169 (<DisconnectInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
9170 encoder,
9171 offset,
9172 _depth,
9173 )
9174 }
9175 }
9176 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<DisconnectInfo, D>>
9177 fidl::encoding::Encode<ConnectTransactionOnDisconnectRequest, D> for (T0,)
9178 {
9179 #[inline]
9180 unsafe fn encode(
9181 self,
9182 encoder: &mut fidl::encoding::Encoder<'_, D>,
9183 offset: usize,
9184 depth: fidl::encoding::Depth,
9185 ) -> fidl::Result<()> {
9186 encoder.debug_check_bounds::<ConnectTransactionOnDisconnectRequest>(offset);
9187 self.0.encode(encoder, offset + 0, depth)?;
9191 Ok(())
9192 }
9193 }
9194
9195 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9196 for ConnectTransactionOnDisconnectRequest
9197 {
9198 #[inline(always)]
9199 fn new_empty() -> Self {
9200 Self { info: fidl::new_empty!(DisconnectInfo, D) }
9201 }
9202
9203 #[inline]
9204 unsafe fn decode(
9205 &mut self,
9206 decoder: &mut fidl::encoding::Decoder<'_, D>,
9207 offset: usize,
9208 _depth: fidl::encoding::Depth,
9209 ) -> fidl::Result<()> {
9210 decoder.debug_check_bounds::<Self>(offset);
9211 fidl::decode!(DisconnectInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
9213 Ok(())
9214 }
9215 }
9216
9217 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnRoamResultRequest {
9218 type Borrowed<'a> = &'a Self;
9219 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9220 value
9221 }
9222 }
9223
9224 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnRoamResultRequest {
9225 type Owned = Self;
9226
9227 #[inline(always)]
9228 fn inline_align(_context: fidl::encoding::Context) -> usize {
9229 8
9230 }
9231
9232 #[inline(always)]
9233 fn inline_size(_context: fidl::encoding::Context) -> usize {
9234 40
9235 }
9236 }
9237
9238 unsafe impl<D: fidl::encoding::ResourceDialect>
9239 fidl::encoding::Encode<ConnectTransactionOnRoamResultRequest, D>
9240 for &ConnectTransactionOnRoamResultRequest
9241 {
9242 #[inline]
9243 unsafe fn encode(
9244 self,
9245 encoder: &mut fidl::encoding::Encoder<'_, D>,
9246 offset: usize,
9247 _depth: fidl::encoding::Depth,
9248 ) -> fidl::Result<()> {
9249 encoder.debug_check_bounds::<ConnectTransactionOnRoamResultRequest>(offset);
9250 fidl::encoding::Encode::<ConnectTransactionOnRoamResultRequest, D>::encode(
9252 (<RoamResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
9253 encoder,
9254 offset,
9255 _depth,
9256 )
9257 }
9258 }
9259 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RoamResult, D>>
9260 fidl::encoding::Encode<ConnectTransactionOnRoamResultRequest, D> for (T0,)
9261 {
9262 #[inline]
9263 unsafe fn encode(
9264 self,
9265 encoder: &mut fidl::encoding::Encoder<'_, D>,
9266 offset: usize,
9267 depth: fidl::encoding::Depth,
9268 ) -> fidl::Result<()> {
9269 encoder.debug_check_bounds::<ConnectTransactionOnRoamResultRequest>(offset);
9270 self.0.encode(encoder, offset + 0, depth)?;
9274 Ok(())
9275 }
9276 }
9277
9278 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9279 for ConnectTransactionOnRoamResultRequest
9280 {
9281 #[inline(always)]
9282 fn new_empty() -> Self {
9283 Self { result: fidl::new_empty!(RoamResult, D) }
9284 }
9285
9286 #[inline]
9287 unsafe fn decode(
9288 &mut self,
9289 decoder: &mut fidl::encoding::Decoder<'_, D>,
9290 offset: usize,
9291 _depth: fidl::encoding::Depth,
9292 ) -> fidl::Result<()> {
9293 decoder.debug_check_bounds::<Self>(offset);
9294 fidl::decode!(RoamResult, D, &mut self.result, decoder, offset + 0, _depth)?;
9296 Ok(())
9297 }
9298 }
9299
9300 impl fidl::encoding::ValueTypeMarker for ConnectTransactionOnSignalReportRequest {
9301 type Borrowed<'a> = &'a Self;
9302 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9303 value
9304 }
9305 }
9306
9307 unsafe impl fidl::encoding::TypeMarker for ConnectTransactionOnSignalReportRequest {
9308 type Owned = Self;
9309
9310 #[inline(always)]
9311 fn inline_align(_context: fidl::encoding::Context) -> usize {
9312 1
9313 }
9314
9315 #[inline(always)]
9316 fn inline_size(_context: fidl::encoding::Context) -> usize {
9317 2
9318 }
9319 }
9320
9321 unsafe impl<D: fidl::encoding::ResourceDialect>
9322 fidl::encoding::Encode<ConnectTransactionOnSignalReportRequest, D>
9323 for &ConnectTransactionOnSignalReportRequest
9324 {
9325 #[inline]
9326 unsafe fn encode(
9327 self,
9328 encoder: &mut fidl::encoding::Encoder<'_, D>,
9329 offset: usize,
9330 _depth: fidl::encoding::Depth,
9331 ) -> fidl::Result<()> {
9332 encoder.debug_check_bounds::<ConnectTransactionOnSignalReportRequest>(offset);
9333 fidl::encoding::Encode::<ConnectTransactionOnSignalReportRequest, D>::encode(
9335 (
9336 <fidl_fuchsia_wlan_internal::SignalReportIndication as fidl::encoding::ValueTypeMarker>::borrow(&self.ind),
9337 ),
9338 encoder, offset, _depth
9339 )
9340 }
9341 }
9342 unsafe impl<
9343 D: fidl::encoding::ResourceDialect,
9344 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_internal::SignalReportIndication, D>,
9345 > fidl::encoding::Encode<ConnectTransactionOnSignalReportRequest, D> for (T0,)
9346 {
9347 #[inline]
9348 unsafe fn encode(
9349 self,
9350 encoder: &mut fidl::encoding::Encoder<'_, D>,
9351 offset: usize,
9352 depth: fidl::encoding::Depth,
9353 ) -> fidl::Result<()> {
9354 encoder.debug_check_bounds::<ConnectTransactionOnSignalReportRequest>(offset);
9355 self.0.encode(encoder, offset + 0, depth)?;
9359 Ok(())
9360 }
9361 }
9362
9363 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9364 for ConnectTransactionOnSignalReportRequest
9365 {
9366 #[inline(always)]
9367 fn new_empty() -> Self {
9368 Self { ind: fidl::new_empty!(fidl_fuchsia_wlan_internal::SignalReportIndication, D) }
9369 }
9370
9371 #[inline]
9372 unsafe fn decode(
9373 &mut self,
9374 decoder: &mut fidl::encoding::Decoder<'_, D>,
9375 offset: usize,
9376 _depth: fidl::encoding::Depth,
9377 ) -> fidl::Result<()> {
9378 decoder.debug_check_bounds::<Self>(offset);
9379 fidl::decode!(
9381 fidl_fuchsia_wlan_internal::SignalReportIndication,
9382 D,
9383 &mut self.ind,
9384 decoder,
9385 offset + 0,
9386 _depth
9387 )?;
9388 Ok(())
9389 }
9390 }
9391
9392 impl fidl::encoding::ValueTypeMarker for DisconnectCause {
9393 type Borrowed<'a> = &'a Self;
9394 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9395 value
9396 }
9397 }
9398
9399 unsafe impl fidl::encoding::TypeMarker for DisconnectCause {
9400 type Owned = Self;
9401
9402 #[inline(always)]
9403 fn inline_align(_context: fidl::encoding::Context) -> usize {
9404 4
9405 }
9406
9407 #[inline(always)]
9408 fn inline_size(_context: fidl::encoding::Context) -> usize {
9409 8
9410 }
9411 }
9412
9413 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisconnectCause, D>
9414 for &DisconnectCause
9415 {
9416 #[inline]
9417 unsafe fn encode(
9418 self,
9419 encoder: &mut fidl::encoding::Encoder<'_, D>,
9420 offset: usize,
9421 _depth: fidl::encoding::Depth,
9422 ) -> fidl::Result<()> {
9423 encoder.debug_check_bounds::<DisconnectCause>(offset);
9424 fidl::encoding::Encode::<DisconnectCause, D>::encode(
9426 (
9427 <DisconnectMlmeEventName as fidl::encoding::ValueTypeMarker>::borrow(&self.mlme_event_name),
9428 <fidl_fuchsia_wlan_ieee80211::ReasonCode as fidl::encoding::ValueTypeMarker>::borrow(&self.reason_code),
9429 ),
9430 encoder, offset, _depth
9431 )
9432 }
9433 }
9434 unsafe impl<
9435 D: fidl::encoding::ResourceDialect,
9436 T0: fidl::encoding::Encode<DisconnectMlmeEventName, D>,
9437 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::ReasonCode, D>,
9438 > fidl::encoding::Encode<DisconnectCause, D> for (T0, T1)
9439 {
9440 #[inline]
9441 unsafe fn encode(
9442 self,
9443 encoder: &mut fidl::encoding::Encoder<'_, D>,
9444 offset: usize,
9445 depth: fidl::encoding::Depth,
9446 ) -> fidl::Result<()> {
9447 encoder.debug_check_bounds::<DisconnectCause>(offset);
9448 unsafe {
9451 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
9452 (ptr as *mut u32).write_unaligned(0);
9453 }
9454 self.0.encode(encoder, offset + 0, depth)?;
9456 self.1.encode(encoder, offset + 4, depth)?;
9457 Ok(())
9458 }
9459 }
9460
9461 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisconnectCause {
9462 #[inline(always)]
9463 fn new_empty() -> Self {
9464 Self {
9465 mlme_event_name: fidl::new_empty!(DisconnectMlmeEventName, D),
9466 reason_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::ReasonCode, D),
9467 }
9468 }
9469
9470 #[inline]
9471 unsafe fn decode(
9472 &mut self,
9473 decoder: &mut fidl::encoding::Decoder<'_, D>,
9474 offset: usize,
9475 _depth: fidl::encoding::Depth,
9476 ) -> fidl::Result<()> {
9477 decoder.debug_check_bounds::<Self>(offset);
9478 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
9480 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9481 let mask = 0xffff0000u32;
9482 let maskedval = padval & mask;
9483 if maskedval != 0 {
9484 return Err(fidl::Error::NonZeroPadding {
9485 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
9486 });
9487 }
9488 fidl::decode!(
9489 DisconnectMlmeEventName,
9490 D,
9491 &mut self.mlme_event_name,
9492 decoder,
9493 offset + 0,
9494 _depth
9495 )?;
9496 fidl::decode!(
9497 fidl_fuchsia_wlan_ieee80211::ReasonCode,
9498 D,
9499 &mut self.reason_code,
9500 decoder,
9501 offset + 4,
9502 _depth
9503 )?;
9504 Ok(())
9505 }
9506 }
9507
9508 impl fidl::encoding::ValueTypeMarker for DisconnectInfo {
9509 type Borrowed<'a> = &'a Self;
9510 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9511 value
9512 }
9513 }
9514
9515 unsafe impl fidl::encoding::TypeMarker for DisconnectInfo {
9516 type Owned = Self;
9517
9518 #[inline(always)]
9519 fn inline_align(_context: fidl::encoding::Context) -> usize {
9520 8
9521 }
9522
9523 #[inline(always)]
9524 fn inline_size(_context: fidl::encoding::Context) -> usize {
9525 24
9526 }
9527 }
9528
9529 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisconnectInfo, D>
9530 for &DisconnectInfo
9531 {
9532 #[inline]
9533 unsafe fn encode(
9534 self,
9535 encoder: &mut fidl::encoding::Encoder<'_, D>,
9536 offset: usize,
9537 _depth: fidl::encoding::Depth,
9538 ) -> fidl::Result<()> {
9539 encoder.debug_check_bounds::<DisconnectInfo>(offset);
9540 fidl::encoding::Encode::<DisconnectInfo, D>::encode(
9542 (
9543 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_sme_reconnecting),
9544 <DisconnectSource as fidl::encoding::ValueTypeMarker>::borrow(
9545 &self.disconnect_source,
9546 ),
9547 ),
9548 encoder,
9549 offset,
9550 _depth,
9551 )
9552 }
9553 }
9554 unsafe impl<
9555 D: fidl::encoding::ResourceDialect,
9556 T0: fidl::encoding::Encode<bool, D>,
9557 T1: fidl::encoding::Encode<DisconnectSource, D>,
9558 > fidl::encoding::Encode<DisconnectInfo, D> for (T0, T1)
9559 {
9560 #[inline]
9561 unsafe fn encode(
9562 self,
9563 encoder: &mut fidl::encoding::Encoder<'_, D>,
9564 offset: usize,
9565 depth: fidl::encoding::Depth,
9566 ) -> fidl::Result<()> {
9567 encoder.debug_check_bounds::<DisconnectInfo>(offset);
9568 unsafe {
9571 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9572 (ptr as *mut u64).write_unaligned(0);
9573 }
9574 self.0.encode(encoder, offset + 0, depth)?;
9576 self.1.encode(encoder, offset + 8, depth)?;
9577 Ok(())
9578 }
9579 }
9580
9581 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisconnectInfo {
9582 #[inline(always)]
9583 fn new_empty() -> Self {
9584 Self {
9585 is_sme_reconnecting: fidl::new_empty!(bool, D),
9586 disconnect_source: fidl::new_empty!(DisconnectSource, D),
9587 }
9588 }
9589
9590 #[inline]
9591 unsafe fn decode(
9592 &mut self,
9593 decoder: &mut fidl::encoding::Decoder<'_, D>,
9594 offset: usize,
9595 _depth: fidl::encoding::Depth,
9596 ) -> fidl::Result<()> {
9597 decoder.debug_check_bounds::<Self>(offset);
9598 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
9600 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9601 let mask = 0xffffffffffffff00u64;
9602 let maskedval = padval & mask;
9603 if maskedval != 0 {
9604 return Err(fidl::Error::NonZeroPadding {
9605 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9606 });
9607 }
9608 fidl::decode!(bool, D, &mut self.is_sme_reconnecting, decoder, offset + 0, _depth)?;
9609 fidl::decode!(
9610 DisconnectSource,
9611 D,
9612 &mut self.disconnect_source,
9613 decoder,
9614 offset + 8,
9615 _depth
9616 )?;
9617 Ok(())
9618 }
9619 }
9620
9621 impl fidl::encoding::ValueTypeMarker for DisjointSecurityProtocol {
9622 type Borrowed<'a> = &'a Self;
9623 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9624 value
9625 }
9626 }
9627
9628 unsafe impl fidl::encoding::TypeMarker for DisjointSecurityProtocol {
9629 type Owned = Self;
9630
9631 #[inline(always)]
9632 fn inline_align(_context: fidl::encoding::Context) -> usize {
9633 4
9634 }
9635
9636 #[inline(always)]
9637 fn inline_size(_context: fidl::encoding::Context) -> usize {
9638 8
9639 }
9640 }
9641
9642 unsafe impl<D: fidl::encoding::ResourceDialect>
9643 fidl::encoding::Encode<DisjointSecurityProtocol, D> for &DisjointSecurityProtocol
9644 {
9645 #[inline]
9646 unsafe fn encode(
9647 self,
9648 encoder: &mut fidl::encoding::Encoder<'_, D>,
9649 offset: usize,
9650 _depth: fidl::encoding::Depth,
9651 ) -> fidl::Result<()> {
9652 encoder.debug_check_bounds::<DisjointSecurityProtocol>(offset);
9653 fidl::encoding::Encode::<DisjointSecurityProtocol, D>::encode(
9655 (
9656 <fidl_fuchsia_wlan_common_security::Protocol as fidl::encoding::ValueTypeMarker>::borrow(&self.protocol),
9657 <fidl_fuchsia_wlan_common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow(&self.role),
9658 ),
9659 encoder, offset, _depth
9660 )
9661 }
9662 }
9663 unsafe impl<
9664 D: fidl::encoding::ResourceDialect,
9665 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common_security::Protocol, D>,
9666 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanMacRole, D>,
9667 > fidl::encoding::Encode<DisjointSecurityProtocol, D> for (T0, T1)
9668 {
9669 #[inline]
9670 unsafe fn encode(
9671 self,
9672 encoder: &mut fidl::encoding::Encoder<'_, D>,
9673 offset: usize,
9674 depth: fidl::encoding::Depth,
9675 ) -> fidl::Result<()> {
9676 encoder.debug_check_bounds::<DisjointSecurityProtocol>(offset);
9677 self.0.encode(encoder, offset + 0, depth)?;
9681 self.1.encode(encoder, offset + 4, depth)?;
9682 Ok(())
9683 }
9684 }
9685
9686 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9687 for DisjointSecurityProtocol
9688 {
9689 #[inline(always)]
9690 fn new_empty() -> Self {
9691 Self {
9692 protocol: fidl::new_empty!(fidl_fuchsia_wlan_common_security::Protocol, D),
9693 role: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanMacRole, D),
9694 }
9695 }
9696
9697 #[inline]
9698 unsafe fn decode(
9699 &mut self,
9700 decoder: &mut fidl::encoding::Decoder<'_, D>,
9701 offset: usize,
9702 _depth: fidl::encoding::Depth,
9703 ) -> fidl::Result<()> {
9704 decoder.debug_check_bounds::<Self>(offset);
9705 fidl::decode!(
9707 fidl_fuchsia_wlan_common_security::Protocol,
9708 D,
9709 &mut self.protocol,
9710 decoder,
9711 offset + 0,
9712 _depth
9713 )?;
9714 fidl::decode!(
9715 fidl_fuchsia_wlan_common::WlanMacRole,
9716 D,
9717 &mut self.role,
9718 decoder,
9719 offset + 4,
9720 _depth
9721 )?;
9722 Ok(())
9723 }
9724 }
9725
9726 impl fidl::encoding::ValueTypeMarker for Empty {
9727 type Borrowed<'a> = &'a Self;
9728 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9729 value
9730 }
9731 }
9732
9733 unsafe impl fidl::encoding::TypeMarker for Empty {
9734 type Owned = Self;
9735
9736 #[inline(always)]
9737 fn inline_align(_context: fidl::encoding::Context) -> usize {
9738 1
9739 }
9740
9741 #[inline(always)]
9742 fn inline_size(_context: fidl::encoding::Context) -> usize {
9743 1
9744 }
9745 }
9746
9747 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Empty, D> for &Empty {
9748 #[inline]
9749 unsafe fn encode(
9750 self,
9751 encoder: &mut fidl::encoding::Encoder<'_, D>,
9752 offset: usize,
9753 _depth: fidl::encoding::Depth,
9754 ) -> fidl::Result<()> {
9755 encoder.debug_check_bounds::<Empty>(offset);
9756 encoder.write_num(0u8, offset);
9757 Ok(())
9758 }
9759 }
9760
9761 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Empty {
9762 #[inline(always)]
9763 fn new_empty() -> Self {
9764 Self
9765 }
9766
9767 #[inline]
9768 unsafe fn decode(
9769 &mut self,
9770 decoder: &mut fidl::encoding::Decoder<'_, D>,
9771 offset: usize,
9772 _depth: fidl::encoding::Depth,
9773 ) -> fidl::Result<()> {
9774 decoder.debug_check_bounds::<Self>(offset);
9775 match decoder.read_num::<u8>(offset) {
9776 0 => Ok(()),
9777 _ => Err(fidl::Error::Invalid),
9778 }
9779 }
9780 }
9781
9782 impl fidl::encoding::ValueTypeMarker for FeatureSupportQueryDiscoverySupportResponse {
9783 type Borrowed<'a> = &'a Self;
9784 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9785 value
9786 }
9787 }
9788
9789 unsafe impl fidl::encoding::TypeMarker for FeatureSupportQueryDiscoverySupportResponse {
9790 type Owned = Self;
9791
9792 #[inline(always)]
9793 fn inline_align(_context: fidl::encoding::Context) -> usize {
9794 1
9795 }
9796
9797 #[inline(always)]
9798 fn inline_size(_context: fidl::encoding::Context) -> usize {
9799 3
9800 }
9801 }
9802
9803 unsafe impl<D: fidl::encoding::ResourceDialect>
9804 fidl::encoding::Encode<FeatureSupportQueryDiscoverySupportResponse, D>
9805 for &FeatureSupportQueryDiscoverySupportResponse
9806 {
9807 #[inline]
9808 unsafe fn encode(
9809 self,
9810 encoder: &mut fidl::encoding::Encoder<'_, D>,
9811 offset: usize,
9812 _depth: fidl::encoding::Depth,
9813 ) -> fidl::Result<()> {
9814 encoder.debug_check_bounds::<FeatureSupportQueryDiscoverySupportResponse>(offset);
9815 fidl::encoding::Encode::<FeatureSupportQueryDiscoverySupportResponse, D>::encode(
9817 (
9818 <fidl_fuchsia_wlan_common::DiscoverySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
9819 ),
9820 encoder, offset, _depth
9821 )
9822 }
9823 }
9824 unsafe impl<
9825 D: fidl::encoding::ResourceDialect,
9826 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::DiscoverySupport, D>,
9827 > fidl::encoding::Encode<FeatureSupportQueryDiscoverySupportResponse, D> for (T0,)
9828 {
9829 #[inline]
9830 unsafe fn encode(
9831 self,
9832 encoder: &mut fidl::encoding::Encoder<'_, D>,
9833 offset: usize,
9834 depth: fidl::encoding::Depth,
9835 ) -> fidl::Result<()> {
9836 encoder.debug_check_bounds::<FeatureSupportQueryDiscoverySupportResponse>(offset);
9837 self.0.encode(encoder, offset + 0, depth)?;
9841 Ok(())
9842 }
9843 }
9844
9845 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9846 for FeatureSupportQueryDiscoverySupportResponse
9847 {
9848 #[inline(always)]
9849 fn new_empty() -> Self {
9850 Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::DiscoverySupport, D) }
9851 }
9852
9853 #[inline]
9854 unsafe fn decode(
9855 &mut self,
9856 decoder: &mut fidl::encoding::Decoder<'_, D>,
9857 offset: usize,
9858 _depth: fidl::encoding::Depth,
9859 ) -> fidl::Result<()> {
9860 decoder.debug_check_bounds::<Self>(offset);
9861 fidl::decode!(
9863 fidl_fuchsia_wlan_common::DiscoverySupport,
9864 D,
9865 &mut self.resp,
9866 decoder,
9867 offset + 0,
9868 _depth
9869 )?;
9870 Ok(())
9871 }
9872 }
9873
9874 impl fidl::encoding::ValueTypeMarker for FeatureSupportQueryMacSublayerSupportResponse {
9875 type Borrowed<'a> = &'a Self;
9876 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9877 value
9878 }
9879 }
9880
9881 unsafe impl fidl::encoding::TypeMarker for FeatureSupportQueryMacSublayerSupportResponse {
9882 type Owned = Self;
9883
9884 #[inline(always)]
9885 fn inline_align(_context: fidl::encoding::Context) -> usize {
9886 1
9887 }
9888
9889 #[inline(always)]
9890 fn inline_size(_context: fidl::encoding::Context) -> usize {
9891 5
9892 }
9893 }
9894
9895 unsafe impl<D: fidl::encoding::ResourceDialect>
9896 fidl::encoding::Encode<FeatureSupportQueryMacSublayerSupportResponse, D>
9897 for &FeatureSupportQueryMacSublayerSupportResponse
9898 {
9899 #[inline]
9900 unsafe fn encode(
9901 self,
9902 encoder: &mut fidl::encoding::Encoder<'_, D>,
9903 offset: usize,
9904 _depth: fidl::encoding::Depth,
9905 ) -> fidl::Result<()> {
9906 encoder.debug_check_bounds::<FeatureSupportQueryMacSublayerSupportResponse>(offset);
9907 fidl::encoding::Encode::<FeatureSupportQueryMacSublayerSupportResponse, D>::encode(
9909 (
9910 <fidl_fuchsia_wlan_common::MacSublayerSupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
9911 ),
9912 encoder, offset, _depth
9913 )
9914 }
9915 }
9916 unsafe impl<
9917 D: fidl::encoding::ResourceDialect,
9918 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::MacSublayerSupport, D>,
9919 > fidl::encoding::Encode<FeatureSupportQueryMacSublayerSupportResponse, D> for (T0,)
9920 {
9921 #[inline]
9922 unsafe fn encode(
9923 self,
9924 encoder: &mut fidl::encoding::Encoder<'_, D>,
9925 offset: usize,
9926 depth: fidl::encoding::Depth,
9927 ) -> fidl::Result<()> {
9928 encoder.debug_check_bounds::<FeatureSupportQueryMacSublayerSupportResponse>(offset);
9929 self.0.encode(encoder, offset + 0, depth)?;
9933 Ok(())
9934 }
9935 }
9936
9937 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9938 for FeatureSupportQueryMacSublayerSupportResponse
9939 {
9940 #[inline(always)]
9941 fn new_empty() -> Self {
9942 Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::MacSublayerSupport, D) }
9943 }
9944
9945 #[inline]
9946 unsafe fn decode(
9947 &mut self,
9948 decoder: &mut fidl::encoding::Decoder<'_, D>,
9949 offset: usize,
9950 _depth: fidl::encoding::Depth,
9951 ) -> fidl::Result<()> {
9952 decoder.debug_check_bounds::<Self>(offset);
9953 fidl::decode!(
9955 fidl_fuchsia_wlan_common::MacSublayerSupport,
9956 D,
9957 &mut self.resp,
9958 decoder,
9959 offset + 0,
9960 _depth
9961 )?;
9962 Ok(())
9963 }
9964 }
9965
9966 impl fidl::encoding::ValueTypeMarker for FeatureSupportQuerySecuritySupportResponse {
9967 type Borrowed<'a> = &'a Self;
9968 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9969 value
9970 }
9971 }
9972
9973 unsafe impl fidl::encoding::TypeMarker for FeatureSupportQuerySecuritySupportResponse {
9974 type Owned = Self;
9975
9976 #[inline(always)]
9977 fn inline_align(_context: fidl::encoding::Context) -> usize {
9978 1
9979 }
9980
9981 #[inline(always)]
9982 fn inline_size(_context: fidl::encoding::Context) -> usize {
9983 3
9984 }
9985 }
9986
9987 unsafe impl<D: fidl::encoding::ResourceDialect>
9988 fidl::encoding::Encode<FeatureSupportQuerySecuritySupportResponse, D>
9989 for &FeatureSupportQuerySecuritySupportResponse
9990 {
9991 #[inline]
9992 unsafe fn encode(
9993 self,
9994 encoder: &mut fidl::encoding::Encoder<'_, D>,
9995 offset: usize,
9996 _depth: fidl::encoding::Depth,
9997 ) -> fidl::Result<()> {
9998 encoder.debug_check_bounds::<FeatureSupportQuerySecuritySupportResponse>(offset);
9999 fidl::encoding::Encode::<FeatureSupportQuerySecuritySupportResponse, D>::encode(
10001 (
10002 <fidl_fuchsia_wlan_common::SecuritySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
10003 ),
10004 encoder, offset, _depth
10005 )
10006 }
10007 }
10008 unsafe impl<
10009 D: fidl::encoding::ResourceDialect,
10010 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::SecuritySupport, D>,
10011 > fidl::encoding::Encode<FeatureSupportQuerySecuritySupportResponse, D> for (T0,)
10012 {
10013 #[inline]
10014 unsafe fn encode(
10015 self,
10016 encoder: &mut fidl::encoding::Encoder<'_, D>,
10017 offset: usize,
10018 depth: fidl::encoding::Depth,
10019 ) -> fidl::Result<()> {
10020 encoder.debug_check_bounds::<FeatureSupportQuerySecuritySupportResponse>(offset);
10021 self.0.encode(encoder, offset + 0, depth)?;
10025 Ok(())
10026 }
10027 }
10028
10029 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10030 for FeatureSupportQuerySecuritySupportResponse
10031 {
10032 #[inline(always)]
10033 fn new_empty() -> Self {
10034 Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::SecuritySupport, D) }
10035 }
10036
10037 #[inline]
10038 unsafe fn decode(
10039 &mut self,
10040 decoder: &mut fidl::encoding::Decoder<'_, D>,
10041 offset: usize,
10042 _depth: fidl::encoding::Depth,
10043 ) -> fidl::Result<()> {
10044 decoder.debug_check_bounds::<Self>(offset);
10045 fidl::decode!(
10047 fidl_fuchsia_wlan_common::SecuritySupport,
10048 D,
10049 &mut self.resp,
10050 decoder,
10051 offset + 0,
10052 _depth
10053 )?;
10054 Ok(())
10055 }
10056 }
10057
10058 impl fidl::encoding::ValueTypeMarker for FeatureSupportQuerySpectrumManagementSupportResponse {
10059 type Borrowed<'a> = &'a Self;
10060 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10061 value
10062 }
10063 }
10064
10065 unsafe impl fidl::encoding::TypeMarker for FeatureSupportQuerySpectrumManagementSupportResponse {
10066 type Owned = Self;
10067
10068 #[inline(always)]
10069 fn inline_align(_context: fidl::encoding::Context) -> usize {
10070 1
10071 }
10072
10073 #[inline(always)]
10074 fn inline_size(_context: fidl::encoding::Context) -> usize {
10075 1
10076 }
10077 }
10078
10079 unsafe impl<D: fidl::encoding::ResourceDialect>
10080 fidl::encoding::Encode<FeatureSupportQuerySpectrumManagementSupportResponse, D>
10081 for &FeatureSupportQuerySpectrumManagementSupportResponse
10082 {
10083 #[inline]
10084 unsafe fn encode(
10085 self,
10086 encoder: &mut fidl::encoding::Encoder<'_, D>,
10087 offset: usize,
10088 _depth: fidl::encoding::Depth,
10089 ) -> fidl::Result<()> {
10090 encoder
10091 .debug_check_bounds::<FeatureSupportQuerySpectrumManagementSupportResponse>(offset);
10092 fidl::encoding::Encode::<FeatureSupportQuerySpectrumManagementSupportResponse, D>::encode(
10094 (
10095 <fidl_fuchsia_wlan_common::SpectrumManagementSupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
10096 ),
10097 encoder, offset, _depth
10098 )
10099 }
10100 }
10101 unsafe impl<
10102 D: fidl::encoding::ResourceDialect,
10103 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::SpectrumManagementSupport, D>,
10104 > fidl::encoding::Encode<FeatureSupportQuerySpectrumManagementSupportResponse, D> for (T0,)
10105 {
10106 #[inline]
10107 unsafe fn encode(
10108 self,
10109 encoder: &mut fidl::encoding::Encoder<'_, D>,
10110 offset: usize,
10111 depth: fidl::encoding::Depth,
10112 ) -> fidl::Result<()> {
10113 encoder
10114 .debug_check_bounds::<FeatureSupportQuerySpectrumManagementSupportResponse>(offset);
10115 self.0.encode(encoder, offset + 0, depth)?;
10119 Ok(())
10120 }
10121 }
10122
10123 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10124 for FeatureSupportQuerySpectrumManagementSupportResponse
10125 {
10126 #[inline(always)]
10127 fn new_empty() -> Self {
10128 Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_common::SpectrumManagementSupport, D) }
10129 }
10130
10131 #[inline]
10132 unsafe fn decode(
10133 &mut self,
10134 decoder: &mut fidl::encoding::Decoder<'_, D>,
10135 offset: usize,
10136 _depth: fidl::encoding::Depth,
10137 ) -> fidl::Result<()> {
10138 decoder.debug_check_bounds::<Self>(offset);
10139 fidl::decode!(
10141 fidl_fuchsia_wlan_common::SpectrumManagementSupport,
10142 D,
10143 &mut self.resp,
10144 decoder,
10145 offset + 0,
10146 _depth
10147 )?;
10148 Ok(())
10149 }
10150 }
10151
10152 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetApSmeRequest {
10153 type Borrowed<'a> = &'a mut Self;
10154 fn take_or_borrow<'a>(
10155 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10156 ) -> Self::Borrowed<'a> {
10157 value
10158 }
10159 }
10160
10161 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetApSmeRequest {
10162 type Owned = Self;
10163
10164 #[inline(always)]
10165 fn inline_align(_context: fidl::encoding::Context) -> usize {
10166 4
10167 }
10168
10169 #[inline(always)]
10170 fn inline_size(_context: fidl::encoding::Context) -> usize {
10171 4
10172 }
10173 }
10174
10175 unsafe impl
10176 fidl::encoding::Encode<
10177 GenericSmeGetApSmeRequest,
10178 fidl::encoding::DefaultFuchsiaResourceDialect,
10179 > for &mut GenericSmeGetApSmeRequest
10180 {
10181 #[inline]
10182 unsafe fn encode(
10183 self,
10184 encoder: &mut fidl::encoding::Encoder<
10185 '_,
10186 fidl::encoding::DefaultFuchsiaResourceDialect,
10187 >,
10188 offset: usize,
10189 _depth: fidl::encoding::Depth,
10190 ) -> fidl::Result<()> {
10191 encoder.debug_check_bounds::<GenericSmeGetApSmeRequest>(offset);
10192 fidl::encoding::Encode::<GenericSmeGetApSmeRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10194 (
10195 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sme_server),
10196 ),
10197 encoder, offset, _depth
10198 )
10199 }
10200 }
10201 unsafe impl<
10202 T0: fidl::encoding::Encode<
10203 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
10204 fidl::encoding::DefaultFuchsiaResourceDialect,
10205 >,
10206 >
10207 fidl::encoding::Encode<
10208 GenericSmeGetApSmeRequest,
10209 fidl::encoding::DefaultFuchsiaResourceDialect,
10210 > for (T0,)
10211 {
10212 #[inline]
10213 unsafe fn encode(
10214 self,
10215 encoder: &mut fidl::encoding::Encoder<
10216 '_,
10217 fidl::encoding::DefaultFuchsiaResourceDialect,
10218 >,
10219 offset: usize,
10220 depth: fidl::encoding::Depth,
10221 ) -> fidl::Result<()> {
10222 encoder.debug_check_bounds::<GenericSmeGetApSmeRequest>(offset);
10223 self.0.encode(encoder, offset + 0, depth)?;
10227 Ok(())
10228 }
10229 }
10230
10231 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10232 for GenericSmeGetApSmeRequest
10233 {
10234 #[inline(always)]
10235 fn new_empty() -> Self {
10236 Self {
10237 sme_server: fidl::new_empty!(
10238 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
10239 fidl::encoding::DefaultFuchsiaResourceDialect
10240 ),
10241 }
10242 }
10243
10244 #[inline]
10245 unsafe fn decode(
10246 &mut self,
10247 decoder: &mut fidl::encoding::Decoder<
10248 '_,
10249 fidl::encoding::DefaultFuchsiaResourceDialect,
10250 >,
10251 offset: usize,
10252 _depth: fidl::encoding::Depth,
10253 ) -> fidl::Result<()> {
10254 decoder.debug_check_bounds::<Self>(offset);
10255 fidl::decode!(
10257 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
10258 fidl::encoding::DefaultFuchsiaResourceDialect,
10259 &mut self.sme_server,
10260 decoder,
10261 offset + 0,
10262 _depth
10263 )?;
10264 Ok(())
10265 }
10266 }
10267
10268 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetClientSmeRequest {
10269 type Borrowed<'a> = &'a mut Self;
10270 fn take_or_borrow<'a>(
10271 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10272 ) -> Self::Borrowed<'a> {
10273 value
10274 }
10275 }
10276
10277 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetClientSmeRequest {
10278 type Owned = Self;
10279
10280 #[inline(always)]
10281 fn inline_align(_context: fidl::encoding::Context) -> usize {
10282 4
10283 }
10284
10285 #[inline(always)]
10286 fn inline_size(_context: fidl::encoding::Context) -> usize {
10287 4
10288 }
10289 }
10290
10291 unsafe impl
10292 fidl::encoding::Encode<
10293 GenericSmeGetClientSmeRequest,
10294 fidl::encoding::DefaultFuchsiaResourceDialect,
10295 > for &mut GenericSmeGetClientSmeRequest
10296 {
10297 #[inline]
10298 unsafe fn encode(
10299 self,
10300 encoder: &mut fidl::encoding::Encoder<
10301 '_,
10302 fidl::encoding::DefaultFuchsiaResourceDialect,
10303 >,
10304 offset: usize,
10305 _depth: fidl::encoding::Depth,
10306 ) -> fidl::Result<()> {
10307 encoder.debug_check_bounds::<GenericSmeGetClientSmeRequest>(offset);
10308 fidl::encoding::Encode::<GenericSmeGetClientSmeRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10310 (
10311 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sme_server),
10312 ),
10313 encoder, offset, _depth
10314 )
10315 }
10316 }
10317 unsafe impl<
10318 T0: fidl::encoding::Encode<
10319 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
10320 fidl::encoding::DefaultFuchsiaResourceDialect,
10321 >,
10322 >
10323 fidl::encoding::Encode<
10324 GenericSmeGetClientSmeRequest,
10325 fidl::encoding::DefaultFuchsiaResourceDialect,
10326 > for (T0,)
10327 {
10328 #[inline]
10329 unsafe fn encode(
10330 self,
10331 encoder: &mut fidl::encoding::Encoder<
10332 '_,
10333 fidl::encoding::DefaultFuchsiaResourceDialect,
10334 >,
10335 offset: usize,
10336 depth: fidl::encoding::Depth,
10337 ) -> fidl::Result<()> {
10338 encoder.debug_check_bounds::<GenericSmeGetClientSmeRequest>(offset);
10339 self.0.encode(encoder, offset + 0, depth)?;
10343 Ok(())
10344 }
10345 }
10346
10347 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10348 for GenericSmeGetClientSmeRequest
10349 {
10350 #[inline(always)]
10351 fn new_empty() -> Self {
10352 Self {
10353 sme_server: fidl::new_empty!(
10354 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
10355 fidl::encoding::DefaultFuchsiaResourceDialect
10356 ),
10357 }
10358 }
10359
10360 #[inline]
10361 unsafe fn decode(
10362 &mut self,
10363 decoder: &mut fidl::encoding::Decoder<
10364 '_,
10365 fidl::encoding::DefaultFuchsiaResourceDialect,
10366 >,
10367 offset: usize,
10368 _depth: fidl::encoding::Depth,
10369 ) -> fidl::Result<()> {
10370 decoder.debug_check_bounds::<Self>(offset);
10371 fidl::decode!(
10373 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
10374 fidl::encoding::DefaultFuchsiaResourceDialect,
10375 &mut self.sme_server,
10376 decoder,
10377 offset + 0,
10378 _depth
10379 )?;
10380 Ok(())
10381 }
10382 }
10383
10384 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetFeatureSupportRequest {
10385 type Borrowed<'a> = &'a mut Self;
10386 fn take_or_borrow<'a>(
10387 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10388 ) -> Self::Borrowed<'a> {
10389 value
10390 }
10391 }
10392
10393 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetFeatureSupportRequest {
10394 type Owned = Self;
10395
10396 #[inline(always)]
10397 fn inline_align(_context: fidl::encoding::Context) -> usize {
10398 4
10399 }
10400
10401 #[inline(always)]
10402 fn inline_size(_context: fidl::encoding::Context) -> usize {
10403 4
10404 }
10405 }
10406
10407 unsafe impl
10408 fidl::encoding::Encode<
10409 GenericSmeGetFeatureSupportRequest,
10410 fidl::encoding::DefaultFuchsiaResourceDialect,
10411 > for &mut GenericSmeGetFeatureSupportRequest
10412 {
10413 #[inline]
10414 unsafe fn encode(
10415 self,
10416 encoder: &mut fidl::encoding::Encoder<
10417 '_,
10418 fidl::encoding::DefaultFuchsiaResourceDialect,
10419 >,
10420 offset: usize,
10421 _depth: fidl::encoding::Depth,
10422 ) -> fidl::Result<()> {
10423 encoder.debug_check_bounds::<GenericSmeGetFeatureSupportRequest>(offset);
10424 fidl::encoding::Encode::<GenericSmeGetFeatureSupportRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10426 (
10427 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<FeatureSupportMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.feature_support_server),
10428 ),
10429 encoder, offset, _depth
10430 )
10431 }
10432 }
10433 unsafe impl<
10434 T0: fidl::encoding::Encode<
10435 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<FeatureSupportMarker>>,
10436 fidl::encoding::DefaultFuchsiaResourceDialect,
10437 >,
10438 >
10439 fidl::encoding::Encode<
10440 GenericSmeGetFeatureSupportRequest,
10441 fidl::encoding::DefaultFuchsiaResourceDialect,
10442 > for (T0,)
10443 {
10444 #[inline]
10445 unsafe fn encode(
10446 self,
10447 encoder: &mut fidl::encoding::Encoder<
10448 '_,
10449 fidl::encoding::DefaultFuchsiaResourceDialect,
10450 >,
10451 offset: usize,
10452 depth: fidl::encoding::Depth,
10453 ) -> fidl::Result<()> {
10454 encoder.debug_check_bounds::<GenericSmeGetFeatureSupportRequest>(offset);
10455 self.0.encode(encoder, offset + 0, depth)?;
10459 Ok(())
10460 }
10461 }
10462
10463 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10464 for GenericSmeGetFeatureSupportRequest
10465 {
10466 #[inline(always)]
10467 fn new_empty() -> Self {
10468 Self {
10469 feature_support_server: fidl::new_empty!(
10470 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<FeatureSupportMarker>>,
10471 fidl::encoding::DefaultFuchsiaResourceDialect
10472 ),
10473 }
10474 }
10475
10476 #[inline]
10477 unsafe fn decode(
10478 &mut self,
10479 decoder: &mut fidl::encoding::Decoder<
10480 '_,
10481 fidl::encoding::DefaultFuchsiaResourceDialect,
10482 >,
10483 offset: usize,
10484 _depth: fidl::encoding::Depth,
10485 ) -> fidl::Result<()> {
10486 decoder.debug_check_bounds::<Self>(offset);
10487 fidl::decode!(
10489 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<FeatureSupportMarker>>,
10490 fidl::encoding::DefaultFuchsiaResourceDialect,
10491 &mut self.feature_support_server,
10492 decoder,
10493 offset + 0,
10494 _depth
10495 )?;
10496 Ok(())
10497 }
10498 }
10499
10500 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetSmeTelemetryRequest {
10501 type Borrowed<'a> = &'a mut Self;
10502 fn take_or_borrow<'a>(
10503 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10504 ) -> Self::Borrowed<'a> {
10505 value
10506 }
10507 }
10508
10509 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetSmeTelemetryRequest {
10510 type Owned = Self;
10511
10512 #[inline(always)]
10513 fn inline_align(_context: fidl::encoding::Context) -> usize {
10514 4
10515 }
10516
10517 #[inline(always)]
10518 fn inline_size(_context: fidl::encoding::Context) -> usize {
10519 4
10520 }
10521 }
10522
10523 unsafe impl
10524 fidl::encoding::Encode<
10525 GenericSmeGetSmeTelemetryRequest,
10526 fidl::encoding::DefaultFuchsiaResourceDialect,
10527 > for &mut GenericSmeGetSmeTelemetryRequest
10528 {
10529 #[inline]
10530 unsafe fn encode(
10531 self,
10532 encoder: &mut fidl::encoding::Encoder<
10533 '_,
10534 fidl::encoding::DefaultFuchsiaResourceDialect,
10535 >,
10536 offset: usize,
10537 _depth: fidl::encoding::Depth,
10538 ) -> fidl::Result<()> {
10539 encoder.debug_check_bounds::<GenericSmeGetSmeTelemetryRequest>(offset);
10540 fidl::encoding::Encode::<GenericSmeGetSmeTelemetryRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10542 (
10543 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.telemetry_server),
10544 ),
10545 encoder, offset, _depth
10546 )
10547 }
10548 }
10549 unsafe impl<
10550 T0: fidl::encoding::Encode<
10551 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
10552 fidl::encoding::DefaultFuchsiaResourceDialect,
10553 >,
10554 >
10555 fidl::encoding::Encode<
10556 GenericSmeGetSmeTelemetryRequest,
10557 fidl::encoding::DefaultFuchsiaResourceDialect,
10558 > for (T0,)
10559 {
10560 #[inline]
10561 unsafe fn encode(
10562 self,
10563 encoder: &mut fidl::encoding::Encoder<
10564 '_,
10565 fidl::encoding::DefaultFuchsiaResourceDialect,
10566 >,
10567 offset: usize,
10568 depth: fidl::encoding::Depth,
10569 ) -> fidl::Result<()> {
10570 encoder.debug_check_bounds::<GenericSmeGetSmeTelemetryRequest>(offset);
10571 self.0.encode(encoder, offset + 0, depth)?;
10575 Ok(())
10576 }
10577 }
10578
10579 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10580 for GenericSmeGetSmeTelemetryRequest
10581 {
10582 #[inline(always)]
10583 fn new_empty() -> Self {
10584 Self {
10585 telemetry_server: fidl::new_empty!(
10586 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
10587 fidl::encoding::DefaultFuchsiaResourceDialect
10588 ),
10589 }
10590 }
10591
10592 #[inline]
10593 unsafe fn decode(
10594 &mut self,
10595 decoder: &mut fidl::encoding::Decoder<
10596 '_,
10597 fidl::encoding::DefaultFuchsiaResourceDialect,
10598 >,
10599 offset: usize,
10600 _depth: fidl::encoding::Depth,
10601 ) -> fidl::Result<()> {
10602 decoder.debug_check_bounds::<Self>(offset);
10603 fidl::decode!(
10605 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
10606 fidl::encoding::DefaultFuchsiaResourceDialect,
10607 &mut self.telemetry_server,
10608 decoder,
10609 offset + 0,
10610 _depth
10611 )?;
10612 Ok(())
10613 }
10614 }
10615
10616 impl fidl::encoding::ValueTypeMarker for GenericSmeQuery {
10617 type Borrowed<'a> = &'a Self;
10618 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10619 value
10620 }
10621 }
10622
10623 unsafe impl fidl::encoding::TypeMarker for GenericSmeQuery {
10624 type Owned = Self;
10625
10626 #[inline(always)]
10627 fn inline_align(_context: fidl::encoding::Context) -> usize {
10628 4
10629 }
10630
10631 #[inline(always)]
10632 fn inline_size(_context: fidl::encoding::Context) -> usize {
10633 12
10634 }
10635 }
10636
10637 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GenericSmeQuery, D>
10638 for &GenericSmeQuery
10639 {
10640 #[inline]
10641 unsafe fn encode(
10642 self,
10643 encoder: &mut fidl::encoding::Encoder<'_, D>,
10644 offset: usize,
10645 _depth: fidl::encoding::Depth,
10646 ) -> fidl::Result<()> {
10647 encoder.debug_check_bounds::<GenericSmeQuery>(offset);
10648 fidl::encoding::Encode::<GenericSmeQuery, D>::encode(
10650 (
10651 <fidl_fuchsia_wlan_common::WlanMacRole as fidl::encoding::ValueTypeMarker>::borrow(&self.role),
10652 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.sta_addr),
10653 ),
10654 encoder, offset, _depth
10655 )
10656 }
10657 }
10658 unsafe impl<
10659 D: fidl::encoding::ResourceDialect,
10660 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanMacRole, D>,
10661 T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
10662 > fidl::encoding::Encode<GenericSmeQuery, D> for (T0, T1)
10663 {
10664 #[inline]
10665 unsafe fn encode(
10666 self,
10667 encoder: &mut fidl::encoding::Encoder<'_, D>,
10668 offset: usize,
10669 depth: fidl::encoding::Depth,
10670 ) -> fidl::Result<()> {
10671 encoder.debug_check_bounds::<GenericSmeQuery>(offset);
10672 unsafe {
10675 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
10676 (ptr as *mut u32).write_unaligned(0);
10677 }
10678 self.0.encode(encoder, offset + 0, depth)?;
10680 self.1.encode(encoder, offset + 4, depth)?;
10681 Ok(())
10682 }
10683 }
10684
10685 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GenericSmeQuery {
10686 #[inline(always)]
10687 fn new_empty() -> Self {
10688 Self {
10689 role: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanMacRole, D),
10690 sta_addr: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
10691 }
10692 }
10693
10694 #[inline]
10695 unsafe fn decode(
10696 &mut self,
10697 decoder: &mut fidl::encoding::Decoder<'_, D>,
10698 offset: usize,
10699 _depth: fidl::encoding::Depth,
10700 ) -> fidl::Result<()> {
10701 decoder.debug_check_bounds::<Self>(offset);
10702 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
10704 let padval = unsafe { (ptr as *const u32).read_unaligned() };
10705 let mask = 0xffff0000u32;
10706 let maskedval = padval & mask;
10707 if maskedval != 0 {
10708 return Err(fidl::Error::NonZeroPadding {
10709 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
10710 });
10711 }
10712 fidl::decode!(
10713 fidl_fuchsia_wlan_common::WlanMacRole,
10714 D,
10715 &mut self.role,
10716 decoder,
10717 offset + 0,
10718 _depth
10719 )?;
10720 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.sta_addr, decoder, offset + 4, _depth)?;
10721 Ok(())
10722 }
10723 }
10724
10725 impl fidl::encoding::ResourceTypeMarker for GenericSmeQueryResponse {
10726 type Borrowed<'a> = &'a mut Self;
10727 fn take_or_borrow<'a>(
10728 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10729 ) -> Self::Borrowed<'a> {
10730 value
10731 }
10732 }
10733
10734 unsafe impl fidl::encoding::TypeMarker for GenericSmeQueryResponse {
10735 type Owned = Self;
10736
10737 #[inline(always)]
10738 fn inline_align(_context: fidl::encoding::Context) -> usize {
10739 4
10740 }
10741
10742 #[inline(always)]
10743 fn inline_size(_context: fidl::encoding::Context) -> usize {
10744 12
10745 }
10746 }
10747
10748 unsafe impl
10749 fidl::encoding::Encode<
10750 GenericSmeQueryResponse,
10751 fidl::encoding::DefaultFuchsiaResourceDialect,
10752 > for &mut GenericSmeQueryResponse
10753 {
10754 #[inline]
10755 unsafe fn encode(
10756 self,
10757 encoder: &mut fidl::encoding::Encoder<
10758 '_,
10759 fidl::encoding::DefaultFuchsiaResourceDialect,
10760 >,
10761 offset: usize,
10762 _depth: fidl::encoding::Depth,
10763 ) -> fidl::Result<()> {
10764 encoder.debug_check_bounds::<GenericSmeQueryResponse>(offset);
10765 fidl::encoding::Encode::<
10767 GenericSmeQueryResponse,
10768 fidl::encoding::DefaultFuchsiaResourceDialect,
10769 >::encode(
10770 (<GenericSmeQuery as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
10771 encoder,
10772 offset,
10773 _depth,
10774 )
10775 }
10776 }
10777 unsafe impl<
10778 T0: fidl::encoding::Encode<GenericSmeQuery, fidl::encoding::DefaultFuchsiaResourceDialect>,
10779 >
10780 fidl::encoding::Encode<
10781 GenericSmeQueryResponse,
10782 fidl::encoding::DefaultFuchsiaResourceDialect,
10783 > for (T0,)
10784 {
10785 #[inline]
10786 unsafe fn encode(
10787 self,
10788 encoder: &mut fidl::encoding::Encoder<
10789 '_,
10790 fidl::encoding::DefaultFuchsiaResourceDialect,
10791 >,
10792 offset: usize,
10793 depth: fidl::encoding::Depth,
10794 ) -> fidl::Result<()> {
10795 encoder.debug_check_bounds::<GenericSmeQueryResponse>(offset);
10796 self.0.encode(encoder, offset + 0, depth)?;
10800 Ok(())
10801 }
10802 }
10803
10804 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10805 for GenericSmeQueryResponse
10806 {
10807 #[inline(always)]
10808 fn new_empty() -> Self {
10809 Self {
10810 resp: fidl::new_empty!(
10811 GenericSmeQuery,
10812 fidl::encoding::DefaultFuchsiaResourceDialect
10813 ),
10814 }
10815 }
10816
10817 #[inline]
10818 unsafe fn decode(
10819 &mut self,
10820 decoder: &mut fidl::encoding::Decoder<
10821 '_,
10822 fidl::encoding::DefaultFuchsiaResourceDialect,
10823 >,
10824 offset: usize,
10825 _depth: fidl::encoding::Depth,
10826 ) -> fidl::Result<()> {
10827 decoder.debug_check_bounds::<Self>(offset);
10828 fidl::decode!(
10830 GenericSmeQuery,
10831 fidl::encoding::DefaultFuchsiaResourceDialect,
10832 &mut self.resp,
10833 decoder,
10834 offset + 0,
10835 _depth
10836 )?;
10837 Ok(())
10838 }
10839 }
10840
10841 impl fidl::encoding::ValueTypeMarker for Incompatible {
10842 type Borrowed<'a> = &'a Self;
10843 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10844 value
10845 }
10846 }
10847
10848 unsafe impl fidl::encoding::TypeMarker for Incompatible {
10849 type Owned = Self;
10850
10851 #[inline(always)]
10852 fn inline_align(_context: fidl::encoding::Context) -> usize {
10853 8
10854 }
10855
10856 #[inline(always)]
10857 fn inline_size(_context: fidl::encoding::Context) -> usize {
10858 32
10859 }
10860 }
10861
10862 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Incompatible, D>
10863 for &Incompatible
10864 {
10865 #[inline]
10866 unsafe fn encode(
10867 self,
10868 encoder: &mut fidl::encoding::Encoder<'_, D>,
10869 offset: usize,
10870 _depth: fidl::encoding::Depth,
10871 ) -> fidl::Result<()> {
10872 encoder.debug_check_bounds::<Incompatible>(offset);
10873 fidl::encoding::Encode::<Incompatible, D>::encode(
10875 (
10876 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.description),
10877 <fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.disjoint_security_protocols),
10878 ),
10879 encoder, offset, _depth
10880 )
10881 }
10882 }
10883 unsafe impl<
10884 D: fidl::encoding::ResourceDialect,
10885 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
10886 T1: fidl::encoding::Encode<
10887 fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>>,
10888 D,
10889 >,
10890 > fidl::encoding::Encode<Incompatible, D> for (T0, T1)
10891 {
10892 #[inline]
10893 unsafe fn encode(
10894 self,
10895 encoder: &mut fidl::encoding::Encoder<'_, D>,
10896 offset: usize,
10897 depth: fidl::encoding::Depth,
10898 ) -> fidl::Result<()> {
10899 encoder.debug_check_bounds::<Incompatible>(offset);
10900 self.0.encode(encoder, offset + 0, depth)?;
10904 self.1.encode(encoder, offset + 16, depth)?;
10905 Ok(())
10906 }
10907 }
10908
10909 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Incompatible {
10910 #[inline(always)]
10911 fn new_empty() -> Self {
10912 Self {
10913 description: fidl::new_empty!(fidl::encoding::UnboundedString, D),
10914 disjoint_security_protocols: fidl::new_empty!(
10915 fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>>,
10916 D
10917 ),
10918 }
10919 }
10920
10921 #[inline]
10922 unsafe fn decode(
10923 &mut self,
10924 decoder: &mut fidl::encoding::Decoder<'_, D>,
10925 offset: usize,
10926 _depth: fidl::encoding::Depth,
10927 ) -> fidl::Result<()> {
10928 decoder.debug_check_bounds::<Self>(offset);
10929 fidl::decode!(
10931 fidl::encoding::UnboundedString,
10932 D,
10933 &mut self.description,
10934 decoder,
10935 offset + 0,
10936 _depth
10937 )?;
10938 fidl::decode!(
10939 fidl::encoding::Optional<fidl::encoding::Vector<DisjointSecurityProtocol, 32>>,
10940 D,
10941 &mut self.disjoint_security_protocols,
10942 decoder,
10943 offset + 16,
10944 _depth
10945 )?;
10946 Ok(())
10947 }
10948 }
10949
10950 impl fidl::encoding::ValueTypeMarker for LegacyPrivacySupport {
10951 type Borrowed<'a> = &'a Self;
10952 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10953 value
10954 }
10955 }
10956
10957 unsafe impl fidl::encoding::TypeMarker for LegacyPrivacySupport {
10958 type Owned = Self;
10959
10960 #[inline(always)]
10961 fn inline_align(_context: fidl::encoding::Context) -> usize {
10962 1
10963 }
10964
10965 #[inline(always)]
10966 fn inline_size(_context: fidl::encoding::Context) -> usize {
10967 2
10968 }
10969 }
10970
10971 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LegacyPrivacySupport, D>
10972 for &LegacyPrivacySupport
10973 {
10974 #[inline]
10975 unsafe fn encode(
10976 self,
10977 encoder: &mut fidl::encoding::Encoder<'_, D>,
10978 offset: usize,
10979 _depth: fidl::encoding::Depth,
10980 ) -> fidl::Result<()> {
10981 encoder.debug_check_bounds::<LegacyPrivacySupport>(offset);
10982 fidl::encoding::Encode::<LegacyPrivacySupport, D>::encode(
10984 (
10985 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.wep_supported),
10986 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.wpa1_supported),
10987 ),
10988 encoder,
10989 offset,
10990 _depth,
10991 )
10992 }
10993 }
10994 unsafe impl<
10995 D: fidl::encoding::ResourceDialect,
10996 T0: fidl::encoding::Encode<bool, D>,
10997 T1: fidl::encoding::Encode<bool, D>,
10998 > fidl::encoding::Encode<LegacyPrivacySupport, D> for (T0, T1)
10999 {
11000 #[inline]
11001 unsafe fn encode(
11002 self,
11003 encoder: &mut fidl::encoding::Encoder<'_, D>,
11004 offset: usize,
11005 depth: fidl::encoding::Depth,
11006 ) -> fidl::Result<()> {
11007 encoder.debug_check_bounds::<LegacyPrivacySupport>(offset);
11008 self.0.encode(encoder, offset + 0, depth)?;
11012 self.1.encode(encoder, offset + 1, depth)?;
11013 Ok(())
11014 }
11015 }
11016
11017 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LegacyPrivacySupport {
11018 #[inline(always)]
11019 fn new_empty() -> Self {
11020 Self {
11021 wep_supported: fidl::new_empty!(bool, D),
11022 wpa1_supported: fidl::new_empty!(bool, D),
11023 }
11024 }
11025
11026 #[inline]
11027 unsafe fn decode(
11028 &mut self,
11029 decoder: &mut fidl::encoding::Decoder<'_, D>,
11030 offset: usize,
11031 _depth: fidl::encoding::Depth,
11032 ) -> fidl::Result<()> {
11033 decoder.debug_check_bounds::<Self>(offset);
11034 fidl::decode!(bool, D, &mut self.wep_supported, decoder, offset + 0, _depth)?;
11036 fidl::decode!(bool, D, &mut self.wpa1_supported, decoder, offset + 1, _depth)?;
11037 Ok(())
11038 }
11039 }
11040
11041 impl fidl::encoding::ValueTypeMarker for PassiveScanRequest {
11042 type Borrowed<'a> = &'a Self;
11043 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11044 value
11045 }
11046 }
11047
11048 unsafe impl fidl::encoding::TypeMarker for PassiveScanRequest {
11049 type Owned = Self;
11050
11051 #[inline(always)]
11052 fn inline_align(_context: fidl::encoding::Context) -> usize {
11053 1
11054 }
11055
11056 #[inline(always)]
11057 fn inline_size(_context: fidl::encoding::Context) -> usize {
11058 1
11059 }
11060 }
11061
11062 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PassiveScanRequest, D>
11063 for &PassiveScanRequest
11064 {
11065 #[inline]
11066 unsafe fn encode(
11067 self,
11068 encoder: &mut fidl::encoding::Encoder<'_, D>,
11069 offset: usize,
11070 _depth: fidl::encoding::Depth,
11071 ) -> fidl::Result<()> {
11072 encoder.debug_check_bounds::<PassiveScanRequest>(offset);
11073 encoder.write_num(0u8, offset);
11074 Ok(())
11075 }
11076 }
11077
11078 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PassiveScanRequest {
11079 #[inline(always)]
11080 fn new_empty() -> Self {
11081 Self
11082 }
11083
11084 #[inline]
11085 unsafe fn decode(
11086 &mut self,
11087 decoder: &mut fidl::encoding::Decoder<'_, D>,
11088 offset: usize,
11089 _depth: fidl::encoding::Depth,
11090 ) -> fidl::Result<()> {
11091 decoder.debug_check_bounds::<Self>(offset);
11092 match decoder.read_num::<u8>(offset) {
11093 0 => Ok(()),
11094 _ => Err(fidl::Error::Invalid),
11095 }
11096 }
11097 }
11098
11099 impl fidl::encoding::ValueTypeMarker for RadioConfig {
11100 type Borrowed<'a> = &'a Self;
11101 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11102 value
11103 }
11104 }
11105
11106 unsafe impl fidl::encoding::TypeMarker for RadioConfig {
11107 type Owned = Self;
11108
11109 #[inline(always)]
11110 fn inline_align(_context: fidl::encoding::Context) -> usize {
11111 4
11112 }
11113
11114 #[inline(always)]
11115 fn inline_size(_context: fidl::encoding::Context) -> usize {
11116 16
11117 }
11118 }
11119
11120 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RadioConfig, D>
11121 for &RadioConfig
11122 {
11123 #[inline]
11124 unsafe fn encode(
11125 self,
11126 encoder: &mut fidl::encoding::Encoder<'_, D>,
11127 offset: usize,
11128 _depth: fidl::encoding::Depth,
11129 ) -> fidl::Result<()> {
11130 encoder.debug_check_bounds::<RadioConfig>(offset);
11131 fidl::encoding::Encode::<RadioConfig, D>::encode(
11133 (
11134 <fidl_fuchsia_wlan_common::WlanPhyType as fidl::encoding::ValueTypeMarker>::borrow(&self.phy),
11135 <fidl_fuchsia_wlan_common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
11136 ),
11137 encoder, offset, _depth
11138 )
11139 }
11140 }
11141 unsafe impl<
11142 D: fidl::encoding::ResourceDialect,
11143 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanPhyType, D>,
11144 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanChannel, D>,
11145 > fidl::encoding::Encode<RadioConfig, D> for (T0, T1)
11146 {
11147 #[inline]
11148 unsafe fn encode(
11149 self,
11150 encoder: &mut fidl::encoding::Encoder<'_, D>,
11151 offset: usize,
11152 depth: fidl::encoding::Depth,
11153 ) -> fidl::Result<()> {
11154 encoder.debug_check_bounds::<RadioConfig>(offset);
11155 self.0.encode(encoder, offset + 0, depth)?;
11159 self.1.encode(encoder, offset + 4, depth)?;
11160 Ok(())
11161 }
11162 }
11163
11164 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RadioConfig {
11165 #[inline(always)]
11166 fn new_empty() -> Self {
11167 Self {
11168 phy: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanPhyType, D),
11169 channel: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanChannel, D),
11170 }
11171 }
11172
11173 #[inline]
11174 unsafe fn decode(
11175 &mut self,
11176 decoder: &mut fidl::encoding::Decoder<'_, D>,
11177 offset: usize,
11178 _depth: fidl::encoding::Depth,
11179 ) -> fidl::Result<()> {
11180 decoder.debug_check_bounds::<Self>(offset);
11181 fidl::decode!(
11183 fidl_fuchsia_wlan_common::WlanPhyType,
11184 D,
11185 &mut self.phy,
11186 decoder,
11187 offset + 0,
11188 _depth
11189 )?;
11190 fidl::decode!(
11191 fidl_fuchsia_wlan_common::WlanChannel,
11192 D,
11193 &mut self.channel,
11194 decoder,
11195 offset + 4,
11196 _depth
11197 )?;
11198 Ok(())
11199 }
11200 }
11201
11202 impl fidl::encoding::ValueTypeMarker for RoamRequest {
11203 type Borrowed<'a> = &'a Self;
11204 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11205 value
11206 }
11207 }
11208
11209 unsafe impl fidl::encoding::TypeMarker for RoamRequest {
11210 type Owned = Self;
11211
11212 #[inline(always)]
11213 fn inline_align(_context: fidl::encoding::Context) -> usize {
11214 8
11215 }
11216
11217 #[inline(always)]
11218 fn inline_size(_context: fidl::encoding::Context) -> usize {
11219 48
11220 }
11221 }
11222
11223 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamRequest, D>
11224 for &RoamRequest
11225 {
11226 #[inline]
11227 unsafe fn encode(
11228 self,
11229 encoder: &mut fidl::encoding::Encoder<'_, D>,
11230 offset: usize,
11231 _depth: fidl::encoding::Depth,
11232 ) -> fidl::Result<()> {
11233 encoder.debug_check_bounds::<RoamRequest>(offset);
11234 fidl::encoding::Encode::<RoamRequest, D>::encode(
11236 (
11237 <fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
11238 ),
11239 encoder, offset, _depth
11240 )
11241 }
11242 }
11243 unsafe impl<
11244 D: fidl::encoding::ResourceDialect,
11245 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssDescription, D>,
11246 > fidl::encoding::Encode<RoamRequest, D> for (T0,)
11247 {
11248 #[inline]
11249 unsafe fn encode(
11250 self,
11251 encoder: &mut fidl::encoding::Encoder<'_, D>,
11252 offset: usize,
11253 depth: fidl::encoding::Depth,
11254 ) -> fidl::Result<()> {
11255 encoder.debug_check_bounds::<RoamRequest>(offset);
11256 self.0.encode(encoder, offset + 0, depth)?;
11260 Ok(())
11261 }
11262 }
11263
11264 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamRequest {
11265 #[inline(always)]
11266 fn new_empty() -> Self {
11267 Self { bss_description: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D) }
11268 }
11269
11270 #[inline]
11271 unsafe fn decode(
11272 &mut self,
11273 decoder: &mut fidl::encoding::Decoder<'_, D>,
11274 offset: usize,
11275 _depth: fidl::encoding::Depth,
11276 ) -> fidl::Result<()> {
11277 decoder.debug_check_bounds::<Self>(offset);
11278 fidl::decode!(
11280 fidl_fuchsia_wlan_common::BssDescription,
11281 D,
11282 &mut self.bss_description,
11283 decoder,
11284 offset + 0,
11285 _depth
11286 )?;
11287 Ok(())
11288 }
11289 }
11290
11291 impl fidl::encoding::ValueTypeMarker for RoamResult {
11292 type Borrowed<'a> = &'a Self;
11293 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11294 value
11295 }
11296 }
11297
11298 unsafe impl fidl::encoding::TypeMarker for RoamResult {
11299 type Owned = Self;
11300
11301 #[inline(always)]
11302 fn inline_align(_context: fidl::encoding::Context) -> usize {
11303 8
11304 }
11305
11306 #[inline(always)]
11307 fn inline_size(_context: fidl::encoding::Context) -> usize {
11308 40
11309 }
11310 }
11311
11312 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoamResult, D>
11313 for &RoamResult
11314 {
11315 #[inline]
11316 unsafe fn encode(
11317 self,
11318 encoder: &mut fidl::encoding::Encoder<'_, D>,
11319 offset: usize,
11320 _depth: fidl::encoding::Depth,
11321 ) -> fidl::Result<()> {
11322 encoder.debug_check_bounds::<RoamResult>(offset);
11323 fidl::encoding::Encode::<RoamResult, D>::encode(
11325 (
11326 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.bssid),
11327 <fidl_fuchsia_wlan_ieee80211::StatusCode as fidl::encoding::ValueTypeMarker>::borrow(&self.status_code),
11328 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.original_association_maintained),
11329 <fidl::encoding::Boxed<fidl_fuchsia_wlan_common::BssDescription> as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
11330 <fidl::encoding::Boxed<DisconnectInfo> as fidl::encoding::ValueTypeMarker>::borrow(&self.disconnect_info),
11331 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_credential_rejected),
11332 ),
11333 encoder, offset, _depth
11334 )
11335 }
11336 }
11337 unsafe impl<
11338 D: fidl::encoding::ResourceDialect,
11339 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
11340 T1: fidl::encoding::Encode<fidl_fuchsia_wlan_ieee80211::StatusCode, D>,
11341 T2: fidl::encoding::Encode<bool, D>,
11342 T3: fidl::encoding::Encode<
11343 fidl::encoding::Boxed<fidl_fuchsia_wlan_common::BssDescription>,
11344 D,
11345 >,
11346 T4: fidl::encoding::Encode<fidl::encoding::Boxed<DisconnectInfo>, D>,
11347 T5: fidl::encoding::Encode<bool, D>,
11348 > fidl::encoding::Encode<RoamResult, D> for (T0, T1, T2, T3, T4, T5)
11349 {
11350 #[inline]
11351 unsafe fn encode(
11352 self,
11353 encoder: &mut fidl::encoding::Encoder<'_, D>,
11354 offset: usize,
11355 depth: fidl::encoding::Depth,
11356 ) -> fidl::Result<()> {
11357 encoder.debug_check_bounds::<RoamResult>(offset);
11358 unsafe {
11361 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
11362 (ptr as *mut u64).write_unaligned(0);
11363 }
11364 unsafe {
11365 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
11366 (ptr as *mut u64).write_unaligned(0);
11367 }
11368 self.0.encode(encoder, offset + 0, depth)?;
11370 self.1.encode(encoder, offset + 6, depth)?;
11371 self.2.encode(encoder, offset + 8, depth)?;
11372 self.3.encode(encoder, offset + 16, depth)?;
11373 self.4.encode(encoder, offset + 24, depth)?;
11374 self.5.encode(encoder, offset + 32, depth)?;
11375 Ok(())
11376 }
11377 }
11378
11379 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoamResult {
11380 #[inline(always)]
11381 fn new_empty() -> Self {
11382 Self {
11383 bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
11384 status_code: fidl::new_empty!(fidl_fuchsia_wlan_ieee80211::StatusCode, D),
11385 original_association_maintained: fidl::new_empty!(bool, D),
11386 bss_description: fidl::new_empty!(
11387 fidl::encoding::Boxed<fidl_fuchsia_wlan_common::BssDescription>,
11388 D
11389 ),
11390 disconnect_info: fidl::new_empty!(fidl::encoding::Boxed<DisconnectInfo>, D),
11391 is_credential_rejected: fidl::new_empty!(bool, D),
11392 }
11393 }
11394
11395 #[inline]
11396 unsafe fn decode(
11397 &mut self,
11398 decoder: &mut fidl::encoding::Decoder<'_, D>,
11399 offset: usize,
11400 _depth: fidl::encoding::Depth,
11401 ) -> fidl::Result<()> {
11402 decoder.debug_check_bounds::<Self>(offset);
11403 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
11405 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11406 let mask = 0xffffffffffffff00u64;
11407 let maskedval = padval & mask;
11408 if maskedval != 0 {
11409 return Err(fidl::Error::NonZeroPadding {
11410 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
11411 });
11412 }
11413 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
11414 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11415 let mask = 0xffffffffffffff00u64;
11416 let maskedval = padval & mask;
11417 if maskedval != 0 {
11418 return Err(fidl::Error::NonZeroPadding {
11419 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
11420 });
11421 }
11422 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.bssid, decoder, offset + 0, _depth)?;
11423 fidl::decode!(
11424 fidl_fuchsia_wlan_ieee80211::StatusCode,
11425 D,
11426 &mut self.status_code,
11427 decoder,
11428 offset + 6,
11429 _depth
11430 )?;
11431 fidl::decode!(
11432 bool,
11433 D,
11434 &mut self.original_association_maintained,
11435 decoder,
11436 offset + 8,
11437 _depth
11438 )?;
11439 fidl::decode!(
11440 fidl::encoding::Boxed<fidl_fuchsia_wlan_common::BssDescription>,
11441 D,
11442 &mut self.bss_description,
11443 decoder,
11444 offset + 16,
11445 _depth
11446 )?;
11447 fidl::decode!(
11448 fidl::encoding::Boxed<DisconnectInfo>,
11449 D,
11450 &mut self.disconnect_info,
11451 decoder,
11452 offset + 24,
11453 _depth
11454 )?;
11455 fidl::decode!(bool, D, &mut self.is_credential_rejected, decoder, offset + 32, _depth)?;
11456 Ok(())
11457 }
11458 }
11459
11460 impl fidl::encoding::ValueTypeMarker for ScanResult {
11461 type Borrowed<'a> = &'a Self;
11462 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11463 value
11464 }
11465 }
11466
11467 unsafe impl fidl::encoding::TypeMarker for ScanResult {
11468 type Owned = Self;
11469
11470 #[inline(always)]
11471 fn inline_align(_context: fidl::encoding::Context) -> usize {
11472 8
11473 }
11474
11475 #[inline(always)]
11476 fn inline_size(_context: fidl::encoding::Context) -> usize {
11477 72
11478 }
11479 }
11480
11481 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanResult, D>
11482 for &ScanResult
11483 {
11484 #[inline]
11485 unsafe fn encode(
11486 self,
11487 encoder: &mut fidl::encoding::Encoder<'_, D>,
11488 offset: usize,
11489 _depth: fidl::encoding::Depth,
11490 ) -> fidl::Result<()> {
11491 encoder.debug_check_bounds::<ScanResult>(offset);
11492 fidl::encoding::Encode::<ScanResult, D>::encode(
11494 (
11495 <Compatibility as fidl::encoding::ValueTypeMarker>::borrow(&self.compatibility),
11496 <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.timestamp_nanos),
11497 <fidl_fuchsia_wlan_common::BssDescription as fidl::encoding::ValueTypeMarker>::borrow(&self.bss_description),
11498 ),
11499 encoder, offset, _depth
11500 )
11501 }
11502 }
11503 unsafe impl<
11504 D: fidl::encoding::ResourceDialect,
11505 T0: fidl::encoding::Encode<Compatibility, D>,
11506 T1: fidl::encoding::Encode<i64, D>,
11507 T2: fidl::encoding::Encode<fidl_fuchsia_wlan_common::BssDescription, D>,
11508 > fidl::encoding::Encode<ScanResult, D> for (T0, T1, T2)
11509 {
11510 #[inline]
11511 unsafe fn encode(
11512 self,
11513 encoder: &mut fidl::encoding::Encoder<'_, D>,
11514 offset: usize,
11515 depth: fidl::encoding::Depth,
11516 ) -> fidl::Result<()> {
11517 encoder.debug_check_bounds::<ScanResult>(offset);
11518 self.0.encode(encoder, offset + 0, depth)?;
11522 self.1.encode(encoder, offset + 16, depth)?;
11523 self.2.encode(encoder, offset + 24, depth)?;
11524 Ok(())
11525 }
11526 }
11527
11528 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanResult {
11529 #[inline(always)]
11530 fn new_empty() -> Self {
11531 Self {
11532 compatibility: fidl::new_empty!(Compatibility, D),
11533 timestamp_nanos: fidl::new_empty!(i64, D),
11534 bss_description: fidl::new_empty!(fidl_fuchsia_wlan_common::BssDescription, D),
11535 }
11536 }
11537
11538 #[inline]
11539 unsafe fn decode(
11540 &mut self,
11541 decoder: &mut fidl::encoding::Decoder<'_, D>,
11542 offset: usize,
11543 _depth: fidl::encoding::Depth,
11544 ) -> fidl::Result<()> {
11545 decoder.debug_check_bounds::<Self>(offset);
11546 fidl::decode!(Compatibility, D, &mut self.compatibility, decoder, offset + 0, _depth)?;
11548 fidl::decode!(i64, D, &mut self.timestamp_nanos, decoder, offset + 16, _depth)?;
11549 fidl::decode!(
11550 fidl_fuchsia_wlan_common::BssDescription,
11551 D,
11552 &mut self.bss_description,
11553 decoder,
11554 offset + 24,
11555 _depth
11556 )?;
11557 Ok(())
11558 }
11559 }
11560
11561 impl fidl::encoding::ValueTypeMarker for ScanResultVector {
11562 type Borrowed<'a> = &'a Self;
11563 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11564 value
11565 }
11566 }
11567
11568 unsafe impl fidl::encoding::TypeMarker for ScanResultVector {
11569 type Owned = Self;
11570
11571 #[inline(always)]
11572 fn inline_align(_context: fidl::encoding::Context) -> usize {
11573 8
11574 }
11575
11576 #[inline(always)]
11577 fn inline_size(_context: fidl::encoding::Context) -> usize {
11578 16
11579 }
11580 }
11581
11582 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanResultVector, D>
11583 for &ScanResultVector
11584 {
11585 #[inline]
11586 unsafe fn encode(
11587 self,
11588 encoder: &mut fidl::encoding::Encoder<'_, D>,
11589 offset: usize,
11590 _depth: fidl::encoding::Depth,
11591 ) -> fidl::Result<()> {
11592 encoder.debug_check_bounds::<ScanResultVector>(offset);
11593 fidl::encoding::Encode::<ScanResultVector, D>::encode(
11595 (
11596 <fidl::encoding::UnboundedVector<ScanResult> as fidl::encoding::ValueTypeMarker>::borrow(&self.results),
11597 ),
11598 encoder, offset, _depth
11599 )
11600 }
11601 }
11602 unsafe impl<
11603 D: fidl::encoding::ResourceDialect,
11604 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<ScanResult>, D>,
11605 > fidl::encoding::Encode<ScanResultVector, D> for (T0,)
11606 {
11607 #[inline]
11608 unsafe fn encode(
11609 self,
11610 encoder: &mut fidl::encoding::Encoder<'_, D>,
11611 offset: usize,
11612 depth: fidl::encoding::Depth,
11613 ) -> fidl::Result<()> {
11614 encoder.debug_check_bounds::<ScanResultVector>(offset);
11615 self.0.encode(encoder, offset + 0, depth)?;
11619 Ok(())
11620 }
11621 }
11622
11623 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanResultVector {
11624 #[inline(always)]
11625 fn new_empty() -> Self {
11626 Self { results: fidl::new_empty!(fidl::encoding::UnboundedVector<ScanResult>, D) }
11627 }
11628
11629 #[inline]
11630 unsafe fn decode(
11631 &mut self,
11632 decoder: &mut fidl::encoding::Decoder<'_, D>,
11633 offset: usize,
11634 _depth: fidl::encoding::Depth,
11635 ) -> fidl::Result<()> {
11636 decoder.debug_check_bounds::<Self>(offset);
11637 fidl::decode!(
11639 fidl::encoding::UnboundedVector<ScanResult>,
11640 D,
11641 &mut self.results,
11642 decoder,
11643 offset + 0,
11644 _depth
11645 )?;
11646 Ok(())
11647 }
11648 }
11649
11650 impl fidl::encoding::ValueTypeMarker for ServingApInfo {
11651 type Borrowed<'a> = &'a Self;
11652 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11653 value
11654 }
11655 }
11656
11657 unsafe impl fidl::encoding::TypeMarker for ServingApInfo {
11658 type Owned = Self;
11659
11660 #[inline(always)]
11661 fn inline_align(_context: fidl::encoding::Context) -> usize {
11662 8
11663 }
11664
11665 #[inline(always)]
11666 fn inline_size(_context: fidl::encoding::Context) -> usize {
11667 48
11668 }
11669 }
11670
11671 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ServingApInfo, D>
11672 for &ServingApInfo
11673 {
11674 #[inline]
11675 unsafe fn encode(
11676 self,
11677 encoder: &mut fidl::encoding::Encoder<'_, D>,
11678 offset: usize,
11679 _depth: fidl::encoding::Depth,
11680 ) -> fidl::Result<()> {
11681 encoder.debug_check_bounds::<ServingApInfo>(offset);
11682 fidl::encoding::Encode::<ServingApInfo, D>::encode(
11684 (
11685 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(&self.bssid),
11686 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(&self.ssid),
11687 <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.rssi_dbm),
11688 <i8 as fidl::encoding::ValueTypeMarker>::borrow(&self.snr_db),
11689 <fidl_fuchsia_wlan_common::WlanChannel as fidl::encoding::ValueTypeMarker>::borrow(&self.channel),
11690 <Protection as fidl::encoding::ValueTypeMarker>::borrow(&self.protection),
11691 ),
11692 encoder, offset, _depth
11693 )
11694 }
11695 }
11696 unsafe impl<
11697 D: fidl::encoding::ResourceDialect,
11698 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 6>, D>,
11699 T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
11700 T2: fidl::encoding::Encode<i8, D>,
11701 T3: fidl::encoding::Encode<i8, D>,
11702 T4: fidl::encoding::Encode<fidl_fuchsia_wlan_common::WlanChannel, D>,
11703 T5: fidl::encoding::Encode<Protection, D>,
11704 > fidl::encoding::Encode<ServingApInfo, D> for (T0, T1, T2, T3, T4, T5)
11705 {
11706 #[inline]
11707 unsafe fn encode(
11708 self,
11709 encoder: &mut fidl::encoding::Encoder<'_, D>,
11710 offset: usize,
11711 depth: fidl::encoding::Depth,
11712 ) -> fidl::Result<()> {
11713 encoder.debug_check_bounds::<ServingApInfo>(offset);
11714 unsafe {
11717 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
11718 (ptr as *mut u64).write_unaligned(0);
11719 }
11720 unsafe {
11721 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
11722 (ptr as *mut u64).write_unaligned(0);
11723 }
11724 unsafe {
11725 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
11726 (ptr as *mut u64).write_unaligned(0);
11727 }
11728 self.0.encode(encoder, offset + 0, depth)?;
11730 self.1.encode(encoder, offset + 8, depth)?;
11731 self.2.encode(encoder, offset + 24, depth)?;
11732 self.3.encode(encoder, offset + 25, depth)?;
11733 self.4.encode(encoder, offset + 28, depth)?;
11734 self.5.encode(encoder, offset + 40, depth)?;
11735 Ok(())
11736 }
11737 }
11738
11739 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ServingApInfo {
11740 #[inline(always)]
11741 fn new_empty() -> Self {
11742 Self {
11743 bssid: fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
11744 ssid: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
11745 rssi_dbm: fidl::new_empty!(i8, D),
11746 snr_db: fidl::new_empty!(i8, D),
11747 channel: fidl::new_empty!(fidl_fuchsia_wlan_common::WlanChannel, D),
11748 protection: fidl::new_empty!(Protection, D),
11749 }
11750 }
11751
11752 #[inline]
11753 unsafe fn decode(
11754 &mut self,
11755 decoder: &mut fidl::encoding::Decoder<'_, D>,
11756 offset: usize,
11757 _depth: fidl::encoding::Depth,
11758 ) -> fidl::Result<()> {
11759 decoder.debug_check_bounds::<Self>(offset);
11760 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
11762 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11763 let mask = 0xffff000000000000u64;
11764 let maskedval = padval & mask;
11765 if maskedval != 0 {
11766 return Err(fidl::Error::NonZeroPadding {
11767 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
11768 });
11769 }
11770 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
11771 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11772 let mask = 0xffff0000u64;
11773 let maskedval = padval & mask;
11774 if maskedval != 0 {
11775 return Err(fidl::Error::NonZeroPadding {
11776 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
11777 });
11778 }
11779 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
11780 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11781 let mask = 0xffffffff00000000u64;
11782 let maskedval = padval & mask;
11783 if maskedval != 0 {
11784 return Err(fidl::Error::NonZeroPadding {
11785 padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
11786 });
11787 }
11788 fidl::decode!(fidl::encoding::Array<u8, 6>, D, &mut self.bssid, decoder, offset + 0, _depth)?;
11789 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.ssid, decoder, offset + 8, _depth)?;
11790 fidl::decode!(i8, D, &mut self.rssi_dbm, decoder, offset + 24, _depth)?;
11791 fidl::decode!(i8, D, &mut self.snr_db, decoder, offset + 25, _depth)?;
11792 fidl::decode!(
11793 fidl_fuchsia_wlan_common::WlanChannel,
11794 D,
11795 &mut self.channel,
11796 decoder,
11797 offset + 28,
11798 _depth
11799 )?;
11800 fidl::decode!(Protection, D, &mut self.protection, decoder, offset + 40, _depth)?;
11801 Ok(())
11802 }
11803 }
11804
11805 impl fidl::encoding::ResourceTypeMarker for TelemetryCloneInspectVmoResponse {
11806 type Borrowed<'a> = &'a mut Self;
11807 fn take_or_borrow<'a>(
11808 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11809 ) -> Self::Borrowed<'a> {
11810 value
11811 }
11812 }
11813
11814 unsafe impl fidl::encoding::TypeMarker for TelemetryCloneInspectVmoResponse {
11815 type Owned = Self;
11816
11817 #[inline(always)]
11818 fn inline_align(_context: fidl::encoding::Context) -> usize {
11819 4
11820 }
11821
11822 #[inline(always)]
11823 fn inline_size(_context: fidl::encoding::Context) -> usize {
11824 4
11825 }
11826 }
11827
11828 unsafe impl
11829 fidl::encoding::Encode<
11830 TelemetryCloneInspectVmoResponse,
11831 fidl::encoding::DefaultFuchsiaResourceDialect,
11832 > for &mut TelemetryCloneInspectVmoResponse
11833 {
11834 #[inline]
11835 unsafe fn encode(
11836 self,
11837 encoder: &mut fidl::encoding::Encoder<
11838 '_,
11839 fidl::encoding::DefaultFuchsiaResourceDialect,
11840 >,
11841 offset: usize,
11842 _depth: fidl::encoding::Depth,
11843 ) -> fidl::Result<()> {
11844 encoder.debug_check_bounds::<TelemetryCloneInspectVmoResponse>(offset);
11845 fidl::encoding::Encode::<
11847 TelemetryCloneInspectVmoResponse,
11848 fidl::encoding::DefaultFuchsiaResourceDialect,
11849 >::encode(
11850 (<fidl::encoding::HandleType<
11851 fidl::Vmo,
11852 { fidl::ObjectType::VMO.into_raw() },
11853 2147483648,
11854 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11855 &mut self.inspect_vmo
11856 ),),
11857 encoder,
11858 offset,
11859 _depth,
11860 )
11861 }
11862 }
11863 unsafe impl<
11864 T0: fidl::encoding::Encode<
11865 fidl::encoding::HandleType<
11866 fidl::Vmo,
11867 { fidl::ObjectType::VMO.into_raw() },
11868 2147483648,
11869 >,
11870 fidl::encoding::DefaultFuchsiaResourceDialect,
11871 >,
11872 >
11873 fidl::encoding::Encode<
11874 TelemetryCloneInspectVmoResponse,
11875 fidl::encoding::DefaultFuchsiaResourceDialect,
11876 > for (T0,)
11877 {
11878 #[inline]
11879 unsafe fn encode(
11880 self,
11881 encoder: &mut fidl::encoding::Encoder<
11882 '_,
11883 fidl::encoding::DefaultFuchsiaResourceDialect,
11884 >,
11885 offset: usize,
11886 depth: fidl::encoding::Depth,
11887 ) -> fidl::Result<()> {
11888 encoder.debug_check_bounds::<TelemetryCloneInspectVmoResponse>(offset);
11889 self.0.encode(encoder, offset + 0, depth)?;
11893 Ok(())
11894 }
11895 }
11896
11897 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11898 for TelemetryCloneInspectVmoResponse
11899 {
11900 #[inline(always)]
11901 fn new_empty() -> Self {
11902 Self {
11903 inspect_vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
11904 }
11905 }
11906
11907 #[inline]
11908 unsafe fn decode(
11909 &mut self,
11910 decoder: &mut fidl::encoding::Decoder<
11911 '_,
11912 fidl::encoding::DefaultFuchsiaResourceDialect,
11913 >,
11914 offset: usize,
11915 _depth: fidl::encoding::Depth,
11916 ) -> fidl::Result<()> {
11917 decoder.debug_check_bounds::<Self>(offset);
11918 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.inspect_vmo, decoder, offset + 0, _depth)?;
11920 Ok(())
11921 }
11922 }
11923
11924 impl fidl::encoding::ValueTypeMarker for TelemetryGetCounterStatsResponse {
11925 type Borrowed<'a> = &'a Self;
11926 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11927 value
11928 }
11929 }
11930
11931 unsafe impl fidl::encoding::TypeMarker for TelemetryGetCounterStatsResponse {
11932 type Owned = Self;
11933
11934 #[inline(always)]
11935 fn inline_align(_context: fidl::encoding::Context) -> usize {
11936 8
11937 }
11938
11939 #[inline(always)]
11940 fn inline_size(_context: fidl::encoding::Context) -> usize {
11941 16
11942 }
11943 }
11944
11945 unsafe impl<D: fidl::encoding::ResourceDialect>
11946 fidl::encoding::Encode<TelemetryGetCounterStatsResponse, D>
11947 for &TelemetryGetCounterStatsResponse
11948 {
11949 #[inline]
11950 unsafe fn encode(
11951 self,
11952 encoder: &mut fidl::encoding::Encoder<'_, D>,
11953 offset: usize,
11954 _depth: fidl::encoding::Depth,
11955 ) -> fidl::Result<()> {
11956 encoder.debug_check_bounds::<TelemetryGetCounterStatsResponse>(offset);
11957 fidl::encoding::Encode::<TelemetryGetCounterStatsResponse, D>::encode(
11959 (
11960 <fidl_fuchsia_wlan_stats::IfaceCounterStats as fidl::encoding::ValueTypeMarker>::borrow(&self.stats),
11961 ),
11962 encoder, offset, _depth
11963 )
11964 }
11965 }
11966 unsafe impl<
11967 D: fidl::encoding::ResourceDialect,
11968 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats::IfaceCounterStats, D>,
11969 > fidl::encoding::Encode<TelemetryGetCounterStatsResponse, D> for (T0,)
11970 {
11971 #[inline]
11972 unsafe fn encode(
11973 self,
11974 encoder: &mut fidl::encoding::Encoder<'_, D>,
11975 offset: usize,
11976 depth: fidl::encoding::Depth,
11977 ) -> fidl::Result<()> {
11978 encoder.debug_check_bounds::<TelemetryGetCounterStatsResponse>(offset);
11979 self.0.encode(encoder, offset + 0, depth)?;
11983 Ok(())
11984 }
11985 }
11986
11987 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11988 for TelemetryGetCounterStatsResponse
11989 {
11990 #[inline(always)]
11991 fn new_empty() -> Self {
11992 Self { stats: fidl::new_empty!(fidl_fuchsia_wlan_stats::IfaceCounterStats, D) }
11993 }
11994
11995 #[inline]
11996 unsafe fn decode(
11997 &mut self,
11998 decoder: &mut fidl::encoding::Decoder<'_, D>,
11999 offset: usize,
12000 _depth: fidl::encoding::Depth,
12001 ) -> fidl::Result<()> {
12002 decoder.debug_check_bounds::<Self>(offset);
12003 fidl::decode!(
12005 fidl_fuchsia_wlan_stats::IfaceCounterStats,
12006 D,
12007 &mut self.stats,
12008 decoder,
12009 offset + 0,
12010 _depth
12011 )?;
12012 Ok(())
12013 }
12014 }
12015
12016 impl fidl::encoding::ValueTypeMarker for TelemetryGetHistogramStatsResponse {
12017 type Borrowed<'a> = &'a Self;
12018 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12019 value
12020 }
12021 }
12022
12023 unsafe impl fidl::encoding::TypeMarker for TelemetryGetHistogramStatsResponse {
12024 type Owned = Self;
12025
12026 #[inline(always)]
12027 fn inline_align(_context: fidl::encoding::Context) -> usize {
12028 8
12029 }
12030
12031 #[inline(always)]
12032 fn inline_size(_context: fidl::encoding::Context) -> usize {
12033 16
12034 }
12035 }
12036
12037 unsafe impl<D: fidl::encoding::ResourceDialect>
12038 fidl::encoding::Encode<TelemetryGetHistogramStatsResponse, D>
12039 for &TelemetryGetHistogramStatsResponse
12040 {
12041 #[inline]
12042 unsafe fn encode(
12043 self,
12044 encoder: &mut fidl::encoding::Encoder<'_, D>,
12045 offset: usize,
12046 _depth: fidl::encoding::Depth,
12047 ) -> fidl::Result<()> {
12048 encoder.debug_check_bounds::<TelemetryGetHistogramStatsResponse>(offset);
12049 fidl::encoding::Encode::<TelemetryGetHistogramStatsResponse, D>::encode(
12051 (
12052 <fidl_fuchsia_wlan_stats::IfaceHistogramStats as fidl::encoding::ValueTypeMarker>::borrow(&self.stats),
12053 ),
12054 encoder, offset, _depth
12055 )
12056 }
12057 }
12058 unsafe impl<
12059 D: fidl::encoding::ResourceDialect,
12060 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats::IfaceHistogramStats, D>,
12061 > fidl::encoding::Encode<TelemetryGetHistogramStatsResponse, D> for (T0,)
12062 {
12063 #[inline]
12064 unsafe fn encode(
12065 self,
12066 encoder: &mut fidl::encoding::Encoder<'_, D>,
12067 offset: usize,
12068 depth: fidl::encoding::Depth,
12069 ) -> fidl::Result<()> {
12070 encoder.debug_check_bounds::<TelemetryGetHistogramStatsResponse>(offset);
12071 self.0.encode(encoder, offset + 0, depth)?;
12075 Ok(())
12076 }
12077 }
12078
12079 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12080 for TelemetryGetHistogramStatsResponse
12081 {
12082 #[inline(always)]
12083 fn new_empty() -> Self {
12084 Self { stats: fidl::new_empty!(fidl_fuchsia_wlan_stats::IfaceHistogramStats, D) }
12085 }
12086
12087 #[inline]
12088 unsafe fn decode(
12089 &mut self,
12090 decoder: &mut fidl::encoding::Decoder<'_, D>,
12091 offset: usize,
12092 _depth: fidl::encoding::Depth,
12093 ) -> fidl::Result<()> {
12094 decoder.debug_check_bounds::<Self>(offset);
12095 fidl::decode!(
12097 fidl_fuchsia_wlan_stats::IfaceHistogramStats,
12098 D,
12099 &mut self.stats,
12100 decoder,
12101 offset + 0,
12102 _depth
12103 )?;
12104 Ok(())
12105 }
12106 }
12107
12108 impl fidl::encoding::ValueTypeMarker for TelemetryQueryTelemetrySupportResponse {
12109 type Borrowed<'a> = &'a Self;
12110 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12111 value
12112 }
12113 }
12114
12115 unsafe impl fidl::encoding::TypeMarker for TelemetryQueryTelemetrySupportResponse {
12116 type Owned = Self;
12117
12118 #[inline(always)]
12119 fn inline_align(_context: fidl::encoding::Context) -> usize {
12120 8
12121 }
12122
12123 #[inline(always)]
12124 fn inline_size(_context: fidl::encoding::Context) -> usize {
12125 16
12126 }
12127 }
12128
12129 unsafe impl<D: fidl::encoding::ResourceDialect>
12130 fidl::encoding::Encode<TelemetryQueryTelemetrySupportResponse, D>
12131 for &TelemetryQueryTelemetrySupportResponse
12132 {
12133 #[inline]
12134 unsafe fn encode(
12135 self,
12136 encoder: &mut fidl::encoding::Encoder<'_, D>,
12137 offset: usize,
12138 _depth: fidl::encoding::Depth,
12139 ) -> fidl::Result<()> {
12140 encoder.debug_check_bounds::<TelemetryQueryTelemetrySupportResponse>(offset);
12141 fidl::encoding::Encode::<TelemetryQueryTelemetrySupportResponse, D>::encode(
12143 (
12144 <fidl_fuchsia_wlan_stats::TelemetrySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),
12145 ),
12146 encoder, offset, _depth
12147 )
12148 }
12149 }
12150 unsafe impl<
12151 D: fidl::encoding::ResourceDialect,
12152 T0: fidl::encoding::Encode<fidl_fuchsia_wlan_stats::TelemetrySupport, D>,
12153 > fidl::encoding::Encode<TelemetryQueryTelemetrySupportResponse, D> for (T0,)
12154 {
12155 #[inline]
12156 unsafe fn encode(
12157 self,
12158 encoder: &mut fidl::encoding::Encoder<'_, D>,
12159 offset: usize,
12160 depth: fidl::encoding::Depth,
12161 ) -> fidl::Result<()> {
12162 encoder.debug_check_bounds::<TelemetryQueryTelemetrySupportResponse>(offset);
12163 self.0.encode(encoder, offset + 0, depth)?;
12167 Ok(())
12168 }
12169 }
12170
12171 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12172 for TelemetryQueryTelemetrySupportResponse
12173 {
12174 #[inline(always)]
12175 fn new_empty() -> Self {
12176 Self { resp: fidl::new_empty!(fidl_fuchsia_wlan_stats::TelemetrySupport, D) }
12177 }
12178
12179 #[inline]
12180 unsafe fn decode(
12181 &mut self,
12182 decoder: &mut fidl::encoding::Decoder<'_, D>,
12183 offset: usize,
12184 _depth: fidl::encoding::Depth,
12185 ) -> fidl::Result<()> {
12186 decoder.debug_check_bounds::<Self>(offset);
12187 fidl::decode!(
12189 fidl_fuchsia_wlan_stats::TelemetrySupport,
12190 D,
12191 &mut self.resp,
12192 decoder,
12193 offset + 0,
12194 _depth
12195 )?;
12196 Ok(())
12197 }
12198 }
12199
12200 impl fidl::encoding::ResourceTypeMarker for UsmeBootstrapStartRequest {
12201 type Borrowed<'a> = &'a mut Self;
12202 fn take_or_borrow<'a>(
12203 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12204 ) -> Self::Borrowed<'a> {
12205 value
12206 }
12207 }
12208
12209 unsafe impl fidl::encoding::TypeMarker for UsmeBootstrapStartRequest {
12210 type Owned = Self;
12211
12212 #[inline(always)]
12213 fn inline_align(_context: fidl::encoding::Context) -> usize {
12214 4
12215 }
12216
12217 #[inline(always)]
12218 fn inline_size(_context: fidl::encoding::Context) -> usize {
12219 8
12220 }
12221 }
12222
12223 unsafe impl
12224 fidl::encoding::Encode<
12225 UsmeBootstrapStartRequest,
12226 fidl::encoding::DefaultFuchsiaResourceDialect,
12227 > for &mut UsmeBootstrapStartRequest
12228 {
12229 #[inline]
12230 unsafe fn encode(
12231 self,
12232 encoder: &mut fidl::encoding::Encoder<
12233 '_,
12234 fidl::encoding::DefaultFuchsiaResourceDialect,
12235 >,
12236 offset: usize,
12237 _depth: fidl::encoding::Depth,
12238 ) -> fidl::Result<()> {
12239 encoder.debug_check_bounds::<UsmeBootstrapStartRequest>(offset);
12240 fidl::encoding::Encode::<UsmeBootstrapStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
12242 (
12243 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.generic_sme_server),
12244 <LegacyPrivacySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.legacy_privacy_support),
12245 ),
12246 encoder, offset, _depth
12247 )
12248 }
12249 }
12250 unsafe impl<
12251 T0: fidl::encoding::Encode<
12252 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
12253 fidl::encoding::DefaultFuchsiaResourceDialect,
12254 >,
12255 T1: fidl::encoding::Encode<
12256 LegacyPrivacySupport,
12257 fidl::encoding::DefaultFuchsiaResourceDialect,
12258 >,
12259 >
12260 fidl::encoding::Encode<
12261 UsmeBootstrapStartRequest,
12262 fidl::encoding::DefaultFuchsiaResourceDialect,
12263 > for (T0, T1)
12264 {
12265 #[inline]
12266 unsafe fn encode(
12267 self,
12268 encoder: &mut fidl::encoding::Encoder<
12269 '_,
12270 fidl::encoding::DefaultFuchsiaResourceDialect,
12271 >,
12272 offset: usize,
12273 depth: fidl::encoding::Depth,
12274 ) -> fidl::Result<()> {
12275 encoder.debug_check_bounds::<UsmeBootstrapStartRequest>(offset);
12276 unsafe {
12279 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
12280 (ptr as *mut u32).write_unaligned(0);
12281 }
12282 self.0.encode(encoder, offset + 0, depth)?;
12284 self.1.encode(encoder, offset + 4, depth)?;
12285 Ok(())
12286 }
12287 }
12288
12289 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12290 for UsmeBootstrapStartRequest
12291 {
12292 #[inline(always)]
12293 fn new_empty() -> Self {
12294 Self {
12295 generic_sme_server: fidl::new_empty!(
12296 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
12297 fidl::encoding::DefaultFuchsiaResourceDialect
12298 ),
12299 legacy_privacy_support: fidl::new_empty!(
12300 LegacyPrivacySupport,
12301 fidl::encoding::DefaultFuchsiaResourceDialect
12302 ),
12303 }
12304 }
12305
12306 #[inline]
12307 unsafe fn decode(
12308 &mut self,
12309 decoder: &mut fidl::encoding::Decoder<
12310 '_,
12311 fidl::encoding::DefaultFuchsiaResourceDialect,
12312 >,
12313 offset: usize,
12314 _depth: fidl::encoding::Depth,
12315 ) -> fidl::Result<()> {
12316 decoder.debug_check_bounds::<Self>(offset);
12317 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
12319 let padval = unsafe { (ptr as *const u32).read_unaligned() };
12320 let mask = 0xffff0000u32;
12321 let maskedval = padval & mask;
12322 if maskedval != 0 {
12323 return Err(fidl::Error::NonZeroPadding {
12324 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
12325 });
12326 }
12327 fidl::decode!(
12328 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
12329 fidl::encoding::DefaultFuchsiaResourceDialect,
12330 &mut self.generic_sme_server,
12331 decoder,
12332 offset + 0,
12333 _depth
12334 )?;
12335 fidl::decode!(
12336 LegacyPrivacySupport,
12337 fidl::encoding::DefaultFuchsiaResourceDialect,
12338 &mut self.legacy_privacy_support,
12339 decoder,
12340 offset + 4,
12341 _depth
12342 )?;
12343 Ok(())
12344 }
12345 }
12346
12347 impl fidl::encoding::ResourceTypeMarker for UsmeBootstrapStartResponse {
12348 type Borrowed<'a> = &'a mut Self;
12349 fn take_or_borrow<'a>(
12350 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12351 ) -> Self::Borrowed<'a> {
12352 value
12353 }
12354 }
12355
12356 unsafe impl fidl::encoding::TypeMarker for UsmeBootstrapStartResponse {
12357 type Owned = Self;
12358
12359 #[inline(always)]
12360 fn inline_align(_context: fidl::encoding::Context) -> usize {
12361 4
12362 }
12363
12364 #[inline(always)]
12365 fn inline_size(_context: fidl::encoding::Context) -> usize {
12366 4
12367 }
12368 }
12369
12370 unsafe impl
12371 fidl::encoding::Encode<
12372 UsmeBootstrapStartResponse,
12373 fidl::encoding::DefaultFuchsiaResourceDialect,
12374 > for &mut UsmeBootstrapStartResponse
12375 {
12376 #[inline]
12377 unsafe fn encode(
12378 self,
12379 encoder: &mut fidl::encoding::Encoder<
12380 '_,
12381 fidl::encoding::DefaultFuchsiaResourceDialect,
12382 >,
12383 offset: usize,
12384 _depth: fidl::encoding::Depth,
12385 ) -> fidl::Result<()> {
12386 encoder.debug_check_bounds::<UsmeBootstrapStartResponse>(offset);
12387 fidl::encoding::Encode::<
12389 UsmeBootstrapStartResponse,
12390 fidl::encoding::DefaultFuchsiaResourceDialect,
12391 >::encode(
12392 (<fidl::encoding::HandleType<
12393 fidl::Vmo,
12394 { fidl::ObjectType::VMO.into_raw() },
12395 2147483648,
12396 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
12397 &mut self.inspect_vmo
12398 ),),
12399 encoder,
12400 offset,
12401 _depth,
12402 )
12403 }
12404 }
12405 unsafe impl<
12406 T0: fidl::encoding::Encode<
12407 fidl::encoding::HandleType<
12408 fidl::Vmo,
12409 { fidl::ObjectType::VMO.into_raw() },
12410 2147483648,
12411 >,
12412 fidl::encoding::DefaultFuchsiaResourceDialect,
12413 >,
12414 >
12415 fidl::encoding::Encode<
12416 UsmeBootstrapStartResponse,
12417 fidl::encoding::DefaultFuchsiaResourceDialect,
12418 > for (T0,)
12419 {
12420 #[inline]
12421 unsafe fn encode(
12422 self,
12423 encoder: &mut fidl::encoding::Encoder<
12424 '_,
12425 fidl::encoding::DefaultFuchsiaResourceDialect,
12426 >,
12427 offset: usize,
12428 depth: fidl::encoding::Depth,
12429 ) -> fidl::Result<()> {
12430 encoder.debug_check_bounds::<UsmeBootstrapStartResponse>(offset);
12431 self.0.encode(encoder, offset + 0, depth)?;
12435 Ok(())
12436 }
12437 }
12438
12439 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12440 for UsmeBootstrapStartResponse
12441 {
12442 #[inline(always)]
12443 fn new_empty() -> Self {
12444 Self {
12445 inspect_vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
12446 }
12447 }
12448
12449 #[inline]
12450 unsafe fn decode(
12451 &mut self,
12452 decoder: &mut fidl::encoding::Decoder<
12453 '_,
12454 fidl::encoding::DefaultFuchsiaResourceDialect,
12455 >,
12456 offset: usize,
12457 _depth: fidl::encoding::Depth,
12458 ) -> fidl::Result<()> {
12459 decoder.debug_check_bounds::<Self>(offset);
12460 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.inspect_vmo, decoder, offset + 0, _depth)?;
12462 Ok(())
12463 }
12464 }
12465
12466 impl fidl::encoding::ValueTypeMarker for ClientStatusResponse {
12467 type Borrowed<'a> = &'a Self;
12468 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12469 value
12470 }
12471 }
12472
12473 unsafe impl fidl::encoding::TypeMarker for ClientStatusResponse {
12474 type Owned = Self;
12475
12476 #[inline(always)]
12477 fn inline_align(_context: fidl::encoding::Context) -> usize {
12478 8
12479 }
12480
12481 #[inline(always)]
12482 fn inline_size(_context: fidl::encoding::Context) -> usize {
12483 16
12484 }
12485 }
12486
12487 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ClientStatusResponse, D>
12488 for &ClientStatusResponse
12489 {
12490 #[inline]
12491 unsafe fn encode(
12492 self,
12493 encoder: &mut fidl::encoding::Encoder<'_, D>,
12494 offset: usize,
12495 _depth: fidl::encoding::Depth,
12496 ) -> fidl::Result<()> {
12497 encoder.debug_check_bounds::<ClientStatusResponse>(offset);
12498 encoder.write_num::<u64>(self.ordinal(), offset);
12499 match self {
12500 ClientStatusResponse::Connected(ref val) => {
12501 fidl::encoding::encode_in_envelope::<ServingApInfo, D>(
12502 <ServingApInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
12503 encoder,
12504 offset + 8,
12505 _depth,
12506 )
12507 }
12508 ClientStatusResponse::Connecting(ref val) => {
12509 fidl::encoding::encode_in_envelope::<fidl::encoding::Vector<u8, 32>, D>(
12510 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
12511 val,
12512 ),
12513 encoder,
12514 offset + 8,
12515 _depth,
12516 )
12517 }
12518 ClientStatusResponse::Idle(ref val) => {
12519 fidl::encoding::encode_in_envelope::<Empty, D>(
12520 <Empty as fidl::encoding::ValueTypeMarker>::borrow(val),
12521 encoder,
12522 offset + 8,
12523 _depth,
12524 )
12525 }
12526 ClientStatusResponse::Roaming(ref val) => fidl::encoding::encode_in_envelope::<
12527 fidl::encoding::Array<u8, 6>,
12528 D,
12529 >(
12530 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(val),
12531 encoder,
12532 offset + 8,
12533 _depth,
12534 ),
12535 }
12536 }
12537 }
12538
12539 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClientStatusResponse {
12540 #[inline(always)]
12541 fn new_empty() -> Self {
12542 Self::Connected(fidl::new_empty!(ServingApInfo, D))
12543 }
12544
12545 #[inline]
12546 unsafe fn decode(
12547 &mut self,
12548 decoder: &mut fidl::encoding::Decoder<'_, D>,
12549 offset: usize,
12550 mut depth: fidl::encoding::Depth,
12551 ) -> fidl::Result<()> {
12552 decoder.debug_check_bounds::<Self>(offset);
12553 #[allow(unused_variables)]
12554 let next_out_of_line = decoder.next_out_of_line();
12555 let handles_before = decoder.remaining_handles();
12556 let (ordinal, inlined, num_bytes, num_handles) =
12557 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12558
12559 let member_inline_size = match ordinal {
12560 1 => <ServingApInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12561 2 => <fidl::encoding::Vector<u8, 32> as fidl::encoding::TypeMarker>::inline_size(
12562 decoder.context,
12563 ),
12564 3 => <Empty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12565 4 => <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
12566 decoder.context,
12567 ),
12568 _ => return Err(fidl::Error::UnknownUnionTag),
12569 };
12570
12571 if inlined != (member_inline_size <= 4) {
12572 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12573 }
12574 let _inner_offset;
12575 if inlined {
12576 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12577 _inner_offset = offset + 8;
12578 } else {
12579 depth.increment()?;
12580 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12581 }
12582 match ordinal {
12583 1 => {
12584 #[allow(irrefutable_let_patterns)]
12585 if let ClientStatusResponse::Connected(_) = self {
12586 } else {
12588 *self = ClientStatusResponse::Connected(fidl::new_empty!(ServingApInfo, D));
12590 }
12591 #[allow(irrefutable_let_patterns)]
12592 if let ClientStatusResponse::Connected(ref mut val) = self {
12593 fidl::decode!(ServingApInfo, D, val, decoder, _inner_offset, depth)?;
12594 } else {
12595 unreachable!()
12596 }
12597 }
12598 2 => {
12599 #[allow(irrefutable_let_patterns)]
12600 if let ClientStatusResponse::Connecting(_) = self {
12601 } else {
12603 *self = ClientStatusResponse::Connecting(
12605 fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
12606 );
12607 }
12608 #[allow(irrefutable_let_patterns)]
12609 if let ClientStatusResponse::Connecting(ref mut val) = self {
12610 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, val, decoder, _inner_offset, depth)?;
12611 } else {
12612 unreachable!()
12613 }
12614 }
12615 3 => {
12616 #[allow(irrefutable_let_patterns)]
12617 if let ClientStatusResponse::Idle(_) = self {
12618 } else {
12620 *self = ClientStatusResponse::Idle(fidl::new_empty!(Empty, D));
12622 }
12623 #[allow(irrefutable_let_patterns)]
12624 if let ClientStatusResponse::Idle(ref mut val) = self {
12625 fidl::decode!(Empty, D, val, decoder, _inner_offset, depth)?;
12626 } else {
12627 unreachable!()
12628 }
12629 }
12630 4 => {
12631 #[allow(irrefutable_let_patterns)]
12632 if let ClientStatusResponse::Roaming(_) = self {
12633 } else {
12635 *self = ClientStatusResponse::Roaming(
12637 fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
12638 );
12639 }
12640 #[allow(irrefutable_let_patterns)]
12641 if let ClientStatusResponse::Roaming(ref mut val) = self {
12642 fidl::decode!(fidl::encoding::Array<u8, 6>, D, val, decoder, _inner_offset, depth)?;
12643 } else {
12644 unreachable!()
12645 }
12646 }
12647 ordinal => panic!("unexpected ordinal {:?}", ordinal),
12648 }
12649 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
12650 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12651 }
12652 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12653 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12654 }
12655 Ok(())
12656 }
12657 }
12658
12659 impl fidl::encoding::ValueTypeMarker for Compatibility {
12660 type Borrowed<'a> = &'a Self;
12661 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12662 value
12663 }
12664 }
12665
12666 unsafe impl fidl::encoding::TypeMarker for Compatibility {
12667 type Owned = Self;
12668
12669 #[inline(always)]
12670 fn inline_align(_context: fidl::encoding::Context) -> usize {
12671 8
12672 }
12673
12674 #[inline(always)]
12675 fn inline_size(_context: fidl::encoding::Context) -> usize {
12676 16
12677 }
12678 }
12679
12680 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Compatibility, D>
12681 for &Compatibility
12682 {
12683 #[inline]
12684 unsafe fn encode(
12685 self,
12686 encoder: &mut fidl::encoding::Encoder<'_, D>,
12687 offset: usize,
12688 _depth: fidl::encoding::Depth,
12689 ) -> fidl::Result<()> {
12690 encoder.debug_check_bounds::<Compatibility>(offset);
12691 encoder.write_num::<u64>(self.ordinal(), offset);
12692 match self {
12693 Compatibility::Compatible(ref val) => {
12694 fidl::encoding::encode_in_envelope::<Compatible, D>(
12695 <Compatible as fidl::encoding::ValueTypeMarker>::borrow(val),
12696 encoder,
12697 offset + 8,
12698 _depth,
12699 )
12700 }
12701 Compatibility::Incompatible(ref val) => {
12702 fidl::encoding::encode_in_envelope::<Incompatible, D>(
12703 <Incompatible as fidl::encoding::ValueTypeMarker>::borrow(val),
12704 encoder,
12705 offset + 8,
12706 _depth,
12707 )
12708 }
12709 }
12710 }
12711 }
12712
12713 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Compatibility {
12714 #[inline(always)]
12715 fn new_empty() -> Self {
12716 Self::Compatible(fidl::new_empty!(Compatible, D))
12717 }
12718
12719 #[inline]
12720 unsafe fn decode(
12721 &mut self,
12722 decoder: &mut fidl::encoding::Decoder<'_, D>,
12723 offset: usize,
12724 mut depth: fidl::encoding::Depth,
12725 ) -> fidl::Result<()> {
12726 decoder.debug_check_bounds::<Self>(offset);
12727 #[allow(unused_variables)]
12728 let next_out_of_line = decoder.next_out_of_line();
12729 let handles_before = decoder.remaining_handles();
12730 let (ordinal, inlined, num_bytes, num_handles) =
12731 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12732
12733 let member_inline_size = match ordinal {
12734 1 => <Compatible as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12735 2 => <Incompatible as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12736 _ => return Err(fidl::Error::UnknownUnionTag),
12737 };
12738
12739 if inlined != (member_inline_size <= 4) {
12740 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12741 }
12742 let _inner_offset;
12743 if inlined {
12744 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12745 _inner_offset = offset + 8;
12746 } else {
12747 depth.increment()?;
12748 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12749 }
12750 match ordinal {
12751 1 => {
12752 #[allow(irrefutable_let_patterns)]
12753 if let Compatibility::Compatible(_) = self {
12754 } else {
12756 *self = Compatibility::Compatible(fidl::new_empty!(Compatible, D));
12758 }
12759 #[allow(irrefutable_let_patterns)]
12760 if let Compatibility::Compatible(ref mut val) = self {
12761 fidl::decode!(Compatible, D, val, decoder, _inner_offset, depth)?;
12762 } else {
12763 unreachable!()
12764 }
12765 }
12766 2 => {
12767 #[allow(irrefutable_let_patterns)]
12768 if let Compatibility::Incompatible(_) = self {
12769 } else {
12771 *self = Compatibility::Incompatible(fidl::new_empty!(Incompatible, D));
12773 }
12774 #[allow(irrefutable_let_patterns)]
12775 if let Compatibility::Incompatible(ref mut val) = self {
12776 fidl::decode!(Incompatible, D, val, decoder, _inner_offset, depth)?;
12777 } else {
12778 unreachable!()
12779 }
12780 }
12781 ordinal => panic!("unexpected ordinal {:?}", ordinal),
12782 }
12783 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
12784 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12785 }
12786 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12787 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12788 }
12789 Ok(())
12790 }
12791 }
12792
12793 impl fidl::encoding::ValueTypeMarker for DisconnectSource {
12794 type Borrowed<'a> = &'a Self;
12795 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12796 value
12797 }
12798 }
12799
12800 unsafe impl fidl::encoding::TypeMarker for DisconnectSource {
12801 type Owned = Self;
12802
12803 #[inline(always)]
12804 fn inline_align(_context: fidl::encoding::Context) -> usize {
12805 8
12806 }
12807
12808 #[inline(always)]
12809 fn inline_size(_context: fidl::encoding::Context) -> usize {
12810 16
12811 }
12812 }
12813
12814 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisconnectSource, D>
12815 for &DisconnectSource
12816 {
12817 #[inline]
12818 unsafe fn encode(
12819 self,
12820 encoder: &mut fidl::encoding::Encoder<'_, D>,
12821 offset: usize,
12822 _depth: fidl::encoding::Depth,
12823 ) -> fidl::Result<()> {
12824 encoder.debug_check_bounds::<DisconnectSource>(offset);
12825 encoder.write_num::<u64>(self.ordinal(), offset);
12826 match self {
12827 DisconnectSource::Ap(ref val) => {
12828 fidl::encoding::encode_in_envelope::<DisconnectCause, D>(
12829 <DisconnectCause as fidl::encoding::ValueTypeMarker>::borrow(val),
12830 encoder,
12831 offset + 8,
12832 _depth,
12833 )
12834 }
12835 DisconnectSource::User(ref val) => {
12836 fidl::encoding::encode_in_envelope::<UserDisconnectReason, D>(
12837 <UserDisconnectReason as fidl::encoding::ValueTypeMarker>::borrow(val),
12838 encoder,
12839 offset + 8,
12840 _depth,
12841 )
12842 }
12843 DisconnectSource::Mlme(ref val) => {
12844 fidl::encoding::encode_in_envelope::<DisconnectCause, D>(
12845 <DisconnectCause as fidl::encoding::ValueTypeMarker>::borrow(val),
12846 encoder,
12847 offset + 8,
12848 _depth,
12849 )
12850 }
12851 }
12852 }
12853 }
12854
12855 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisconnectSource {
12856 #[inline(always)]
12857 fn new_empty() -> Self {
12858 Self::Ap(fidl::new_empty!(DisconnectCause, D))
12859 }
12860
12861 #[inline]
12862 unsafe fn decode(
12863 &mut self,
12864 decoder: &mut fidl::encoding::Decoder<'_, D>,
12865 offset: usize,
12866 mut depth: fidl::encoding::Depth,
12867 ) -> fidl::Result<()> {
12868 decoder.debug_check_bounds::<Self>(offset);
12869 #[allow(unused_variables)]
12870 let next_out_of_line = decoder.next_out_of_line();
12871 let handles_before = decoder.remaining_handles();
12872 let (ordinal, inlined, num_bytes, num_handles) =
12873 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12874
12875 let member_inline_size = match ordinal {
12876 1 => <DisconnectCause as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12877 2 => <UserDisconnectReason as fidl::encoding::TypeMarker>::inline_size(
12878 decoder.context,
12879 ),
12880 3 => <DisconnectCause as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12881 _ => return Err(fidl::Error::UnknownUnionTag),
12882 };
12883
12884 if inlined != (member_inline_size <= 4) {
12885 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12886 }
12887 let _inner_offset;
12888 if inlined {
12889 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12890 _inner_offset = offset + 8;
12891 } else {
12892 depth.increment()?;
12893 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12894 }
12895 match ordinal {
12896 1 => {
12897 #[allow(irrefutable_let_patterns)]
12898 if let DisconnectSource::Ap(_) = self {
12899 } else {
12901 *self = DisconnectSource::Ap(fidl::new_empty!(DisconnectCause, D));
12903 }
12904 #[allow(irrefutable_let_patterns)]
12905 if let DisconnectSource::Ap(ref mut val) = self {
12906 fidl::decode!(DisconnectCause, D, val, decoder, _inner_offset, depth)?;
12907 } else {
12908 unreachable!()
12909 }
12910 }
12911 2 => {
12912 #[allow(irrefutable_let_patterns)]
12913 if let DisconnectSource::User(_) = self {
12914 } else {
12916 *self = DisconnectSource::User(fidl::new_empty!(UserDisconnectReason, D));
12918 }
12919 #[allow(irrefutable_let_patterns)]
12920 if let DisconnectSource::User(ref mut val) = self {
12921 fidl::decode!(UserDisconnectReason, D, val, decoder, _inner_offset, depth)?;
12922 } else {
12923 unreachable!()
12924 }
12925 }
12926 3 => {
12927 #[allow(irrefutable_let_patterns)]
12928 if let DisconnectSource::Mlme(_) = self {
12929 } else {
12931 *self = DisconnectSource::Mlme(fidl::new_empty!(DisconnectCause, D));
12933 }
12934 #[allow(irrefutable_let_patterns)]
12935 if let DisconnectSource::Mlme(ref mut val) = self {
12936 fidl::decode!(DisconnectCause, D, val, decoder, _inner_offset, depth)?;
12937 } else {
12938 unreachable!()
12939 }
12940 }
12941 ordinal => panic!("unexpected ordinal {:?}", ordinal),
12942 }
12943 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
12944 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12945 }
12946 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12947 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12948 }
12949 Ok(())
12950 }
12951 }
12952
12953 impl fidl::encoding::ValueTypeMarker for ScanRequest {
12954 type Borrowed<'a> = &'a Self;
12955 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12956 value
12957 }
12958 }
12959
12960 unsafe impl fidl::encoding::TypeMarker for ScanRequest {
12961 type Owned = Self;
12962
12963 #[inline(always)]
12964 fn inline_align(_context: fidl::encoding::Context) -> usize {
12965 8
12966 }
12967
12968 #[inline(always)]
12969 fn inline_size(_context: fidl::encoding::Context) -> usize {
12970 16
12971 }
12972 }
12973
12974 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ScanRequest, D>
12975 for &ScanRequest
12976 {
12977 #[inline]
12978 unsafe fn encode(
12979 self,
12980 encoder: &mut fidl::encoding::Encoder<'_, D>,
12981 offset: usize,
12982 _depth: fidl::encoding::Depth,
12983 ) -> fidl::Result<()> {
12984 encoder.debug_check_bounds::<ScanRequest>(offset);
12985 encoder.write_num::<u64>(self.ordinal(), offset);
12986 match self {
12987 ScanRequest::Active(ref val) => {
12988 fidl::encoding::encode_in_envelope::<ActiveScanRequest, D>(
12989 <ActiveScanRequest as fidl::encoding::ValueTypeMarker>::borrow(val),
12990 encoder,
12991 offset + 8,
12992 _depth,
12993 )
12994 }
12995 ScanRequest::Passive(ref val) => {
12996 fidl::encoding::encode_in_envelope::<PassiveScanRequest, D>(
12997 <PassiveScanRequest as fidl::encoding::ValueTypeMarker>::borrow(val),
12998 encoder,
12999 offset + 8,
13000 _depth,
13001 )
13002 }
13003 }
13004 }
13005 }
13006
13007 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScanRequest {
13008 #[inline(always)]
13009 fn new_empty() -> Self {
13010 Self::Active(fidl::new_empty!(ActiveScanRequest, D))
13011 }
13012
13013 #[inline]
13014 unsafe fn decode(
13015 &mut self,
13016 decoder: &mut fidl::encoding::Decoder<'_, D>,
13017 offset: usize,
13018 mut depth: fidl::encoding::Depth,
13019 ) -> fidl::Result<()> {
13020 decoder.debug_check_bounds::<Self>(offset);
13021 #[allow(unused_variables)]
13022 let next_out_of_line = decoder.next_out_of_line();
13023 let handles_before = decoder.remaining_handles();
13024 let (ordinal, inlined, num_bytes, num_handles) =
13025 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13026
13027 let member_inline_size = match ordinal {
13028 1 => {
13029 <ActiveScanRequest as fidl::encoding::TypeMarker>::inline_size(decoder.context)
13030 }
13031 2 => {
13032 <PassiveScanRequest as fidl::encoding::TypeMarker>::inline_size(decoder.context)
13033 }
13034 _ => return Err(fidl::Error::UnknownUnionTag),
13035 };
13036
13037 if inlined != (member_inline_size <= 4) {
13038 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13039 }
13040 let _inner_offset;
13041 if inlined {
13042 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13043 _inner_offset = offset + 8;
13044 } else {
13045 depth.increment()?;
13046 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13047 }
13048 match ordinal {
13049 1 => {
13050 #[allow(irrefutable_let_patterns)]
13051 if let ScanRequest::Active(_) = self {
13052 } else {
13054 *self = ScanRequest::Active(fidl::new_empty!(ActiveScanRequest, D));
13056 }
13057 #[allow(irrefutable_let_patterns)]
13058 if let ScanRequest::Active(ref mut val) = self {
13059 fidl::decode!(ActiveScanRequest, D, val, decoder, _inner_offset, depth)?;
13060 } else {
13061 unreachable!()
13062 }
13063 }
13064 2 => {
13065 #[allow(irrefutable_let_patterns)]
13066 if let ScanRequest::Passive(_) = self {
13067 } else {
13069 *self = ScanRequest::Passive(fidl::new_empty!(PassiveScanRequest, D));
13071 }
13072 #[allow(irrefutable_let_patterns)]
13073 if let ScanRequest::Passive(ref mut val) = self {
13074 fidl::decode!(PassiveScanRequest, D, val, decoder, _inner_offset, depth)?;
13075 } else {
13076 unreachable!()
13077 }
13078 }
13079 ordinal => panic!("unexpected ordinal {:?}", ordinal),
13080 }
13081 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13082 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13083 }
13084 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13085 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13086 }
13087 Ok(())
13088 }
13089 }
13090}