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 _};
10pub use fidl_fuchsia_wlan_sme_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, PartialEq)]
15pub struct ClientSmeConnectRequest {
16 pub req: ConnectRequest,
17 pub txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
18}
19
20impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ClientSmeConnectRequest {}
21
22#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
23pub struct ClientSmeScanForControllerRequest {
24 pub req: ScanRequest,
25}
26
27impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
28 for ClientSmeScanForControllerRequest
29{
30}
31
32#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
33pub struct ClientSmeScanRequest {
34 pub req: ScanRequest,
35}
36
37impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ClientSmeScanRequest {}
38
39#[derive(Debug, PartialEq)]
40pub struct ClientSmeStartScheduledScanRequest {
41 pub req: fidl_fuchsia_wlan_common::ScheduledScanRequest,
42 pub txn: fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
43}
44
45impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
46 for ClientSmeStartScheduledScanRequest
47{
48}
49
50#[derive(Debug, PartialEq)]
51pub struct ClientSmeScanForControllerResponse {
52 pub scan_results: Vec<ScanResult>,
53}
54
55impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
56 for ClientSmeScanForControllerResponse
57{
58}
59
60#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
61pub struct ClientSmeScanResponse {
62 pub scan_results: fidl::Vmo,
63}
64
65impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ClientSmeScanResponse {}
66
67#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
68pub struct GenericSmeGetApSmeRequest {
69 pub sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
70}
71
72impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for GenericSmeGetApSmeRequest {}
73
74#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
75pub struct GenericSmeGetClientSmeRequest {
76 pub sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
77}
78
79impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
80 for GenericSmeGetClientSmeRequest
81{
82}
83
84#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
85pub struct GenericSmeGetSmeTelemetryRequest {
86 pub telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
87}
88
89impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
90 for GenericSmeGetSmeTelemetryRequest
91{
92}
93
94#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
95pub struct GenericSmeQueryResponse {
96 pub resp: GenericSmeQuery,
97}
98
99impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for GenericSmeQueryResponse {}
100
101#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
102pub struct ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest {
103 pub scan_results: fidl::Vmo,
104}
105
106impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
107 for ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest
108{
109}
110
111#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
112pub struct TelemetryCloneInspectVmoResponse {
113 pub inspect_vmo: fidl::Vmo,
114}
115
116impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
117 for TelemetryCloneInspectVmoResponse
118{
119}
120
121#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
122pub struct UsmeBootstrapStartRequest {
123 pub generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
124 pub legacy_privacy_support: LegacyPrivacySupport,
125}
126
127impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UsmeBootstrapStartRequest {}
128
129#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
130pub struct UsmeBootstrapStartResponse {
131 pub inspect_vmo: fidl::Vmo,
132}
133
134impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
135 for UsmeBootstrapStartResponse
136{
137}
138
139#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
140pub struct ApSmeMarker;
141
142impl fidl::endpoints::ProtocolMarker for ApSmeMarker {
143 type Proxy = ApSmeProxy;
144 type RequestStream = ApSmeRequestStream;
145 #[cfg(target_os = "fuchsia")]
146 type SynchronousProxy = ApSmeSynchronousProxy;
147
148 const DEBUG_NAME: &'static str = "(anonymous) ApSme";
149}
150
151pub trait ApSmeProxyInterface: Send + Sync {
152 type StartResponseFut: std::future::Future<Output = Result<StartApResultCode, fidl::Error>>
153 + Send;
154 fn r#start(&self, config: &ApConfig) -> Self::StartResponseFut;
155 type StopResponseFut: std::future::Future<Output = Result<StopApResultCode, fidl::Error>> + Send;
156 fn r#stop(&self) -> Self::StopResponseFut;
157 type StatusResponseFut: std::future::Future<Output = Result<ApStatusResponse, fidl::Error>>
158 + Send;
159 fn r#status(&self) -> Self::StatusResponseFut;
160}
161#[derive(Debug)]
162#[cfg(target_os = "fuchsia")]
163pub struct ApSmeSynchronousProxy {
164 client: fidl::client::sync::Client,
165}
166
167#[cfg(target_os = "fuchsia")]
168impl fidl::endpoints::SynchronousProxy for ApSmeSynchronousProxy {
169 type Proxy = ApSmeProxy;
170 type Protocol = ApSmeMarker;
171
172 fn from_channel(inner: fidl::Channel) -> Self {
173 Self::new(inner)
174 }
175
176 fn into_channel(self) -> fidl::Channel {
177 self.client.into_channel()
178 }
179
180 fn as_channel(&self) -> &fidl::Channel {
181 self.client.as_channel()
182 }
183}
184
185#[cfg(target_os = "fuchsia")]
186impl ApSmeSynchronousProxy {
187 pub fn new(channel: fidl::Channel) -> Self {
188 Self { client: fidl::client::sync::Client::new(channel) }
189 }
190
191 pub fn into_channel(self) -> fidl::Channel {
192 self.client.into_channel()
193 }
194
195 pub fn wait_for_event(
198 &self,
199 deadline: zx::MonotonicInstant,
200 ) -> Result<ApSmeEvent, fidl::Error> {
201 ApSmeEvent::decode(self.client.wait_for_event::<ApSmeMarker>(deadline)?)
202 }
203
204 pub fn r#start(
205 &self,
206 mut config: &ApConfig,
207 ___deadline: zx::MonotonicInstant,
208 ) -> Result<StartApResultCode, fidl::Error> {
209 let _response =
210 self.client.send_query::<ApSmeStartRequest, ApSmeStartResponse, ApSmeMarker>(
211 (config,),
212 0x33fa134ceda8624d,
213 fidl::encoding::DynamicFlags::empty(),
214 ___deadline,
215 )?;
216 Ok(_response.code)
217 }
218
219 pub fn r#stop(
220 &self,
221 ___deadline: zx::MonotonicInstant,
222 ) -> Result<StopApResultCode, fidl::Error> {
223 let _response = self
224 .client
225 .send_query::<fidl::encoding::EmptyPayload, ApSmeStopResponse, ApSmeMarker>(
226 (),
227 0x56423f5b49a2e851,
228 fidl::encoding::DynamicFlags::empty(),
229 ___deadline,
230 )?;
231 Ok(_response.code)
232 }
233
234 pub fn r#status(
235 &self,
236 ___deadline: zx::MonotonicInstant,
237 ) -> Result<ApStatusResponse, fidl::Error> {
238 let _response = self
239 .client
240 .send_query::<fidl::encoding::EmptyPayload, ApSmeStatusResponse, ApSmeMarker>(
241 (),
242 0x51c688ac7a101606,
243 fidl::encoding::DynamicFlags::empty(),
244 ___deadline,
245 )?;
246 Ok(_response.resp)
247 }
248}
249
250#[cfg(target_os = "fuchsia")]
251impl From<ApSmeSynchronousProxy> for zx::NullableHandle {
252 fn from(value: ApSmeSynchronousProxy) -> Self {
253 value.into_channel().into()
254 }
255}
256
257#[cfg(target_os = "fuchsia")]
258impl From<fidl::Channel> for ApSmeSynchronousProxy {
259 fn from(value: fidl::Channel) -> Self {
260 Self::new(value)
261 }
262}
263
264#[cfg(target_os = "fuchsia")]
265impl fidl::endpoints::FromClient for ApSmeSynchronousProxy {
266 type Protocol = ApSmeMarker;
267
268 fn from_client(value: fidl::endpoints::ClientEnd<ApSmeMarker>) -> Self {
269 Self::new(value.into_channel())
270 }
271}
272
273#[derive(Debug, Clone)]
274pub struct ApSmeProxy {
275 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
276}
277
278impl fidl::endpoints::Proxy for ApSmeProxy {
279 type Protocol = ApSmeMarker;
280
281 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
282 Self::new(inner)
283 }
284
285 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
286 self.client.into_channel().map_err(|client| Self { client })
287 }
288
289 fn as_channel(&self) -> &::fidl::AsyncChannel {
290 self.client.as_channel()
291 }
292}
293
294impl ApSmeProxy {
295 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
297 let protocol_name = <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
298 Self { client: fidl::client::Client::new(channel, protocol_name) }
299 }
300
301 pub fn take_event_stream(&self) -> ApSmeEventStream {
307 ApSmeEventStream { event_receiver: self.client.take_event_receiver() }
308 }
309
310 pub fn r#start(
311 &self,
312 mut config: &ApConfig,
313 ) -> fidl::client::QueryResponseFut<
314 StartApResultCode,
315 fidl::encoding::DefaultFuchsiaResourceDialect,
316 > {
317 ApSmeProxyInterface::r#start(self, config)
318 }
319
320 pub fn r#stop(
321 &self,
322 ) -> fidl::client::QueryResponseFut<
323 StopApResultCode,
324 fidl::encoding::DefaultFuchsiaResourceDialect,
325 > {
326 ApSmeProxyInterface::r#stop(self)
327 }
328
329 pub fn r#status(
330 &self,
331 ) -> fidl::client::QueryResponseFut<
332 ApStatusResponse,
333 fidl::encoding::DefaultFuchsiaResourceDialect,
334 > {
335 ApSmeProxyInterface::r#status(self)
336 }
337}
338
339impl ApSmeProxyInterface for ApSmeProxy {
340 type StartResponseFut = fidl::client::QueryResponseFut<
341 StartApResultCode,
342 fidl::encoding::DefaultFuchsiaResourceDialect,
343 >;
344 fn r#start(&self, mut config: &ApConfig) -> Self::StartResponseFut {
345 fn _decode(
346 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
347 ) -> Result<StartApResultCode, fidl::Error> {
348 let _response = fidl::client::decode_transaction_body::<
349 ApSmeStartResponse,
350 fidl::encoding::DefaultFuchsiaResourceDialect,
351 0x33fa134ceda8624d,
352 >(_buf?)?;
353 Ok(_response.code)
354 }
355 self.client.send_query_and_decode::<ApSmeStartRequest, StartApResultCode>(
356 (config,),
357 0x33fa134ceda8624d,
358 fidl::encoding::DynamicFlags::empty(),
359 _decode,
360 )
361 }
362
363 type StopResponseFut = fidl::client::QueryResponseFut<
364 StopApResultCode,
365 fidl::encoding::DefaultFuchsiaResourceDialect,
366 >;
367 fn r#stop(&self) -> Self::StopResponseFut {
368 fn _decode(
369 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
370 ) -> Result<StopApResultCode, fidl::Error> {
371 let _response = fidl::client::decode_transaction_body::<
372 ApSmeStopResponse,
373 fidl::encoding::DefaultFuchsiaResourceDialect,
374 0x56423f5b49a2e851,
375 >(_buf?)?;
376 Ok(_response.code)
377 }
378 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, StopApResultCode>(
379 (),
380 0x56423f5b49a2e851,
381 fidl::encoding::DynamicFlags::empty(),
382 _decode,
383 )
384 }
385
386 type StatusResponseFut = fidl::client::QueryResponseFut<
387 ApStatusResponse,
388 fidl::encoding::DefaultFuchsiaResourceDialect,
389 >;
390 fn r#status(&self) -> Self::StatusResponseFut {
391 fn _decode(
392 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
393 ) -> Result<ApStatusResponse, fidl::Error> {
394 let _response = fidl::client::decode_transaction_body::<
395 ApSmeStatusResponse,
396 fidl::encoding::DefaultFuchsiaResourceDialect,
397 0x51c688ac7a101606,
398 >(_buf?)?;
399 Ok(_response.resp)
400 }
401 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ApStatusResponse>(
402 (),
403 0x51c688ac7a101606,
404 fidl::encoding::DynamicFlags::empty(),
405 _decode,
406 )
407 }
408}
409
410pub struct ApSmeEventStream {
411 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
412}
413
414impl std::marker::Unpin for ApSmeEventStream {}
415
416impl futures::stream::FusedStream for ApSmeEventStream {
417 fn is_terminated(&self) -> bool {
418 self.event_receiver.is_terminated()
419 }
420}
421
422impl futures::Stream for ApSmeEventStream {
423 type Item = Result<ApSmeEvent, fidl::Error>;
424
425 fn poll_next(
426 mut self: std::pin::Pin<&mut Self>,
427 cx: &mut std::task::Context<'_>,
428 ) -> std::task::Poll<Option<Self::Item>> {
429 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
430 &mut self.event_receiver,
431 cx
432 )?) {
433 Some(buf) => std::task::Poll::Ready(Some(ApSmeEvent::decode(buf))),
434 None => std::task::Poll::Ready(None),
435 }
436 }
437}
438
439#[derive(Debug)]
440pub enum ApSmeEvent {}
441
442impl ApSmeEvent {
443 fn decode(
445 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
446 ) -> Result<ApSmeEvent, fidl::Error> {
447 let (bytes, _handles) = buf.split_mut();
448 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
449 debug_assert_eq!(tx_header.tx_id, 0);
450 match tx_header.ordinal {
451 _ => Err(fidl::Error::UnknownOrdinal {
452 ordinal: tx_header.ordinal,
453 protocol_name: <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
454 }),
455 }
456 }
457}
458
459pub struct ApSmeRequestStream {
461 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
462 is_terminated: bool,
463}
464
465impl std::marker::Unpin for ApSmeRequestStream {}
466
467impl futures::stream::FusedStream for ApSmeRequestStream {
468 fn is_terminated(&self) -> bool {
469 self.is_terminated
470 }
471}
472
473impl fidl::endpoints::RequestStream for ApSmeRequestStream {
474 type Protocol = ApSmeMarker;
475 type ControlHandle = ApSmeControlHandle;
476
477 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
478 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
479 }
480
481 fn control_handle(&self) -> Self::ControlHandle {
482 ApSmeControlHandle { inner: self.inner.clone() }
483 }
484
485 fn into_inner(
486 self,
487 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
488 {
489 (self.inner, self.is_terminated)
490 }
491
492 fn from_inner(
493 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
494 is_terminated: bool,
495 ) -> Self {
496 Self { inner, is_terminated }
497 }
498}
499
500impl futures::Stream for ApSmeRequestStream {
501 type Item = Result<ApSmeRequest, fidl::Error>;
502
503 fn poll_next(
504 mut self: std::pin::Pin<&mut Self>,
505 cx: &mut std::task::Context<'_>,
506 ) -> std::task::Poll<Option<Self::Item>> {
507 let this = &mut *self;
508 if this.inner.check_shutdown(cx) {
509 this.is_terminated = true;
510 return std::task::Poll::Ready(None);
511 }
512 if this.is_terminated {
513 panic!("polled ApSmeRequestStream after completion");
514 }
515 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
516 |bytes, handles| {
517 match this.inner.channel().read_etc(cx, bytes, handles) {
518 std::task::Poll::Ready(Ok(())) => {}
519 std::task::Poll::Pending => return std::task::Poll::Pending,
520 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
521 this.is_terminated = true;
522 return std::task::Poll::Ready(None);
523 }
524 std::task::Poll::Ready(Err(e)) => {
525 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
526 e.into(),
527 ))));
528 }
529 }
530
531 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
533
534 std::task::Poll::Ready(Some(match header.ordinal {
535 0x33fa134ceda8624d => {
536 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
537 let mut req = fidl::new_empty!(
538 ApSmeStartRequest,
539 fidl::encoding::DefaultFuchsiaResourceDialect
540 );
541 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ApSmeStartRequest>(&header, _body_bytes, handles, &mut req)?;
542 let control_handle = ApSmeControlHandle { inner: this.inner.clone() };
543 Ok(ApSmeRequest::Start {
544 config: req.config,
545
546 responder: ApSmeStartResponder {
547 control_handle: std::mem::ManuallyDrop::new(control_handle),
548 tx_id: header.tx_id,
549 },
550 })
551 }
552 0x56423f5b49a2e851 => {
553 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
554 let mut req = fidl::new_empty!(
555 fidl::encoding::EmptyPayload,
556 fidl::encoding::DefaultFuchsiaResourceDialect
557 );
558 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
559 let control_handle = ApSmeControlHandle { inner: this.inner.clone() };
560 Ok(ApSmeRequest::Stop {
561 responder: ApSmeStopResponder {
562 control_handle: std::mem::ManuallyDrop::new(control_handle),
563 tx_id: header.tx_id,
564 },
565 })
566 }
567 0x51c688ac7a101606 => {
568 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
569 let mut req = fidl::new_empty!(
570 fidl::encoding::EmptyPayload,
571 fidl::encoding::DefaultFuchsiaResourceDialect
572 );
573 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
574 let control_handle = ApSmeControlHandle { inner: this.inner.clone() };
575 Ok(ApSmeRequest::Status {
576 responder: ApSmeStatusResponder {
577 control_handle: std::mem::ManuallyDrop::new(control_handle),
578 tx_id: header.tx_id,
579 },
580 })
581 }
582 _ => Err(fidl::Error::UnknownOrdinal {
583 ordinal: header.ordinal,
584 protocol_name: <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
585 }),
586 }))
587 },
588 )
589 }
590}
591
592#[derive(Debug)]
593pub enum ApSmeRequest {
594 Start { config: ApConfig, responder: ApSmeStartResponder },
595 Stop { responder: ApSmeStopResponder },
596 Status { responder: ApSmeStatusResponder },
597}
598
599impl ApSmeRequest {
600 #[allow(irrefutable_let_patterns)]
601 pub fn into_start(self) -> Option<(ApConfig, ApSmeStartResponder)> {
602 if let ApSmeRequest::Start { config, responder } = self {
603 Some((config, responder))
604 } else {
605 None
606 }
607 }
608
609 #[allow(irrefutable_let_patterns)]
610 pub fn into_stop(self) -> Option<(ApSmeStopResponder)> {
611 if let ApSmeRequest::Stop { responder } = self { Some((responder)) } else { None }
612 }
613
614 #[allow(irrefutable_let_patterns)]
615 pub fn into_status(self) -> Option<(ApSmeStatusResponder)> {
616 if let ApSmeRequest::Status { responder } = self { Some((responder)) } else { None }
617 }
618
619 pub fn method_name(&self) -> &'static str {
621 match *self {
622 ApSmeRequest::Start { .. } => "start",
623 ApSmeRequest::Stop { .. } => "stop",
624 ApSmeRequest::Status { .. } => "status",
625 }
626 }
627}
628
629#[derive(Debug, Clone)]
630pub struct ApSmeControlHandle {
631 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
632}
633
634impl fidl::endpoints::ControlHandle for ApSmeControlHandle {
635 fn shutdown(&self) {
636 self.inner.shutdown()
637 }
638
639 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
640 self.inner.shutdown_with_epitaph(status)
641 }
642
643 fn is_closed(&self) -> bool {
644 self.inner.channel().is_closed()
645 }
646 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
647 self.inner.channel().on_closed()
648 }
649
650 #[cfg(target_os = "fuchsia")]
651 fn signal_peer(
652 &self,
653 clear_mask: zx::Signals,
654 set_mask: zx::Signals,
655 ) -> Result<(), zx_status::Status> {
656 use fidl::Peered;
657 self.inner.channel().signal_peer(clear_mask, set_mask)
658 }
659}
660
661impl ApSmeControlHandle {}
662
663#[must_use = "FIDL methods require a response to be sent"]
664#[derive(Debug)]
665pub struct ApSmeStartResponder {
666 control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
667 tx_id: u32,
668}
669
670impl std::ops::Drop for ApSmeStartResponder {
674 fn drop(&mut self) {
675 self.control_handle.shutdown();
676 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
678 }
679}
680
681impl fidl::endpoints::Responder for ApSmeStartResponder {
682 type ControlHandle = ApSmeControlHandle;
683
684 fn control_handle(&self) -> &ApSmeControlHandle {
685 &self.control_handle
686 }
687
688 fn drop_without_shutdown(mut self) {
689 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
691 std::mem::forget(self);
693 }
694}
695
696impl ApSmeStartResponder {
697 pub fn send(self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
701 let _result = self.send_raw(code);
702 if _result.is_err() {
703 self.control_handle.shutdown();
704 }
705 self.drop_without_shutdown();
706 _result
707 }
708
709 pub fn send_no_shutdown_on_err(self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
711 let _result = self.send_raw(code);
712 self.drop_without_shutdown();
713 _result
714 }
715
716 fn send_raw(&self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
717 self.control_handle.inner.send::<ApSmeStartResponse>(
718 (code,),
719 self.tx_id,
720 0x33fa134ceda8624d,
721 fidl::encoding::DynamicFlags::empty(),
722 )
723 }
724}
725
726#[must_use = "FIDL methods require a response to be sent"]
727#[derive(Debug)]
728pub struct ApSmeStopResponder {
729 control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
730 tx_id: u32,
731}
732
733impl std::ops::Drop for ApSmeStopResponder {
737 fn drop(&mut self) {
738 self.control_handle.shutdown();
739 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
741 }
742}
743
744impl fidl::endpoints::Responder for ApSmeStopResponder {
745 type ControlHandle = ApSmeControlHandle;
746
747 fn control_handle(&self) -> &ApSmeControlHandle {
748 &self.control_handle
749 }
750
751 fn drop_without_shutdown(mut self) {
752 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
754 std::mem::forget(self);
756 }
757}
758
759impl ApSmeStopResponder {
760 pub fn send(self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
764 let _result = self.send_raw(code);
765 if _result.is_err() {
766 self.control_handle.shutdown();
767 }
768 self.drop_without_shutdown();
769 _result
770 }
771
772 pub fn send_no_shutdown_on_err(self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
774 let _result = self.send_raw(code);
775 self.drop_without_shutdown();
776 _result
777 }
778
779 fn send_raw(&self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
780 self.control_handle.inner.send::<ApSmeStopResponse>(
781 (code,),
782 self.tx_id,
783 0x56423f5b49a2e851,
784 fidl::encoding::DynamicFlags::empty(),
785 )
786 }
787}
788
789#[must_use = "FIDL methods require a response to be sent"]
790#[derive(Debug)]
791pub struct ApSmeStatusResponder {
792 control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
793 tx_id: u32,
794}
795
796impl std::ops::Drop for ApSmeStatusResponder {
800 fn drop(&mut self) {
801 self.control_handle.shutdown();
802 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
804 }
805}
806
807impl fidl::endpoints::Responder for ApSmeStatusResponder {
808 type ControlHandle = ApSmeControlHandle;
809
810 fn control_handle(&self) -> &ApSmeControlHandle {
811 &self.control_handle
812 }
813
814 fn drop_without_shutdown(mut self) {
815 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
817 std::mem::forget(self);
819 }
820}
821
822impl ApSmeStatusResponder {
823 pub fn send(self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
827 let _result = self.send_raw(resp);
828 if _result.is_err() {
829 self.control_handle.shutdown();
830 }
831 self.drop_without_shutdown();
832 _result
833 }
834
835 pub fn send_no_shutdown_on_err(self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
837 let _result = self.send_raw(resp);
838 self.drop_without_shutdown();
839 _result
840 }
841
842 fn send_raw(&self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
843 self.control_handle.inner.send::<ApSmeStatusResponse>(
844 (resp,),
845 self.tx_id,
846 0x51c688ac7a101606,
847 fidl::encoding::DynamicFlags::empty(),
848 )
849 }
850}
851
852#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
853pub struct ClientSmeMarker;
854
855impl fidl::endpoints::ProtocolMarker for ClientSmeMarker {
856 type Proxy = ClientSmeProxy;
857 type RequestStream = ClientSmeRequestStream;
858 #[cfg(target_os = "fuchsia")]
859 type SynchronousProxy = ClientSmeSynchronousProxy;
860
861 const DEBUG_NAME: &'static str = "(anonymous) ClientSme";
862}
863pub type ClientSmeScanResult = Result<fidl::Vmo, ScanErrorCode>;
864pub type ClientSmeStartScheduledScanResult = Result<(), i32>;
865pub type ClientSmeGetScheduledScanEnabledResult = Result<bool, i32>;
866pub type ClientSmeWmmStatusResult = Result<fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>;
867pub type ClientSmeScanForControllerResult = Result<Vec<ScanResult>, ScanErrorCode>;
868pub type ClientSmeSetMacAddressResult = Result<(), i32>;
869pub type ClientSmeInstallApfPacketFilterResult = Result<(), i32>;
870pub type ClientSmeReadApfPacketFilterDataResult = Result<Vec<u8>, i32>;
871pub type ClientSmeSetApfPacketFilterEnabledResult = Result<(), i32>;
872pub type ClientSmeGetApfPacketFilterEnabledResult = Result<bool, i32>;
873
874pub trait ClientSmeProxyInterface: Send + Sync {
875 type ScanResponseFut: std::future::Future<Output = Result<ClientSmeScanResult, fidl::Error>>
876 + Send;
877 fn r#scan(&self, req: &ScanRequest) -> Self::ScanResponseFut;
878 type StartScheduledScanResponseFut: std::future::Future<Output = Result<ClientSmeStartScheduledScanResult, fidl::Error>>
879 + Send;
880 fn r#start_scheduled_scan(
881 &self,
882 req: &fidl_fuchsia_wlan_common::ScheduledScanRequest,
883 txn: fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
884 ) -> Self::StartScheduledScanResponseFut;
885 type GetScheduledScanEnabledResponseFut: std::future::Future<Output = Result<ClientSmeGetScheduledScanEnabledResult, fidl::Error>>
886 + Send;
887 fn r#get_scheduled_scan_enabled(&self) -> Self::GetScheduledScanEnabledResponseFut;
888 fn r#connect(
889 &self,
890 req: &ConnectRequest,
891 txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
892 ) -> Result<(), fidl::Error>;
893 fn r#roam(&self, req: &RoamRequest) -> Result<(), fidl::Error>;
894 type DisconnectResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
895 fn r#disconnect(&self, reason: UserDisconnectReason) -> Self::DisconnectResponseFut;
896 type StatusResponseFut: std::future::Future<Output = Result<ClientStatusResponse, fidl::Error>>
897 + Send;
898 fn r#status(&self) -> Self::StatusResponseFut;
899 type WmmStatusResponseFut: std::future::Future<Output = Result<ClientSmeWmmStatusResult, fidl::Error>>
900 + Send;
901 fn r#wmm_status(&self) -> Self::WmmStatusResponseFut;
902 type ScanForControllerResponseFut: std::future::Future<Output = Result<ClientSmeScanForControllerResult, fidl::Error>>
903 + Send;
904 fn r#scan_for_controller(&self, req: &ScanRequest) -> Self::ScanForControllerResponseFut;
905 type SetMacAddressResponseFut: std::future::Future<Output = Result<ClientSmeSetMacAddressResult, fidl::Error>>
906 + Send;
907 fn r#set_mac_address(&self, mac_addr: &[u8; 6]) -> Self::SetMacAddressResponseFut;
908 type InstallApfPacketFilterResponseFut: std::future::Future<Output = Result<ClientSmeInstallApfPacketFilterResult, fidl::Error>>
909 + Send;
910 fn r#install_apf_packet_filter(
911 &self,
912 program: &[u8],
913 ) -> Self::InstallApfPacketFilterResponseFut;
914 type ReadApfPacketFilterDataResponseFut: std::future::Future<Output = Result<ClientSmeReadApfPacketFilterDataResult, fidl::Error>>
915 + Send;
916 fn r#read_apf_packet_filter_data(&self) -> Self::ReadApfPacketFilterDataResponseFut;
917 type SetApfPacketFilterEnabledResponseFut: std::future::Future<Output = Result<ClientSmeSetApfPacketFilterEnabledResult, fidl::Error>>
918 + Send;
919 fn r#set_apf_packet_filter_enabled(
920 &self,
921 enabled: bool,
922 ) -> Self::SetApfPacketFilterEnabledResponseFut;
923 type GetApfPacketFilterEnabledResponseFut: std::future::Future<Output = Result<ClientSmeGetApfPacketFilterEnabledResult, fidl::Error>>
924 + Send;
925 fn r#get_apf_packet_filter_enabled(&self) -> Self::GetApfPacketFilterEnabledResponseFut;
926}
927#[derive(Debug)]
928#[cfg(target_os = "fuchsia")]
929pub struct ClientSmeSynchronousProxy {
930 client: fidl::client::sync::Client,
931}
932
933#[cfg(target_os = "fuchsia")]
934impl fidl::endpoints::SynchronousProxy for ClientSmeSynchronousProxy {
935 type Proxy = ClientSmeProxy;
936 type Protocol = ClientSmeMarker;
937
938 fn from_channel(inner: fidl::Channel) -> Self {
939 Self::new(inner)
940 }
941
942 fn into_channel(self) -> fidl::Channel {
943 self.client.into_channel()
944 }
945
946 fn as_channel(&self) -> &fidl::Channel {
947 self.client.as_channel()
948 }
949}
950
951#[cfg(target_os = "fuchsia")]
952impl ClientSmeSynchronousProxy {
953 pub fn new(channel: fidl::Channel) -> Self {
954 Self { client: fidl::client::sync::Client::new(channel) }
955 }
956
957 pub fn into_channel(self) -> fidl::Channel {
958 self.client.into_channel()
959 }
960
961 pub fn wait_for_event(
964 &self,
965 deadline: zx::MonotonicInstant,
966 ) -> Result<ClientSmeEvent, fidl::Error> {
967 ClientSmeEvent::decode(self.client.wait_for_event::<ClientSmeMarker>(deadline)?)
968 }
969
970 pub fn r#scan(
971 &self,
972 mut req: &ScanRequest,
973 ___deadline: zx::MonotonicInstant,
974 ) -> Result<ClientSmeScanResult, fidl::Error> {
975 let _response = self.client.send_query::<ClientSmeScanRequest, fidl::encoding::ResultType<
976 ClientSmeScanResponse,
977 ScanErrorCode,
978 >, ClientSmeMarker>(
979 (req,),
980 0xded0ce3b1685822,
981 fidl::encoding::DynamicFlags::empty(),
982 ___deadline,
983 )?;
984 Ok(_response.map(|x| x.scan_results))
985 }
986
987 pub fn r#start_scheduled_scan(
989 &self,
990 mut req: &fidl_fuchsia_wlan_common::ScheduledScanRequest,
991 mut txn: fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
992 ___deadline: zx::MonotonicInstant,
993 ) -> Result<ClientSmeStartScheduledScanResult, fidl::Error> {
994 let _response = self.client.send_query::<
995 ClientSmeStartScheduledScanRequest,
996 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
997 ClientSmeMarker,
998 >(
999 (req, txn,),
1000 0x97eedb559e6bdb8,
1001 fidl::encoding::DynamicFlags::empty(),
1002 ___deadline,
1003 )?;
1004 Ok(_response.map(|x| x))
1005 }
1006
1007 pub fn r#get_scheduled_scan_enabled(
1009 &self,
1010 ___deadline: zx::MonotonicInstant,
1011 ) -> Result<ClientSmeGetScheduledScanEnabledResult, fidl::Error> {
1012 let _response = self.client.send_query::<
1013 fidl::encoding::EmptyPayload,
1014 fidl::encoding::ResultType<ClientSmeGetScheduledScanEnabledResponse, i32>,
1015 ClientSmeMarker,
1016 >(
1017 (),
1018 0x777e3c8854ff2710,
1019 fidl::encoding::DynamicFlags::empty(),
1020 ___deadline,
1021 )?;
1022 Ok(_response.map(|x| x.enabled))
1023 }
1024
1025 pub fn r#connect(
1026 &self,
1027 mut req: &ConnectRequest,
1028 mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1029 ) -> Result<(), fidl::Error> {
1030 self.client.send::<ClientSmeConnectRequest>(
1031 (req, txn),
1032 0x250a0f6fe9f85351,
1033 fidl::encoding::DynamicFlags::empty(),
1034 )
1035 }
1036
1037 pub fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1038 self.client.send::<ClientSmeRoamRequest>(
1039 (req,),
1040 0x107ead7d84723921,
1041 fidl::encoding::DynamicFlags::empty(),
1042 )
1043 }
1044
1045 pub fn r#disconnect(
1046 &self,
1047 mut reason: UserDisconnectReason,
1048 ___deadline: zx::MonotonicInstant,
1049 ) -> Result<(), fidl::Error> {
1050 let _response = self.client.send_query::<
1051 ClientSmeDisconnectRequest,
1052 fidl::encoding::EmptyPayload,
1053 ClientSmeMarker,
1054 >(
1055 (reason,),
1056 0x39a578de9a107304,
1057 fidl::encoding::DynamicFlags::empty(),
1058 ___deadline,
1059 )?;
1060 Ok(_response)
1061 }
1062
1063 pub fn r#status(
1064 &self,
1065 ___deadline: zx::MonotonicInstant,
1066 ) -> Result<ClientStatusResponse, fidl::Error> {
1067 let _response = self
1068 .client
1069 .send_query::<fidl::encoding::EmptyPayload, ClientSmeStatusResponse, ClientSmeMarker>(
1070 (),
1071 0xda00b607470faf2,
1072 fidl::encoding::DynamicFlags::empty(),
1073 ___deadline,
1074 )?;
1075 Ok(_response.resp)
1076 }
1077
1078 pub fn r#wmm_status(
1079 &self,
1080 ___deadline: zx::MonotonicInstant,
1081 ) -> Result<ClientSmeWmmStatusResult, fidl::Error> {
1082 let _response = self.client.send_query::<
1083 fidl::encoding::EmptyPayload,
1084 fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>,
1085 ClientSmeMarker,
1086 >(
1087 (),
1088 0x3d0ccc75f6baa9e3,
1089 fidl::encoding::DynamicFlags::empty(),
1090 ___deadline,
1091 )?;
1092 Ok(_response.map(|x| x.resp))
1093 }
1094
1095 pub fn r#scan_for_controller(
1096 &self,
1097 mut req: &ScanRequest,
1098 ___deadline: zx::MonotonicInstant,
1099 ) -> Result<ClientSmeScanForControllerResult, fidl::Error> {
1100 let _response = self.client.send_query::<
1101 ClientSmeScanForControllerRequest,
1102 fidl::encoding::ResultType<ClientSmeScanForControllerResponse, ScanErrorCode>,
1103 ClientSmeMarker,
1104 >(
1105 (req,),
1106 0x21f00ab22ff79a12,
1107 fidl::encoding::DynamicFlags::empty(),
1108 ___deadline,
1109 )?;
1110 Ok(_response.map(|x| x.scan_results))
1111 }
1112
1113 pub fn r#set_mac_address(
1114 &self,
1115 mut mac_addr: &[u8; 6],
1116 ___deadline: zx::MonotonicInstant,
1117 ) -> Result<ClientSmeSetMacAddressResult, fidl::Error> {
1118 let _response = self.client.send_query::<
1119 ClientSmeSetMacAddressRequest,
1120 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1121 ClientSmeMarker,
1122 >(
1123 (mac_addr,),
1124 0x13e0a0bee8962f58,
1125 fidl::encoding::DynamicFlags::empty(),
1126 ___deadline,
1127 )?;
1128 Ok(_response.map(|x| x))
1129 }
1130
1131 pub fn r#install_apf_packet_filter(
1132 &self,
1133 mut program: &[u8],
1134 ___deadline: zx::MonotonicInstant,
1135 ) -> Result<ClientSmeInstallApfPacketFilterResult, fidl::Error> {
1136 let _response = self.client.send_query::<
1137 ClientSmeInstallApfPacketFilterRequest,
1138 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1139 ClientSmeMarker,
1140 >(
1141 (program,),
1142 0x77435965e7bfaf83,
1143 fidl::encoding::DynamicFlags::empty(),
1144 ___deadline,
1145 )?;
1146 Ok(_response.map(|x| x))
1147 }
1148
1149 pub fn r#read_apf_packet_filter_data(
1150 &self,
1151 ___deadline: zx::MonotonicInstant,
1152 ) -> Result<ClientSmeReadApfPacketFilterDataResult, fidl::Error> {
1153 let _response = self.client.send_query::<
1154 fidl::encoding::EmptyPayload,
1155 fidl::encoding::ResultType<ClientSmeReadApfPacketFilterDataResponse, i32>,
1156 ClientSmeMarker,
1157 >(
1158 (),
1159 0x66fc6616b9963023,
1160 fidl::encoding::DynamicFlags::empty(),
1161 ___deadline,
1162 )?;
1163 Ok(_response.map(|x| x.memory))
1164 }
1165
1166 pub fn r#set_apf_packet_filter_enabled(
1167 &self,
1168 mut enabled: bool,
1169 ___deadline: zx::MonotonicInstant,
1170 ) -> Result<ClientSmeSetApfPacketFilterEnabledResult, fidl::Error> {
1171 let _response = self.client.send_query::<
1172 ClientSmeSetApfPacketFilterEnabledRequest,
1173 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1174 ClientSmeMarker,
1175 >(
1176 (enabled,),
1177 0x5070d2ed31580b81,
1178 fidl::encoding::DynamicFlags::empty(),
1179 ___deadline,
1180 )?;
1181 Ok(_response.map(|x| x))
1182 }
1183
1184 pub fn r#get_apf_packet_filter_enabled(
1185 &self,
1186 ___deadline: zx::MonotonicInstant,
1187 ) -> Result<ClientSmeGetApfPacketFilterEnabledResult, fidl::Error> {
1188 let _response =
1189 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1190 ClientSmeGetApfPacketFilterEnabledResponse,
1191 i32,
1192 >, ClientSmeMarker>(
1193 (),
1194 0xdda5c1533526869,
1195 fidl::encoding::DynamicFlags::empty(),
1196 ___deadline,
1197 )?;
1198 Ok(_response.map(|x| x.enabled))
1199 }
1200}
1201
1202#[cfg(target_os = "fuchsia")]
1203impl From<ClientSmeSynchronousProxy> for zx::NullableHandle {
1204 fn from(value: ClientSmeSynchronousProxy) -> Self {
1205 value.into_channel().into()
1206 }
1207}
1208
1209#[cfg(target_os = "fuchsia")]
1210impl From<fidl::Channel> for ClientSmeSynchronousProxy {
1211 fn from(value: fidl::Channel) -> Self {
1212 Self::new(value)
1213 }
1214}
1215
1216#[cfg(target_os = "fuchsia")]
1217impl fidl::endpoints::FromClient for ClientSmeSynchronousProxy {
1218 type Protocol = ClientSmeMarker;
1219
1220 fn from_client(value: fidl::endpoints::ClientEnd<ClientSmeMarker>) -> Self {
1221 Self::new(value.into_channel())
1222 }
1223}
1224
1225#[derive(Debug, Clone)]
1226pub struct ClientSmeProxy {
1227 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1228}
1229
1230impl fidl::endpoints::Proxy for ClientSmeProxy {
1231 type Protocol = ClientSmeMarker;
1232
1233 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1234 Self::new(inner)
1235 }
1236
1237 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1238 self.client.into_channel().map_err(|client| Self { client })
1239 }
1240
1241 fn as_channel(&self) -> &::fidl::AsyncChannel {
1242 self.client.as_channel()
1243 }
1244}
1245
1246impl ClientSmeProxy {
1247 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1249 let protocol_name = <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1250 Self { client: fidl::client::Client::new(channel, protocol_name) }
1251 }
1252
1253 pub fn take_event_stream(&self) -> ClientSmeEventStream {
1259 ClientSmeEventStream { event_receiver: self.client.take_event_receiver() }
1260 }
1261
1262 pub fn r#scan(
1263 &self,
1264 mut req: &ScanRequest,
1265 ) -> fidl::client::QueryResponseFut<
1266 ClientSmeScanResult,
1267 fidl::encoding::DefaultFuchsiaResourceDialect,
1268 > {
1269 ClientSmeProxyInterface::r#scan(self, req)
1270 }
1271
1272 pub fn r#start_scheduled_scan(
1274 &self,
1275 mut req: &fidl_fuchsia_wlan_common::ScheduledScanRequest,
1276 mut txn: fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
1277 ) -> fidl::client::QueryResponseFut<
1278 ClientSmeStartScheduledScanResult,
1279 fidl::encoding::DefaultFuchsiaResourceDialect,
1280 > {
1281 ClientSmeProxyInterface::r#start_scheduled_scan(self, req, txn)
1282 }
1283
1284 pub fn r#get_scheduled_scan_enabled(
1286 &self,
1287 ) -> fidl::client::QueryResponseFut<
1288 ClientSmeGetScheduledScanEnabledResult,
1289 fidl::encoding::DefaultFuchsiaResourceDialect,
1290 > {
1291 ClientSmeProxyInterface::r#get_scheduled_scan_enabled(self)
1292 }
1293
1294 pub fn r#connect(
1295 &self,
1296 mut req: &ConnectRequest,
1297 mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1298 ) -> Result<(), fidl::Error> {
1299 ClientSmeProxyInterface::r#connect(self, req, txn)
1300 }
1301
1302 pub fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1303 ClientSmeProxyInterface::r#roam(self, req)
1304 }
1305
1306 pub fn r#disconnect(
1307 &self,
1308 mut reason: UserDisconnectReason,
1309 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
1310 ClientSmeProxyInterface::r#disconnect(self, reason)
1311 }
1312
1313 pub fn r#status(
1314 &self,
1315 ) -> fidl::client::QueryResponseFut<
1316 ClientStatusResponse,
1317 fidl::encoding::DefaultFuchsiaResourceDialect,
1318 > {
1319 ClientSmeProxyInterface::r#status(self)
1320 }
1321
1322 pub fn r#wmm_status(
1323 &self,
1324 ) -> fidl::client::QueryResponseFut<
1325 ClientSmeWmmStatusResult,
1326 fidl::encoding::DefaultFuchsiaResourceDialect,
1327 > {
1328 ClientSmeProxyInterface::r#wmm_status(self)
1329 }
1330
1331 pub fn r#scan_for_controller(
1332 &self,
1333 mut req: &ScanRequest,
1334 ) -> fidl::client::QueryResponseFut<
1335 ClientSmeScanForControllerResult,
1336 fidl::encoding::DefaultFuchsiaResourceDialect,
1337 > {
1338 ClientSmeProxyInterface::r#scan_for_controller(self, req)
1339 }
1340
1341 pub fn r#set_mac_address(
1342 &self,
1343 mut mac_addr: &[u8; 6],
1344 ) -> fidl::client::QueryResponseFut<
1345 ClientSmeSetMacAddressResult,
1346 fidl::encoding::DefaultFuchsiaResourceDialect,
1347 > {
1348 ClientSmeProxyInterface::r#set_mac_address(self, mac_addr)
1349 }
1350
1351 pub fn r#install_apf_packet_filter(
1352 &self,
1353 mut program: &[u8],
1354 ) -> fidl::client::QueryResponseFut<
1355 ClientSmeInstallApfPacketFilterResult,
1356 fidl::encoding::DefaultFuchsiaResourceDialect,
1357 > {
1358 ClientSmeProxyInterface::r#install_apf_packet_filter(self, program)
1359 }
1360
1361 pub fn r#read_apf_packet_filter_data(
1362 &self,
1363 ) -> fidl::client::QueryResponseFut<
1364 ClientSmeReadApfPacketFilterDataResult,
1365 fidl::encoding::DefaultFuchsiaResourceDialect,
1366 > {
1367 ClientSmeProxyInterface::r#read_apf_packet_filter_data(self)
1368 }
1369
1370 pub fn r#set_apf_packet_filter_enabled(
1371 &self,
1372 mut enabled: bool,
1373 ) -> fidl::client::QueryResponseFut<
1374 ClientSmeSetApfPacketFilterEnabledResult,
1375 fidl::encoding::DefaultFuchsiaResourceDialect,
1376 > {
1377 ClientSmeProxyInterface::r#set_apf_packet_filter_enabled(self, enabled)
1378 }
1379
1380 pub fn r#get_apf_packet_filter_enabled(
1381 &self,
1382 ) -> fidl::client::QueryResponseFut<
1383 ClientSmeGetApfPacketFilterEnabledResult,
1384 fidl::encoding::DefaultFuchsiaResourceDialect,
1385 > {
1386 ClientSmeProxyInterface::r#get_apf_packet_filter_enabled(self)
1387 }
1388}
1389
1390impl ClientSmeProxyInterface for ClientSmeProxy {
1391 type ScanResponseFut = fidl::client::QueryResponseFut<
1392 ClientSmeScanResult,
1393 fidl::encoding::DefaultFuchsiaResourceDialect,
1394 >;
1395 fn r#scan(&self, mut req: &ScanRequest) -> Self::ScanResponseFut {
1396 fn _decode(
1397 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1398 ) -> Result<ClientSmeScanResult, fidl::Error> {
1399 let _response = fidl::client::decode_transaction_body::<
1400 fidl::encoding::ResultType<ClientSmeScanResponse, ScanErrorCode>,
1401 fidl::encoding::DefaultFuchsiaResourceDialect,
1402 0xded0ce3b1685822,
1403 >(_buf?)?;
1404 Ok(_response.map(|x| x.scan_results))
1405 }
1406 self.client.send_query_and_decode::<ClientSmeScanRequest, ClientSmeScanResult>(
1407 (req,),
1408 0xded0ce3b1685822,
1409 fidl::encoding::DynamicFlags::empty(),
1410 _decode,
1411 )
1412 }
1413
1414 type StartScheduledScanResponseFut = fidl::client::QueryResponseFut<
1415 ClientSmeStartScheduledScanResult,
1416 fidl::encoding::DefaultFuchsiaResourceDialect,
1417 >;
1418 fn r#start_scheduled_scan(
1419 &self,
1420 mut req: &fidl_fuchsia_wlan_common::ScheduledScanRequest,
1421 mut txn: fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
1422 ) -> Self::StartScheduledScanResponseFut {
1423 fn _decode(
1424 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1425 ) -> Result<ClientSmeStartScheduledScanResult, fidl::Error> {
1426 let _response = fidl::client::decode_transaction_body::<
1427 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1428 fidl::encoding::DefaultFuchsiaResourceDialect,
1429 0x97eedb559e6bdb8,
1430 >(_buf?)?;
1431 Ok(_response.map(|x| x))
1432 }
1433 self.client.send_query_and_decode::<
1434 ClientSmeStartScheduledScanRequest,
1435 ClientSmeStartScheduledScanResult,
1436 >(
1437 (req, txn,),
1438 0x97eedb559e6bdb8,
1439 fidl::encoding::DynamicFlags::empty(),
1440 _decode,
1441 )
1442 }
1443
1444 type GetScheduledScanEnabledResponseFut = fidl::client::QueryResponseFut<
1445 ClientSmeGetScheduledScanEnabledResult,
1446 fidl::encoding::DefaultFuchsiaResourceDialect,
1447 >;
1448 fn r#get_scheduled_scan_enabled(&self) -> Self::GetScheduledScanEnabledResponseFut {
1449 fn _decode(
1450 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1451 ) -> Result<ClientSmeGetScheduledScanEnabledResult, fidl::Error> {
1452 let _response = fidl::client::decode_transaction_body::<
1453 fidl::encoding::ResultType<ClientSmeGetScheduledScanEnabledResponse, i32>,
1454 fidl::encoding::DefaultFuchsiaResourceDialect,
1455 0x777e3c8854ff2710,
1456 >(_buf?)?;
1457 Ok(_response.map(|x| x.enabled))
1458 }
1459 self.client.send_query_and_decode::<
1460 fidl::encoding::EmptyPayload,
1461 ClientSmeGetScheduledScanEnabledResult,
1462 >(
1463 (),
1464 0x777e3c8854ff2710,
1465 fidl::encoding::DynamicFlags::empty(),
1466 _decode,
1467 )
1468 }
1469
1470 fn r#connect(
1471 &self,
1472 mut req: &ConnectRequest,
1473 mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1474 ) -> Result<(), fidl::Error> {
1475 self.client.send::<ClientSmeConnectRequest>(
1476 (req, txn),
1477 0x250a0f6fe9f85351,
1478 fidl::encoding::DynamicFlags::empty(),
1479 )
1480 }
1481
1482 fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1483 self.client.send::<ClientSmeRoamRequest>(
1484 (req,),
1485 0x107ead7d84723921,
1486 fidl::encoding::DynamicFlags::empty(),
1487 )
1488 }
1489
1490 type DisconnectResponseFut =
1491 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1492 fn r#disconnect(&self, mut reason: UserDisconnectReason) -> Self::DisconnectResponseFut {
1493 fn _decode(
1494 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1495 ) -> Result<(), fidl::Error> {
1496 let _response = fidl::client::decode_transaction_body::<
1497 fidl::encoding::EmptyPayload,
1498 fidl::encoding::DefaultFuchsiaResourceDialect,
1499 0x39a578de9a107304,
1500 >(_buf?)?;
1501 Ok(_response)
1502 }
1503 self.client.send_query_and_decode::<ClientSmeDisconnectRequest, ()>(
1504 (reason,),
1505 0x39a578de9a107304,
1506 fidl::encoding::DynamicFlags::empty(),
1507 _decode,
1508 )
1509 }
1510
1511 type StatusResponseFut = fidl::client::QueryResponseFut<
1512 ClientStatusResponse,
1513 fidl::encoding::DefaultFuchsiaResourceDialect,
1514 >;
1515 fn r#status(&self) -> Self::StatusResponseFut {
1516 fn _decode(
1517 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1518 ) -> Result<ClientStatusResponse, fidl::Error> {
1519 let _response = fidl::client::decode_transaction_body::<
1520 ClientSmeStatusResponse,
1521 fidl::encoding::DefaultFuchsiaResourceDialect,
1522 0xda00b607470faf2,
1523 >(_buf?)?;
1524 Ok(_response.resp)
1525 }
1526 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ClientStatusResponse>(
1527 (),
1528 0xda00b607470faf2,
1529 fidl::encoding::DynamicFlags::empty(),
1530 _decode,
1531 )
1532 }
1533
1534 type WmmStatusResponseFut = fidl::client::QueryResponseFut<
1535 ClientSmeWmmStatusResult,
1536 fidl::encoding::DefaultFuchsiaResourceDialect,
1537 >;
1538 fn r#wmm_status(&self) -> Self::WmmStatusResponseFut {
1539 fn _decode(
1540 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1541 ) -> Result<ClientSmeWmmStatusResult, fidl::Error> {
1542 let _response = fidl::client::decode_transaction_body::<
1543 fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>,
1544 fidl::encoding::DefaultFuchsiaResourceDialect,
1545 0x3d0ccc75f6baa9e3,
1546 >(_buf?)?;
1547 Ok(_response.map(|x| x.resp))
1548 }
1549 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ClientSmeWmmStatusResult>(
1550 (),
1551 0x3d0ccc75f6baa9e3,
1552 fidl::encoding::DynamicFlags::empty(),
1553 _decode,
1554 )
1555 }
1556
1557 type ScanForControllerResponseFut = fidl::client::QueryResponseFut<
1558 ClientSmeScanForControllerResult,
1559 fidl::encoding::DefaultFuchsiaResourceDialect,
1560 >;
1561 fn r#scan_for_controller(&self, mut req: &ScanRequest) -> Self::ScanForControllerResponseFut {
1562 fn _decode(
1563 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1564 ) -> Result<ClientSmeScanForControllerResult, fidl::Error> {
1565 let _response = fidl::client::decode_transaction_body::<
1566 fidl::encoding::ResultType<ClientSmeScanForControllerResponse, ScanErrorCode>,
1567 fidl::encoding::DefaultFuchsiaResourceDialect,
1568 0x21f00ab22ff79a12,
1569 >(_buf?)?;
1570 Ok(_response.map(|x| x.scan_results))
1571 }
1572 self.client.send_query_and_decode::<
1573 ClientSmeScanForControllerRequest,
1574 ClientSmeScanForControllerResult,
1575 >(
1576 (req,),
1577 0x21f00ab22ff79a12,
1578 fidl::encoding::DynamicFlags::empty(),
1579 _decode,
1580 )
1581 }
1582
1583 type SetMacAddressResponseFut = fidl::client::QueryResponseFut<
1584 ClientSmeSetMacAddressResult,
1585 fidl::encoding::DefaultFuchsiaResourceDialect,
1586 >;
1587 fn r#set_mac_address(&self, mut mac_addr: &[u8; 6]) -> Self::SetMacAddressResponseFut {
1588 fn _decode(
1589 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1590 ) -> Result<ClientSmeSetMacAddressResult, fidl::Error> {
1591 let _response = fidl::client::decode_transaction_body::<
1592 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1593 fidl::encoding::DefaultFuchsiaResourceDialect,
1594 0x13e0a0bee8962f58,
1595 >(_buf?)?;
1596 Ok(_response.map(|x| x))
1597 }
1598 self.client
1599 .send_query_and_decode::<ClientSmeSetMacAddressRequest, ClientSmeSetMacAddressResult>(
1600 (mac_addr,),
1601 0x13e0a0bee8962f58,
1602 fidl::encoding::DynamicFlags::empty(),
1603 _decode,
1604 )
1605 }
1606
1607 type InstallApfPacketFilterResponseFut = fidl::client::QueryResponseFut<
1608 ClientSmeInstallApfPacketFilterResult,
1609 fidl::encoding::DefaultFuchsiaResourceDialect,
1610 >;
1611 fn r#install_apf_packet_filter(
1612 &self,
1613 mut program: &[u8],
1614 ) -> Self::InstallApfPacketFilterResponseFut {
1615 fn _decode(
1616 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1617 ) -> Result<ClientSmeInstallApfPacketFilterResult, fidl::Error> {
1618 let _response = fidl::client::decode_transaction_body::<
1619 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1620 fidl::encoding::DefaultFuchsiaResourceDialect,
1621 0x77435965e7bfaf83,
1622 >(_buf?)?;
1623 Ok(_response.map(|x| x))
1624 }
1625 self.client.send_query_and_decode::<
1626 ClientSmeInstallApfPacketFilterRequest,
1627 ClientSmeInstallApfPacketFilterResult,
1628 >(
1629 (program,),
1630 0x77435965e7bfaf83,
1631 fidl::encoding::DynamicFlags::empty(),
1632 _decode,
1633 )
1634 }
1635
1636 type ReadApfPacketFilterDataResponseFut = fidl::client::QueryResponseFut<
1637 ClientSmeReadApfPacketFilterDataResult,
1638 fidl::encoding::DefaultFuchsiaResourceDialect,
1639 >;
1640 fn r#read_apf_packet_filter_data(&self) -> Self::ReadApfPacketFilterDataResponseFut {
1641 fn _decode(
1642 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1643 ) -> Result<ClientSmeReadApfPacketFilterDataResult, fidl::Error> {
1644 let _response = fidl::client::decode_transaction_body::<
1645 fidl::encoding::ResultType<ClientSmeReadApfPacketFilterDataResponse, i32>,
1646 fidl::encoding::DefaultFuchsiaResourceDialect,
1647 0x66fc6616b9963023,
1648 >(_buf?)?;
1649 Ok(_response.map(|x| x.memory))
1650 }
1651 self.client.send_query_and_decode::<
1652 fidl::encoding::EmptyPayload,
1653 ClientSmeReadApfPacketFilterDataResult,
1654 >(
1655 (),
1656 0x66fc6616b9963023,
1657 fidl::encoding::DynamicFlags::empty(),
1658 _decode,
1659 )
1660 }
1661
1662 type SetApfPacketFilterEnabledResponseFut = fidl::client::QueryResponseFut<
1663 ClientSmeSetApfPacketFilterEnabledResult,
1664 fidl::encoding::DefaultFuchsiaResourceDialect,
1665 >;
1666 fn r#set_apf_packet_filter_enabled(
1667 &self,
1668 mut enabled: bool,
1669 ) -> Self::SetApfPacketFilterEnabledResponseFut {
1670 fn _decode(
1671 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1672 ) -> Result<ClientSmeSetApfPacketFilterEnabledResult, fidl::Error> {
1673 let _response = fidl::client::decode_transaction_body::<
1674 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1675 fidl::encoding::DefaultFuchsiaResourceDialect,
1676 0x5070d2ed31580b81,
1677 >(_buf?)?;
1678 Ok(_response.map(|x| x))
1679 }
1680 self.client.send_query_and_decode::<
1681 ClientSmeSetApfPacketFilterEnabledRequest,
1682 ClientSmeSetApfPacketFilterEnabledResult,
1683 >(
1684 (enabled,),
1685 0x5070d2ed31580b81,
1686 fidl::encoding::DynamicFlags::empty(),
1687 _decode,
1688 )
1689 }
1690
1691 type GetApfPacketFilterEnabledResponseFut = fidl::client::QueryResponseFut<
1692 ClientSmeGetApfPacketFilterEnabledResult,
1693 fidl::encoding::DefaultFuchsiaResourceDialect,
1694 >;
1695 fn r#get_apf_packet_filter_enabled(&self) -> Self::GetApfPacketFilterEnabledResponseFut {
1696 fn _decode(
1697 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1698 ) -> Result<ClientSmeGetApfPacketFilterEnabledResult, fidl::Error> {
1699 let _response = fidl::client::decode_transaction_body::<
1700 fidl::encoding::ResultType<ClientSmeGetApfPacketFilterEnabledResponse, i32>,
1701 fidl::encoding::DefaultFuchsiaResourceDialect,
1702 0xdda5c1533526869,
1703 >(_buf?)?;
1704 Ok(_response.map(|x| x.enabled))
1705 }
1706 self.client.send_query_and_decode::<
1707 fidl::encoding::EmptyPayload,
1708 ClientSmeGetApfPacketFilterEnabledResult,
1709 >(
1710 (),
1711 0xdda5c1533526869,
1712 fidl::encoding::DynamicFlags::empty(),
1713 _decode,
1714 )
1715 }
1716}
1717
1718pub struct ClientSmeEventStream {
1719 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1720}
1721
1722impl std::marker::Unpin for ClientSmeEventStream {}
1723
1724impl futures::stream::FusedStream for ClientSmeEventStream {
1725 fn is_terminated(&self) -> bool {
1726 self.event_receiver.is_terminated()
1727 }
1728}
1729
1730impl futures::Stream for ClientSmeEventStream {
1731 type Item = Result<ClientSmeEvent, fidl::Error>;
1732
1733 fn poll_next(
1734 mut self: std::pin::Pin<&mut Self>,
1735 cx: &mut std::task::Context<'_>,
1736 ) -> std::task::Poll<Option<Self::Item>> {
1737 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1738 &mut self.event_receiver,
1739 cx
1740 )?) {
1741 Some(buf) => std::task::Poll::Ready(Some(ClientSmeEvent::decode(buf))),
1742 None => std::task::Poll::Ready(None),
1743 }
1744 }
1745}
1746
1747#[derive(Debug)]
1748pub enum ClientSmeEvent {}
1749
1750impl ClientSmeEvent {
1751 fn decode(
1753 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1754 ) -> Result<ClientSmeEvent, fidl::Error> {
1755 let (bytes, _handles) = buf.split_mut();
1756 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1757 debug_assert_eq!(tx_header.tx_id, 0);
1758 match tx_header.ordinal {
1759 _ => Err(fidl::Error::UnknownOrdinal {
1760 ordinal: tx_header.ordinal,
1761 protocol_name: <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1762 }),
1763 }
1764 }
1765}
1766
1767pub struct ClientSmeRequestStream {
1769 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1770 is_terminated: bool,
1771}
1772
1773impl std::marker::Unpin for ClientSmeRequestStream {}
1774
1775impl futures::stream::FusedStream for ClientSmeRequestStream {
1776 fn is_terminated(&self) -> bool {
1777 self.is_terminated
1778 }
1779}
1780
1781impl fidl::endpoints::RequestStream for ClientSmeRequestStream {
1782 type Protocol = ClientSmeMarker;
1783 type ControlHandle = ClientSmeControlHandle;
1784
1785 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1786 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1787 }
1788
1789 fn control_handle(&self) -> Self::ControlHandle {
1790 ClientSmeControlHandle { inner: self.inner.clone() }
1791 }
1792
1793 fn into_inner(
1794 self,
1795 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1796 {
1797 (self.inner, self.is_terminated)
1798 }
1799
1800 fn from_inner(
1801 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1802 is_terminated: bool,
1803 ) -> Self {
1804 Self { inner, is_terminated }
1805 }
1806}
1807
1808impl futures::Stream for ClientSmeRequestStream {
1809 type Item = Result<ClientSmeRequest, fidl::Error>;
1810
1811 fn poll_next(
1812 mut self: std::pin::Pin<&mut Self>,
1813 cx: &mut std::task::Context<'_>,
1814 ) -> std::task::Poll<Option<Self::Item>> {
1815 let this = &mut *self;
1816 if this.inner.check_shutdown(cx) {
1817 this.is_terminated = true;
1818 return std::task::Poll::Ready(None);
1819 }
1820 if this.is_terminated {
1821 panic!("polled ClientSmeRequestStream after completion");
1822 }
1823 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1824 |bytes, handles| {
1825 match this.inner.channel().read_etc(cx, bytes, handles) {
1826 std::task::Poll::Ready(Ok(())) => {}
1827 std::task::Poll::Pending => return std::task::Poll::Pending,
1828 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1829 this.is_terminated = true;
1830 return std::task::Poll::Ready(None);
1831 }
1832 std::task::Poll::Ready(Err(e)) => {
1833 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1834 e.into(),
1835 ))));
1836 }
1837 }
1838
1839 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1841
1842 std::task::Poll::Ready(Some(match header.ordinal {
1843 0xded0ce3b1685822 => {
1844 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1845 let mut req = fidl::new_empty!(
1846 ClientSmeScanRequest,
1847 fidl::encoding::DefaultFuchsiaResourceDialect
1848 );
1849 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeScanRequest>(&header, _body_bytes, handles, &mut req)?;
1850 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1851 Ok(ClientSmeRequest::Scan {
1852 req: req.req,
1853
1854 responder: ClientSmeScanResponder {
1855 control_handle: std::mem::ManuallyDrop::new(control_handle),
1856 tx_id: header.tx_id,
1857 },
1858 })
1859 }
1860 0x97eedb559e6bdb8 => {
1861 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1862 let mut req = fidl::new_empty!(
1863 ClientSmeStartScheduledScanRequest,
1864 fidl::encoding::DefaultFuchsiaResourceDialect
1865 );
1866 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeStartScheduledScanRequest>(&header, _body_bytes, handles, &mut req)?;
1867 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1868 Ok(ClientSmeRequest::StartScheduledScan {
1869 req: req.req,
1870 txn: req.txn,
1871
1872 responder: ClientSmeStartScheduledScanResponder {
1873 control_handle: std::mem::ManuallyDrop::new(control_handle),
1874 tx_id: header.tx_id,
1875 },
1876 })
1877 }
1878 0x777e3c8854ff2710 => {
1879 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1880 let mut req = fidl::new_empty!(
1881 fidl::encoding::EmptyPayload,
1882 fidl::encoding::DefaultFuchsiaResourceDialect
1883 );
1884 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1885 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1886 Ok(ClientSmeRequest::GetScheduledScanEnabled {
1887 responder: ClientSmeGetScheduledScanEnabledResponder {
1888 control_handle: std::mem::ManuallyDrop::new(control_handle),
1889 tx_id: header.tx_id,
1890 },
1891 })
1892 }
1893 0x250a0f6fe9f85351 => {
1894 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1895 let mut req = fidl::new_empty!(
1896 ClientSmeConnectRequest,
1897 fidl::encoding::DefaultFuchsiaResourceDialect
1898 );
1899 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeConnectRequest>(&header, _body_bytes, handles, &mut req)?;
1900 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1901 Ok(ClientSmeRequest::Connect { req: req.req, txn: req.txn, control_handle })
1902 }
1903 0x107ead7d84723921 => {
1904 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1905 let mut req = fidl::new_empty!(
1906 ClientSmeRoamRequest,
1907 fidl::encoding::DefaultFuchsiaResourceDialect
1908 );
1909 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeRoamRequest>(&header, _body_bytes, handles, &mut req)?;
1910 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1911 Ok(ClientSmeRequest::Roam { req: req.req, control_handle })
1912 }
1913 0x39a578de9a107304 => {
1914 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1915 let mut req = fidl::new_empty!(
1916 ClientSmeDisconnectRequest,
1917 fidl::encoding::DefaultFuchsiaResourceDialect
1918 );
1919 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeDisconnectRequest>(&header, _body_bytes, handles, &mut req)?;
1920 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1921 Ok(ClientSmeRequest::Disconnect {
1922 reason: req.reason,
1923
1924 responder: ClientSmeDisconnectResponder {
1925 control_handle: std::mem::ManuallyDrop::new(control_handle),
1926 tx_id: header.tx_id,
1927 },
1928 })
1929 }
1930 0xda00b607470faf2 => {
1931 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1932 let mut req = fidl::new_empty!(
1933 fidl::encoding::EmptyPayload,
1934 fidl::encoding::DefaultFuchsiaResourceDialect
1935 );
1936 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1937 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1938 Ok(ClientSmeRequest::Status {
1939 responder: ClientSmeStatusResponder {
1940 control_handle: std::mem::ManuallyDrop::new(control_handle),
1941 tx_id: header.tx_id,
1942 },
1943 })
1944 }
1945 0x3d0ccc75f6baa9e3 => {
1946 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1947 let mut req = fidl::new_empty!(
1948 fidl::encoding::EmptyPayload,
1949 fidl::encoding::DefaultFuchsiaResourceDialect
1950 );
1951 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1952 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1953 Ok(ClientSmeRequest::WmmStatus {
1954 responder: ClientSmeWmmStatusResponder {
1955 control_handle: std::mem::ManuallyDrop::new(control_handle),
1956 tx_id: header.tx_id,
1957 },
1958 })
1959 }
1960 0x21f00ab22ff79a12 => {
1961 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1962 let mut req = fidl::new_empty!(
1963 ClientSmeScanForControllerRequest,
1964 fidl::encoding::DefaultFuchsiaResourceDialect
1965 );
1966 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeScanForControllerRequest>(&header, _body_bytes, handles, &mut req)?;
1967 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1968 Ok(ClientSmeRequest::ScanForController {
1969 req: req.req,
1970
1971 responder: ClientSmeScanForControllerResponder {
1972 control_handle: std::mem::ManuallyDrop::new(control_handle),
1973 tx_id: header.tx_id,
1974 },
1975 })
1976 }
1977 0x13e0a0bee8962f58 => {
1978 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1979 let mut req = fidl::new_empty!(
1980 ClientSmeSetMacAddressRequest,
1981 fidl::encoding::DefaultFuchsiaResourceDialect
1982 );
1983 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeSetMacAddressRequest>(&header, _body_bytes, handles, &mut req)?;
1984 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1985 Ok(ClientSmeRequest::SetMacAddress {
1986 mac_addr: req.mac_addr,
1987
1988 responder: ClientSmeSetMacAddressResponder {
1989 control_handle: std::mem::ManuallyDrop::new(control_handle),
1990 tx_id: header.tx_id,
1991 },
1992 })
1993 }
1994 0x77435965e7bfaf83 => {
1995 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1996 let mut req = fidl::new_empty!(
1997 ClientSmeInstallApfPacketFilterRequest,
1998 fidl::encoding::DefaultFuchsiaResourceDialect
1999 );
2000 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeInstallApfPacketFilterRequest>(&header, _body_bytes, handles, &mut req)?;
2001 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2002 Ok(ClientSmeRequest::InstallApfPacketFilter {
2003 program: req.program,
2004
2005 responder: ClientSmeInstallApfPacketFilterResponder {
2006 control_handle: std::mem::ManuallyDrop::new(control_handle),
2007 tx_id: header.tx_id,
2008 },
2009 })
2010 }
2011 0x66fc6616b9963023 => {
2012 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2013 let mut req = fidl::new_empty!(
2014 fidl::encoding::EmptyPayload,
2015 fidl::encoding::DefaultFuchsiaResourceDialect
2016 );
2017 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2018 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2019 Ok(ClientSmeRequest::ReadApfPacketFilterData {
2020 responder: ClientSmeReadApfPacketFilterDataResponder {
2021 control_handle: std::mem::ManuallyDrop::new(control_handle),
2022 tx_id: header.tx_id,
2023 },
2024 })
2025 }
2026 0x5070d2ed31580b81 => {
2027 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2028 let mut req = fidl::new_empty!(
2029 ClientSmeSetApfPacketFilterEnabledRequest,
2030 fidl::encoding::DefaultFuchsiaResourceDialect
2031 );
2032 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeSetApfPacketFilterEnabledRequest>(&header, _body_bytes, handles, &mut req)?;
2033 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2034 Ok(ClientSmeRequest::SetApfPacketFilterEnabled {
2035 enabled: req.enabled,
2036
2037 responder: ClientSmeSetApfPacketFilterEnabledResponder {
2038 control_handle: std::mem::ManuallyDrop::new(control_handle),
2039 tx_id: header.tx_id,
2040 },
2041 })
2042 }
2043 0xdda5c1533526869 => {
2044 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2045 let mut req = fidl::new_empty!(
2046 fidl::encoding::EmptyPayload,
2047 fidl::encoding::DefaultFuchsiaResourceDialect
2048 );
2049 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2050 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2051 Ok(ClientSmeRequest::GetApfPacketFilterEnabled {
2052 responder: ClientSmeGetApfPacketFilterEnabledResponder {
2053 control_handle: std::mem::ManuallyDrop::new(control_handle),
2054 tx_id: header.tx_id,
2055 },
2056 })
2057 }
2058 _ => Err(fidl::Error::UnknownOrdinal {
2059 ordinal: header.ordinal,
2060 protocol_name:
2061 <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2062 }),
2063 }))
2064 },
2065 )
2066 }
2067}
2068
2069#[derive(Debug)]
2070pub enum ClientSmeRequest {
2071 Scan {
2072 req: ScanRequest,
2073 responder: ClientSmeScanResponder,
2074 },
2075 StartScheduledScan {
2077 req: fidl_fuchsia_wlan_common::ScheduledScanRequest,
2078 txn: fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
2079 responder: ClientSmeStartScheduledScanResponder,
2080 },
2081 GetScheduledScanEnabled {
2083 responder: ClientSmeGetScheduledScanEnabledResponder,
2084 },
2085 Connect {
2086 req: ConnectRequest,
2087 txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
2088 control_handle: ClientSmeControlHandle,
2089 },
2090 Roam {
2091 req: RoamRequest,
2092 control_handle: ClientSmeControlHandle,
2093 },
2094 Disconnect {
2095 reason: UserDisconnectReason,
2096 responder: ClientSmeDisconnectResponder,
2097 },
2098 Status {
2099 responder: ClientSmeStatusResponder,
2100 },
2101 WmmStatus {
2102 responder: ClientSmeWmmStatusResponder,
2103 },
2104 ScanForController {
2105 req: ScanRequest,
2106 responder: ClientSmeScanForControllerResponder,
2107 },
2108 SetMacAddress {
2109 mac_addr: [u8; 6],
2110 responder: ClientSmeSetMacAddressResponder,
2111 },
2112 InstallApfPacketFilter {
2113 program: Vec<u8>,
2114 responder: ClientSmeInstallApfPacketFilterResponder,
2115 },
2116 ReadApfPacketFilterData {
2117 responder: ClientSmeReadApfPacketFilterDataResponder,
2118 },
2119 SetApfPacketFilterEnabled {
2120 enabled: bool,
2121 responder: ClientSmeSetApfPacketFilterEnabledResponder,
2122 },
2123 GetApfPacketFilterEnabled {
2124 responder: ClientSmeGetApfPacketFilterEnabledResponder,
2125 },
2126}
2127
2128impl ClientSmeRequest {
2129 #[allow(irrefutable_let_patterns)]
2130 pub fn into_scan(self) -> Option<(ScanRequest, ClientSmeScanResponder)> {
2131 if let ClientSmeRequest::Scan { req, responder } = self {
2132 Some((req, responder))
2133 } else {
2134 None
2135 }
2136 }
2137
2138 #[allow(irrefutable_let_patterns)]
2139 pub fn into_start_scheduled_scan(
2140 self,
2141 ) -> Option<(
2142 fidl_fuchsia_wlan_common::ScheduledScanRequest,
2143 fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
2144 ClientSmeStartScheduledScanResponder,
2145 )> {
2146 if let ClientSmeRequest::StartScheduledScan { req, txn, responder } = self {
2147 Some((req, txn, responder))
2148 } else {
2149 None
2150 }
2151 }
2152
2153 #[allow(irrefutable_let_patterns)]
2154 pub fn into_get_scheduled_scan_enabled(
2155 self,
2156 ) -> Option<(ClientSmeGetScheduledScanEnabledResponder)> {
2157 if let ClientSmeRequest::GetScheduledScanEnabled { responder } = self {
2158 Some((responder))
2159 } else {
2160 None
2161 }
2162 }
2163
2164 #[allow(irrefutable_let_patterns)]
2165 pub fn into_connect(
2166 self,
2167 ) -> Option<(
2168 ConnectRequest,
2169 Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
2170 ClientSmeControlHandle,
2171 )> {
2172 if let ClientSmeRequest::Connect { req, txn, control_handle } = self {
2173 Some((req, txn, control_handle))
2174 } else {
2175 None
2176 }
2177 }
2178
2179 #[allow(irrefutable_let_patterns)]
2180 pub fn into_roam(self) -> Option<(RoamRequest, ClientSmeControlHandle)> {
2181 if let ClientSmeRequest::Roam { req, control_handle } = self {
2182 Some((req, control_handle))
2183 } else {
2184 None
2185 }
2186 }
2187
2188 #[allow(irrefutable_let_patterns)]
2189 pub fn into_disconnect(self) -> Option<(UserDisconnectReason, ClientSmeDisconnectResponder)> {
2190 if let ClientSmeRequest::Disconnect { reason, responder } = self {
2191 Some((reason, responder))
2192 } else {
2193 None
2194 }
2195 }
2196
2197 #[allow(irrefutable_let_patterns)]
2198 pub fn into_status(self) -> Option<(ClientSmeStatusResponder)> {
2199 if let ClientSmeRequest::Status { responder } = self { Some((responder)) } else { None }
2200 }
2201
2202 #[allow(irrefutable_let_patterns)]
2203 pub fn into_wmm_status(self) -> Option<(ClientSmeWmmStatusResponder)> {
2204 if let ClientSmeRequest::WmmStatus { responder } = self { Some((responder)) } else { None }
2205 }
2206
2207 #[allow(irrefutable_let_patterns)]
2208 pub fn into_scan_for_controller(
2209 self,
2210 ) -> Option<(ScanRequest, ClientSmeScanForControllerResponder)> {
2211 if let ClientSmeRequest::ScanForController { req, responder } = self {
2212 Some((req, responder))
2213 } else {
2214 None
2215 }
2216 }
2217
2218 #[allow(irrefutable_let_patterns)]
2219 pub fn into_set_mac_address(self) -> Option<([u8; 6], ClientSmeSetMacAddressResponder)> {
2220 if let ClientSmeRequest::SetMacAddress { mac_addr, responder } = self {
2221 Some((mac_addr, responder))
2222 } else {
2223 None
2224 }
2225 }
2226
2227 #[allow(irrefutable_let_patterns)]
2228 pub fn into_install_apf_packet_filter(
2229 self,
2230 ) -> Option<(Vec<u8>, ClientSmeInstallApfPacketFilterResponder)> {
2231 if let ClientSmeRequest::InstallApfPacketFilter { program, responder } = self {
2232 Some((program, responder))
2233 } else {
2234 None
2235 }
2236 }
2237
2238 #[allow(irrefutable_let_patterns)]
2239 pub fn into_read_apf_packet_filter_data(
2240 self,
2241 ) -> Option<(ClientSmeReadApfPacketFilterDataResponder)> {
2242 if let ClientSmeRequest::ReadApfPacketFilterData { responder } = self {
2243 Some((responder))
2244 } else {
2245 None
2246 }
2247 }
2248
2249 #[allow(irrefutable_let_patterns)]
2250 pub fn into_set_apf_packet_filter_enabled(
2251 self,
2252 ) -> Option<(bool, ClientSmeSetApfPacketFilterEnabledResponder)> {
2253 if let ClientSmeRequest::SetApfPacketFilterEnabled { enabled, responder } = self {
2254 Some((enabled, responder))
2255 } else {
2256 None
2257 }
2258 }
2259
2260 #[allow(irrefutable_let_patterns)]
2261 pub fn into_get_apf_packet_filter_enabled(
2262 self,
2263 ) -> Option<(ClientSmeGetApfPacketFilterEnabledResponder)> {
2264 if let ClientSmeRequest::GetApfPacketFilterEnabled { responder } = self {
2265 Some((responder))
2266 } else {
2267 None
2268 }
2269 }
2270
2271 pub fn method_name(&self) -> &'static str {
2273 match *self {
2274 ClientSmeRequest::Scan { .. } => "scan",
2275 ClientSmeRequest::StartScheduledScan { .. } => "start_scheduled_scan",
2276 ClientSmeRequest::GetScheduledScanEnabled { .. } => "get_scheduled_scan_enabled",
2277 ClientSmeRequest::Connect { .. } => "connect",
2278 ClientSmeRequest::Roam { .. } => "roam",
2279 ClientSmeRequest::Disconnect { .. } => "disconnect",
2280 ClientSmeRequest::Status { .. } => "status",
2281 ClientSmeRequest::WmmStatus { .. } => "wmm_status",
2282 ClientSmeRequest::ScanForController { .. } => "scan_for_controller",
2283 ClientSmeRequest::SetMacAddress { .. } => "set_mac_address",
2284 ClientSmeRequest::InstallApfPacketFilter { .. } => "install_apf_packet_filter",
2285 ClientSmeRequest::ReadApfPacketFilterData { .. } => "read_apf_packet_filter_data",
2286 ClientSmeRequest::SetApfPacketFilterEnabled { .. } => "set_apf_packet_filter_enabled",
2287 ClientSmeRequest::GetApfPacketFilterEnabled { .. } => "get_apf_packet_filter_enabled",
2288 }
2289 }
2290}
2291
2292#[derive(Debug, Clone)]
2293pub struct ClientSmeControlHandle {
2294 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2295}
2296
2297impl fidl::endpoints::ControlHandle for ClientSmeControlHandle {
2298 fn shutdown(&self) {
2299 self.inner.shutdown()
2300 }
2301
2302 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2303 self.inner.shutdown_with_epitaph(status)
2304 }
2305
2306 fn is_closed(&self) -> bool {
2307 self.inner.channel().is_closed()
2308 }
2309 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2310 self.inner.channel().on_closed()
2311 }
2312
2313 #[cfg(target_os = "fuchsia")]
2314 fn signal_peer(
2315 &self,
2316 clear_mask: zx::Signals,
2317 set_mask: zx::Signals,
2318 ) -> Result<(), zx_status::Status> {
2319 use fidl::Peered;
2320 self.inner.channel().signal_peer(clear_mask, set_mask)
2321 }
2322}
2323
2324impl ClientSmeControlHandle {}
2325
2326#[must_use = "FIDL methods require a response to be sent"]
2327#[derive(Debug)]
2328pub struct ClientSmeScanResponder {
2329 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2330 tx_id: u32,
2331}
2332
2333impl std::ops::Drop for ClientSmeScanResponder {
2337 fn drop(&mut self) {
2338 self.control_handle.shutdown();
2339 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2341 }
2342}
2343
2344impl fidl::endpoints::Responder for ClientSmeScanResponder {
2345 type ControlHandle = ClientSmeControlHandle;
2346
2347 fn control_handle(&self) -> &ClientSmeControlHandle {
2348 &self.control_handle
2349 }
2350
2351 fn drop_without_shutdown(mut self) {
2352 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2354 std::mem::forget(self);
2356 }
2357}
2358
2359impl ClientSmeScanResponder {
2360 pub fn send(self, mut result: Result<fidl::Vmo, ScanErrorCode>) -> Result<(), fidl::Error> {
2364 let _result = self.send_raw(result);
2365 if _result.is_err() {
2366 self.control_handle.shutdown();
2367 }
2368 self.drop_without_shutdown();
2369 _result
2370 }
2371
2372 pub fn send_no_shutdown_on_err(
2374 self,
2375 mut result: Result<fidl::Vmo, ScanErrorCode>,
2376 ) -> Result<(), fidl::Error> {
2377 let _result = self.send_raw(result);
2378 self.drop_without_shutdown();
2379 _result
2380 }
2381
2382 fn send_raw(&self, mut result: Result<fidl::Vmo, ScanErrorCode>) -> Result<(), fidl::Error> {
2383 self.control_handle
2384 .inner
2385 .send::<fidl::encoding::ResultType<ClientSmeScanResponse, ScanErrorCode>>(
2386 result.map(|scan_results| (scan_results,)),
2387 self.tx_id,
2388 0xded0ce3b1685822,
2389 fidl::encoding::DynamicFlags::empty(),
2390 )
2391 }
2392}
2393
2394#[must_use = "FIDL methods require a response to be sent"]
2395#[derive(Debug)]
2396pub struct ClientSmeStartScheduledScanResponder {
2397 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2398 tx_id: u32,
2399}
2400
2401impl std::ops::Drop for ClientSmeStartScheduledScanResponder {
2405 fn drop(&mut self) {
2406 self.control_handle.shutdown();
2407 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2409 }
2410}
2411
2412impl fidl::endpoints::Responder for ClientSmeStartScheduledScanResponder {
2413 type ControlHandle = ClientSmeControlHandle;
2414
2415 fn control_handle(&self) -> &ClientSmeControlHandle {
2416 &self.control_handle
2417 }
2418
2419 fn drop_without_shutdown(mut self) {
2420 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2422 std::mem::forget(self);
2424 }
2425}
2426
2427impl ClientSmeStartScheduledScanResponder {
2428 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2432 let _result = self.send_raw(result);
2433 if _result.is_err() {
2434 self.control_handle.shutdown();
2435 }
2436 self.drop_without_shutdown();
2437 _result
2438 }
2439
2440 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2442 let _result = self.send_raw(result);
2443 self.drop_without_shutdown();
2444 _result
2445 }
2446
2447 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2448 self.control_handle
2449 .inner
2450 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2451 result,
2452 self.tx_id,
2453 0x97eedb559e6bdb8,
2454 fidl::encoding::DynamicFlags::empty(),
2455 )
2456 }
2457}
2458
2459#[must_use = "FIDL methods require a response to be sent"]
2460#[derive(Debug)]
2461pub struct ClientSmeGetScheduledScanEnabledResponder {
2462 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2463 tx_id: u32,
2464}
2465
2466impl std::ops::Drop for ClientSmeGetScheduledScanEnabledResponder {
2470 fn drop(&mut self) {
2471 self.control_handle.shutdown();
2472 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2474 }
2475}
2476
2477impl fidl::endpoints::Responder for ClientSmeGetScheduledScanEnabledResponder {
2478 type ControlHandle = ClientSmeControlHandle;
2479
2480 fn control_handle(&self) -> &ClientSmeControlHandle {
2481 &self.control_handle
2482 }
2483
2484 fn drop_without_shutdown(mut self) {
2485 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2487 std::mem::forget(self);
2489 }
2490}
2491
2492impl ClientSmeGetScheduledScanEnabledResponder {
2493 pub fn send(self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
2497 let _result = self.send_raw(result);
2498 if _result.is_err() {
2499 self.control_handle.shutdown();
2500 }
2501 self.drop_without_shutdown();
2502 _result
2503 }
2504
2505 pub fn send_no_shutdown_on_err(self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
2507 let _result = self.send_raw(result);
2508 self.drop_without_shutdown();
2509 _result
2510 }
2511
2512 fn send_raw(&self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
2513 self.control_handle.inner.send::<fidl::encoding::ResultType<
2514 ClientSmeGetScheduledScanEnabledResponse,
2515 i32,
2516 >>(
2517 result.map(|enabled| (enabled,)),
2518 self.tx_id,
2519 0x777e3c8854ff2710,
2520 fidl::encoding::DynamicFlags::empty(),
2521 )
2522 }
2523}
2524
2525#[must_use = "FIDL methods require a response to be sent"]
2526#[derive(Debug)]
2527pub struct ClientSmeDisconnectResponder {
2528 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2529 tx_id: u32,
2530}
2531
2532impl std::ops::Drop for ClientSmeDisconnectResponder {
2536 fn drop(&mut self) {
2537 self.control_handle.shutdown();
2538 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2540 }
2541}
2542
2543impl fidl::endpoints::Responder for ClientSmeDisconnectResponder {
2544 type ControlHandle = ClientSmeControlHandle;
2545
2546 fn control_handle(&self) -> &ClientSmeControlHandle {
2547 &self.control_handle
2548 }
2549
2550 fn drop_without_shutdown(mut self) {
2551 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2553 std::mem::forget(self);
2555 }
2556}
2557
2558impl ClientSmeDisconnectResponder {
2559 pub fn send(self) -> Result<(), fidl::Error> {
2563 let _result = self.send_raw();
2564 if _result.is_err() {
2565 self.control_handle.shutdown();
2566 }
2567 self.drop_without_shutdown();
2568 _result
2569 }
2570
2571 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
2573 let _result = self.send_raw();
2574 self.drop_without_shutdown();
2575 _result
2576 }
2577
2578 fn send_raw(&self) -> Result<(), fidl::Error> {
2579 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
2580 (),
2581 self.tx_id,
2582 0x39a578de9a107304,
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 ClientSmeStatusResponder {
2591 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2592 tx_id: u32,
2593}
2594
2595impl std::ops::Drop for ClientSmeStatusResponder {
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 ClientSmeStatusResponder {
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 ClientSmeStatusResponder {
2622 pub fn send(self, mut resp: &ClientStatusResponse) -> Result<(), fidl::Error> {
2626 let _result = self.send_raw(resp);
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 resp: &ClientStatusResponse,
2638 ) -> Result<(), fidl::Error> {
2639 let _result = self.send_raw(resp);
2640 self.drop_without_shutdown();
2641 _result
2642 }
2643
2644 fn send_raw(&self, mut resp: &ClientStatusResponse) -> Result<(), fidl::Error> {
2645 self.control_handle.inner.send::<ClientSmeStatusResponse>(
2646 (resp,),
2647 self.tx_id,
2648 0xda00b607470faf2,
2649 fidl::encoding::DynamicFlags::empty(),
2650 )
2651 }
2652}
2653
2654#[must_use = "FIDL methods require a response to be sent"]
2655#[derive(Debug)]
2656pub struct ClientSmeWmmStatusResponder {
2657 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2658 tx_id: u32,
2659}
2660
2661impl std::ops::Drop for ClientSmeWmmStatusResponder {
2665 fn drop(&mut self) {
2666 self.control_handle.shutdown();
2667 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2669 }
2670}
2671
2672impl fidl::endpoints::Responder for ClientSmeWmmStatusResponder {
2673 type ControlHandle = ClientSmeControlHandle;
2674
2675 fn control_handle(&self) -> &ClientSmeControlHandle {
2676 &self.control_handle
2677 }
2678
2679 fn drop_without_shutdown(mut self) {
2680 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2682 std::mem::forget(self);
2684 }
2685}
2686
2687impl ClientSmeWmmStatusResponder {
2688 pub fn send(
2692 self,
2693 mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
2694 ) -> Result<(), fidl::Error> {
2695 let _result = self.send_raw(result);
2696 if _result.is_err() {
2697 self.control_handle.shutdown();
2698 }
2699 self.drop_without_shutdown();
2700 _result
2701 }
2702
2703 pub fn send_no_shutdown_on_err(
2705 self,
2706 mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
2707 ) -> Result<(), fidl::Error> {
2708 let _result = self.send_raw(result);
2709 self.drop_without_shutdown();
2710 _result
2711 }
2712
2713 fn send_raw(
2714 &self,
2715 mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
2716 ) -> Result<(), fidl::Error> {
2717 self.control_handle
2718 .inner
2719 .send::<fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>>(
2720 result.map(|resp| (resp,)),
2721 self.tx_id,
2722 0x3d0ccc75f6baa9e3,
2723 fidl::encoding::DynamicFlags::empty(),
2724 )
2725 }
2726}
2727
2728#[must_use = "FIDL methods require a response to be sent"]
2729#[derive(Debug)]
2730pub struct ClientSmeScanForControllerResponder {
2731 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2732 tx_id: u32,
2733}
2734
2735impl std::ops::Drop for ClientSmeScanForControllerResponder {
2739 fn drop(&mut self) {
2740 self.control_handle.shutdown();
2741 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2743 }
2744}
2745
2746impl fidl::endpoints::Responder for ClientSmeScanForControllerResponder {
2747 type ControlHandle = ClientSmeControlHandle;
2748
2749 fn control_handle(&self) -> &ClientSmeControlHandle {
2750 &self.control_handle
2751 }
2752
2753 fn drop_without_shutdown(mut self) {
2754 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2756 std::mem::forget(self);
2758 }
2759}
2760
2761impl ClientSmeScanForControllerResponder {
2762 pub fn send(self, mut result: Result<&[ScanResult], ScanErrorCode>) -> Result<(), fidl::Error> {
2766 let _result = self.send_raw(result);
2767 if _result.is_err() {
2768 self.control_handle.shutdown();
2769 }
2770 self.drop_without_shutdown();
2771 _result
2772 }
2773
2774 pub fn send_no_shutdown_on_err(
2776 self,
2777 mut result: Result<&[ScanResult], ScanErrorCode>,
2778 ) -> Result<(), fidl::Error> {
2779 let _result = self.send_raw(result);
2780 self.drop_without_shutdown();
2781 _result
2782 }
2783
2784 fn send_raw(
2785 &self,
2786 mut result: Result<&[ScanResult], ScanErrorCode>,
2787 ) -> Result<(), fidl::Error> {
2788 self.control_handle.inner.send::<fidl::encoding::ResultType<
2789 ClientSmeScanForControllerResponse,
2790 ScanErrorCode,
2791 >>(
2792 result.map(|scan_results| (scan_results,)),
2793 self.tx_id,
2794 0x21f00ab22ff79a12,
2795 fidl::encoding::DynamicFlags::empty(),
2796 )
2797 }
2798}
2799
2800#[must_use = "FIDL methods require a response to be sent"]
2801#[derive(Debug)]
2802pub struct ClientSmeSetMacAddressResponder {
2803 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2804 tx_id: u32,
2805}
2806
2807impl std::ops::Drop for ClientSmeSetMacAddressResponder {
2811 fn drop(&mut self) {
2812 self.control_handle.shutdown();
2813 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2815 }
2816}
2817
2818impl fidl::endpoints::Responder for ClientSmeSetMacAddressResponder {
2819 type ControlHandle = ClientSmeControlHandle;
2820
2821 fn control_handle(&self) -> &ClientSmeControlHandle {
2822 &self.control_handle
2823 }
2824
2825 fn drop_without_shutdown(mut self) {
2826 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2828 std::mem::forget(self);
2830 }
2831}
2832
2833impl ClientSmeSetMacAddressResponder {
2834 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2838 let _result = self.send_raw(result);
2839 if _result.is_err() {
2840 self.control_handle.shutdown();
2841 }
2842 self.drop_without_shutdown();
2843 _result
2844 }
2845
2846 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2848 let _result = self.send_raw(result);
2849 self.drop_without_shutdown();
2850 _result
2851 }
2852
2853 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2854 self.control_handle
2855 .inner
2856 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2857 result,
2858 self.tx_id,
2859 0x13e0a0bee8962f58,
2860 fidl::encoding::DynamicFlags::empty(),
2861 )
2862 }
2863}
2864
2865#[must_use = "FIDL methods require a response to be sent"]
2866#[derive(Debug)]
2867pub struct ClientSmeInstallApfPacketFilterResponder {
2868 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2869 tx_id: u32,
2870}
2871
2872impl std::ops::Drop for ClientSmeInstallApfPacketFilterResponder {
2876 fn drop(&mut self) {
2877 self.control_handle.shutdown();
2878 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2880 }
2881}
2882
2883impl fidl::endpoints::Responder for ClientSmeInstallApfPacketFilterResponder {
2884 type ControlHandle = ClientSmeControlHandle;
2885
2886 fn control_handle(&self) -> &ClientSmeControlHandle {
2887 &self.control_handle
2888 }
2889
2890 fn drop_without_shutdown(mut self) {
2891 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2893 std::mem::forget(self);
2895 }
2896}
2897
2898impl ClientSmeInstallApfPacketFilterResponder {
2899 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2903 let _result = self.send_raw(result);
2904 if _result.is_err() {
2905 self.control_handle.shutdown();
2906 }
2907 self.drop_without_shutdown();
2908 _result
2909 }
2910
2911 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2913 let _result = self.send_raw(result);
2914 self.drop_without_shutdown();
2915 _result
2916 }
2917
2918 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2919 self.control_handle
2920 .inner
2921 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2922 result,
2923 self.tx_id,
2924 0x77435965e7bfaf83,
2925 fidl::encoding::DynamicFlags::empty(),
2926 )
2927 }
2928}
2929
2930#[must_use = "FIDL methods require a response to be sent"]
2931#[derive(Debug)]
2932pub struct ClientSmeReadApfPacketFilterDataResponder {
2933 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2934 tx_id: u32,
2935}
2936
2937impl std::ops::Drop for ClientSmeReadApfPacketFilterDataResponder {
2941 fn drop(&mut self) {
2942 self.control_handle.shutdown();
2943 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2945 }
2946}
2947
2948impl fidl::endpoints::Responder for ClientSmeReadApfPacketFilterDataResponder {
2949 type ControlHandle = ClientSmeControlHandle;
2950
2951 fn control_handle(&self) -> &ClientSmeControlHandle {
2952 &self.control_handle
2953 }
2954
2955 fn drop_without_shutdown(mut self) {
2956 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2958 std::mem::forget(self);
2960 }
2961}
2962
2963impl ClientSmeReadApfPacketFilterDataResponder {
2964 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
2968 let _result = self.send_raw(result);
2969 if _result.is_err() {
2970 self.control_handle.shutdown();
2971 }
2972 self.drop_without_shutdown();
2973 _result
2974 }
2975
2976 pub fn send_no_shutdown_on_err(
2978 self,
2979 mut result: Result<&[u8], i32>,
2980 ) -> Result<(), fidl::Error> {
2981 let _result = self.send_raw(result);
2982 self.drop_without_shutdown();
2983 _result
2984 }
2985
2986 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
2987 self.control_handle.inner.send::<fidl::encoding::ResultType<
2988 ClientSmeReadApfPacketFilterDataResponse,
2989 i32,
2990 >>(
2991 result.map(|memory| (memory,)),
2992 self.tx_id,
2993 0x66fc6616b9963023,
2994 fidl::encoding::DynamicFlags::empty(),
2995 )
2996 }
2997}
2998
2999#[must_use = "FIDL methods require a response to be sent"]
3000#[derive(Debug)]
3001pub struct ClientSmeSetApfPacketFilterEnabledResponder {
3002 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
3003 tx_id: u32,
3004}
3005
3006impl std::ops::Drop for ClientSmeSetApfPacketFilterEnabledResponder {
3010 fn drop(&mut self) {
3011 self.control_handle.shutdown();
3012 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3014 }
3015}
3016
3017impl fidl::endpoints::Responder for ClientSmeSetApfPacketFilterEnabledResponder {
3018 type ControlHandle = ClientSmeControlHandle;
3019
3020 fn control_handle(&self) -> &ClientSmeControlHandle {
3021 &self.control_handle
3022 }
3023
3024 fn drop_without_shutdown(mut self) {
3025 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3027 std::mem::forget(self);
3029 }
3030}
3031
3032impl ClientSmeSetApfPacketFilterEnabledResponder {
3033 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3037 let _result = self.send_raw(result);
3038 if _result.is_err() {
3039 self.control_handle.shutdown();
3040 }
3041 self.drop_without_shutdown();
3042 _result
3043 }
3044
3045 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3047 let _result = self.send_raw(result);
3048 self.drop_without_shutdown();
3049 _result
3050 }
3051
3052 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3053 self.control_handle
3054 .inner
3055 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3056 result,
3057 self.tx_id,
3058 0x5070d2ed31580b81,
3059 fidl::encoding::DynamicFlags::empty(),
3060 )
3061 }
3062}
3063
3064#[must_use = "FIDL methods require a response to be sent"]
3065#[derive(Debug)]
3066pub struct ClientSmeGetApfPacketFilterEnabledResponder {
3067 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
3068 tx_id: u32,
3069}
3070
3071impl std::ops::Drop for ClientSmeGetApfPacketFilterEnabledResponder {
3075 fn drop(&mut self) {
3076 self.control_handle.shutdown();
3077 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3079 }
3080}
3081
3082impl fidl::endpoints::Responder for ClientSmeGetApfPacketFilterEnabledResponder {
3083 type ControlHandle = ClientSmeControlHandle;
3084
3085 fn control_handle(&self) -> &ClientSmeControlHandle {
3086 &self.control_handle
3087 }
3088
3089 fn drop_without_shutdown(mut self) {
3090 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3092 std::mem::forget(self);
3094 }
3095}
3096
3097impl ClientSmeGetApfPacketFilterEnabledResponder {
3098 pub fn send(self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
3102 let _result = self.send_raw(result);
3103 if _result.is_err() {
3104 self.control_handle.shutdown();
3105 }
3106 self.drop_without_shutdown();
3107 _result
3108 }
3109
3110 pub fn send_no_shutdown_on_err(self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
3112 let _result = self.send_raw(result);
3113 self.drop_without_shutdown();
3114 _result
3115 }
3116
3117 fn send_raw(&self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
3118 self.control_handle.inner.send::<fidl::encoding::ResultType<
3119 ClientSmeGetApfPacketFilterEnabledResponse,
3120 i32,
3121 >>(
3122 result.map(|enabled| (enabled,)),
3123 self.tx_id,
3124 0xdda5c1533526869,
3125 fidl::encoding::DynamicFlags::empty(),
3126 )
3127 }
3128}
3129
3130#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3131pub struct ConnectTransactionMarker;
3132
3133impl fidl::endpoints::ProtocolMarker for ConnectTransactionMarker {
3134 type Proxy = ConnectTransactionProxy;
3135 type RequestStream = ConnectTransactionRequestStream;
3136 #[cfg(target_os = "fuchsia")]
3137 type SynchronousProxy = ConnectTransactionSynchronousProxy;
3138
3139 const DEBUG_NAME: &'static str = "(anonymous) ConnectTransaction";
3140}
3141
3142pub trait ConnectTransactionProxyInterface: Send + Sync {}
3143#[derive(Debug)]
3144#[cfg(target_os = "fuchsia")]
3145pub struct ConnectTransactionSynchronousProxy {
3146 client: fidl::client::sync::Client,
3147}
3148
3149#[cfg(target_os = "fuchsia")]
3150impl fidl::endpoints::SynchronousProxy for ConnectTransactionSynchronousProxy {
3151 type Proxy = ConnectTransactionProxy;
3152 type Protocol = ConnectTransactionMarker;
3153
3154 fn from_channel(inner: fidl::Channel) -> Self {
3155 Self::new(inner)
3156 }
3157
3158 fn into_channel(self) -> fidl::Channel {
3159 self.client.into_channel()
3160 }
3161
3162 fn as_channel(&self) -> &fidl::Channel {
3163 self.client.as_channel()
3164 }
3165}
3166
3167#[cfg(target_os = "fuchsia")]
3168impl ConnectTransactionSynchronousProxy {
3169 pub fn new(channel: fidl::Channel) -> Self {
3170 Self { client: fidl::client::sync::Client::new(channel) }
3171 }
3172
3173 pub fn into_channel(self) -> fidl::Channel {
3174 self.client.into_channel()
3175 }
3176
3177 pub fn wait_for_event(
3180 &self,
3181 deadline: zx::MonotonicInstant,
3182 ) -> Result<ConnectTransactionEvent, fidl::Error> {
3183 ConnectTransactionEvent::decode(
3184 self.client.wait_for_event::<ConnectTransactionMarker>(deadline)?,
3185 )
3186 }
3187}
3188
3189#[cfg(target_os = "fuchsia")]
3190impl From<ConnectTransactionSynchronousProxy> for zx::NullableHandle {
3191 fn from(value: ConnectTransactionSynchronousProxy) -> Self {
3192 value.into_channel().into()
3193 }
3194}
3195
3196#[cfg(target_os = "fuchsia")]
3197impl From<fidl::Channel> for ConnectTransactionSynchronousProxy {
3198 fn from(value: fidl::Channel) -> Self {
3199 Self::new(value)
3200 }
3201}
3202
3203#[cfg(target_os = "fuchsia")]
3204impl fidl::endpoints::FromClient for ConnectTransactionSynchronousProxy {
3205 type Protocol = ConnectTransactionMarker;
3206
3207 fn from_client(value: fidl::endpoints::ClientEnd<ConnectTransactionMarker>) -> Self {
3208 Self::new(value.into_channel())
3209 }
3210}
3211
3212#[derive(Debug, Clone)]
3213pub struct ConnectTransactionProxy {
3214 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3215}
3216
3217impl fidl::endpoints::Proxy for ConnectTransactionProxy {
3218 type Protocol = ConnectTransactionMarker;
3219
3220 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3221 Self::new(inner)
3222 }
3223
3224 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3225 self.client.into_channel().map_err(|client| Self { client })
3226 }
3227
3228 fn as_channel(&self) -> &::fidl::AsyncChannel {
3229 self.client.as_channel()
3230 }
3231}
3232
3233impl ConnectTransactionProxy {
3234 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3236 let protocol_name =
3237 <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3238 Self { client: fidl::client::Client::new(channel, protocol_name) }
3239 }
3240
3241 pub fn take_event_stream(&self) -> ConnectTransactionEventStream {
3247 ConnectTransactionEventStream { event_receiver: self.client.take_event_receiver() }
3248 }
3249}
3250
3251impl ConnectTransactionProxyInterface for ConnectTransactionProxy {}
3252
3253pub struct ConnectTransactionEventStream {
3254 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3255}
3256
3257impl std::marker::Unpin for ConnectTransactionEventStream {}
3258
3259impl futures::stream::FusedStream for ConnectTransactionEventStream {
3260 fn is_terminated(&self) -> bool {
3261 self.event_receiver.is_terminated()
3262 }
3263}
3264
3265impl futures::Stream for ConnectTransactionEventStream {
3266 type Item = Result<ConnectTransactionEvent, fidl::Error>;
3267
3268 fn poll_next(
3269 mut self: std::pin::Pin<&mut Self>,
3270 cx: &mut std::task::Context<'_>,
3271 ) -> std::task::Poll<Option<Self::Item>> {
3272 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3273 &mut self.event_receiver,
3274 cx
3275 )?) {
3276 Some(buf) => std::task::Poll::Ready(Some(ConnectTransactionEvent::decode(buf))),
3277 None => std::task::Poll::Ready(None),
3278 }
3279 }
3280}
3281
3282#[derive(Debug)]
3283pub enum ConnectTransactionEvent {
3284 OnConnectResult { result: ConnectResult },
3285 OnDisconnect { info: DisconnectInfo },
3286 OnRoamResult { result: RoamResult },
3287 OnSignalReport { ind: fidl_fuchsia_wlan_internal::SignalReportIndication },
3288 OnChannelSwitched { info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo },
3289}
3290
3291impl ConnectTransactionEvent {
3292 #[allow(irrefutable_let_patterns)]
3293 pub fn into_on_connect_result(self) -> Option<ConnectResult> {
3294 if let ConnectTransactionEvent::OnConnectResult { result } = self {
3295 Some((result))
3296 } else {
3297 None
3298 }
3299 }
3300 #[allow(irrefutable_let_patterns)]
3301 pub fn into_on_disconnect(self) -> Option<DisconnectInfo> {
3302 if let ConnectTransactionEvent::OnDisconnect { info } = self { Some((info)) } else { None }
3303 }
3304 #[allow(irrefutable_let_patterns)]
3305 pub fn into_on_roam_result(self) -> Option<RoamResult> {
3306 if let ConnectTransactionEvent::OnRoamResult { result } = self {
3307 Some((result))
3308 } else {
3309 None
3310 }
3311 }
3312 #[allow(irrefutable_let_patterns)]
3313 pub fn into_on_signal_report(
3314 self,
3315 ) -> Option<fidl_fuchsia_wlan_internal::SignalReportIndication> {
3316 if let ConnectTransactionEvent::OnSignalReport { ind } = self { Some((ind)) } else { None }
3317 }
3318 #[allow(irrefutable_let_patterns)]
3319 pub fn into_on_channel_switched(self) -> Option<fidl_fuchsia_wlan_internal::ChannelSwitchInfo> {
3320 if let ConnectTransactionEvent::OnChannelSwitched { info } = self {
3321 Some((info))
3322 } else {
3323 None
3324 }
3325 }
3326
3327 fn decode(
3329 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3330 ) -> Result<ConnectTransactionEvent, fidl::Error> {
3331 let (bytes, _handles) = buf.split_mut();
3332 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3333 debug_assert_eq!(tx_header.tx_id, 0);
3334 match tx_header.ordinal {
3335 0x48d2cf407da489a7 => {
3336 let mut out = fidl::new_empty!(
3337 ConnectTransactionOnConnectResultRequest,
3338 fidl::encoding::DefaultFuchsiaResourceDialect
3339 );
3340 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnConnectResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3341 Ok((ConnectTransactionEvent::OnConnectResult { result: out.result }))
3342 }
3343 0x40dea7b1449cc733 => {
3344 let mut out = fidl::new_empty!(
3345 ConnectTransactionOnDisconnectRequest,
3346 fidl::encoding::DefaultFuchsiaResourceDialect
3347 );
3348 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnDisconnectRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3349 Ok((ConnectTransactionEvent::OnDisconnect { info: out.info }))
3350 }
3351 0x656267da4ccf2a41 => {
3352 let mut out = fidl::new_empty!(
3353 ConnectTransactionOnRoamResultRequest,
3354 fidl::encoding::DefaultFuchsiaResourceDialect
3355 );
3356 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnRoamResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3357 Ok((ConnectTransactionEvent::OnRoamResult { result: out.result }))
3358 }
3359 0x5e968bd5e267e262 => {
3360 let mut out = fidl::new_empty!(
3361 ConnectTransactionOnSignalReportRequest,
3362 fidl::encoding::DefaultFuchsiaResourceDialect
3363 );
3364 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnSignalReportRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3365 Ok((ConnectTransactionEvent::OnSignalReport { ind: out.ind }))
3366 }
3367 0x5f5153778cd70512 => {
3368 let mut out = fidl::new_empty!(
3369 ConnectTransactionOnChannelSwitchedRequest,
3370 fidl::encoding::DefaultFuchsiaResourceDialect
3371 );
3372 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnChannelSwitchedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3373 Ok((ConnectTransactionEvent::OnChannelSwitched { info: out.info }))
3374 }
3375 _ => Err(fidl::Error::UnknownOrdinal {
3376 ordinal: tx_header.ordinal,
3377 protocol_name:
3378 <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3379 }),
3380 }
3381 }
3382}
3383
3384pub struct ConnectTransactionRequestStream {
3386 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3387 is_terminated: bool,
3388}
3389
3390impl std::marker::Unpin for ConnectTransactionRequestStream {}
3391
3392impl futures::stream::FusedStream for ConnectTransactionRequestStream {
3393 fn is_terminated(&self) -> bool {
3394 self.is_terminated
3395 }
3396}
3397
3398impl fidl::endpoints::RequestStream for ConnectTransactionRequestStream {
3399 type Protocol = ConnectTransactionMarker;
3400 type ControlHandle = ConnectTransactionControlHandle;
3401
3402 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3403 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3404 }
3405
3406 fn control_handle(&self) -> Self::ControlHandle {
3407 ConnectTransactionControlHandle { inner: self.inner.clone() }
3408 }
3409
3410 fn into_inner(
3411 self,
3412 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3413 {
3414 (self.inner, self.is_terminated)
3415 }
3416
3417 fn from_inner(
3418 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3419 is_terminated: bool,
3420 ) -> Self {
3421 Self { inner, is_terminated }
3422 }
3423}
3424
3425impl futures::Stream for ConnectTransactionRequestStream {
3426 type Item = Result<ConnectTransactionRequest, fidl::Error>;
3427
3428 fn poll_next(
3429 mut self: std::pin::Pin<&mut Self>,
3430 cx: &mut std::task::Context<'_>,
3431 ) -> std::task::Poll<Option<Self::Item>> {
3432 let this = &mut *self;
3433 if this.inner.check_shutdown(cx) {
3434 this.is_terminated = true;
3435 return std::task::Poll::Ready(None);
3436 }
3437 if this.is_terminated {
3438 panic!("polled ConnectTransactionRequestStream after completion");
3439 }
3440 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3441 |bytes, handles| {
3442 match this.inner.channel().read_etc(cx, bytes, handles) {
3443 std::task::Poll::Ready(Ok(())) => {}
3444 std::task::Poll::Pending => return std::task::Poll::Pending,
3445 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3446 this.is_terminated = true;
3447 return std::task::Poll::Ready(None);
3448 }
3449 std::task::Poll::Ready(Err(e)) => {
3450 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3451 e.into(),
3452 ))));
3453 }
3454 }
3455
3456 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3458
3459 std::task::Poll::Ready(Some(match header.ordinal {
3460 _ => Err(fidl::Error::UnknownOrdinal {
3461 ordinal: header.ordinal,
3462 protocol_name: <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3463 }),
3464 }))
3465 },
3466 )
3467 }
3468}
3469
3470#[derive(Debug)]
3471pub enum ConnectTransactionRequest {}
3472
3473impl ConnectTransactionRequest {
3474 pub fn method_name(&self) -> &'static str {
3476 match *self {}
3477 }
3478}
3479
3480#[derive(Debug, Clone)]
3481pub struct ConnectTransactionControlHandle {
3482 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3483}
3484
3485impl fidl::endpoints::ControlHandle for ConnectTransactionControlHandle {
3486 fn shutdown(&self) {
3487 self.inner.shutdown()
3488 }
3489
3490 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3491 self.inner.shutdown_with_epitaph(status)
3492 }
3493
3494 fn is_closed(&self) -> bool {
3495 self.inner.channel().is_closed()
3496 }
3497 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3498 self.inner.channel().on_closed()
3499 }
3500
3501 #[cfg(target_os = "fuchsia")]
3502 fn signal_peer(
3503 &self,
3504 clear_mask: zx::Signals,
3505 set_mask: zx::Signals,
3506 ) -> Result<(), zx_status::Status> {
3507 use fidl::Peered;
3508 self.inner.channel().signal_peer(clear_mask, set_mask)
3509 }
3510}
3511
3512impl ConnectTransactionControlHandle {
3513 pub fn send_on_connect_result(&self, mut result: &ConnectResult) -> Result<(), fidl::Error> {
3514 self.inner.send::<ConnectTransactionOnConnectResultRequest>(
3515 (result,),
3516 0,
3517 0x48d2cf407da489a7,
3518 fidl::encoding::DynamicFlags::empty(),
3519 )
3520 }
3521
3522 pub fn send_on_disconnect(&self, mut info: &DisconnectInfo) -> Result<(), fidl::Error> {
3523 self.inner.send::<ConnectTransactionOnDisconnectRequest>(
3524 (info,),
3525 0,
3526 0x40dea7b1449cc733,
3527 fidl::encoding::DynamicFlags::empty(),
3528 )
3529 }
3530
3531 pub fn send_on_roam_result(&self, mut result: &RoamResult) -> Result<(), fidl::Error> {
3532 self.inner.send::<ConnectTransactionOnRoamResultRequest>(
3533 (result,),
3534 0,
3535 0x656267da4ccf2a41,
3536 fidl::encoding::DynamicFlags::empty(),
3537 )
3538 }
3539
3540 pub fn send_on_signal_report(
3541 &self,
3542 mut ind: &fidl_fuchsia_wlan_internal::SignalReportIndication,
3543 ) -> Result<(), fidl::Error> {
3544 self.inner.send::<ConnectTransactionOnSignalReportRequest>(
3545 (ind,),
3546 0,
3547 0x5e968bd5e267e262,
3548 fidl::encoding::DynamicFlags::empty(),
3549 )
3550 }
3551
3552 pub fn send_on_channel_switched(
3553 &self,
3554 mut info: &fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
3555 ) -> Result<(), fidl::Error> {
3556 self.inner.send::<ConnectTransactionOnChannelSwitchedRequest>(
3557 (info,),
3558 0,
3559 0x5f5153778cd70512,
3560 fidl::encoding::DynamicFlags::empty(),
3561 )
3562 }
3563}
3564
3565#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3566pub struct GenericSmeMarker;
3567
3568impl fidl::endpoints::ProtocolMarker for GenericSmeMarker {
3569 type Proxy = GenericSmeProxy;
3570 type RequestStream = GenericSmeRequestStream;
3571 #[cfg(target_os = "fuchsia")]
3572 type SynchronousProxy = GenericSmeSynchronousProxy;
3573
3574 const DEBUG_NAME: &'static str = "(anonymous) GenericSme";
3575}
3576pub type GenericSmeQueryIfaceCapabilitiesResult =
3577 Result<fidl_fuchsia_wlan_common::ApfPacketFilterSupport, i32>;
3578pub type GenericSmeGetClientSmeResult = Result<(), i32>;
3579pub type GenericSmeGetApSmeResult = Result<(), i32>;
3580pub type GenericSmeGetSmeTelemetryResult = Result<(), i32>;
3581
3582pub trait GenericSmeProxyInterface: Send + Sync {
3583 type QueryResponseFut: std::future::Future<Output = Result<GenericSmeQuery, fidl::Error>> + Send;
3584 fn r#query(&self) -> Self::QueryResponseFut;
3585 type QueryIfaceCapabilitiesResponseFut: std::future::Future<Output = Result<GenericSmeQueryIfaceCapabilitiesResult, fidl::Error>>
3586 + Send;
3587 fn r#query_iface_capabilities(&self) -> Self::QueryIfaceCapabilitiesResponseFut;
3588 type GetClientSmeResponseFut: std::future::Future<Output = Result<GenericSmeGetClientSmeResult, fidl::Error>>
3589 + Send;
3590 fn r#get_client_sme(
3591 &self,
3592 sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
3593 ) -> Self::GetClientSmeResponseFut;
3594 type GetApSmeResponseFut: std::future::Future<Output = Result<GenericSmeGetApSmeResult, fidl::Error>>
3595 + Send;
3596 fn r#get_ap_sme(
3597 &self,
3598 sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
3599 ) -> Self::GetApSmeResponseFut;
3600 type GetSmeTelemetryResponseFut: std::future::Future<Output = Result<GenericSmeGetSmeTelemetryResult, fidl::Error>>
3601 + Send;
3602 fn r#get_sme_telemetry(
3603 &self,
3604 telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
3605 ) -> Self::GetSmeTelemetryResponseFut;
3606}
3607#[derive(Debug)]
3608#[cfg(target_os = "fuchsia")]
3609pub struct GenericSmeSynchronousProxy {
3610 client: fidl::client::sync::Client,
3611}
3612
3613#[cfg(target_os = "fuchsia")]
3614impl fidl::endpoints::SynchronousProxy for GenericSmeSynchronousProxy {
3615 type Proxy = GenericSmeProxy;
3616 type Protocol = GenericSmeMarker;
3617
3618 fn from_channel(inner: fidl::Channel) -> Self {
3619 Self::new(inner)
3620 }
3621
3622 fn into_channel(self) -> fidl::Channel {
3623 self.client.into_channel()
3624 }
3625
3626 fn as_channel(&self) -> &fidl::Channel {
3627 self.client.as_channel()
3628 }
3629}
3630
3631#[cfg(target_os = "fuchsia")]
3632impl GenericSmeSynchronousProxy {
3633 pub fn new(channel: fidl::Channel) -> Self {
3634 Self { client: fidl::client::sync::Client::new(channel) }
3635 }
3636
3637 pub fn into_channel(self) -> fidl::Channel {
3638 self.client.into_channel()
3639 }
3640
3641 pub fn wait_for_event(
3644 &self,
3645 deadline: zx::MonotonicInstant,
3646 ) -> Result<GenericSmeEvent, fidl::Error> {
3647 GenericSmeEvent::decode(self.client.wait_for_event::<GenericSmeMarker>(deadline)?)
3648 }
3649
3650 pub fn r#query(
3654 &self,
3655 ___deadline: zx::MonotonicInstant,
3656 ) -> Result<GenericSmeQuery, fidl::Error> {
3657 let _response = self
3658 .client
3659 .send_query::<fidl::encoding::EmptyPayload, GenericSmeQueryResponse, GenericSmeMarker>(
3660 (),
3661 0x6ef4a820c153e249,
3662 fidl::encoding::DynamicFlags::empty(),
3663 ___deadline,
3664 )?;
3665 Ok(_response.resp)
3666 }
3667
3668 pub fn r#query_iface_capabilities(
3670 &self,
3671 ___deadline: zx::MonotonicInstant,
3672 ) -> Result<GenericSmeQueryIfaceCapabilitiesResult, fidl::Error> {
3673 let _response = self.client.send_query::<
3674 fidl::encoding::EmptyPayload,
3675 fidl::encoding::ResultType<GenericSmeQueryIfaceCapabilitiesResponse, i32>,
3676 GenericSmeMarker,
3677 >(
3678 (),
3679 0x2f483964e794fbba,
3680 fidl::encoding::DynamicFlags::empty(),
3681 ___deadline,
3682 )?;
3683 Ok(_response.map(|x| x.apf_support))
3684 }
3685
3686 pub fn r#get_client_sme(
3693 &self,
3694 mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
3695 ___deadline: zx::MonotonicInstant,
3696 ) -> Result<GenericSmeGetClientSmeResult, fidl::Error> {
3697 let _response = self.client.send_query::<
3698 GenericSmeGetClientSmeRequest,
3699 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3700 GenericSmeMarker,
3701 >(
3702 (sme_server,),
3703 0x2439ad714c642f15,
3704 fidl::encoding::DynamicFlags::empty(),
3705 ___deadline,
3706 )?;
3707 Ok(_response.map(|x| x))
3708 }
3709
3710 pub fn r#get_ap_sme(
3717 &self,
3718 mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
3719 ___deadline: zx::MonotonicInstant,
3720 ) -> Result<GenericSmeGetApSmeResult, fidl::Error> {
3721 let _response = self.client.send_query::<
3722 GenericSmeGetApSmeRequest,
3723 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3724 GenericSmeMarker,
3725 >(
3726 (sme_server,),
3727 0x4d2a40be2b44ad6c,
3728 fidl::encoding::DynamicFlags::empty(),
3729 ___deadline,
3730 )?;
3731 Ok(_response.map(|x| x))
3732 }
3733
3734 pub fn r#get_sme_telemetry(
3742 &self,
3743 mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
3744 ___deadline: zx::MonotonicInstant,
3745 ) -> Result<GenericSmeGetSmeTelemetryResult, fidl::Error> {
3746 let _response = self.client.send_query::<
3747 GenericSmeGetSmeTelemetryRequest,
3748 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3749 GenericSmeMarker,
3750 >(
3751 (telemetry_server,),
3752 0x7ea015b3060fa,
3753 fidl::encoding::DynamicFlags::empty(),
3754 ___deadline,
3755 )?;
3756 Ok(_response.map(|x| x))
3757 }
3758}
3759
3760#[cfg(target_os = "fuchsia")]
3761impl From<GenericSmeSynchronousProxy> for zx::NullableHandle {
3762 fn from(value: GenericSmeSynchronousProxy) -> Self {
3763 value.into_channel().into()
3764 }
3765}
3766
3767#[cfg(target_os = "fuchsia")]
3768impl From<fidl::Channel> for GenericSmeSynchronousProxy {
3769 fn from(value: fidl::Channel) -> Self {
3770 Self::new(value)
3771 }
3772}
3773
3774#[cfg(target_os = "fuchsia")]
3775impl fidl::endpoints::FromClient for GenericSmeSynchronousProxy {
3776 type Protocol = GenericSmeMarker;
3777
3778 fn from_client(value: fidl::endpoints::ClientEnd<GenericSmeMarker>) -> Self {
3779 Self::new(value.into_channel())
3780 }
3781}
3782
3783#[derive(Debug, Clone)]
3784pub struct GenericSmeProxy {
3785 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3786}
3787
3788impl fidl::endpoints::Proxy for GenericSmeProxy {
3789 type Protocol = GenericSmeMarker;
3790
3791 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3792 Self::new(inner)
3793 }
3794
3795 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3796 self.client.into_channel().map_err(|client| Self { client })
3797 }
3798
3799 fn as_channel(&self) -> &::fidl::AsyncChannel {
3800 self.client.as_channel()
3801 }
3802}
3803
3804impl GenericSmeProxy {
3805 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3807 let protocol_name = <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3808 Self { client: fidl::client::Client::new(channel, protocol_name) }
3809 }
3810
3811 pub fn take_event_stream(&self) -> GenericSmeEventStream {
3817 GenericSmeEventStream { event_receiver: self.client.take_event_receiver() }
3818 }
3819
3820 pub fn r#query(
3824 &self,
3825 ) -> fidl::client::QueryResponseFut<
3826 GenericSmeQuery,
3827 fidl::encoding::DefaultFuchsiaResourceDialect,
3828 > {
3829 GenericSmeProxyInterface::r#query(self)
3830 }
3831
3832 pub fn r#query_iface_capabilities(
3834 &self,
3835 ) -> fidl::client::QueryResponseFut<
3836 GenericSmeQueryIfaceCapabilitiesResult,
3837 fidl::encoding::DefaultFuchsiaResourceDialect,
3838 > {
3839 GenericSmeProxyInterface::r#query_iface_capabilities(self)
3840 }
3841
3842 pub fn r#get_client_sme(
3849 &self,
3850 mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
3851 ) -> fidl::client::QueryResponseFut<
3852 GenericSmeGetClientSmeResult,
3853 fidl::encoding::DefaultFuchsiaResourceDialect,
3854 > {
3855 GenericSmeProxyInterface::r#get_client_sme(self, sme_server)
3856 }
3857
3858 pub fn r#get_ap_sme(
3865 &self,
3866 mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
3867 ) -> fidl::client::QueryResponseFut<
3868 GenericSmeGetApSmeResult,
3869 fidl::encoding::DefaultFuchsiaResourceDialect,
3870 > {
3871 GenericSmeProxyInterface::r#get_ap_sme(self, sme_server)
3872 }
3873
3874 pub fn r#get_sme_telemetry(
3882 &self,
3883 mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
3884 ) -> fidl::client::QueryResponseFut<
3885 GenericSmeGetSmeTelemetryResult,
3886 fidl::encoding::DefaultFuchsiaResourceDialect,
3887 > {
3888 GenericSmeProxyInterface::r#get_sme_telemetry(self, telemetry_server)
3889 }
3890}
3891
3892impl GenericSmeProxyInterface for GenericSmeProxy {
3893 type QueryResponseFut = fidl::client::QueryResponseFut<
3894 GenericSmeQuery,
3895 fidl::encoding::DefaultFuchsiaResourceDialect,
3896 >;
3897 fn r#query(&self) -> Self::QueryResponseFut {
3898 fn _decode(
3899 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3900 ) -> Result<GenericSmeQuery, fidl::Error> {
3901 let _response = fidl::client::decode_transaction_body::<
3902 GenericSmeQueryResponse,
3903 fidl::encoding::DefaultFuchsiaResourceDialect,
3904 0x6ef4a820c153e249,
3905 >(_buf?)?;
3906 Ok(_response.resp)
3907 }
3908 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, GenericSmeQuery>(
3909 (),
3910 0x6ef4a820c153e249,
3911 fidl::encoding::DynamicFlags::empty(),
3912 _decode,
3913 )
3914 }
3915
3916 type QueryIfaceCapabilitiesResponseFut = fidl::client::QueryResponseFut<
3917 GenericSmeQueryIfaceCapabilitiesResult,
3918 fidl::encoding::DefaultFuchsiaResourceDialect,
3919 >;
3920 fn r#query_iface_capabilities(&self) -> Self::QueryIfaceCapabilitiesResponseFut {
3921 fn _decode(
3922 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3923 ) -> Result<GenericSmeQueryIfaceCapabilitiesResult, fidl::Error> {
3924 let _response = fidl::client::decode_transaction_body::<
3925 fidl::encoding::ResultType<GenericSmeQueryIfaceCapabilitiesResponse, i32>,
3926 fidl::encoding::DefaultFuchsiaResourceDialect,
3927 0x2f483964e794fbba,
3928 >(_buf?)?;
3929 Ok(_response.map(|x| x.apf_support))
3930 }
3931 self.client.send_query_and_decode::<
3932 fidl::encoding::EmptyPayload,
3933 GenericSmeQueryIfaceCapabilitiesResult,
3934 >(
3935 (),
3936 0x2f483964e794fbba,
3937 fidl::encoding::DynamicFlags::empty(),
3938 _decode,
3939 )
3940 }
3941
3942 type GetClientSmeResponseFut = fidl::client::QueryResponseFut<
3943 GenericSmeGetClientSmeResult,
3944 fidl::encoding::DefaultFuchsiaResourceDialect,
3945 >;
3946 fn r#get_client_sme(
3947 &self,
3948 mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
3949 ) -> Self::GetClientSmeResponseFut {
3950 fn _decode(
3951 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3952 ) -> Result<GenericSmeGetClientSmeResult, fidl::Error> {
3953 let _response = fidl::client::decode_transaction_body::<
3954 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3955 fidl::encoding::DefaultFuchsiaResourceDialect,
3956 0x2439ad714c642f15,
3957 >(_buf?)?;
3958 Ok(_response.map(|x| x))
3959 }
3960 self.client
3961 .send_query_and_decode::<GenericSmeGetClientSmeRequest, GenericSmeGetClientSmeResult>(
3962 (sme_server,),
3963 0x2439ad714c642f15,
3964 fidl::encoding::DynamicFlags::empty(),
3965 _decode,
3966 )
3967 }
3968
3969 type GetApSmeResponseFut = fidl::client::QueryResponseFut<
3970 GenericSmeGetApSmeResult,
3971 fidl::encoding::DefaultFuchsiaResourceDialect,
3972 >;
3973 fn r#get_ap_sme(
3974 &self,
3975 mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
3976 ) -> Self::GetApSmeResponseFut {
3977 fn _decode(
3978 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3979 ) -> Result<GenericSmeGetApSmeResult, fidl::Error> {
3980 let _response = fidl::client::decode_transaction_body::<
3981 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3982 fidl::encoding::DefaultFuchsiaResourceDialect,
3983 0x4d2a40be2b44ad6c,
3984 >(_buf?)?;
3985 Ok(_response.map(|x| x))
3986 }
3987 self.client.send_query_and_decode::<GenericSmeGetApSmeRequest, GenericSmeGetApSmeResult>(
3988 (sme_server,),
3989 0x4d2a40be2b44ad6c,
3990 fidl::encoding::DynamicFlags::empty(),
3991 _decode,
3992 )
3993 }
3994
3995 type GetSmeTelemetryResponseFut = fidl::client::QueryResponseFut<
3996 GenericSmeGetSmeTelemetryResult,
3997 fidl::encoding::DefaultFuchsiaResourceDialect,
3998 >;
3999 fn r#get_sme_telemetry(
4000 &self,
4001 mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
4002 ) -> Self::GetSmeTelemetryResponseFut {
4003 fn _decode(
4004 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4005 ) -> Result<GenericSmeGetSmeTelemetryResult, fidl::Error> {
4006 let _response = fidl::client::decode_transaction_body::<
4007 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4008 fidl::encoding::DefaultFuchsiaResourceDialect,
4009 0x7ea015b3060fa,
4010 >(_buf?)?;
4011 Ok(_response.map(|x| x))
4012 }
4013 self.client.send_query_and_decode::<
4014 GenericSmeGetSmeTelemetryRequest,
4015 GenericSmeGetSmeTelemetryResult,
4016 >(
4017 (telemetry_server,),
4018 0x7ea015b3060fa,
4019 fidl::encoding::DynamicFlags::empty(),
4020 _decode,
4021 )
4022 }
4023}
4024
4025pub struct GenericSmeEventStream {
4026 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4027}
4028
4029impl std::marker::Unpin for GenericSmeEventStream {}
4030
4031impl futures::stream::FusedStream for GenericSmeEventStream {
4032 fn is_terminated(&self) -> bool {
4033 self.event_receiver.is_terminated()
4034 }
4035}
4036
4037impl futures::Stream for GenericSmeEventStream {
4038 type Item = Result<GenericSmeEvent, fidl::Error>;
4039
4040 fn poll_next(
4041 mut self: std::pin::Pin<&mut Self>,
4042 cx: &mut std::task::Context<'_>,
4043 ) -> std::task::Poll<Option<Self::Item>> {
4044 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4045 &mut self.event_receiver,
4046 cx
4047 )?) {
4048 Some(buf) => std::task::Poll::Ready(Some(GenericSmeEvent::decode(buf))),
4049 None => std::task::Poll::Ready(None),
4050 }
4051 }
4052}
4053
4054#[derive(Debug)]
4055pub enum GenericSmeEvent {}
4056
4057impl GenericSmeEvent {
4058 fn decode(
4060 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4061 ) -> Result<GenericSmeEvent, fidl::Error> {
4062 let (bytes, _handles) = buf.split_mut();
4063 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4064 debug_assert_eq!(tx_header.tx_id, 0);
4065 match tx_header.ordinal {
4066 _ => Err(fidl::Error::UnknownOrdinal {
4067 ordinal: tx_header.ordinal,
4068 protocol_name: <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4069 }),
4070 }
4071 }
4072}
4073
4074pub struct GenericSmeRequestStream {
4076 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4077 is_terminated: bool,
4078}
4079
4080impl std::marker::Unpin for GenericSmeRequestStream {}
4081
4082impl futures::stream::FusedStream for GenericSmeRequestStream {
4083 fn is_terminated(&self) -> bool {
4084 self.is_terminated
4085 }
4086}
4087
4088impl fidl::endpoints::RequestStream for GenericSmeRequestStream {
4089 type Protocol = GenericSmeMarker;
4090 type ControlHandle = GenericSmeControlHandle;
4091
4092 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4093 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4094 }
4095
4096 fn control_handle(&self) -> Self::ControlHandle {
4097 GenericSmeControlHandle { inner: self.inner.clone() }
4098 }
4099
4100 fn into_inner(
4101 self,
4102 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4103 {
4104 (self.inner, self.is_terminated)
4105 }
4106
4107 fn from_inner(
4108 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4109 is_terminated: bool,
4110 ) -> Self {
4111 Self { inner, is_terminated }
4112 }
4113}
4114
4115impl futures::Stream for GenericSmeRequestStream {
4116 type Item = Result<GenericSmeRequest, fidl::Error>;
4117
4118 fn poll_next(
4119 mut self: std::pin::Pin<&mut Self>,
4120 cx: &mut std::task::Context<'_>,
4121 ) -> std::task::Poll<Option<Self::Item>> {
4122 let this = &mut *self;
4123 if this.inner.check_shutdown(cx) {
4124 this.is_terminated = true;
4125 return std::task::Poll::Ready(None);
4126 }
4127 if this.is_terminated {
4128 panic!("polled GenericSmeRequestStream after completion");
4129 }
4130 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4131 |bytes, handles| {
4132 match this.inner.channel().read_etc(cx, bytes, handles) {
4133 std::task::Poll::Ready(Ok(())) => {}
4134 std::task::Poll::Pending => return std::task::Poll::Pending,
4135 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4136 this.is_terminated = true;
4137 return std::task::Poll::Ready(None);
4138 }
4139 std::task::Poll::Ready(Err(e)) => {
4140 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4141 e.into(),
4142 ))));
4143 }
4144 }
4145
4146 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4148
4149 std::task::Poll::Ready(Some(match header.ordinal {
4150 0x6ef4a820c153e249 => {
4151 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4152 let mut req = fidl::new_empty!(
4153 fidl::encoding::EmptyPayload,
4154 fidl::encoding::DefaultFuchsiaResourceDialect
4155 );
4156 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4157 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
4158 Ok(GenericSmeRequest::Query {
4159 responder: GenericSmeQueryResponder {
4160 control_handle: std::mem::ManuallyDrop::new(control_handle),
4161 tx_id: header.tx_id,
4162 },
4163 })
4164 }
4165 0x2f483964e794fbba => {
4166 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4167 let mut req = fidl::new_empty!(
4168 fidl::encoding::EmptyPayload,
4169 fidl::encoding::DefaultFuchsiaResourceDialect
4170 );
4171 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4172 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
4173 Ok(GenericSmeRequest::QueryIfaceCapabilities {
4174 responder: GenericSmeQueryIfaceCapabilitiesResponder {
4175 control_handle: std::mem::ManuallyDrop::new(control_handle),
4176 tx_id: header.tx_id,
4177 },
4178 })
4179 }
4180 0x2439ad714c642f15 => {
4181 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4182 let mut req = fidl::new_empty!(
4183 GenericSmeGetClientSmeRequest,
4184 fidl::encoding::DefaultFuchsiaResourceDialect
4185 );
4186 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetClientSmeRequest>(&header, _body_bytes, handles, &mut req)?;
4187 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
4188 Ok(GenericSmeRequest::GetClientSme {
4189 sme_server: req.sme_server,
4190
4191 responder: GenericSmeGetClientSmeResponder {
4192 control_handle: std::mem::ManuallyDrop::new(control_handle),
4193 tx_id: header.tx_id,
4194 },
4195 })
4196 }
4197 0x4d2a40be2b44ad6c => {
4198 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4199 let mut req = fidl::new_empty!(
4200 GenericSmeGetApSmeRequest,
4201 fidl::encoding::DefaultFuchsiaResourceDialect
4202 );
4203 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetApSmeRequest>(&header, _body_bytes, handles, &mut req)?;
4204 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
4205 Ok(GenericSmeRequest::GetApSme {
4206 sme_server: req.sme_server,
4207
4208 responder: GenericSmeGetApSmeResponder {
4209 control_handle: std::mem::ManuallyDrop::new(control_handle),
4210 tx_id: header.tx_id,
4211 },
4212 })
4213 }
4214 0x7ea015b3060fa => {
4215 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4216 let mut req = fidl::new_empty!(
4217 GenericSmeGetSmeTelemetryRequest,
4218 fidl::encoding::DefaultFuchsiaResourceDialect
4219 );
4220 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetSmeTelemetryRequest>(&header, _body_bytes, handles, &mut req)?;
4221 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
4222 Ok(GenericSmeRequest::GetSmeTelemetry {
4223 telemetry_server: req.telemetry_server,
4224
4225 responder: GenericSmeGetSmeTelemetryResponder {
4226 control_handle: std::mem::ManuallyDrop::new(control_handle),
4227 tx_id: header.tx_id,
4228 },
4229 })
4230 }
4231 _ => Err(fidl::Error::UnknownOrdinal {
4232 ordinal: header.ordinal,
4233 protocol_name:
4234 <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4235 }),
4236 }))
4237 },
4238 )
4239 }
4240}
4241
4242#[derive(Debug)]
4243pub enum GenericSmeRequest {
4244 Query { responder: GenericSmeQueryResponder },
4248 QueryIfaceCapabilities { responder: GenericSmeQueryIfaceCapabilitiesResponder },
4250 GetClientSme {
4257 sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
4258 responder: GenericSmeGetClientSmeResponder,
4259 },
4260 GetApSme {
4267 sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
4268 responder: GenericSmeGetApSmeResponder,
4269 },
4270 GetSmeTelemetry {
4278 telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
4279 responder: GenericSmeGetSmeTelemetryResponder,
4280 },
4281}
4282
4283impl GenericSmeRequest {
4284 #[allow(irrefutable_let_patterns)]
4285 pub fn into_query(self) -> Option<(GenericSmeQueryResponder)> {
4286 if let GenericSmeRequest::Query { responder } = self { Some((responder)) } else { None }
4287 }
4288
4289 #[allow(irrefutable_let_patterns)]
4290 pub fn into_query_iface_capabilities(
4291 self,
4292 ) -> Option<(GenericSmeQueryIfaceCapabilitiesResponder)> {
4293 if let GenericSmeRequest::QueryIfaceCapabilities { responder } = self {
4294 Some((responder))
4295 } else {
4296 None
4297 }
4298 }
4299
4300 #[allow(irrefutable_let_patterns)]
4301 pub fn into_get_client_sme(
4302 self,
4303 ) -> Option<(fidl::endpoints::ServerEnd<ClientSmeMarker>, GenericSmeGetClientSmeResponder)>
4304 {
4305 if let GenericSmeRequest::GetClientSme { sme_server, responder } = self {
4306 Some((sme_server, responder))
4307 } else {
4308 None
4309 }
4310 }
4311
4312 #[allow(irrefutable_let_patterns)]
4313 pub fn into_get_ap_sme(
4314 self,
4315 ) -> Option<(fidl::endpoints::ServerEnd<ApSmeMarker>, GenericSmeGetApSmeResponder)> {
4316 if let GenericSmeRequest::GetApSme { sme_server, responder } = self {
4317 Some((sme_server, responder))
4318 } else {
4319 None
4320 }
4321 }
4322
4323 #[allow(irrefutable_let_patterns)]
4324 pub fn into_get_sme_telemetry(
4325 self,
4326 ) -> Option<(fidl::endpoints::ServerEnd<TelemetryMarker>, GenericSmeGetSmeTelemetryResponder)>
4327 {
4328 if let GenericSmeRequest::GetSmeTelemetry { telemetry_server, responder } = self {
4329 Some((telemetry_server, responder))
4330 } else {
4331 None
4332 }
4333 }
4334
4335 pub fn method_name(&self) -> &'static str {
4337 match *self {
4338 GenericSmeRequest::Query { .. } => "query",
4339 GenericSmeRequest::QueryIfaceCapabilities { .. } => "query_iface_capabilities",
4340 GenericSmeRequest::GetClientSme { .. } => "get_client_sme",
4341 GenericSmeRequest::GetApSme { .. } => "get_ap_sme",
4342 GenericSmeRequest::GetSmeTelemetry { .. } => "get_sme_telemetry",
4343 }
4344 }
4345}
4346
4347#[derive(Debug, Clone)]
4348pub struct GenericSmeControlHandle {
4349 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4350}
4351
4352impl fidl::endpoints::ControlHandle for GenericSmeControlHandle {
4353 fn shutdown(&self) {
4354 self.inner.shutdown()
4355 }
4356
4357 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4358 self.inner.shutdown_with_epitaph(status)
4359 }
4360
4361 fn is_closed(&self) -> bool {
4362 self.inner.channel().is_closed()
4363 }
4364 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4365 self.inner.channel().on_closed()
4366 }
4367
4368 #[cfg(target_os = "fuchsia")]
4369 fn signal_peer(
4370 &self,
4371 clear_mask: zx::Signals,
4372 set_mask: zx::Signals,
4373 ) -> Result<(), zx_status::Status> {
4374 use fidl::Peered;
4375 self.inner.channel().signal_peer(clear_mask, set_mask)
4376 }
4377}
4378
4379impl GenericSmeControlHandle {}
4380
4381#[must_use = "FIDL methods require a response to be sent"]
4382#[derive(Debug)]
4383pub struct GenericSmeQueryResponder {
4384 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4385 tx_id: u32,
4386}
4387
4388impl std::ops::Drop for GenericSmeQueryResponder {
4392 fn drop(&mut self) {
4393 self.control_handle.shutdown();
4394 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4396 }
4397}
4398
4399impl fidl::endpoints::Responder for GenericSmeQueryResponder {
4400 type ControlHandle = GenericSmeControlHandle;
4401
4402 fn control_handle(&self) -> &GenericSmeControlHandle {
4403 &self.control_handle
4404 }
4405
4406 fn drop_without_shutdown(mut self) {
4407 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4409 std::mem::forget(self);
4411 }
4412}
4413
4414impl GenericSmeQueryResponder {
4415 pub fn send(self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
4419 let _result = self.send_raw(resp);
4420 if _result.is_err() {
4421 self.control_handle.shutdown();
4422 }
4423 self.drop_without_shutdown();
4424 _result
4425 }
4426
4427 pub fn send_no_shutdown_on_err(self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
4429 let _result = self.send_raw(resp);
4430 self.drop_without_shutdown();
4431 _result
4432 }
4433
4434 fn send_raw(&self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
4435 self.control_handle.inner.send::<GenericSmeQueryResponse>(
4436 (resp,),
4437 self.tx_id,
4438 0x6ef4a820c153e249,
4439 fidl::encoding::DynamicFlags::empty(),
4440 )
4441 }
4442}
4443
4444#[must_use = "FIDL methods require a response to be sent"]
4445#[derive(Debug)]
4446pub struct GenericSmeQueryIfaceCapabilitiesResponder {
4447 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4448 tx_id: u32,
4449}
4450
4451impl std::ops::Drop for GenericSmeQueryIfaceCapabilitiesResponder {
4455 fn drop(&mut self) {
4456 self.control_handle.shutdown();
4457 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4459 }
4460}
4461
4462impl fidl::endpoints::Responder for GenericSmeQueryIfaceCapabilitiesResponder {
4463 type ControlHandle = GenericSmeControlHandle;
4464
4465 fn control_handle(&self) -> &GenericSmeControlHandle {
4466 &self.control_handle
4467 }
4468
4469 fn drop_without_shutdown(mut self) {
4470 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4472 std::mem::forget(self);
4474 }
4475}
4476
4477impl GenericSmeQueryIfaceCapabilitiesResponder {
4478 pub fn send(
4482 self,
4483 mut result: Result<&fidl_fuchsia_wlan_common::ApfPacketFilterSupport, i32>,
4484 ) -> Result<(), fidl::Error> {
4485 let _result = self.send_raw(result);
4486 if _result.is_err() {
4487 self.control_handle.shutdown();
4488 }
4489 self.drop_without_shutdown();
4490 _result
4491 }
4492
4493 pub fn send_no_shutdown_on_err(
4495 self,
4496 mut result: Result<&fidl_fuchsia_wlan_common::ApfPacketFilterSupport, i32>,
4497 ) -> Result<(), fidl::Error> {
4498 let _result = self.send_raw(result);
4499 self.drop_without_shutdown();
4500 _result
4501 }
4502
4503 fn send_raw(
4504 &self,
4505 mut result: Result<&fidl_fuchsia_wlan_common::ApfPacketFilterSupport, i32>,
4506 ) -> Result<(), fidl::Error> {
4507 self.control_handle.inner.send::<fidl::encoding::ResultType<
4508 GenericSmeQueryIfaceCapabilitiesResponse,
4509 i32,
4510 >>(
4511 result.map(|apf_support| (apf_support,)),
4512 self.tx_id,
4513 0x2f483964e794fbba,
4514 fidl::encoding::DynamicFlags::empty(),
4515 )
4516 }
4517}
4518
4519#[must_use = "FIDL methods require a response to be sent"]
4520#[derive(Debug)]
4521pub struct GenericSmeGetClientSmeResponder {
4522 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4523 tx_id: u32,
4524}
4525
4526impl std::ops::Drop for GenericSmeGetClientSmeResponder {
4530 fn drop(&mut self) {
4531 self.control_handle.shutdown();
4532 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4534 }
4535}
4536
4537impl fidl::endpoints::Responder for GenericSmeGetClientSmeResponder {
4538 type ControlHandle = GenericSmeControlHandle;
4539
4540 fn control_handle(&self) -> &GenericSmeControlHandle {
4541 &self.control_handle
4542 }
4543
4544 fn drop_without_shutdown(mut self) {
4545 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4547 std::mem::forget(self);
4549 }
4550}
4551
4552impl GenericSmeGetClientSmeResponder {
4553 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4557 let _result = self.send_raw(result);
4558 if _result.is_err() {
4559 self.control_handle.shutdown();
4560 }
4561 self.drop_without_shutdown();
4562 _result
4563 }
4564
4565 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4567 let _result = self.send_raw(result);
4568 self.drop_without_shutdown();
4569 _result
4570 }
4571
4572 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4573 self.control_handle
4574 .inner
4575 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4576 result,
4577 self.tx_id,
4578 0x2439ad714c642f15,
4579 fidl::encoding::DynamicFlags::empty(),
4580 )
4581 }
4582}
4583
4584#[must_use = "FIDL methods require a response to be sent"]
4585#[derive(Debug)]
4586pub struct GenericSmeGetApSmeResponder {
4587 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4588 tx_id: u32,
4589}
4590
4591impl std::ops::Drop for GenericSmeGetApSmeResponder {
4595 fn drop(&mut self) {
4596 self.control_handle.shutdown();
4597 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4599 }
4600}
4601
4602impl fidl::endpoints::Responder for GenericSmeGetApSmeResponder {
4603 type ControlHandle = GenericSmeControlHandle;
4604
4605 fn control_handle(&self) -> &GenericSmeControlHandle {
4606 &self.control_handle
4607 }
4608
4609 fn drop_without_shutdown(mut self) {
4610 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4612 std::mem::forget(self);
4614 }
4615}
4616
4617impl GenericSmeGetApSmeResponder {
4618 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4622 let _result = self.send_raw(result);
4623 if _result.is_err() {
4624 self.control_handle.shutdown();
4625 }
4626 self.drop_without_shutdown();
4627 _result
4628 }
4629
4630 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4632 let _result = self.send_raw(result);
4633 self.drop_without_shutdown();
4634 _result
4635 }
4636
4637 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4638 self.control_handle
4639 .inner
4640 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4641 result,
4642 self.tx_id,
4643 0x4d2a40be2b44ad6c,
4644 fidl::encoding::DynamicFlags::empty(),
4645 )
4646 }
4647}
4648
4649#[must_use = "FIDL methods require a response to be sent"]
4650#[derive(Debug)]
4651pub struct GenericSmeGetSmeTelemetryResponder {
4652 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4653 tx_id: u32,
4654}
4655
4656impl std::ops::Drop for GenericSmeGetSmeTelemetryResponder {
4660 fn drop(&mut self) {
4661 self.control_handle.shutdown();
4662 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4664 }
4665}
4666
4667impl fidl::endpoints::Responder for GenericSmeGetSmeTelemetryResponder {
4668 type ControlHandle = GenericSmeControlHandle;
4669
4670 fn control_handle(&self) -> &GenericSmeControlHandle {
4671 &self.control_handle
4672 }
4673
4674 fn drop_without_shutdown(mut self) {
4675 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4677 std::mem::forget(self);
4679 }
4680}
4681
4682impl GenericSmeGetSmeTelemetryResponder {
4683 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4687 let _result = self.send_raw(result);
4688 if _result.is_err() {
4689 self.control_handle.shutdown();
4690 }
4691 self.drop_without_shutdown();
4692 _result
4693 }
4694
4695 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4697 let _result = self.send_raw(result);
4698 self.drop_without_shutdown();
4699 _result
4700 }
4701
4702 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4703 self.control_handle
4704 .inner
4705 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4706 result,
4707 self.tx_id,
4708 0x7ea015b3060fa,
4709 fidl::encoding::DynamicFlags::empty(),
4710 )
4711 }
4712}
4713
4714#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4715pub struct ScheduledScanTransactionMarker;
4716
4717impl fidl::endpoints::ProtocolMarker for ScheduledScanTransactionMarker {
4718 type Proxy = ScheduledScanTransactionProxy;
4719 type RequestStream = ScheduledScanTransactionRequestStream;
4720 #[cfg(target_os = "fuchsia")]
4721 type SynchronousProxy = ScheduledScanTransactionSynchronousProxy;
4722
4723 const DEBUG_NAME: &'static str = "(anonymous) ScheduledScanTransaction";
4724}
4725
4726pub trait ScheduledScanTransactionProxyInterface: Send + Sync {}
4727#[derive(Debug)]
4728#[cfg(target_os = "fuchsia")]
4729pub struct ScheduledScanTransactionSynchronousProxy {
4730 client: fidl::client::sync::Client,
4731}
4732
4733#[cfg(target_os = "fuchsia")]
4734impl fidl::endpoints::SynchronousProxy for ScheduledScanTransactionSynchronousProxy {
4735 type Proxy = ScheduledScanTransactionProxy;
4736 type Protocol = ScheduledScanTransactionMarker;
4737
4738 fn from_channel(inner: fidl::Channel) -> Self {
4739 Self::new(inner)
4740 }
4741
4742 fn into_channel(self) -> fidl::Channel {
4743 self.client.into_channel()
4744 }
4745
4746 fn as_channel(&self) -> &fidl::Channel {
4747 self.client.as_channel()
4748 }
4749}
4750
4751#[cfg(target_os = "fuchsia")]
4752impl ScheduledScanTransactionSynchronousProxy {
4753 pub fn new(channel: fidl::Channel) -> Self {
4754 Self { client: fidl::client::sync::Client::new(channel) }
4755 }
4756
4757 pub fn into_channel(self) -> fidl::Channel {
4758 self.client.into_channel()
4759 }
4760
4761 pub fn wait_for_event(
4764 &self,
4765 deadline: zx::MonotonicInstant,
4766 ) -> Result<ScheduledScanTransactionEvent, fidl::Error> {
4767 ScheduledScanTransactionEvent::decode(
4768 self.client.wait_for_event::<ScheduledScanTransactionMarker>(deadline)?,
4769 )
4770 }
4771}
4772
4773#[cfg(target_os = "fuchsia")]
4774impl From<ScheduledScanTransactionSynchronousProxy> for zx::NullableHandle {
4775 fn from(value: ScheduledScanTransactionSynchronousProxy) -> Self {
4776 value.into_channel().into()
4777 }
4778}
4779
4780#[cfg(target_os = "fuchsia")]
4781impl From<fidl::Channel> for ScheduledScanTransactionSynchronousProxy {
4782 fn from(value: fidl::Channel) -> Self {
4783 Self::new(value)
4784 }
4785}
4786
4787#[cfg(target_os = "fuchsia")]
4788impl fidl::endpoints::FromClient for ScheduledScanTransactionSynchronousProxy {
4789 type Protocol = ScheduledScanTransactionMarker;
4790
4791 fn from_client(value: fidl::endpoints::ClientEnd<ScheduledScanTransactionMarker>) -> Self {
4792 Self::new(value.into_channel())
4793 }
4794}
4795
4796#[derive(Debug, Clone)]
4797pub struct ScheduledScanTransactionProxy {
4798 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4799}
4800
4801impl fidl::endpoints::Proxy for ScheduledScanTransactionProxy {
4802 type Protocol = ScheduledScanTransactionMarker;
4803
4804 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4805 Self::new(inner)
4806 }
4807
4808 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4809 self.client.into_channel().map_err(|client| Self { client })
4810 }
4811
4812 fn as_channel(&self) -> &::fidl::AsyncChannel {
4813 self.client.as_channel()
4814 }
4815}
4816
4817impl ScheduledScanTransactionProxy {
4818 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4820 let protocol_name =
4821 <ScheduledScanTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4822 Self { client: fidl::client::Client::new(channel, protocol_name) }
4823 }
4824
4825 pub fn take_event_stream(&self) -> ScheduledScanTransactionEventStream {
4831 ScheduledScanTransactionEventStream { event_receiver: self.client.take_event_receiver() }
4832 }
4833}
4834
4835impl ScheduledScanTransactionProxyInterface for ScheduledScanTransactionProxy {}
4836
4837pub struct ScheduledScanTransactionEventStream {
4838 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4839}
4840
4841impl std::marker::Unpin for ScheduledScanTransactionEventStream {}
4842
4843impl futures::stream::FusedStream for ScheduledScanTransactionEventStream {
4844 fn is_terminated(&self) -> bool {
4845 self.event_receiver.is_terminated()
4846 }
4847}
4848
4849impl futures::Stream for ScheduledScanTransactionEventStream {
4850 type Item = Result<ScheduledScanTransactionEvent, fidl::Error>;
4851
4852 fn poll_next(
4853 mut self: std::pin::Pin<&mut Self>,
4854 cx: &mut std::task::Context<'_>,
4855 ) -> std::task::Poll<Option<Self::Item>> {
4856 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4857 &mut self.event_receiver,
4858 cx
4859 )?) {
4860 Some(buf) => std::task::Poll::Ready(Some(ScheduledScanTransactionEvent::decode(buf))),
4861 None => std::task::Poll::Ready(None),
4862 }
4863 }
4864}
4865
4866#[derive(Debug)]
4867pub enum ScheduledScanTransactionEvent {
4868 OnScheduledScanMatchesAvailable { scan_results: fidl::Vmo },
4869}
4870
4871impl ScheduledScanTransactionEvent {
4872 #[allow(irrefutable_let_patterns)]
4873 pub fn into_on_scheduled_scan_matches_available(self) -> Option<fidl::Vmo> {
4874 if let ScheduledScanTransactionEvent::OnScheduledScanMatchesAvailable { scan_results } =
4875 self
4876 {
4877 Some((scan_results))
4878 } else {
4879 None
4880 }
4881 }
4882
4883 fn decode(
4885 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4886 ) -> Result<ScheduledScanTransactionEvent, fidl::Error> {
4887 let (bytes, _handles) = buf.split_mut();
4888 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4889 debug_assert_eq!(tx_header.tx_id, 0);
4890 match tx_header.ordinal {
4891 0x49ff004527d01bd8 => {
4892 let mut out = fidl::new_empty!(
4893 ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest,
4894 fidl::encoding::DefaultFuchsiaResourceDialect
4895 );
4896 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
4897 Ok((ScheduledScanTransactionEvent::OnScheduledScanMatchesAvailable {
4898 scan_results: out.scan_results,
4899 }))
4900 }
4901 _ => Err(fidl::Error::UnknownOrdinal {
4902 ordinal: tx_header.ordinal,
4903 protocol_name:
4904 <ScheduledScanTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4905 }),
4906 }
4907 }
4908}
4909
4910pub struct ScheduledScanTransactionRequestStream {
4912 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4913 is_terminated: bool,
4914}
4915
4916impl std::marker::Unpin for ScheduledScanTransactionRequestStream {}
4917
4918impl futures::stream::FusedStream for ScheduledScanTransactionRequestStream {
4919 fn is_terminated(&self) -> bool {
4920 self.is_terminated
4921 }
4922}
4923
4924impl fidl::endpoints::RequestStream for ScheduledScanTransactionRequestStream {
4925 type Protocol = ScheduledScanTransactionMarker;
4926 type ControlHandle = ScheduledScanTransactionControlHandle;
4927
4928 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4929 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4930 }
4931
4932 fn control_handle(&self) -> Self::ControlHandle {
4933 ScheduledScanTransactionControlHandle { inner: self.inner.clone() }
4934 }
4935
4936 fn into_inner(
4937 self,
4938 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4939 {
4940 (self.inner, self.is_terminated)
4941 }
4942
4943 fn from_inner(
4944 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4945 is_terminated: bool,
4946 ) -> Self {
4947 Self { inner, is_terminated }
4948 }
4949}
4950
4951impl futures::Stream for ScheduledScanTransactionRequestStream {
4952 type Item = Result<ScheduledScanTransactionRequest, fidl::Error>;
4953
4954 fn poll_next(
4955 mut self: std::pin::Pin<&mut Self>,
4956 cx: &mut std::task::Context<'_>,
4957 ) -> std::task::Poll<Option<Self::Item>> {
4958 let this = &mut *self;
4959 if this.inner.check_shutdown(cx) {
4960 this.is_terminated = true;
4961 return std::task::Poll::Ready(None);
4962 }
4963 if this.is_terminated {
4964 panic!("polled ScheduledScanTransactionRequestStream after completion");
4965 }
4966 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4967 |bytes, handles| {
4968 match this.inner.channel().read_etc(cx, bytes, handles) {
4969 std::task::Poll::Ready(Ok(())) => {}
4970 std::task::Poll::Pending => return std::task::Poll::Pending,
4971 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4972 this.is_terminated = true;
4973 return std::task::Poll::Ready(None);
4974 }
4975 std::task::Poll::Ready(Err(e)) => {
4976 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4977 e.into(),
4978 ))));
4979 }
4980 }
4981
4982 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4984
4985 std::task::Poll::Ready(Some(match header.ordinal {
4986 _ => Err(fidl::Error::UnknownOrdinal {
4987 ordinal: header.ordinal,
4988 protocol_name: <ScheduledScanTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4989 }),
4990 }))
4991 },
4992 )
4993 }
4994}
4995
4996#[derive(Debug)]
4999pub enum ScheduledScanTransactionRequest {}
5000
5001impl ScheduledScanTransactionRequest {
5002 pub fn method_name(&self) -> &'static str {
5004 match *self {}
5005 }
5006}
5007
5008#[derive(Debug, Clone)]
5009pub struct ScheduledScanTransactionControlHandle {
5010 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5011}
5012
5013impl fidl::endpoints::ControlHandle for ScheduledScanTransactionControlHandle {
5014 fn shutdown(&self) {
5015 self.inner.shutdown()
5016 }
5017
5018 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5019 self.inner.shutdown_with_epitaph(status)
5020 }
5021
5022 fn is_closed(&self) -> bool {
5023 self.inner.channel().is_closed()
5024 }
5025 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5026 self.inner.channel().on_closed()
5027 }
5028
5029 #[cfg(target_os = "fuchsia")]
5030 fn signal_peer(
5031 &self,
5032 clear_mask: zx::Signals,
5033 set_mask: zx::Signals,
5034 ) -> Result<(), zx_status::Status> {
5035 use fidl::Peered;
5036 self.inner.channel().signal_peer(clear_mask, set_mask)
5037 }
5038}
5039
5040impl ScheduledScanTransactionControlHandle {
5041 pub fn send_on_scheduled_scan_matches_available(
5042 &self,
5043 mut scan_results: fidl::Vmo,
5044 ) -> Result<(), fidl::Error> {
5045 self.inner.send::<ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest>(
5046 (scan_results,),
5047 0,
5048 0x49ff004527d01bd8,
5049 fidl::encoding::DynamicFlags::empty(),
5050 )
5051 }
5052}
5053
5054#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5055pub struct TelemetryMarker;
5056
5057impl fidl::endpoints::ProtocolMarker for TelemetryMarker {
5058 type Proxy = TelemetryProxy;
5059 type RequestStream = TelemetryRequestStream;
5060 #[cfg(target_os = "fuchsia")]
5061 type SynchronousProxy = TelemetrySynchronousProxy;
5062
5063 const DEBUG_NAME: &'static str = "(anonymous) Telemetry";
5064}
5065pub type TelemetryQueryTelemetrySupportResult =
5066 Result<fidl_fuchsia_wlan_stats::TelemetrySupport, i32>;
5067pub type TelemetryGetIfaceStatsResult = Result<fidl_fuchsia_wlan_stats::IfaceStats, i32>;
5068pub type TelemetryGetHistogramStatsResult =
5069 Result<fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>;
5070pub type TelemetryGetSignalReportResult = Result<fidl_fuchsia_wlan_stats::SignalReport, i32>;
5071pub type TelemetryCloneInspectVmoResult = Result<fidl::Vmo, i32>;
5072
5073pub trait TelemetryProxyInterface: Send + Sync {
5074 type QueryTelemetrySupportResponseFut: std::future::Future<Output = Result<TelemetryQueryTelemetrySupportResult, fidl::Error>>
5075 + Send;
5076 fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut;
5077 type GetIfaceStatsResponseFut: std::future::Future<Output = Result<TelemetryGetIfaceStatsResult, fidl::Error>>
5078 + Send;
5079 fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut;
5080 type GetHistogramStatsResponseFut: std::future::Future<Output = Result<TelemetryGetHistogramStatsResult, fidl::Error>>
5081 + Send;
5082 fn r#get_histogram_stats(&self) -> Self::GetHistogramStatsResponseFut;
5083 type GetSignalReportResponseFut: std::future::Future<Output = Result<TelemetryGetSignalReportResult, fidl::Error>>
5084 + Send;
5085 fn r#get_signal_report(&self) -> Self::GetSignalReportResponseFut;
5086 type CloneInspectVmoResponseFut: std::future::Future<Output = Result<TelemetryCloneInspectVmoResult, fidl::Error>>
5087 + Send;
5088 fn r#clone_inspect_vmo(&self) -> Self::CloneInspectVmoResponseFut;
5089}
5090#[derive(Debug)]
5091#[cfg(target_os = "fuchsia")]
5092pub struct TelemetrySynchronousProxy {
5093 client: fidl::client::sync::Client,
5094}
5095
5096#[cfg(target_os = "fuchsia")]
5097impl fidl::endpoints::SynchronousProxy for TelemetrySynchronousProxy {
5098 type Proxy = TelemetryProxy;
5099 type Protocol = TelemetryMarker;
5100
5101 fn from_channel(inner: fidl::Channel) -> Self {
5102 Self::new(inner)
5103 }
5104
5105 fn into_channel(self) -> fidl::Channel {
5106 self.client.into_channel()
5107 }
5108
5109 fn as_channel(&self) -> &fidl::Channel {
5110 self.client.as_channel()
5111 }
5112}
5113
5114#[cfg(target_os = "fuchsia")]
5115impl TelemetrySynchronousProxy {
5116 pub fn new(channel: fidl::Channel) -> Self {
5117 Self { client: fidl::client::sync::Client::new(channel) }
5118 }
5119
5120 pub fn into_channel(self) -> fidl::Channel {
5121 self.client.into_channel()
5122 }
5123
5124 pub fn wait_for_event(
5127 &self,
5128 deadline: zx::MonotonicInstant,
5129 ) -> Result<TelemetryEvent, fidl::Error> {
5130 TelemetryEvent::decode(self.client.wait_for_event::<TelemetryMarker>(deadline)?)
5131 }
5132
5133 pub fn r#query_telemetry_support(
5134 &self,
5135 ___deadline: zx::MonotonicInstant,
5136 ) -> Result<TelemetryQueryTelemetrySupportResult, fidl::Error> {
5137 let _response = self.client.send_query::<
5138 fidl::encoding::EmptyPayload,
5139 fidl::encoding::ResultType<TelemetryQueryTelemetrySupportResponse, i32>,
5140 TelemetryMarker,
5141 >(
5142 (),
5143 0x69443ad35b204686,
5144 fidl::encoding::DynamicFlags::empty(),
5145 ___deadline,
5146 )?;
5147 Ok(_response.map(|x| x.resp))
5148 }
5149
5150 pub fn r#get_iface_stats(
5151 &self,
5152 ___deadline: zx::MonotonicInstant,
5153 ) -> Result<TelemetryGetIfaceStatsResult, fidl::Error> {
5154 let _response = self.client.send_query::<
5155 fidl::encoding::EmptyPayload,
5156 fidl::encoding::ResultType<TelemetryGetIfaceStatsResponse, i32>,
5157 TelemetryMarker,
5158 >(
5159 (),
5160 0x6af057f3a017f572,
5161 fidl::encoding::DynamicFlags::empty(),
5162 ___deadline,
5163 )?;
5164 Ok(_response.map(|x| x.stats))
5165 }
5166
5167 pub fn r#get_histogram_stats(
5168 &self,
5169 ___deadline: zx::MonotonicInstant,
5170 ) -> Result<TelemetryGetHistogramStatsResult, fidl::Error> {
5171 let _response = self.client.send_query::<
5172 fidl::encoding::EmptyPayload,
5173 fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>,
5174 TelemetryMarker,
5175 >(
5176 (),
5177 0x46d2b6a23f764564,
5178 fidl::encoding::DynamicFlags::empty(),
5179 ___deadline,
5180 )?;
5181 Ok(_response.map(|x| x.stats))
5182 }
5183
5184 pub fn r#get_signal_report(
5185 &self,
5186 ___deadline: zx::MonotonicInstant,
5187 ) -> Result<TelemetryGetSignalReportResult, fidl::Error> {
5188 let _response = self.client.send_query::<
5189 fidl::encoding::EmptyPayload,
5190 fidl::encoding::ResultType<TelemetryGetSignalReportResponse, i32>,
5191 TelemetryMarker,
5192 >(
5193 (),
5194 0x24133aeac3225e28,
5195 fidl::encoding::DynamicFlags::empty(),
5196 ___deadline,
5197 )?;
5198 Ok(_response.map(|x| x.stats))
5199 }
5200
5201 pub fn r#clone_inspect_vmo(
5202 &self,
5203 ___deadline: zx::MonotonicInstant,
5204 ) -> Result<TelemetryCloneInspectVmoResult, fidl::Error> {
5205 let _response = self.client.send_query::<
5206 fidl::encoding::EmptyPayload,
5207 fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>,
5208 TelemetryMarker,
5209 >(
5210 (),
5211 0x47153917e84c5a21,
5212 fidl::encoding::DynamicFlags::empty(),
5213 ___deadline,
5214 )?;
5215 Ok(_response.map(|x| x.inspect_vmo))
5216 }
5217}
5218
5219#[cfg(target_os = "fuchsia")]
5220impl From<TelemetrySynchronousProxy> for zx::NullableHandle {
5221 fn from(value: TelemetrySynchronousProxy) -> Self {
5222 value.into_channel().into()
5223 }
5224}
5225
5226#[cfg(target_os = "fuchsia")]
5227impl From<fidl::Channel> for TelemetrySynchronousProxy {
5228 fn from(value: fidl::Channel) -> Self {
5229 Self::new(value)
5230 }
5231}
5232
5233#[cfg(target_os = "fuchsia")]
5234impl fidl::endpoints::FromClient for TelemetrySynchronousProxy {
5235 type Protocol = TelemetryMarker;
5236
5237 fn from_client(value: fidl::endpoints::ClientEnd<TelemetryMarker>) -> Self {
5238 Self::new(value.into_channel())
5239 }
5240}
5241
5242#[derive(Debug, Clone)]
5243pub struct TelemetryProxy {
5244 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5245}
5246
5247impl fidl::endpoints::Proxy for TelemetryProxy {
5248 type Protocol = TelemetryMarker;
5249
5250 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5251 Self::new(inner)
5252 }
5253
5254 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5255 self.client.into_channel().map_err(|client| Self { client })
5256 }
5257
5258 fn as_channel(&self) -> &::fidl::AsyncChannel {
5259 self.client.as_channel()
5260 }
5261}
5262
5263impl TelemetryProxy {
5264 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5266 let protocol_name = <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5267 Self { client: fidl::client::Client::new(channel, protocol_name) }
5268 }
5269
5270 pub fn take_event_stream(&self) -> TelemetryEventStream {
5276 TelemetryEventStream { event_receiver: self.client.take_event_receiver() }
5277 }
5278
5279 pub fn r#query_telemetry_support(
5280 &self,
5281 ) -> fidl::client::QueryResponseFut<
5282 TelemetryQueryTelemetrySupportResult,
5283 fidl::encoding::DefaultFuchsiaResourceDialect,
5284 > {
5285 TelemetryProxyInterface::r#query_telemetry_support(self)
5286 }
5287
5288 pub fn r#get_iface_stats(
5289 &self,
5290 ) -> fidl::client::QueryResponseFut<
5291 TelemetryGetIfaceStatsResult,
5292 fidl::encoding::DefaultFuchsiaResourceDialect,
5293 > {
5294 TelemetryProxyInterface::r#get_iface_stats(self)
5295 }
5296
5297 pub fn r#get_histogram_stats(
5298 &self,
5299 ) -> fidl::client::QueryResponseFut<
5300 TelemetryGetHistogramStatsResult,
5301 fidl::encoding::DefaultFuchsiaResourceDialect,
5302 > {
5303 TelemetryProxyInterface::r#get_histogram_stats(self)
5304 }
5305
5306 pub fn r#get_signal_report(
5307 &self,
5308 ) -> fidl::client::QueryResponseFut<
5309 TelemetryGetSignalReportResult,
5310 fidl::encoding::DefaultFuchsiaResourceDialect,
5311 > {
5312 TelemetryProxyInterface::r#get_signal_report(self)
5313 }
5314
5315 pub fn r#clone_inspect_vmo(
5316 &self,
5317 ) -> fidl::client::QueryResponseFut<
5318 TelemetryCloneInspectVmoResult,
5319 fidl::encoding::DefaultFuchsiaResourceDialect,
5320 > {
5321 TelemetryProxyInterface::r#clone_inspect_vmo(self)
5322 }
5323}
5324
5325impl TelemetryProxyInterface for TelemetryProxy {
5326 type QueryTelemetrySupportResponseFut = fidl::client::QueryResponseFut<
5327 TelemetryQueryTelemetrySupportResult,
5328 fidl::encoding::DefaultFuchsiaResourceDialect,
5329 >;
5330 fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut {
5331 fn _decode(
5332 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5333 ) -> Result<TelemetryQueryTelemetrySupportResult, fidl::Error> {
5334 let _response = fidl::client::decode_transaction_body::<
5335 fidl::encoding::ResultType<TelemetryQueryTelemetrySupportResponse, i32>,
5336 fidl::encoding::DefaultFuchsiaResourceDialect,
5337 0x69443ad35b204686,
5338 >(_buf?)?;
5339 Ok(_response.map(|x| x.resp))
5340 }
5341 self.client.send_query_and_decode::<
5342 fidl::encoding::EmptyPayload,
5343 TelemetryQueryTelemetrySupportResult,
5344 >(
5345 (),
5346 0x69443ad35b204686,
5347 fidl::encoding::DynamicFlags::empty(),
5348 _decode,
5349 )
5350 }
5351
5352 type GetIfaceStatsResponseFut = fidl::client::QueryResponseFut<
5353 TelemetryGetIfaceStatsResult,
5354 fidl::encoding::DefaultFuchsiaResourceDialect,
5355 >;
5356 fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut {
5357 fn _decode(
5358 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5359 ) -> Result<TelemetryGetIfaceStatsResult, fidl::Error> {
5360 let _response = fidl::client::decode_transaction_body::<
5361 fidl::encoding::ResultType<TelemetryGetIfaceStatsResponse, i32>,
5362 fidl::encoding::DefaultFuchsiaResourceDialect,
5363 0x6af057f3a017f572,
5364 >(_buf?)?;
5365 Ok(_response.map(|x| x.stats))
5366 }
5367 self.client
5368 .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryGetIfaceStatsResult>(
5369 (),
5370 0x6af057f3a017f572,
5371 fidl::encoding::DynamicFlags::empty(),
5372 _decode,
5373 )
5374 }
5375
5376 type GetHistogramStatsResponseFut = fidl::client::QueryResponseFut<
5377 TelemetryGetHistogramStatsResult,
5378 fidl::encoding::DefaultFuchsiaResourceDialect,
5379 >;
5380 fn r#get_histogram_stats(&self) -> Self::GetHistogramStatsResponseFut {
5381 fn _decode(
5382 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5383 ) -> Result<TelemetryGetHistogramStatsResult, fidl::Error> {
5384 let _response = fidl::client::decode_transaction_body::<
5385 fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>,
5386 fidl::encoding::DefaultFuchsiaResourceDialect,
5387 0x46d2b6a23f764564,
5388 >(_buf?)?;
5389 Ok(_response.map(|x| x.stats))
5390 }
5391 self.client.send_query_and_decode::<
5392 fidl::encoding::EmptyPayload,
5393 TelemetryGetHistogramStatsResult,
5394 >(
5395 (),
5396 0x46d2b6a23f764564,
5397 fidl::encoding::DynamicFlags::empty(),
5398 _decode,
5399 )
5400 }
5401
5402 type GetSignalReportResponseFut = fidl::client::QueryResponseFut<
5403 TelemetryGetSignalReportResult,
5404 fidl::encoding::DefaultFuchsiaResourceDialect,
5405 >;
5406 fn r#get_signal_report(&self) -> Self::GetSignalReportResponseFut {
5407 fn _decode(
5408 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5409 ) -> Result<TelemetryGetSignalReportResult, fidl::Error> {
5410 let _response = fidl::client::decode_transaction_body::<
5411 fidl::encoding::ResultType<TelemetryGetSignalReportResponse, i32>,
5412 fidl::encoding::DefaultFuchsiaResourceDialect,
5413 0x24133aeac3225e28,
5414 >(_buf?)?;
5415 Ok(_response.map(|x| x.stats))
5416 }
5417 self.client
5418 .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryGetSignalReportResult>(
5419 (),
5420 0x24133aeac3225e28,
5421 fidl::encoding::DynamicFlags::empty(),
5422 _decode,
5423 )
5424 }
5425
5426 type CloneInspectVmoResponseFut = fidl::client::QueryResponseFut<
5427 TelemetryCloneInspectVmoResult,
5428 fidl::encoding::DefaultFuchsiaResourceDialect,
5429 >;
5430 fn r#clone_inspect_vmo(&self) -> Self::CloneInspectVmoResponseFut {
5431 fn _decode(
5432 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5433 ) -> Result<TelemetryCloneInspectVmoResult, fidl::Error> {
5434 let _response = fidl::client::decode_transaction_body::<
5435 fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>,
5436 fidl::encoding::DefaultFuchsiaResourceDialect,
5437 0x47153917e84c5a21,
5438 >(_buf?)?;
5439 Ok(_response.map(|x| x.inspect_vmo))
5440 }
5441 self.client
5442 .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryCloneInspectVmoResult>(
5443 (),
5444 0x47153917e84c5a21,
5445 fidl::encoding::DynamicFlags::empty(),
5446 _decode,
5447 )
5448 }
5449}
5450
5451pub struct TelemetryEventStream {
5452 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5453}
5454
5455impl std::marker::Unpin for TelemetryEventStream {}
5456
5457impl futures::stream::FusedStream for TelemetryEventStream {
5458 fn is_terminated(&self) -> bool {
5459 self.event_receiver.is_terminated()
5460 }
5461}
5462
5463impl futures::Stream for TelemetryEventStream {
5464 type Item = Result<TelemetryEvent, fidl::Error>;
5465
5466 fn poll_next(
5467 mut self: std::pin::Pin<&mut Self>,
5468 cx: &mut std::task::Context<'_>,
5469 ) -> std::task::Poll<Option<Self::Item>> {
5470 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5471 &mut self.event_receiver,
5472 cx
5473 )?) {
5474 Some(buf) => std::task::Poll::Ready(Some(TelemetryEvent::decode(buf))),
5475 None => std::task::Poll::Ready(None),
5476 }
5477 }
5478}
5479
5480#[derive(Debug)]
5481pub enum TelemetryEvent {}
5482
5483impl TelemetryEvent {
5484 fn decode(
5486 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5487 ) -> Result<TelemetryEvent, fidl::Error> {
5488 let (bytes, _handles) = buf.split_mut();
5489 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5490 debug_assert_eq!(tx_header.tx_id, 0);
5491 match tx_header.ordinal {
5492 _ => Err(fidl::Error::UnknownOrdinal {
5493 ordinal: tx_header.ordinal,
5494 protocol_name: <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5495 }),
5496 }
5497 }
5498}
5499
5500pub struct TelemetryRequestStream {
5502 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5503 is_terminated: bool,
5504}
5505
5506impl std::marker::Unpin for TelemetryRequestStream {}
5507
5508impl futures::stream::FusedStream for TelemetryRequestStream {
5509 fn is_terminated(&self) -> bool {
5510 self.is_terminated
5511 }
5512}
5513
5514impl fidl::endpoints::RequestStream for TelemetryRequestStream {
5515 type Protocol = TelemetryMarker;
5516 type ControlHandle = TelemetryControlHandle;
5517
5518 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5519 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5520 }
5521
5522 fn control_handle(&self) -> Self::ControlHandle {
5523 TelemetryControlHandle { inner: self.inner.clone() }
5524 }
5525
5526 fn into_inner(
5527 self,
5528 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5529 {
5530 (self.inner, self.is_terminated)
5531 }
5532
5533 fn from_inner(
5534 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5535 is_terminated: bool,
5536 ) -> Self {
5537 Self { inner, is_terminated }
5538 }
5539}
5540
5541impl futures::Stream for TelemetryRequestStream {
5542 type Item = Result<TelemetryRequest, fidl::Error>;
5543
5544 fn poll_next(
5545 mut self: std::pin::Pin<&mut Self>,
5546 cx: &mut std::task::Context<'_>,
5547 ) -> std::task::Poll<Option<Self::Item>> {
5548 let this = &mut *self;
5549 if this.inner.check_shutdown(cx) {
5550 this.is_terminated = true;
5551 return std::task::Poll::Ready(None);
5552 }
5553 if this.is_terminated {
5554 panic!("polled TelemetryRequestStream after completion");
5555 }
5556 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5557 |bytes, handles| {
5558 match this.inner.channel().read_etc(cx, bytes, handles) {
5559 std::task::Poll::Ready(Ok(())) => {}
5560 std::task::Poll::Pending => return std::task::Poll::Pending,
5561 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5562 this.is_terminated = true;
5563 return std::task::Poll::Ready(None);
5564 }
5565 std::task::Poll::Ready(Err(e)) => {
5566 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5567 e.into(),
5568 ))));
5569 }
5570 }
5571
5572 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5574
5575 std::task::Poll::Ready(Some(match header.ordinal {
5576 0x69443ad35b204686 => {
5577 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5578 let mut req = fidl::new_empty!(
5579 fidl::encoding::EmptyPayload,
5580 fidl::encoding::DefaultFuchsiaResourceDialect
5581 );
5582 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5583 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
5584 Ok(TelemetryRequest::QueryTelemetrySupport {
5585 responder: TelemetryQueryTelemetrySupportResponder {
5586 control_handle: std::mem::ManuallyDrop::new(control_handle),
5587 tx_id: header.tx_id,
5588 },
5589 })
5590 }
5591 0x6af057f3a017f572 => {
5592 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5593 let mut req = fidl::new_empty!(
5594 fidl::encoding::EmptyPayload,
5595 fidl::encoding::DefaultFuchsiaResourceDialect
5596 );
5597 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5598 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
5599 Ok(TelemetryRequest::GetIfaceStats {
5600 responder: TelemetryGetIfaceStatsResponder {
5601 control_handle: std::mem::ManuallyDrop::new(control_handle),
5602 tx_id: header.tx_id,
5603 },
5604 })
5605 }
5606 0x46d2b6a23f764564 => {
5607 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5608 let mut req = fidl::new_empty!(
5609 fidl::encoding::EmptyPayload,
5610 fidl::encoding::DefaultFuchsiaResourceDialect
5611 );
5612 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5613 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
5614 Ok(TelemetryRequest::GetHistogramStats {
5615 responder: TelemetryGetHistogramStatsResponder {
5616 control_handle: std::mem::ManuallyDrop::new(control_handle),
5617 tx_id: header.tx_id,
5618 },
5619 })
5620 }
5621 0x24133aeac3225e28 => {
5622 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5623 let mut req = fidl::new_empty!(
5624 fidl::encoding::EmptyPayload,
5625 fidl::encoding::DefaultFuchsiaResourceDialect
5626 );
5627 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5628 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
5629 Ok(TelemetryRequest::GetSignalReport {
5630 responder: TelemetryGetSignalReportResponder {
5631 control_handle: std::mem::ManuallyDrop::new(control_handle),
5632 tx_id: header.tx_id,
5633 },
5634 })
5635 }
5636 0x47153917e84c5a21 => {
5637 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5638 let mut req = fidl::new_empty!(
5639 fidl::encoding::EmptyPayload,
5640 fidl::encoding::DefaultFuchsiaResourceDialect
5641 );
5642 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5643 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
5644 Ok(TelemetryRequest::CloneInspectVmo {
5645 responder: TelemetryCloneInspectVmoResponder {
5646 control_handle: std::mem::ManuallyDrop::new(control_handle),
5647 tx_id: header.tx_id,
5648 },
5649 })
5650 }
5651 _ => Err(fidl::Error::UnknownOrdinal {
5652 ordinal: header.ordinal,
5653 protocol_name:
5654 <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5655 }),
5656 }))
5657 },
5658 )
5659 }
5660}
5661
5662#[derive(Debug)]
5663pub enum TelemetryRequest {
5664 QueryTelemetrySupport { responder: TelemetryQueryTelemetrySupportResponder },
5665 GetIfaceStats { responder: TelemetryGetIfaceStatsResponder },
5666 GetHistogramStats { responder: TelemetryGetHistogramStatsResponder },
5667 GetSignalReport { responder: TelemetryGetSignalReportResponder },
5668 CloneInspectVmo { responder: TelemetryCloneInspectVmoResponder },
5669}
5670
5671impl TelemetryRequest {
5672 #[allow(irrefutable_let_patterns)]
5673 pub fn into_query_telemetry_support(self) -> Option<(TelemetryQueryTelemetrySupportResponder)> {
5674 if let TelemetryRequest::QueryTelemetrySupport { responder } = self {
5675 Some((responder))
5676 } else {
5677 None
5678 }
5679 }
5680
5681 #[allow(irrefutable_let_patterns)]
5682 pub fn into_get_iface_stats(self) -> Option<(TelemetryGetIfaceStatsResponder)> {
5683 if let TelemetryRequest::GetIfaceStats { responder } = self {
5684 Some((responder))
5685 } else {
5686 None
5687 }
5688 }
5689
5690 #[allow(irrefutable_let_patterns)]
5691 pub fn into_get_histogram_stats(self) -> Option<(TelemetryGetHistogramStatsResponder)> {
5692 if let TelemetryRequest::GetHistogramStats { responder } = self {
5693 Some((responder))
5694 } else {
5695 None
5696 }
5697 }
5698
5699 #[allow(irrefutable_let_patterns)]
5700 pub fn into_get_signal_report(self) -> Option<(TelemetryGetSignalReportResponder)> {
5701 if let TelemetryRequest::GetSignalReport { responder } = self {
5702 Some((responder))
5703 } else {
5704 None
5705 }
5706 }
5707
5708 #[allow(irrefutable_let_patterns)]
5709 pub fn into_clone_inspect_vmo(self) -> Option<(TelemetryCloneInspectVmoResponder)> {
5710 if let TelemetryRequest::CloneInspectVmo { responder } = self {
5711 Some((responder))
5712 } else {
5713 None
5714 }
5715 }
5716
5717 pub fn method_name(&self) -> &'static str {
5719 match *self {
5720 TelemetryRequest::QueryTelemetrySupport { .. } => "query_telemetry_support",
5721 TelemetryRequest::GetIfaceStats { .. } => "get_iface_stats",
5722 TelemetryRequest::GetHistogramStats { .. } => "get_histogram_stats",
5723 TelemetryRequest::GetSignalReport { .. } => "get_signal_report",
5724 TelemetryRequest::CloneInspectVmo { .. } => "clone_inspect_vmo",
5725 }
5726 }
5727}
5728
5729#[derive(Debug, Clone)]
5730pub struct TelemetryControlHandle {
5731 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5732}
5733
5734impl fidl::endpoints::ControlHandle for TelemetryControlHandle {
5735 fn shutdown(&self) {
5736 self.inner.shutdown()
5737 }
5738
5739 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5740 self.inner.shutdown_with_epitaph(status)
5741 }
5742
5743 fn is_closed(&self) -> bool {
5744 self.inner.channel().is_closed()
5745 }
5746 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5747 self.inner.channel().on_closed()
5748 }
5749
5750 #[cfg(target_os = "fuchsia")]
5751 fn signal_peer(
5752 &self,
5753 clear_mask: zx::Signals,
5754 set_mask: zx::Signals,
5755 ) -> Result<(), zx_status::Status> {
5756 use fidl::Peered;
5757 self.inner.channel().signal_peer(clear_mask, set_mask)
5758 }
5759}
5760
5761impl TelemetryControlHandle {}
5762
5763#[must_use = "FIDL methods require a response to be sent"]
5764#[derive(Debug)]
5765pub struct TelemetryQueryTelemetrySupportResponder {
5766 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
5767 tx_id: u32,
5768}
5769
5770impl std::ops::Drop for TelemetryQueryTelemetrySupportResponder {
5774 fn drop(&mut self) {
5775 self.control_handle.shutdown();
5776 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5778 }
5779}
5780
5781impl fidl::endpoints::Responder for TelemetryQueryTelemetrySupportResponder {
5782 type ControlHandle = TelemetryControlHandle;
5783
5784 fn control_handle(&self) -> &TelemetryControlHandle {
5785 &self.control_handle
5786 }
5787
5788 fn drop_without_shutdown(mut self) {
5789 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5791 std::mem::forget(self);
5793 }
5794}
5795
5796impl TelemetryQueryTelemetrySupportResponder {
5797 pub fn send(
5801 self,
5802 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
5803 ) -> Result<(), fidl::Error> {
5804 let _result = self.send_raw(result);
5805 if _result.is_err() {
5806 self.control_handle.shutdown();
5807 }
5808 self.drop_without_shutdown();
5809 _result
5810 }
5811
5812 pub fn send_no_shutdown_on_err(
5814 self,
5815 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
5816 ) -> Result<(), fidl::Error> {
5817 let _result = self.send_raw(result);
5818 self.drop_without_shutdown();
5819 _result
5820 }
5821
5822 fn send_raw(
5823 &self,
5824 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
5825 ) -> Result<(), fidl::Error> {
5826 self.control_handle.inner.send::<fidl::encoding::ResultType<
5827 TelemetryQueryTelemetrySupportResponse,
5828 i32,
5829 >>(
5830 result.map(|resp| (resp,)),
5831 self.tx_id,
5832 0x69443ad35b204686,
5833 fidl::encoding::DynamicFlags::empty(),
5834 )
5835 }
5836}
5837
5838#[must_use = "FIDL methods require a response to be sent"]
5839#[derive(Debug)]
5840pub struct TelemetryGetIfaceStatsResponder {
5841 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
5842 tx_id: u32,
5843}
5844
5845impl std::ops::Drop for TelemetryGetIfaceStatsResponder {
5849 fn drop(&mut self) {
5850 self.control_handle.shutdown();
5851 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5853 }
5854}
5855
5856impl fidl::endpoints::Responder for TelemetryGetIfaceStatsResponder {
5857 type ControlHandle = TelemetryControlHandle;
5858
5859 fn control_handle(&self) -> &TelemetryControlHandle {
5860 &self.control_handle
5861 }
5862
5863 fn drop_without_shutdown(mut self) {
5864 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5866 std::mem::forget(self);
5868 }
5869}
5870
5871impl TelemetryGetIfaceStatsResponder {
5872 pub fn send(
5876 self,
5877 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceStats, i32>,
5878 ) -> Result<(), fidl::Error> {
5879 let _result = self.send_raw(result);
5880 if _result.is_err() {
5881 self.control_handle.shutdown();
5882 }
5883 self.drop_without_shutdown();
5884 _result
5885 }
5886
5887 pub fn send_no_shutdown_on_err(
5889 self,
5890 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceStats, i32>,
5891 ) -> Result<(), fidl::Error> {
5892 let _result = self.send_raw(result);
5893 self.drop_without_shutdown();
5894 _result
5895 }
5896
5897 fn send_raw(
5898 &self,
5899 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceStats, i32>,
5900 ) -> Result<(), fidl::Error> {
5901 self.control_handle
5902 .inner
5903 .send::<fidl::encoding::ResultType<TelemetryGetIfaceStatsResponse, i32>>(
5904 result.map(|stats| (stats,)),
5905 self.tx_id,
5906 0x6af057f3a017f572,
5907 fidl::encoding::DynamicFlags::empty(),
5908 )
5909 }
5910}
5911
5912#[must_use = "FIDL methods require a response to be sent"]
5913#[derive(Debug)]
5914pub struct TelemetryGetHistogramStatsResponder {
5915 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
5916 tx_id: u32,
5917}
5918
5919impl std::ops::Drop for TelemetryGetHistogramStatsResponder {
5923 fn drop(&mut self) {
5924 self.control_handle.shutdown();
5925 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5927 }
5928}
5929
5930impl fidl::endpoints::Responder for TelemetryGetHistogramStatsResponder {
5931 type ControlHandle = TelemetryControlHandle;
5932
5933 fn control_handle(&self) -> &TelemetryControlHandle {
5934 &self.control_handle
5935 }
5936
5937 fn drop_without_shutdown(mut self) {
5938 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5940 std::mem::forget(self);
5942 }
5943}
5944
5945impl TelemetryGetHistogramStatsResponder {
5946 pub fn send(
5950 self,
5951 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
5952 ) -> Result<(), fidl::Error> {
5953 let _result = self.send_raw(result);
5954 if _result.is_err() {
5955 self.control_handle.shutdown();
5956 }
5957 self.drop_without_shutdown();
5958 _result
5959 }
5960
5961 pub fn send_no_shutdown_on_err(
5963 self,
5964 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
5965 ) -> Result<(), fidl::Error> {
5966 let _result = self.send_raw(result);
5967 self.drop_without_shutdown();
5968 _result
5969 }
5970
5971 fn send_raw(
5972 &self,
5973 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
5974 ) -> Result<(), fidl::Error> {
5975 self.control_handle
5976 .inner
5977 .send::<fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>>(
5978 result.map(|stats| (stats,)),
5979 self.tx_id,
5980 0x46d2b6a23f764564,
5981 fidl::encoding::DynamicFlags::empty(),
5982 )
5983 }
5984}
5985
5986#[must_use = "FIDL methods require a response to be sent"]
5987#[derive(Debug)]
5988pub struct TelemetryGetSignalReportResponder {
5989 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
5990 tx_id: u32,
5991}
5992
5993impl std::ops::Drop for TelemetryGetSignalReportResponder {
5997 fn drop(&mut self) {
5998 self.control_handle.shutdown();
5999 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6001 }
6002}
6003
6004impl fidl::endpoints::Responder for TelemetryGetSignalReportResponder {
6005 type ControlHandle = TelemetryControlHandle;
6006
6007 fn control_handle(&self) -> &TelemetryControlHandle {
6008 &self.control_handle
6009 }
6010
6011 fn drop_without_shutdown(mut self) {
6012 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6014 std::mem::forget(self);
6016 }
6017}
6018
6019impl TelemetryGetSignalReportResponder {
6020 pub fn send(
6024 self,
6025 mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
6026 ) -> Result<(), fidl::Error> {
6027 let _result = self.send_raw(result);
6028 if _result.is_err() {
6029 self.control_handle.shutdown();
6030 }
6031 self.drop_without_shutdown();
6032 _result
6033 }
6034
6035 pub fn send_no_shutdown_on_err(
6037 self,
6038 mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
6039 ) -> Result<(), fidl::Error> {
6040 let _result = self.send_raw(result);
6041 self.drop_without_shutdown();
6042 _result
6043 }
6044
6045 fn send_raw(
6046 &self,
6047 mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
6048 ) -> Result<(), fidl::Error> {
6049 self.control_handle
6050 .inner
6051 .send::<fidl::encoding::ResultType<TelemetryGetSignalReportResponse, i32>>(
6052 result.map(|stats| (stats,)),
6053 self.tx_id,
6054 0x24133aeac3225e28,
6055 fidl::encoding::DynamicFlags::empty(),
6056 )
6057 }
6058}
6059
6060#[must_use = "FIDL methods require a response to be sent"]
6061#[derive(Debug)]
6062pub struct TelemetryCloneInspectVmoResponder {
6063 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
6064 tx_id: u32,
6065}
6066
6067impl std::ops::Drop for TelemetryCloneInspectVmoResponder {
6071 fn drop(&mut self) {
6072 self.control_handle.shutdown();
6073 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6075 }
6076}
6077
6078impl fidl::endpoints::Responder for TelemetryCloneInspectVmoResponder {
6079 type ControlHandle = TelemetryControlHandle;
6080
6081 fn control_handle(&self) -> &TelemetryControlHandle {
6082 &self.control_handle
6083 }
6084
6085 fn drop_without_shutdown(mut self) {
6086 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6088 std::mem::forget(self);
6090 }
6091}
6092
6093impl TelemetryCloneInspectVmoResponder {
6094 pub fn send(self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
6098 let _result = self.send_raw(result);
6099 if _result.is_err() {
6100 self.control_handle.shutdown();
6101 }
6102 self.drop_without_shutdown();
6103 _result
6104 }
6105
6106 pub fn send_no_shutdown_on_err(
6108 self,
6109 mut result: Result<fidl::Vmo, i32>,
6110 ) -> Result<(), fidl::Error> {
6111 let _result = self.send_raw(result);
6112 self.drop_without_shutdown();
6113 _result
6114 }
6115
6116 fn send_raw(&self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
6117 self.control_handle
6118 .inner
6119 .send::<fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>>(
6120 result.map(|inspect_vmo| (inspect_vmo,)),
6121 self.tx_id,
6122 0x47153917e84c5a21,
6123 fidl::encoding::DynamicFlags::empty(),
6124 )
6125 }
6126}
6127
6128#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6129pub struct UsmeBootstrapMarker;
6130
6131impl fidl::endpoints::ProtocolMarker for UsmeBootstrapMarker {
6132 type Proxy = UsmeBootstrapProxy;
6133 type RequestStream = UsmeBootstrapRequestStream;
6134 #[cfg(target_os = "fuchsia")]
6135 type SynchronousProxy = UsmeBootstrapSynchronousProxy;
6136
6137 const DEBUG_NAME: &'static str = "(anonymous) UsmeBootstrap";
6138}
6139
6140pub trait UsmeBootstrapProxyInterface: Send + Sync {
6141 type StartResponseFut: std::future::Future<Output = Result<fidl::Vmo, fidl::Error>> + Send;
6142 fn r#start(
6143 &self,
6144 generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
6145 legacy_privacy_support: &LegacyPrivacySupport,
6146 ) -> Self::StartResponseFut;
6147}
6148#[derive(Debug)]
6149#[cfg(target_os = "fuchsia")]
6150pub struct UsmeBootstrapSynchronousProxy {
6151 client: fidl::client::sync::Client,
6152}
6153
6154#[cfg(target_os = "fuchsia")]
6155impl fidl::endpoints::SynchronousProxy for UsmeBootstrapSynchronousProxy {
6156 type Proxy = UsmeBootstrapProxy;
6157 type Protocol = UsmeBootstrapMarker;
6158
6159 fn from_channel(inner: fidl::Channel) -> Self {
6160 Self::new(inner)
6161 }
6162
6163 fn into_channel(self) -> fidl::Channel {
6164 self.client.into_channel()
6165 }
6166
6167 fn as_channel(&self) -> &fidl::Channel {
6168 self.client.as_channel()
6169 }
6170}
6171
6172#[cfg(target_os = "fuchsia")]
6173impl UsmeBootstrapSynchronousProxy {
6174 pub fn new(channel: fidl::Channel) -> Self {
6175 Self { client: fidl::client::sync::Client::new(channel) }
6176 }
6177
6178 pub fn into_channel(self) -> fidl::Channel {
6179 self.client.into_channel()
6180 }
6181
6182 pub fn wait_for_event(
6185 &self,
6186 deadline: zx::MonotonicInstant,
6187 ) -> Result<UsmeBootstrapEvent, fidl::Error> {
6188 UsmeBootstrapEvent::decode(self.client.wait_for_event::<UsmeBootstrapMarker>(deadline)?)
6189 }
6190
6191 pub fn r#start(
6192 &self,
6193 mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
6194 mut legacy_privacy_support: &LegacyPrivacySupport,
6195 ___deadline: zx::MonotonicInstant,
6196 ) -> Result<fidl::Vmo, fidl::Error> {
6197 let _response = self.client.send_query::<
6198 UsmeBootstrapStartRequest,
6199 UsmeBootstrapStartResponse,
6200 UsmeBootstrapMarker,
6201 >(
6202 (generic_sme_server, legacy_privacy_support,),
6203 0x58850dfb76c29a0e,
6204 fidl::encoding::DynamicFlags::empty(),
6205 ___deadline,
6206 )?;
6207 Ok(_response.inspect_vmo)
6208 }
6209}
6210
6211#[cfg(target_os = "fuchsia")]
6212impl From<UsmeBootstrapSynchronousProxy> for zx::NullableHandle {
6213 fn from(value: UsmeBootstrapSynchronousProxy) -> Self {
6214 value.into_channel().into()
6215 }
6216}
6217
6218#[cfg(target_os = "fuchsia")]
6219impl From<fidl::Channel> for UsmeBootstrapSynchronousProxy {
6220 fn from(value: fidl::Channel) -> Self {
6221 Self::new(value)
6222 }
6223}
6224
6225#[cfg(target_os = "fuchsia")]
6226impl fidl::endpoints::FromClient for UsmeBootstrapSynchronousProxy {
6227 type Protocol = UsmeBootstrapMarker;
6228
6229 fn from_client(value: fidl::endpoints::ClientEnd<UsmeBootstrapMarker>) -> Self {
6230 Self::new(value.into_channel())
6231 }
6232}
6233
6234#[derive(Debug, Clone)]
6235pub struct UsmeBootstrapProxy {
6236 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6237}
6238
6239impl fidl::endpoints::Proxy for UsmeBootstrapProxy {
6240 type Protocol = UsmeBootstrapMarker;
6241
6242 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6243 Self::new(inner)
6244 }
6245
6246 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6247 self.client.into_channel().map_err(|client| Self { client })
6248 }
6249
6250 fn as_channel(&self) -> &::fidl::AsyncChannel {
6251 self.client.as_channel()
6252 }
6253}
6254
6255impl UsmeBootstrapProxy {
6256 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6258 let protocol_name = <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6259 Self { client: fidl::client::Client::new(channel, protocol_name) }
6260 }
6261
6262 pub fn take_event_stream(&self) -> UsmeBootstrapEventStream {
6268 UsmeBootstrapEventStream { event_receiver: self.client.take_event_receiver() }
6269 }
6270
6271 pub fn r#start(
6272 &self,
6273 mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
6274 mut legacy_privacy_support: &LegacyPrivacySupport,
6275 ) -> fidl::client::QueryResponseFut<fidl::Vmo, fidl::encoding::DefaultFuchsiaResourceDialect>
6276 {
6277 UsmeBootstrapProxyInterface::r#start(self, generic_sme_server, legacy_privacy_support)
6278 }
6279}
6280
6281impl UsmeBootstrapProxyInterface for UsmeBootstrapProxy {
6282 type StartResponseFut =
6283 fidl::client::QueryResponseFut<fidl::Vmo, fidl::encoding::DefaultFuchsiaResourceDialect>;
6284 fn r#start(
6285 &self,
6286 mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
6287 mut legacy_privacy_support: &LegacyPrivacySupport,
6288 ) -> Self::StartResponseFut {
6289 fn _decode(
6290 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6291 ) -> Result<fidl::Vmo, fidl::Error> {
6292 let _response = fidl::client::decode_transaction_body::<
6293 UsmeBootstrapStartResponse,
6294 fidl::encoding::DefaultFuchsiaResourceDialect,
6295 0x58850dfb76c29a0e,
6296 >(_buf?)?;
6297 Ok(_response.inspect_vmo)
6298 }
6299 self.client.send_query_and_decode::<UsmeBootstrapStartRequest, fidl::Vmo>(
6300 (generic_sme_server, legacy_privacy_support),
6301 0x58850dfb76c29a0e,
6302 fidl::encoding::DynamicFlags::empty(),
6303 _decode,
6304 )
6305 }
6306}
6307
6308pub struct UsmeBootstrapEventStream {
6309 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6310}
6311
6312impl std::marker::Unpin for UsmeBootstrapEventStream {}
6313
6314impl futures::stream::FusedStream for UsmeBootstrapEventStream {
6315 fn is_terminated(&self) -> bool {
6316 self.event_receiver.is_terminated()
6317 }
6318}
6319
6320impl futures::Stream for UsmeBootstrapEventStream {
6321 type Item = Result<UsmeBootstrapEvent, fidl::Error>;
6322
6323 fn poll_next(
6324 mut self: std::pin::Pin<&mut Self>,
6325 cx: &mut std::task::Context<'_>,
6326 ) -> std::task::Poll<Option<Self::Item>> {
6327 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6328 &mut self.event_receiver,
6329 cx
6330 )?) {
6331 Some(buf) => std::task::Poll::Ready(Some(UsmeBootstrapEvent::decode(buf))),
6332 None => std::task::Poll::Ready(None),
6333 }
6334 }
6335}
6336
6337#[derive(Debug)]
6338pub enum UsmeBootstrapEvent {}
6339
6340impl UsmeBootstrapEvent {
6341 fn decode(
6343 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6344 ) -> Result<UsmeBootstrapEvent, fidl::Error> {
6345 let (bytes, _handles) = buf.split_mut();
6346 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6347 debug_assert_eq!(tx_header.tx_id, 0);
6348 match tx_header.ordinal {
6349 _ => Err(fidl::Error::UnknownOrdinal {
6350 ordinal: tx_header.ordinal,
6351 protocol_name: <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6352 }),
6353 }
6354 }
6355}
6356
6357pub struct UsmeBootstrapRequestStream {
6359 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6360 is_terminated: bool,
6361}
6362
6363impl std::marker::Unpin for UsmeBootstrapRequestStream {}
6364
6365impl futures::stream::FusedStream for UsmeBootstrapRequestStream {
6366 fn is_terminated(&self) -> bool {
6367 self.is_terminated
6368 }
6369}
6370
6371impl fidl::endpoints::RequestStream for UsmeBootstrapRequestStream {
6372 type Protocol = UsmeBootstrapMarker;
6373 type ControlHandle = UsmeBootstrapControlHandle;
6374
6375 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6376 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6377 }
6378
6379 fn control_handle(&self) -> Self::ControlHandle {
6380 UsmeBootstrapControlHandle { inner: self.inner.clone() }
6381 }
6382
6383 fn into_inner(
6384 self,
6385 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6386 {
6387 (self.inner, self.is_terminated)
6388 }
6389
6390 fn from_inner(
6391 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6392 is_terminated: bool,
6393 ) -> Self {
6394 Self { inner, is_terminated }
6395 }
6396}
6397
6398impl futures::Stream for UsmeBootstrapRequestStream {
6399 type Item = Result<UsmeBootstrapRequest, fidl::Error>;
6400
6401 fn poll_next(
6402 mut self: std::pin::Pin<&mut Self>,
6403 cx: &mut std::task::Context<'_>,
6404 ) -> std::task::Poll<Option<Self::Item>> {
6405 let this = &mut *self;
6406 if this.inner.check_shutdown(cx) {
6407 this.is_terminated = true;
6408 return std::task::Poll::Ready(None);
6409 }
6410 if this.is_terminated {
6411 panic!("polled UsmeBootstrapRequestStream after completion");
6412 }
6413 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6414 |bytes, handles| {
6415 match this.inner.channel().read_etc(cx, bytes, handles) {
6416 std::task::Poll::Ready(Ok(())) => {}
6417 std::task::Poll::Pending => return std::task::Poll::Pending,
6418 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6419 this.is_terminated = true;
6420 return std::task::Poll::Ready(None);
6421 }
6422 std::task::Poll::Ready(Err(e)) => {
6423 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6424 e.into(),
6425 ))));
6426 }
6427 }
6428
6429 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6431
6432 std::task::Poll::Ready(Some(match header.ordinal {
6433 0x58850dfb76c29a0e => {
6434 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6435 let mut req = fidl::new_empty!(
6436 UsmeBootstrapStartRequest,
6437 fidl::encoding::DefaultFuchsiaResourceDialect
6438 );
6439 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UsmeBootstrapStartRequest>(&header, _body_bytes, handles, &mut req)?;
6440 let control_handle =
6441 UsmeBootstrapControlHandle { inner: this.inner.clone() };
6442 Ok(UsmeBootstrapRequest::Start {
6443 generic_sme_server: req.generic_sme_server,
6444 legacy_privacy_support: req.legacy_privacy_support,
6445
6446 responder: UsmeBootstrapStartResponder {
6447 control_handle: std::mem::ManuallyDrop::new(control_handle),
6448 tx_id: header.tx_id,
6449 },
6450 })
6451 }
6452 _ => Err(fidl::Error::UnknownOrdinal {
6453 ordinal: header.ordinal,
6454 protocol_name:
6455 <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6456 }),
6457 }))
6458 },
6459 )
6460 }
6461}
6462
6463#[derive(Debug)]
6464pub enum UsmeBootstrapRequest {
6465 Start {
6466 generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
6467 legacy_privacy_support: LegacyPrivacySupport,
6468 responder: UsmeBootstrapStartResponder,
6469 },
6470}
6471
6472impl UsmeBootstrapRequest {
6473 #[allow(irrefutable_let_patterns)]
6474 pub fn into_start(
6475 self,
6476 ) -> Option<(
6477 fidl::endpoints::ServerEnd<GenericSmeMarker>,
6478 LegacyPrivacySupport,
6479 UsmeBootstrapStartResponder,
6480 )> {
6481 if let UsmeBootstrapRequest::Start {
6482 generic_sme_server,
6483 legacy_privacy_support,
6484 responder,
6485 } = self
6486 {
6487 Some((generic_sme_server, legacy_privacy_support, responder))
6488 } else {
6489 None
6490 }
6491 }
6492
6493 pub fn method_name(&self) -> &'static str {
6495 match *self {
6496 UsmeBootstrapRequest::Start { .. } => "start",
6497 }
6498 }
6499}
6500
6501#[derive(Debug, Clone)]
6502pub struct UsmeBootstrapControlHandle {
6503 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6504}
6505
6506impl fidl::endpoints::ControlHandle for UsmeBootstrapControlHandle {
6507 fn shutdown(&self) {
6508 self.inner.shutdown()
6509 }
6510
6511 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6512 self.inner.shutdown_with_epitaph(status)
6513 }
6514
6515 fn is_closed(&self) -> bool {
6516 self.inner.channel().is_closed()
6517 }
6518 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6519 self.inner.channel().on_closed()
6520 }
6521
6522 #[cfg(target_os = "fuchsia")]
6523 fn signal_peer(
6524 &self,
6525 clear_mask: zx::Signals,
6526 set_mask: zx::Signals,
6527 ) -> Result<(), zx_status::Status> {
6528 use fidl::Peered;
6529 self.inner.channel().signal_peer(clear_mask, set_mask)
6530 }
6531}
6532
6533impl UsmeBootstrapControlHandle {}
6534
6535#[must_use = "FIDL methods require a response to be sent"]
6536#[derive(Debug)]
6537pub struct UsmeBootstrapStartResponder {
6538 control_handle: std::mem::ManuallyDrop<UsmeBootstrapControlHandle>,
6539 tx_id: u32,
6540}
6541
6542impl std::ops::Drop for UsmeBootstrapStartResponder {
6546 fn drop(&mut self) {
6547 self.control_handle.shutdown();
6548 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6550 }
6551}
6552
6553impl fidl::endpoints::Responder for UsmeBootstrapStartResponder {
6554 type ControlHandle = UsmeBootstrapControlHandle;
6555
6556 fn control_handle(&self) -> &UsmeBootstrapControlHandle {
6557 &self.control_handle
6558 }
6559
6560 fn drop_without_shutdown(mut self) {
6561 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6563 std::mem::forget(self);
6565 }
6566}
6567
6568impl UsmeBootstrapStartResponder {
6569 pub fn send(self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
6573 let _result = self.send_raw(inspect_vmo);
6574 if _result.is_err() {
6575 self.control_handle.shutdown();
6576 }
6577 self.drop_without_shutdown();
6578 _result
6579 }
6580
6581 pub fn send_no_shutdown_on_err(self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
6583 let _result = self.send_raw(inspect_vmo);
6584 self.drop_without_shutdown();
6585 _result
6586 }
6587
6588 fn send_raw(&self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
6589 self.control_handle.inner.send::<UsmeBootstrapStartResponse>(
6590 (inspect_vmo,),
6591 self.tx_id,
6592 0x58850dfb76c29a0e,
6593 fidl::encoding::DynamicFlags::empty(),
6594 )
6595 }
6596}
6597
6598mod internal {
6599 use super::*;
6600
6601 impl fidl::encoding::ResourceTypeMarker for ClientSmeConnectRequest {
6602 type Borrowed<'a> = &'a mut Self;
6603 fn take_or_borrow<'a>(
6604 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6605 ) -> Self::Borrowed<'a> {
6606 value
6607 }
6608 }
6609
6610 unsafe impl fidl::encoding::TypeMarker for ClientSmeConnectRequest {
6611 type Owned = Self;
6612
6613 #[inline(always)]
6614 fn inline_align(_context: fidl::encoding::Context) -> usize {
6615 8
6616 }
6617
6618 #[inline(always)]
6619 fn inline_size(_context: fidl::encoding::Context) -> usize {
6620 112
6621 }
6622 }
6623
6624 unsafe impl
6625 fidl::encoding::Encode<
6626 ClientSmeConnectRequest,
6627 fidl::encoding::DefaultFuchsiaResourceDialect,
6628 > for &mut ClientSmeConnectRequest
6629 {
6630 #[inline]
6631 unsafe fn encode(
6632 self,
6633 encoder: &mut fidl::encoding::Encoder<
6634 '_,
6635 fidl::encoding::DefaultFuchsiaResourceDialect,
6636 >,
6637 offset: usize,
6638 _depth: fidl::encoding::Depth,
6639 ) -> fidl::Result<()> {
6640 encoder.debug_check_bounds::<ClientSmeConnectRequest>(offset);
6641 fidl::encoding::Encode::<
6643 ClientSmeConnectRequest,
6644 fidl::encoding::DefaultFuchsiaResourceDialect,
6645 >::encode(
6646 (
6647 <ConnectRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),
6648 <fidl::encoding::Optional<
6649 fidl::encoding::Endpoint<
6650 fidl::endpoints::ServerEnd<ConnectTransactionMarker>,
6651 >,
6652 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6653 &mut self.txn
6654 ),
6655 ),
6656 encoder,
6657 offset,
6658 _depth,
6659 )
6660 }
6661 }
6662 unsafe impl<
6663 T0: fidl::encoding::Encode<ConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
6664 T1: fidl::encoding::Encode<
6665 fidl::encoding::Optional<
6666 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
6667 >,
6668 fidl::encoding::DefaultFuchsiaResourceDialect,
6669 >,
6670 >
6671 fidl::encoding::Encode<
6672 ClientSmeConnectRequest,
6673 fidl::encoding::DefaultFuchsiaResourceDialect,
6674 > for (T0, T1)
6675 {
6676 #[inline]
6677 unsafe fn encode(
6678 self,
6679 encoder: &mut fidl::encoding::Encoder<
6680 '_,
6681 fidl::encoding::DefaultFuchsiaResourceDialect,
6682 >,
6683 offset: usize,
6684 depth: fidl::encoding::Depth,
6685 ) -> fidl::Result<()> {
6686 encoder.debug_check_bounds::<ClientSmeConnectRequest>(offset);
6687 unsafe {
6690 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(104);
6691 (ptr as *mut u64).write_unaligned(0);
6692 }
6693 self.0.encode(encoder, offset + 0, depth)?;
6695 self.1.encode(encoder, offset + 104, depth)?;
6696 Ok(())
6697 }
6698 }
6699
6700 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6701 for ClientSmeConnectRequest
6702 {
6703 #[inline(always)]
6704 fn new_empty() -> Self {
6705 Self {
6706 req: fidl::new_empty!(
6707 ConnectRequest,
6708 fidl::encoding::DefaultFuchsiaResourceDialect
6709 ),
6710 txn: fidl::new_empty!(
6711 fidl::encoding::Optional<
6712 fidl::encoding::Endpoint<
6713 fidl::endpoints::ServerEnd<ConnectTransactionMarker>,
6714 >,
6715 >,
6716 fidl::encoding::DefaultFuchsiaResourceDialect
6717 ),
6718 }
6719 }
6720
6721 #[inline]
6722 unsafe fn decode(
6723 &mut self,
6724 decoder: &mut fidl::encoding::Decoder<
6725 '_,
6726 fidl::encoding::DefaultFuchsiaResourceDialect,
6727 >,
6728 offset: usize,
6729 _depth: fidl::encoding::Depth,
6730 ) -> fidl::Result<()> {
6731 decoder.debug_check_bounds::<Self>(offset);
6732 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(104) };
6734 let padval = unsafe { (ptr as *const u64).read_unaligned() };
6735 let mask = 0xffffffff00000000u64;
6736 let maskedval = padval & mask;
6737 if maskedval != 0 {
6738 return Err(fidl::Error::NonZeroPadding {
6739 padding_start: offset + 104 + ((mask as u64).trailing_zeros() / 8) as usize,
6740 });
6741 }
6742 fidl::decode!(
6743 ConnectRequest,
6744 fidl::encoding::DefaultFuchsiaResourceDialect,
6745 &mut self.req,
6746 decoder,
6747 offset + 0,
6748 _depth
6749 )?;
6750 fidl::decode!(
6751 fidl::encoding::Optional<
6752 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
6753 >,
6754 fidl::encoding::DefaultFuchsiaResourceDialect,
6755 &mut self.txn,
6756 decoder,
6757 offset + 104,
6758 _depth
6759 )?;
6760 Ok(())
6761 }
6762 }
6763
6764 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanForControllerRequest {
6765 type Borrowed<'a> = &'a mut Self;
6766 fn take_or_borrow<'a>(
6767 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6768 ) -> Self::Borrowed<'a> {
6769 value
6770 }
6771 }
6772
6773 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanForControllerRequest {
6774 type Owned = Self;
6775
6776 #[inline(always)]
6777 fn inline_align(_context: fidl::encoding::Context) -> usize {
6778 8
6779 }
6780
6781 #[inline(always)]
6782 fn inline_size(_context: fidl::encoding::Context) -> usize {
6783 16
6784 }
6785 }
6786
6787 unsafe impl
6788 fidl::encoding::Encode<
6789 ClientSmeScanForControllerRequest,
6790 fidl::encoding::DefaultFuchsiaResourceDialect,
6791 > for &mut ClientSmeScanForControllerRequest
6792 {
6793 #[inline]
6794 unsafe fn encode(
6795 self,
6796 encoder: &mut fidl::encoding::Encoder<
6797 '_,
6798 fidl::encoding::DefaultFuchsiaResourceDialect,
6799 >,
6800 offset: usize,
6801 _depth: fidl::encoding::Depth,
6802 ) -> fidl::Result<()> {
6803 encoder.debug_check_bounds::<ClientSmeScanForControllerRequest>(offset);
6804 fidl::encoding::Encode::<
6806 ClientSmeScanForControllerRequest,
6807 fidl::encoding::DefaultFuchsiaResourceDialect,
6808 >::encode(
6809 (<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
6810 encoder,
6811 offset,
6812 _depth,
6813 )
6814 }
6815 }
6816 unsafe impl<
6817 T0: fidl::encoding::Encode<ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
6818 >
6819 fidl::encoding::Encode<
6820 ClientSmeScanForControllerRequest,
6821 fidl::encoding::DefaultFuchsiaResourceDialect,
6822 > for (T0,)
6823 {
6824 #[inline]
6825 unsafe fn encode(
6826 self,
6827 encoder: &mut fidl::encoding::Encoder<
6828 '_,
6829 fidl::encoding::DefaultFuchsiaResourceDialect,
6830 >,
6831 offset: usize,
6832 depth: fidl::encoding::Depth,
6833 ) -> fidl::Result<()> {
6834 encoder.debug_check_bounds::<ClientSmeScanForControllerRequest>(offset);
6835 self.0.encode(encoder, offset + 0, depth)?;
6839 Ok(())
6840 }
6841 }
6842
6843 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6844 for ClientSmeScanForControllerRequest
6845 {
6846 #[inline(always)]
6847 fn new_empty() -> Self {
6848 Self {
6849 req: fidl::new_empty!(ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect),
6850 }
6851 }
6852
6853 #[inline]
6854 unsafe fn decode(
6855 &mut self,
6856 decoder: &mut fidl::encoding::Decoder<
6857 '_,
6858 fidl::encoding::DefaultFuchsiaResourceDialect,
6859 >,
6860 offset: usize,
6861 _depth: fidl::encoding::Depth,
6862 ) -> fidl::Result<()> {
6863 decoder.debug_check_bounds::<Self>(offset);
6864 fidl::decode!(
6866 ScanRequest,
6867 fidl::encoding::DefaultFuchsiaResourceDialect,
6868 &mut self.req,
6869 decoder,
6870 offset + 0,
6871 _depth
6872 )?;
6873 Ok(())
6874 }
6875 }
6876
6877 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanRequest {
6878 type Borrowed<'a> = &'a mut Self;
6879 fn take_or_borrow<'a>(
6880 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6881 ) -> Self::Borrowed<'a> {
6882 value
6883 }
6884 }
6885
6886 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanRequest {
6887 type Owned = Self;
6888
6889 #[inline(always)]
6890 fn inline_align(_context: fidl::encoding::Context) -> usize {
6891 8
6892 }
6893
6894 #[inline(always)]
6895 fn inline_size(_context: fidl::encoding::Context) -> usize {
6896 16
6897 }
6898 }
6899
6900 unsafe impl
6901 fidl::encoding::Encode<ClientSmeScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
6902 for &mut ClientSmeScanRequest
6903 {
6904 #[inline]
6905 unsafe fn encode(
6906 self,
6907 encoder: &mut fidl::encoding::Encoder<
6908 '_,
6909 fidl::encoding::DefaultFuchsiaResourceDialect,
6910 >,
6911 offset: usize,
6912 _depth: fidl::encoding::Depth,
6913 ) -> fidl::Result<()> {
6914 encoder.debug_check_bounds::<ClientSmeScanRequest>(offset);
6915 fidl::encoding::Encode::<
6917 ClientSmeScanRequest,
6918 fidl::encoding::DefaultFuchsiaResourceDialect,
6919 >::encode(
6920 (<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
6921 encoder,
6922 offset,
6923 _depth,
6924 )
6925 }
6926 }
6927 unsafe impl<
6928 T0: fidl::encoding::Encode<ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
6929 >
6930 fidl::encoding::Encode<ClientSmeScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
6931 for (T0,)
6932 {
6933 #[inline]
6934 unsafe fn encode(
6935 self,
6936 encoder: &mut fidl::encoding::Encoder<
6937 '_,
6938 fidl::encoding::DefaultFuchsiaResourceDialect,
6939 >,
6940 offset: usize,
6941 depth: fidl::encoding::Depth,
6942 ) -> fidl::Result<()> {
6943 encoder.debug_check_bounds::<ClientSmeScanRequest>(offset);
6944 self.0.encode(encoder, offset + 0, depth)?;
6948 Ok(())
6949 }
6950 }
6951
6952 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6953 for ClientSmeScanRequest
6954 {
6955 #[inline(always)]
6956 fn new_empty() -> Self {
6957 Self {
6958 req: fidl::new_empty!(ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect),
6959 }
6960 }
6961
6962 #[inline]
6963 unsafe fn decode(
6964 &mut self,
6965 decoder: &mut fidl::encoding::Decoder<
6966 '_,
6967 fidl::encoding::DefaultFuchsiaResourceDialect,
6968 >,
6969 offset: usize,
6970 _depth: fidl::encoding::Depth,
6971 ) -> fidl::Result<()> {
6972 decoder.debug_check_bounds::<Self>(offset);
6973 fidl::decode!(
6975 ScanRequest,
6976 fidl::encoding::DefaultFuchsiaResourceDialect,
6977 &mut self.req,
6978 decoder,
6979 offset + 0,
6980 _depth
6981 )?;
6982 Ok(())
6983 }
6984 }
6985
6986 impl fidl::encoding::ResourceTypeMarker for ClientSmeStartScheduledScanRequest {
6987 type Borrowed<'a> = &'a mut Self;
6988 fn take_or_borrow<'a>(
6989 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6990 ) -> Self::Borrowed<'a> {
6991 value
6992 }
6993 }
6994
6995 unsafe impl fidl::encoding::TypeMarker for ClientSmeStartScheduledScanRequest {
6996 type Owned = Self;
6997
6998 #[inline(always)]
6999 fn inline_align(_context: fidl::encoding::Context) -> usize {
7000 8
7001 }
7002
7003 #[inline(always)]
7004 fn inline_size(_context: fidl::encoding::Context) -> usize {
7005 24
7006 }
7007 }
7008
7009 unsafe impl
7010 fidl::encoding::Encode<
7011 ClientSmeStartScheduledScanRequest,
7012 fidl::encoding::DefaultFuchsiaResourceDialect,
7013 > for &mut ClientSmeStartScheduledScanRequest
7014 {
7015 #[inline]
7016 unsafe fn encode(
7017 self,
7018 encoder: &mut fidl::encoding::Encoder<
7019 '_,
7020 fidl::encoding::DefaultFuchsiaResourceDialect,
7021 >,
7022 offset: usize,
7023 _depth: fidl::encoding::Depth,
7024 ) -> fidl::Result<()> {
7025 encoder.debug_check_bounds::<ClientSmeStartScheduledScanRequest>(offset);
7026 fidl::encoding::Encode::<ClientSmeStartScheduledScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7028 (
7029 <fidl_fuchsia_wlan_common::ScheduledScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),
7030 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.txn),
7031 ),
7032 encoder, offset, _depth
7033 )
7034 }
7035 }
7036 unsafe impl<
7037 T0: fidl::encoding::Encode<
7038 fidl_fuchsia_wlan_common::ScheduledScanRequest,
7039 fidl::encoding::DefaultFuchsiaResourceDialect,
7040 >,
7041 T1: fidl::encoding::Encode<
7042 fidl::encoding::Endpoint<
7043 fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
7044 >,
7045 fidl::encoding::DefaultFuchsiaResourceDialect,
7046 >,
7047 >
7048 fidl::encoding::Encode<
7049 ClientSmeStartScheduledScanRequest,
7050 fidl::encoding::DefaultFuchsiaResourceDialect,
7051 > for (T0, T1)
7052 {
7053 #[inline]
7054 unsafe fn encode(
7055 self,
7056 encoder: &mut fidl::encoding::Encoder<
7057 '_,
7058 fidl::encoding::DefaultFuchsiaResourceDialect,
7059 >,
7060 offset: usize,
7061 depth: fidl::encoding::Depth,
7062 ) -> fidl::Result<()> {
7063 encoder.debug_check_bounds::<ClientSmeStartScheduledScanRequest>(offset);
7064 unsafe {
7067 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
7068 (ptr as *mut u64).write_unaligned(0);
7069 }
7070 self.0.encode(encoder, offset + 0, depth)?;
7072 self.1.encode(encoder, offset + 16, depth)?;
7073 Ok(())
7074 }
7075 }
7076
7077 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7078 for ClientSmeStartScheduledScanRequest
7079 {
7080 #[inline(always)]
7081 fn new_empty() -> Self {
7082 Self {
7083 req: fidl::new_empty!(
7084 fidl_fuchsia_wlan_common::ScheduledScanRequest,
7085 fidl::encoding::DefaultFuchsiaResourceDialect
7086 ),
7087 txn: fidl::new_empty!(
7088 fidl::encoding::Endpoint<
7089 fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
7090 >,
7091 fidl::encoding::DefaultFuchsiaResourceDialect
7092 ),
7093 }
7094 }
7095
7096 #[inline]
7097 unsafe fn decode(
7098 &mut self,
7099 decoder: &mut fidl::encoding::Decoder<
7100 '_,
7101 fidl::encoding::DefaultFuchsiaResourceDialect,
7102 >,
7103 offset: usize,
7104 _depth: fidl::encoding::Depth,
7105 ) -> fidl::Result<()> {
7106 decoder.debug_check_bounds::<Self>(offset);
7107 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
7109 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7110 let mask = 0xffffffff00000000u64;
7111 let maskedval = padval & mask;
7112 if maskedval != 0 {
7113 return Err(fidl::Error::NonZeroPadding {
7114 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
7115 });
7116 }
7117 fidl::decode!(
7118 fidl_fuchsia_wlan_common::ScheduledScanRequest,
7119 fidl::encoding::DefaultFuchsiaResourceDialect,
7120 &mut self.req,
7121 decoder,
7122 offset + 0,
7123 _depth
7124 )?;
7125 fidl::decode!(
7126 fidl::encoding::Endpoint<
7127 fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
7128 >,
7129 fidl::encoding::DefaultFuchsiaResourceDialect,
7130 &mut self.txn,
7131 decoder,
7132 offset + 16,
7133 _depth
7134 )?;
7135 Ok(())
7136 }
7137 }
7138
7139 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanForControllerResponse {
7140 type Borrowed<'a> = &'a mut Self;
7141 fn take_or_borrow<'a>(
7142 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7143 ) -> Self::Borrowed<'a> {
7144 value
7145 }
7146 }
7147
7148 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanForControllerResponse {
7149 type Owned = Self;
7150
7151 #[inline(always)]
7152 fn inline_align(_context: fidl::encoding::Context) -> usize {
7153 8
7154 }
7155
7156 #[inline(always)]
7157 fn inline_size(_context: fidl::encoding::Context) -> usize {
7158 16
7159 }
7160 }
7161
7162 unsafe impl
7163 fidl::encoding::Encode<
7164 ClientSmeScanForControllerResponse,
7165 fidl::encoding::DefaultFuchsiaResourceDialect,
7166 > for &mut ClientSmeScanForControllerResponse
7167 {
7168 #[inline]
7169 unsafe fn encode(
7170 self,
7171 encoder: &mut fidl::encoding::Encoder<
7172 '_,
7173 fidl::encoding::DefaultFuchsiaResourceDialect,
7174 >,
7175 offset: usize,
7176 _depth: fidl::encoding::Depth,
7177 ) -> fidl::Result<()> {
7178 encoder.debug_check_bounds::<ClientSmeScanForControllerResponse>(offset);
7179 fidl::encoding::Encode::<ClientSmeScanForControllerResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7181 (
7182 <fidl::encoding::UnboundedVector<ScanResult> as fidl::encoding::ValueTypeMarker>::borrow(&self.scan_results),
7183 ),
7184 encoder, offset, _depth
7185 )
7186 }
7187 }
7188 unsafe impl<
7189 T0: fidl::encoding::Encode<
7190 fidl::encoding::UnboundedVector<ScanResult>,
7191 fidl::encoding::DefaultFuchsiaResourceDialect,
7192 >,
7193 >
7194 fidl::encoding::Encode<
7195 ClientSmeScanForControllerResponse,
7196 fidl::encoding::DefaultFuchsiaResourceDialect,
7197 > for (T0,)
7198 {
7199 #[inline]
7200 unsafe fn encode(
7201 self,
7202 encoder: &mut fidl::encoding::Encoder<
7203 '_,
7204 fidl::encoding::DefaultFuchsiaResourceDialect,
7205 >,
7206 offset: usize,
7207 depth: fidl::encoding::Depth,
7208 ) -> fidl::Result<()> {
7209 encoder.debug_check_bounds::<ClientSmeScanForControllerResponse>(offset);
7210 self.0.encode(encoder, offset + 0, depth)?;
7214 Ok(())
7215 }
7216 }
7217
7218 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7219 for ClientSmeScanForControllerResponse
7220 {
7221 #[inline(always)]
7222 fn new_empty() -> Self {
7223 Self {
7224 scan_results: fidl::new_empty!(
7225 fidl::encoding::UnboundedVector<ScanResult>,
7226 fidl::encoding::DefaultFuchsiaResourceDialect
7227 ),
7228 }
7229 }
7230
7231 #[inline]
7232 unsafe fn decode(
7233 &mut self,
7234 decoder: &mut fidl::encoding::Decoder<
7235 '_,
7236 fidl::encoding::DefaultFuchsiaResourceDialect,
7237 >,
7238 offset: usize,
7239 _depth: fidl::encoding::Depth,
7240 ) -> fidl::Result<()> {
7241 decoder.debug_check_bounds::<Self>(offset);
7242 fidl::decode!(
7244 fidl::encoding::UnboundedVector<ScanResult>,
7245 fidl::encoding::DefaultFuchsiaResourceDialect,
7246 &mut self.scan_results,
7247 decoder,
7248 offset + 0,
7249 _depth
7250 )?;
7251 Ok(())
7252 }
7253 }
7254
7255 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanResponse {
7256 type Borrowed<'a> = &'a mut Self;
7257 fn take_or_borrow<'a>(
7258 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7259 ) -> Self::Borrowed<'a> {
7260 value
7261 }
7262 }
7263
7264 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanResponse {
7265 type Owned = Self;
7266
7267 #[inline(always)]
7268 fn inline_align(_context: fidl::encoding::Context) -> usize {
7269 4
7270 }
7271
7272 #[inline(always)]
7273 fn inline_size(_context: fidl::encoding::Context) -> usize {
7274 4
7275 }
7276 }
7277
7278 unsafe impl
7279 fidl::encoding::Encode<ClientSmeScanResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
7280 for &mut ClientSmeScanResponse
7281 {
7282 #[inline]
7283 unsafe fn encode(
7284 self,
7285 encoder: &mut fidl::encoding::Encoder<
7286 '_,
7287 fidl::encoding::DefaultFuchsiaResourceDialect,
7288 >,
7289 offset: usize,
7290 _depth: fidl::encoding::Depth,
7291 ) -> fidl::Result<()> {
7292 encoder.debug_check_bounds::<ClientSmeScanResponse>(offset);
7293 fidl::encoding::Encode::<
7295 ClientSmeScanResponse,
7296 fidl::encoding::DefaultFuchsiaResourceDialect,
7297 >::encode(
7298 (<fidl::encoding::HandleType<
7299 fidl::Vmo,
7300 { fidl::ObjectType::VMO.into_raw() },
7301 2147483648,
7302 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7303 &mut self.scan_results
7304 ),),
7305 encoder,
7306 offset,
7307 _depth,
7308 )
7309 }
7310 }
7311 unsafe impl<
7312 T0: fidl::encoding::Encode<
7313 fidl::encoding::HandleType<
7314 fidl::Vmo,
7315 { fidl::ObjectType::VMO.into_raw() },
7316 2147483648,
7317 >,
7318 fidl::encoding::DefaultFuchsiaResourceDialect,
7319 >,
7320 >
7321 fidl::encoding::Encode<ClientSmeScanResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
7322 for (T0,)
7323 {
7324 #[inline]
7325 unsafe fn encode(
7326 self,
7327 encoder: &mut fidl::encoding::Encoder<
7328 '_,
7329 fidl::encoding::DefaultFuchsiaResourceDialect,
7330 >,
7331 offset: usize,
7332 depth: fidl::encoding::Depth,
7333 ) -> fidl::Result<()> {
7334 encoder.debug_check_bounds::<ClientSmeScanResponse>(offset);
7335 self.0.encode(encoder, offset + 0, depth)?;
7339 Ok(())
7340 }
7341 }
7342
7343 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7344 for ClientSmeScanResponse
7345 {
7346 #[inline(always)]
7347 fn new_empty() -> Self {
7348 Self {
7349 scan_results: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7350 }
7351 }
7352
7353 #[inline]
7354 unsafe fn decode(
7355 &mut self,
7356 decoder: &mut fidl::encoding::Decoder<
7357 '_,
7358 fidl::encoding::DefaultFuchsiaResourceDialect,
7359 >,
7360 offset: usize,
7361 _depth: fidl::encoding::Depth,
7362 ) -> fidl::Result<()> {
7363 decoder.debug_check_bounds::<Self>(offset);
7364 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.scan_results, decoder, offset + 0, _depth)?;
7366 Ok(())
7367 }
7368 }
7369
7370 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetApSmeRequest {
7371 type Borrowed<'a> = &'a mut Self;
7372 fn take_or_borrow<'a>(
7373 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7374 ) -> Self::Borrowed<'a> {
7375 value
7376 }
7377 }
7378
7379 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetApSmeRequest {
7380 type Owned = Self;
7381
7382 #[inline(always)]
7383 fn inline_align(_context: fidl::encoding::Context) -> usize {
7384 4
7385 }
7386
7387 #[inline(always)]
7388 fn inline_size(_context: fidl::encoding::Context) -> usize {
7389 4
7390 }
7391 }
7392
7393 unsafe impl
7394 fidl::encoding::Encode<
7395 GenericSmeGetApSmeRequest,
7396 fidl::encoding::DefaultFuchsiaResourceDialect,
7397 > for &mut GenericSmeGetApSmeRequest
7398 {
7399 #[inline]
7400 unsafe fn encode(
7401 self,
7402 encoder: &mut fidl::encoding::Encoder<
7403 '_,
7404 fidl::encoding::DefaultFuchsiaResourceDialect,
7405 >,
7406 offset: usize,
7407 _depth: fidl::encoding::Depth,
7408 ) -> fidl::Result<()> {
7409 encoder.debug_check_bounds::<GenericSmeGetApSmeRequest>(offset);
7410 fidl::encoding::Encode::<GenericSmeGetApSmeRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7412 (
7413 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sme_server),
7414 ),
7415 encoder, offset, _depth
7416 )
7417 }
7418 }
7419 unsafe impl<
7420 T0: fidl::encoding::Encode<
7421 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
7422 fidl::encoding::DefaultFuchsiaResourceDialect,
7423 >,
7424 >
7425 fidl::encoding::Encode<
7426 GenericSmeGetApSmeRequest,
7427 fidl::encoding::DefaultFuchsiaResourceDialect,
7428 > for (T0,)
7429 {
7430 #[inline]
7431 unsafe fn encode(
7432 self,
7433 encoder: &mut fidl::encoding::Encoder<
7434 '_,
7435 fidl::encoding::DefaultFuchsiaResourceDialect,
7436 >,
7437 offset: usize,
7438 depth: fidl::encoding::Depth,
7439 ) -> fidl::Result<()> {
7440 encoder.debug_check_bounds::<GenericSmeGetApSmeRequest>(offset);
7441 self.0.encode(encoder, offset + 0, depth)?;
7445 Ok(())
7446 }
7447 }
7448
7449 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7450 for GenericSmeGetApSmeRequest
7451 {
7452 #[inline(always)]
7453 fn new_empty() -> Self {
7454 Self {
7455 sme_server: fidl::new_empty!(
7456 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
7457 fidl::encoding::DefaultFuchsiaResourceDialect
7458 ),
7459 }
7460 }
7461
7462 #[inline]
7463 unsafe fn decode(
7464 &mut self,
7465 decoder: &mut fidl::encoding::Decoder<
7466 '_,
7467 fidl::encoding::DefaultFuchsiaResourceDialect,
7468 >,
7469 offset: usize,
7470 _depth: fidl::encoding::Depth,
7471 ) -> fidl::Result<()> {
7472 decoder.debug_check_bounds::<Self>(offset);
7473 fidl::decode!(
7475 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
7476 fidl::encoding::DefaultFuchsiaResourceDialect,
7477 &mut self.sme_server,
7478 decoder,
7479 offset + 0,
7480 _depth
7481 )?;
7482 Ok(())
7483 }
7484 }
7485
7486 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetClientSmeRequest {
7487 type Borrowed<'a> = &'a mut Self;
7488 fn take_or_borrow<'a>(
7489 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7490 ) -> Self::Borrowed<'a> {
7491 value
7492 }
7493 }
7494
7495 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetClientSmeRequest {
7496 type Owned = Self;
7497
7498 #[inline(always)]
7499 fn inline_align(_context: fidl::encoding::Context) -> usize {
7500 4
7501 }
7502
7503 #[inline(always)]
7504 fn inline_size(_context: fidl::encoding::Context) -> usize {
7505 4
7506 }
7507 }
7508
7509 unsafe impl
7510 fidl::encoding::Encode<
7511 GenericSmeGetClientSmeRequest,
7512 fidl::encoding::DefaultFuchsiaResourceDialect,
7513 > for &mut GenericSmeGetClientSmeRequest
7514 {
7515 #[inline]
7516 unsafe fn encode(
7517 self,
7518 encoder: &mut fidl::encoding::Encoder<
7519 '_,
7520 fidl::encoding::DefaultFuchsiaResourceDialect,
7521 >,
7522 offset: usize,
7523 _depth: fidl::encoding::Depth,
7524 ) -> fidl::Result<()> {
7525 encoder.debug_check_bounds::<GenericSmeGetClientSmeRequest>(offset);
7526 fidl::encoding::Encode::<GenericSmeGetClientSmeRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7528 (
7529 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sme_server),
7530 ),
7531 encoder, offset, _depth
7532 )
7533 }
7534 }
7535 unsafe impl<
7536 T0: fidl::encoding::Encode<
7537 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
7538 fidl::encoding::DefaultFuchsiaResourceDialect,
7539 >,
7540 >
7541 fidl::encoding::Encode<
7542 GenericSmeGetClientSmeRequest,
7543 fidl::encoding::DefaultFuchsiaResourceDialect,
7544 > for (T0,)
7545 {
7546 #[inline]
7547 unsafe fn encode(
7548 self,
7549 encoder: &mut fidl::encoding::Encoder<
7550 '_,
7551 fidl::encoding::DefaultFuchsiaResourceDialect,
7552 >,
7553 offset: usize,
7554 depth: fidl::encoding::Depth,
7555 ) -> fidl::Result<()> {
7556 encoder.debug_check_bounds::<GenericSmeGetClientSmeRequest>(offset);
7557 self.0.encode(encoder, offset + 0, depth)?;
7561 Ok(())
7562 }
7563 }
7564
7565 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7566 for GenericSmeGetClientSmeRequest
7567 {
7568 #[inline(always)]
7569 fn new_empty() -> Self {
7570 Self {
7571 sme_server: fidl::new_empty!(
7572 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
7573 fidl::encoding::DefaultFuchsiaResourceDialect
7574 ),
7575 }
7576 }
7577
7578 #[inline]
7579 unsafe fn decode(
7580 &mut self,
7581 decoder: &mut fidl::encoding::Decoder<
7582 '_,
7583 fidl::encoding::DefaultFuchsiaResourceDialect,
7584 >,
7585 offset: usize,
7586 _depth: fidl::encoding::Depth,
7587 ) -> fidl::Result<()> {
7588 decoder.debug_check_bounds::<Self>(offset);
7589 fidl::decode!(
7591 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
7592 fidl::encoding::DefaultFuchsiaResourceDialect,
7593 &mut self.sme_server,
7594 decoder,
7595 offset + 0,
7596 _depth
7597 )?;
7598 Ok(())
7599 }
7600 }
7601
7602 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetSmeTelemetryRequest {
7603 type Borrowed<'a> = &'a mut Self;
7604 fn take_or_borrow<'a>(
7605 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7606 ) -> Self::Borrowed<'a> {
7607 value
7608 }
7609 }
7610
7611 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetSmeTelemetryRequest {
7612 type Owned = Self;
7613
7614 #[inline(always)]
7615 fn inline_align(_context: fidl::encoding::Context) -> usize {
7616 4
7617 }
7618
7619 #[inline(always)]
7620 fn inline_size(_context: fidl::encoding::Context) -> usize {
7621 4
7622 }
7623 }
7624
7625 unsafe impl
7626 fidl::encoding::Encode<
7627 GenericSmeGetSmeTelemetryRequest,
7628 fidl::encoding::DefaultFuchsiaResourceDialect,
7629 > for &mut GenericSmeGetSmeTelemetryRequest
7630 {
7631 #[inline]
7632 unsafe fn encode(
7633 self,
7634 encoder: &mut fidl::encoding::Encoder<
7635 '_,
7636 fidl::encoding::DefaultFuchsiaResourceDialect,
7637 >,
7638 offset: usize,
7639 _depth: fidl::encoding::Depth,
7640 ) -> fidl::Result<()> {
7641 encoder.debug_check_bounds::<GenericSmeGetSmeTelemetryRequest>(offset);
7642 fidl::encoding::Encode::<GenericSmeGetSmeTelemetryRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7644 (
7645 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.telemetry_server),
7646 ),
7647 encoder, offset, _depth
7648 )
7649 }
7650 }
7651 unsafe impl<
7652 T0: fidl::encoding::Encode<
7653 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
7654 fidl::encoding::DefaultFuchsiaResourceDialect,
7655 >,
7656 >
7657 fidl::encoding::Encode<
7658 GenericSmeGetSmeTelemetryRequest,
7659 fidl::encoding::DefaultFuchsiaResourceDialect,
7660 > for (T0,)
7661 {
7662 #[inline]
7663 unsafe fn encode(
7664 self,
7665 encoder: &mut fidl::encoding::Encoder<
7666 '_,
7667 fidl::encoding::DefaultFuchsiaResourceDialect,
7668 >,
7669 offset: usize,
7670 depth: fidl::encoding::Depth,
7671 ) -> fidl::Result<()> {
7672 encoder.debug_check_bounds::<GenericSmeGetSmeTelemetryRequest>(offset);
7673 self.0.encode(encoder, offset + 0, depth)?;
7677 Ok(())
7678 }
7679 }
7680
7681 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7682 for GenericSmeGetSmeTelemetryRequest
7683 {
7684 #[inline(always)]
7685 fn new_empty() -> Self {
7686 Self {
7687 telemetry_server: fidl::new_empty!(
7688 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
7689 fidl::encoding::DefaultFuchsiaResourceDialect
7690 ),
7691 }
7692 }
7693
7694 #[inline]
7695 unsafe fn decode(
7696 &mut self,
7697 decoder: &mut fidl::encoding::Decoder<
7698 '_,
7699 fidl::encoding::DefaultFuchsiaResourceDialect,
7700 >,
7701 offset: usize,
7702 _depth: fidl::encoding::Depth,
7703 ) -> fidl::Result<()> {
7704 decoder.debug_check_bounds::<Self>(offset);
7705 fidl::decode!(
7707 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
7708 fidl::encoding::DefaultFuchsiaResourceDialect,
7709 &mut self.telemetry_server,
7710 decoder,
7711 offset + 0,
7712 _depth
7713 )?;
7714 Ok(())
7715 }
7716 }
7717
7718 impl fidl::encoding::ResourceTypeMarker for GenericSmeQueryResponse {
7719 type Borrowed<'a> = &'a mut Self;
7720 fn take_or_borrow<'a>(
7721 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7722 ) -> Self::Borrowed<'a> {
7723 value
7724 }
7725 }
7726
7727 unsafe impl fidl::encoding::TypeMarker for GenericSmeQueryResponse {
7728 type Owned = Self;
7729
7730 #[inline(always)]
7731 fn inline_align(_context: fidl::encoding::Context) -> usize {
7732 4
7733 }
7734
7735 #[inline(always)]
7736 fn inline_size(_context: fidl::encoding::Context) -> usize {
7737 16
7738 }
7739 }
7740
7741 unsafe impl
7742 fidl::encoding::Encode<
7743 GenericSmeQueryResponse,
7744 fidl::encoding::DefaultFuchsiaResourceDialect,
7745 > for &mut GenericSmeQueryResponse
7746 {
7747 #[inline]
7748 unsafe fn encode(
7749 self,
7750 encoder: &mut fidl::encoding::Encoder<
7751 '_,
7752 fidl::encoding::DefaultFuchsiaResourceDialect,
7753 >,
7754 offset: usize,
7755 _depth: fidl::encoding::Depth,
7756 ) -> fidl::Result<()> {
7757 encoder.debug_check_bounds::<GenericSmeQueryResponse>(offset);
7758 fidl::encoding::Encode::<
7760 GenericSmeQueryResponse,
7761 fidl::encoding::DefaultFuchsiaResourceDialect,
7762 >::encode(
7763 (<GenericSmeQuery as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
7764 encoder,
7765 offset,
7766 _depth,
7767 )
7768 }
7769 }
7770 unsafe impl<
7771 T0: fidl::encoding::Encode<GenericSmeQuery, fidl::encoding::DefaultFuchsiaResourceDialect>,
7772 >
7773 fidl::encoding::Encode<
7774 GenericSmeQueryResponse,
7775 fidl::encoding::DefaultFuchsiaResourceDialect,
7776 > for (T0,)
7777 {
7778 #[inline]
7779 unsafe fn encode(
7780 self,
7781 encoder: &mut fidl::encoding::Encoder<
7782 '_,
7783 fidl::encoding::DefaultFuchsiaResourceDialect,
7784 >,
7785 offset: usize,
7786 depth: fidl::encoding::Depth,
7787 ) -> fidl::Result<()> {
7788 encoder.debug_check_bounds::<GenericSmeQueryResponse>(offset);
7789 self.0.encode(encoder, offset + 0, depth)?;
7793 Ok(())
7794 }
7795 }
7796
7797 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7798 for GenericSmeQueryResponse
7799 {
7800 #[inline(always)]
7801 fn new_empty() -> Self {
7802 Self {
7803 resp: fidl::new_empty!(
7804 GenericSmeQuery,
7805 fidl::encoding::DefaultFuchsiaResourceDialect
7806 ),
7807 }
7808 }
7809
7810 #[inline]
7811 unsafe fn decode(
7812 &mut self,
7813 decoder: &mut fidl::encoding::Decoder<
7814 '_,
7815 fidl::encoding::DefaultFuchsiaResourceDialect,
7816 >,
7817 offset: usize,
7818 _depth: fidl::encoding::Depth,
7819 ) -> fidl::Result<()> {
7820 decoder.debug_check_bounds::<Self>(offset);
7821 fidl::decode!(
7823 GenericSmeQuery,
7824 fidl::encoding::DefaultFuchsiaResourceDialect,
7825 &mut self.resp,
7826 decoder,
7827 offset + 0,
7828 _depth
7829 )?;
7830 Ok(())
7831 }
7832 }
7833
7834 impl fidl::encoding::ResourceTypeMarker
7835 for ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest
7836 {
7837 type Borrowed<'a> = &'a mut Self;
7838 fn take_or_borrow<'a>(
7839 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7840 ) -> Self::Borrowed<'a> {
7841 value
7842 }
7843 }
7844
7845 unsafe impl fidl::encoding::TypeMarker
7846 for ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest
7847 {
7848 type Owned = Self;
7849
7850 #[inline(always)]
7851 fn inline_align(_context: fidl::encoding::Context) -> usize {
7852 4
7853 }
7854
7855 #[inline(always)]
7856 fn inline_size(_context: fidl::encoding::Context) -> usize {
7857 4
7858 }
7859 }
7860
7861 unsafe impl
7862 fidl::encoding::Encode<
7863 ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest,
7864 fidl::encoding::DefaultFuchsiaResourceDialect,
7865 > for &mut ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest
7866 {
7867 #[inline]
7868 unsafe fn encode(
7869 self,
7870 encoder: &mut fidl::encoding::Encoder<
7871 '_,
7872 fidl::encoding::DefaultFuchsiaResourceDialect,
7873 >,
7874 offset: usize,
7875 _depth: fidl::encoding::Depth,
7876 ) -> fidl::Result<()> {
7877 encoder.debug_check_bounds::<ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest>(offset);
7878 fidl::encoding::Encode::<
7880 ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest,
7881 fidl::encoding::DefaultFuchsiaResourceDialect,
7882 >::encode(
7883 (<fidl::encoding::HandleType<
7884 fidl::Vmo,
7885 { fidl::ObjectType::VMO.into_raw() },
7886 2147483648,
7887 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7888 &mut self.scan_results
7889 ),),
7890 encoder,
7891 offset,
7892 _depth,
7893 )
7894 }
7895 }
7896 unsafe impl<
7897 T0: fidl::encoding::Encode<
7898 fidl::encoding::HandleType<
7899 fidl::Vmo,
7900 { fidl::ObjectType::VMO.into_raw() },
7901 2147483648,
7902 >,
7903 fidl::encoding::DefaultFuchsiaResourceDialect,
7904 >,
7905 >
7906 fidl::encoding::Encode<
7907 ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest,
7908 fidl::encoding::DefaultFuchsiaResourceDialect,
7909 > for (T0,)
7910 {
7911 #[inline]
7912 unsafe fn encode(
7913 self,
7914 encoder: &mut fidl::encoding::Encoder<
7915 '_,
7916 fidl::encoding::DefaultFuchsiaResourceDialect,
7917 >,
7918 offset: usize,
7919 depth: fidl::encoding::Depth,
7920 ) -> fidl::Result<()> {
7921 encoder.debug_check_bounds::<ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest>(offset);
7922 self.0.encode(encoder, offset + 0, depth)?;
7926 Ok(())
7927 }
7928 }
7929
7930 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7931 for ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest
7932 {
7933 #[inline(always)]
7934 fn new_empty() -> Self {
7935 Self {
7936 scan_results: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7937 }
7938 }
7939
7940 #[inline]
7941 unsafe fn decode(
7942 &mut self,
7943 decoder: &mut fidl::encoding::Decoder<
7944 '_,
7945 fidl::encoding::DefaultFuchsiaResourceDialect,
7946 >,
7947 offset: usize,
7948 _depth: fidl::encoding::Depth,
7949 ) -> fidl::Result<()> {
7950 decoder.debug_check_bounds::<Self>(offset);
7951 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.scan_results, decoder, offset + 0, _depth)?;
7953 Ok(())
7954 }
7955 }
7956
7957 impl fidl::encoding::ResourceTypeMarker for TelemetryCloneInspectVmoResponse {
7958 type Borrowed<'a> = &'a mut Self;
7959 fn take_or_borrow<'a>(
7960 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7961 ) -> Self::Borrowed<'a> {
7962 value
7963 }
7964 }
7965
7966 unsafe impl fidl::encoding::TypeMarker for TelemetryCloneInspectVmoResponse {
7967 type Owned = Self;
7968
7969 #[inline(always)]
7970 fn inline_align(_context: fidl::encoding::Context) -> usize {
7971 4
7972 }
7973
7974 #[inline(always)]
7975 fn inline_size(_context: fidl::encoding::Context) -> usize {
7976 4
7977 }
7978 }
7979
7980 unsafe impl
7981 fidl::encoding::Encode<
7982 TelemetryCloneInspectVmoResponse,
7983 fidl::encoding::DefaultFuchsiaResourceDialect,
7984 > for &mut TelemetryCloneInspectVmoResponse
7985 {
7986 #[inline]
7987 unsafe fn encode(
7988 self,
7989 encoder: &mut fidl::encoding::Encoder<
7990 '_,
7991 fidl::encoding::DefaultFuchsiaResourceDialect,
7992 >,
7993 offset: usize,
7994 _depth: fidl::encoding::Depth,
7995 ) -> fidl::Result<()> {
7996 encoder.debug_check_bounds::<TelemetryCloneInspectVmoResponse>(offset);
7997 fidl::encoding::Encode::<
7999 TelemetryCloneInspectVmoResponse,
8000 fidl::encoding::DefaultFuchsiaResourceDialect,
8001 >::encode(
8002 (<fidl::encoding::HandleType<
8003 fidl::Vmo,
8004 { fidl::ObjectType::VMO.into_raw() },
8005 2147483648,
8006 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8007 &mut self.inspect_vmo
8008 ),),
8009 encoder,
8010 offset,
8011 _depth,
8012 )
8013 }
8014 }
8015 unsafe impl<
8016 T0: fidl::encoding::Encode<
8017 fidl::encoding::HandleType<
8018 fidl::Vmo,
8019 { fidl::ObjectType::VMO.into_raw() },
8020 2147483648,
8021 >,
8022 fidl::encoding::DefaultFuchsiaResourceDialect,
8023 >,
8024 >
8025 fidl::encoding::Encode<
8026 TelemetryCloneInspectVmoResponse,
8027 fidl::encoding::DefaultFuchsiaResourceDialect,
8028 > for (T0,)
8029 {
8030 #[inline]
8031 unsafe fn encode(
8032 self,
8033 encoder: &mut fidl::encoding::Encoder<
8034 '_,
8035 fidl::encoding::DefaultFuchsiaResourceDialect,
8036 >,
8037 offset: usize,
8038 depth: fidl::encoding::Depth,
8039 ) -> fidl::Result<()> {
8040 encoder.debug_check_bounds::<TelemetryCloneInspectVmoResponse>(offset);
8041 self.0.encode(encoder, offset + 0, depth)?;
8045 Ok(())
8046 }
8047 }
8048
8049 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8050 for TelemetryCloneInspectVmoResponse
8051 {
8052 #[inline(always)]
8053 fn new_empty() -> Self {
8054 Self {
8055 inspect_vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
8056 }
8057 }
8058
8059 #[inline]
8060 unsafe fn decode(
8061 &mut self,
8062 decoder: &mut fidl::encoding::Decoder<
8063 '_,
8064 fidl::encoding::DefaultFuchsiaResourceDialect,
8065 >,
8066 offset: usize,
8067 _depth: fidl::encoding::Depth,
8068 ) -> fidl::Result<()> {
8069 decoder.debug_check_bounds::<Self>(offset);
8070 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.inspect_vmo, decoder, offset + 0, _depth)?;
8072 Ok(())
8073 }
8074 }
8075
8076 impl fidl::encoding::ResourceTypeMarker for UsmeBootstrapStartRequest {
8077 type Borrowed<'a> = &'a mut Self;
8078 fn take_or_borrow<'a>(
8079 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8080 ) -> Self::Borrowed<'a> {
8081 value
8082 }
8083 }
8084
8085 unsafe impl fidl::encoding::TypeMarker for UsmeBootstrapStartRequest {
8086 type Owned = Self;
8087
8088 #[inline(always)]
8089 fn inline_align(_context: fidl::encoding::Context) -> usize {
8090 4
8091 }
8092
8093 #[inline(always)]
8094 fn inline_size(_context: fidl::encoding::Context) -> usize {
8095 8
8096 }
8097 }
8098
8099 unsafe impl
8100 fidl::encoding::Encode<
8101 UsmeBootstrapStartRequest,
8102 fidl::encoding::DefaultFuchsiaResourceDialect,
8103 > for &mut UsmeBootstrapStartRequest
8104 {
8105 #[inline]
8106 unsafe fn encode(
8107 self,
8108 encoder: &mut fidl::encoding::Encoder<
8109 '_,
8110 fidl::encoding::DefaultFuchsiaResourceDialect,
8111 >,
8112 offset: usize,
8113 _depth: fidl::encoding::Depth,
8114 ) -> fidl::Result<()> {
8115 encoder.debug_check_bounds::<UsmeBootstrapStartRequest>(offset);
8116 fidl::encoding::Encode::<UsmeBootstrapStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8118 (
8119 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.generic_sme_server),
8120 <LegacyPrivacySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.legacy_privacy_support),
8121 ),
8122 encoder, offset, _depth
8123 )
8124 }
8125 }
8126 unsafe impl<
8127 T0: fidl::encoding::Encode<
8128 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
8129 fidl::encoding::DefaultFuchsiaResourceDialect,
8130 >,
8131 T1: fidl::encoding::Encode<LegacyPrivacySupport, fidl::encoding::DefaultFuchsiaResourceDialect>,
8132 >
8133 fidl::encoding::Encode<
8134 UsmeBootstrapStartRequest,
8135 fidl::encoding::DefaultFuchsiaResourceDialect,
8136 > for (T0, T1)
8137 {
8138 #[inline]
8139 unsafe fn encode(
8140 self,
8141 encoder: &mut fidl::encoding::Encoder<
8142 '_,
8143 fidl::encoding::DefaultFuchsiaResourceDialect,
8144 >,
8145 offset: usize,
8146 depth: fidl::encoding::Depth,
8147 ) -> fidl::Result<()> {
8148 encoder.debug_check_bounds::<UsmeBootstrapStartRequest>(offset);
8149 unsafe {
8152 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
8153 (ptr as *mut u32).write_unaligned(0);
8154 }
8155 self.0.encode(encoder, offset + 0, depth)?;
8157 self.1.encode(encoder, offset + 4, depth)?;
8158 Ok(())
8159 }
8160 }
8161
8162 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8163 for UsmeBootstrapStartRequest
8164 {
8165 #[inline(always)]
8166 fn new_empty() -> Self {
8167 Self {
8168 generic_sme_server: fidl::new_empty!(
8169 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
8170 fidl::encoding::DefaultFuchsiaResourceDialect
8171 ),
8172 legacy_privacy_support: fidl::new_empty!(
8173 LegacyPrivacySupport,
8174 fidl::encoding::DefaultFuchsiaResourceDialect
8175 ),
8176 }
8177 }
8178
8179 #[inline]
8180 unsafe fn decode(
8181 &mut self,
8182 decoder: &mut fidl::encoding::Decoder<
8183 '_,
8184 fidl::encoding::DefaultFuchsiaResourceDialect,
8185 >,
8186 offset: usize,
8187 _depth: fidl::encoding::Depth,
8188 ) -> fidl::Result<()> {
8189 decoder.debug_check_bounds::<Self>(offset);
8190 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
8192 let padval = unsafe { (ptr as *const u32).read_unaligned() };
8193 let mask = 0xffff0000u32;
8194 let maskedval = padval & mask;
8195 if maskedval != 0 {
8196 return Err(fidl::Error::NonZeroPadding {
8197 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
8198 });
8199 }
8200 fidl::decode!(
8201 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
8202 fidl::encoding::DefaultFuchsiaResourceDialect,
8203 &mut self.generic_sme_server,
8204 decoder,
8205 offset + 0,
8206 _depth
8207 )?;
8208 fidl::decode!(
8209 LegacyPrivacySupport,
8210 fidl::encoding::DefaultFuchsiaResourceDialect,
8211 &mut self.legacy_privacy_support,
8212 decoder,
8213 offset + 4,
8214 _depth
8215 )?;
8216 Ok(())
8217 }
8218 }
8219
8220 impl fidl::encoding::ResourceTypeMarker for UsmeBootstrapStartResponse {
8221 type Borrowed<'a> = &'a mut Self;
8222 fn take_or_borrow<'a>(
8223 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8224 ) -> Self::Borrowed<'a> {
8225 value
8226 }
8227 }
8228
8229 unsafe impl fidl::encoding::TypeMarker for UsmeBootstrapStartResponse {
8230 type Owned = Self;
8231
8232 #[inline(always)]
8233 fn inline_align(_context: fidl::encoding::Context) -> usize {
8234 4
8235 }
8236
8237 #[inline(always)]
8238 fn inline_size(_context: fidl::encoding::Context) -> usize {
8239 4
8240 }
8241 }
8242
8243 unsafe impl
8244 fidl::encoding::Encode<
8245 UsmeBootstrapStartResponse,
8246 fidl::encoding::DefaultFuchsiaResourceDialect,
8247 > for &mut UsmeBootstrapStartResponse
8248 {
8249 #[inline]
8250 unsafe fn encode(
8251 self,
8252 encoder: &mut fidl::encoding::Encoder<
8253 '_,
8254 fidl::encoding::DefaultFuchsiaResourceDialect,
8255 >,
8256 offset: usize,
8257 _depth: fidl::encoding::Depth,
8258 ) -> fidl::Result<()> {
8259 encoder.debug_check_bounds::<UsmeBootstrapStartResponse>(offset);
8260 fidl::encoding::Encode::<
8262 UsmeBootstrapStartResponse,
8263 fidl::encoding::DefaultFuchsiaResourceDialect,
8264 >::encode(
8265 (<fidl::encoding::HandleType<
8266 fidl::Vmo,
8267 { fidl::ObjectType::VMO.into_raw() },
8268 2147483648,
8269 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8270 &mut self.inspect_vmo
8271 ),),
8272 encoder,
8273 offset,
8274 _depth,
8275 )
8276 }
8277 }
8278 unsafe impl<
8279 T0: fidl::encoding::Encode<
8280 fidl::encoding::HandleType<
8281 fidl::Vmo,
8282 { fidl::ObjectType::VMO.into_raw() },
8283 2147483648,
8284 >,
8285 fidl::encoding::DefaultFuchsiaResourceDialect,
8286 >,
8287 >
8288 fidl::encoding::Encode<
8289 UsmeBootstrapStartResponse,
8290 fidl::encoding::DefaultFuchsiaResourceDialect,
8291 > for (T0,)
8292 {
8293 #[inline]
8294 unsafe fn encode(
8295 self,
8296 encoder: &mut fidl::encoding::Encoder<
8297 '_,
8298 fidl::encoding::DefaultFuchsiaResourceDialect,
8299 >,
8300 offset: usize,
8301 depth: fidl::encoding::Depth,
8302 ) -> fidl::Result<()> {
8303 encoder.debug_check_bounds::<UsmeBootstrapStartResponse>(offset);
8304 self.0.encode(encoder, offset + 0, depth)?;
8308 Ok(())
8309 }
8310 }
8311
8312 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8313 for UsmeBootstrapStartResponse
8314 {
8315 #[inline(always)]
8316 fn new_empty() -> Self {
8317 Self {
8318 inspect_vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
8319 }
8320 }
8321
8322 #[inline]
8323 unsafe fn decode(
8324 &mut self,
8325 decoder: &mut fidl::encoding::Decoder<
8326 '_,
8327 fidl::encoding::DefaultFuchsiaResourceDialect,
8328 >,
8329 offset: usize,
8330 _depth: fidl::encoding::Depth,
8331 ) -> fidl::Result<()> {
8332 decoder.debug_check_bounds::<Self>(offset);
8333 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.inspect_vmo, decoder, offset + 0, _depth)?;
8335 Ok(())
8336 }
8337 }
8338}