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 ApSmeControlHandle {
635 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
636 self.inner.shutdown_with_epitaph(status.into())
637 }
638}
639
640impl fidl::endpoints::ControlHandle for ApSmeControlHandle {
641 fn shutdown(&self) {
642 self.inner.shutdown()
643 }
644
645 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
646 self.inner.shutdown_with_epitaph(status)
647 }
648
649 fn is_closed(&self) -> bool {
650 self.inner.channel().is_closed()
651 }
652 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
653 self.inner.channel().on_closed()
654 }
655
656 #[cfg(target_os = "fuchsia")]
657 fn signal_peer(
658 &self,
659 clear_mask: zx::Signals,
660 set_mask: zx::Signals,
661 ) -> Result<(), zx_status::Status> {
662 use fidl::Peered;
663 self.inner.channel().signal_peer(clear_mask, set_mask)
664 }
665}
666
667impl ApSmeControlHandle {}
668
669#[must_use = "FIDL methods require a response to be sent"]
670#[derive(Debug)]
671pub struct ApSmeStartResponder {
672 control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
673 tx_id: u32,
674}
675
676impl std::ops::Drop for ApSmeStartResponder {
680 fn drop(&mut self) {
681 self.control_handle.shutdown();
682 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
684 }
685}
686
687impl fidl::endpoints::Responder for ApSmeStartResponder {
688 type ControlHandle = ApSmeControlHandle;
689
690 fn control_handle(&self) -> &ApSmeControlHandle {
691 &self.control_handle
692 }
693
694 fn drop_without_shutdown(mut self) {
695 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
697 std::mem::forget(self);
699 }
700}
701
702impl ApSmeStartResponder {
703 pub fn send(self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
707 let _result = self.send_raw(code);
708 if _result.is_err() {
709 self.control_handle.shutdown();
710 }
711 self.drop_without_shutdown();
712 _result
713 }
714
715 pub fn send_no_shutdown_on_err(self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
717 let _result = self.send_raw(code);
718 self.drop_without_shutdown();
719 _result
720 }
721
722 fn send_raw(&self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
723 self.control_handle.inner.send::<ApSmeStartResponse>(
724 (code,),
725 self.tx_id,
726 0x33fa134ceda8624d,
727 fidl::encoding::DynamicFlags::empty(),
728 )
729 }
730}
731
732#[must_use = "FIDL methods require a response to be sent"]
733#[derive(Debug)]
734pub struct ApSmeStopResponder {
735 control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
736 tx_id: u32,
737}
738
739impl std::ops::Drop for ApSmeStopResponder {
743 fn drop(&mut self) {
744 self.control_handle.shutdown();
745 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
747 }
748}
749
750impl fidl::endpoints::Responder for ApSmeStopResponder {
751 type ControlHandle = ApSmeControlHandle;
752
753 fn control_handle(&self) -> &ApSmeControlHandle {
754 &self.control_handle
755 }
756
757 fn drop_without_shutdown(mut self) {
758 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
760 std::mem::forget(self);
762 }
763}
764
765impl ApSmeStopResponder {
766 pub fn send(self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
770 let _result = self.send_raw(code);
771 if _result.is_err() {
772 self.control_handle.shutdown();
773 }
774 self.drop_without_shutdown();
775 _result
776 }
777
778 pub fn send_no_shutdown_on_err(self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
780 let _result = self.send_raw(code);
781 self.drop_without_shutdown();
782 _result
783 }
784
785 fn send_raw(&self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
786 self.control_handle.inner.send::<ApSmeStopResponse>(
787 (code,),
788 self.tx_id,
789 0x56423f5b49a2e851,
790 fidl::encoding::DynamicFlags::empty(),
791 )
792 }
793}
794
795#[must_use = "FIDL methods require a response to be sent"]
796#[derive(Debug)]
797pub struct ApSmeStatusResponder {
798 control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
799 tx_id: u32,
800}
801
802impl std::ops::Drop for ApSmeStatusResponder {
806 fn drop(&mut self) {
807 self.control_handle.shutdown();
808 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
810 }
811}
812
813impl fidl::endpoints::Responder for ApSmeStatusResponder {
814 type ControlHandle = ApSmeControlHandle;
815
816 fn control_handle(&self) -> &ApSmeControlHandle {
817 &self.control_handle
818 }
819
820 fn drop_without_shutdown(mut self) {
821 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
823 std::mem::forget(self);
825 }
826}
827
828impl ApSmeStatusResponder {
829 pub fn send(self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
833 let _result = self.send_raw(resp);
834 if _result.is_err() {
835 self.control_handle.shutdown();
836 }
837 self.drop_without_shutdown();
838 _result
839 }
840
841 pub fn send_no_shutdown_on_err(self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
843 let _result = self.send_raw(resp);
844 self.drop_without_shutdown();
845 _result
846 }
847
848 fn send_raw(&self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
849 self.control_handle.inner.send::<ApSmeStatusResponse>(
850 (resp,),
851 self.tx_id,
852 0x51c688ac7a101606,
853 fidl::encoding::DynamicFlags::empty(),
854 )
855 }
856}
857
858#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
859pub struct ClientSmeMarker;
860
861impl fidl::endpoints::ProtocolMarker for ClientSmeMarker {
862 type Proxy = ClientSmeProxy;
863 type RequestStream = ClientSmeRequestStream;
864 #[cfg(target_os = "fuchsia")]
865 type SynchronousProxy = ClientSmeSynchronousProxy;
866
867 const DEBUG_NAME: &'static str = "(anonymous) ClientSme";
868}
869pub type ClientSmeScanResult = Result<fidl::Vmo, ScanErrorCode>;
870pub type ClientSmeStartScheduledScanResult = Result<(), i32>;
871pub type ClientSmeGetScheduledScanEnabledResult = Result<bool, i32>;
872pub type ClientSmeWmmStatusResult = Result<fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>;
873pub type ClientSmeScanForControllerResult = Result<Vec<ScanResult>, ScanErrorCode>;
874pub type ClientSmeSetMacAddressResult = Result<(), i32>;
875pub type ClientSmeInstallApfPacketFilterResult = Result<(), i32>;
876pub type ClientSmeReadApfPacketFilterDataResult = Result<Vec<u8>, i32>;
877pub type ClientSmeSetApfPacketFilterEnabledResult = Result<(), i32>;
878pub type ClientSmeGetApfPacketFilterEnabledResult = Result<bool, i32>;
879pub type ClientSmeStartRssiMonitorResult = Result<(), i32>;
880pub type ClientSmeStopRssiMonitorResult = Result<(), i32>;
881
882pub trait ClientSmeProxyInterface: Send + Sync {
883 type ScanResponseFut: std::future::Future<Output = Result<ClientSmeScanResult, fidl::Error>>
884 + Send;
885 fn r#scan(&self, req: &ScanRequest) -> Self::ScanResponseFut;
886 type StartScheduledScanResponseFut: std::future::Future<Output = Result<ClientSmeStartScheduledScanResult, fidl::Error>>
887 + Send;
888 fn r#start_scheduled_scan(
889 &self,
890 req: &fidl_fuchsia_wlan_common::ScheduledScanRequest,
891 txn: fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
892 ) -> Self::StartScheduledScanResponseFut;
893 type GetScheduledScanEnabledResponseFut: std::future::Future<Output = Result<ClientSmeGetScheduledScanEnabledResult, fidl::Error>>
894 + Send;
895 fn r#get_scheduled_scan_enabled(&self) -> Self::GetScheduledScanEnabledResponseFut;
896 fn r#connect(
897 &self,
898 req: &ConnectRequest,
899 txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
900 ) -> Result<(), fidl::Error>;
901 fn r#roam(&self, req: &RoamRequest) -> Result<(), fidl::Error>;
902 type DisconnectResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
903 fn r#disconnect(&self, reason: UserDisconnectReason) -> Self::DisconnectResponseFut;
904 type StatusResponseFut: std::future::Future<Output = Result<ClientStatusResponse, fidl::Error>>
905 + Send;
906 fn r#status(&self) -> Self::StatusResponseFut;
907 type WmmStatusResponseFut: std::future::Future<Output = Result<ClientSmeWmmStatusResult, fidl::Error>>
908 + Send;
909 fn r#wmm_status(&self) -> Self::WmmStatusResponseFut;
910 type ScanForControllerResponseFut: std::future::Future<Output = Result<ClientSmeScanForControllerResult, fidl::Error>>
911 + Send;
912 fn r#scan_for_controller(&self, req: &ScanRequest) -> Self::ScanForControllerResponseFut;
913 type SetMacAddressResponseFut: std::future::Future<Output = Result<ClientSmeSetMacAddressResult, fidl::Error>>
914 + Send;
915 fn r#set_mac_address(&self, mac_addr: &[u8; 6]) -> Self::SetMacAddressResponseFut;
916 type InstallApfPacketFilterResponseFut: std::future::Future<Output = Result<ClientSmeInstallApfPacketFilterResult, fidl::Error>>
917 + Send;
918 fn r#install_apf_packet_filter(
919 &self,
920 program: &[u8],
921 ) -> Self::InstallApfPacketFilterResponseFut;
922 type ReadApfPacketFilterDataResponseFut: std::future::Future<Output = Result<ClientSmeReadApfPacketFilterDataResult, fidl::Error>>
923 + Send;
924 fn r#read_apf_packet_filter_data(&self) -> Self::ReadApfPacketFilterDataResponseFut;
925 type SetApfPacketFilterEnabledResponseFut: std::future::Future<Output = Result<ClientSmeSetApfPacketFilterEnabledResult, fidl::Error>>
926 + Send;
927 fn r#set_apf_packet_filter_enabled(
928 &self,
929 enabled: bool,
930 ) -> Self::SetApfPacketFilterEnabledResponseFut;
931 type GetApfPacketFilterEnabledResponseFut: std::future::Future<Output = Result<ClientSmeGetApfPacketFilterEnabledResult, fidl::Error>>
932 + Send;
933 fn r#get_apf_packet_filter_enabled(&self) -> Self::GetApfPacketFilterEnabledResponseFut;
934 type StartRssiMonitorResponseFut: std::future::Future<Output = Result<ClientSmeStartRssiMonitorResult, fidl::Error>>
935 + Send;
936 fn r#start_rssi_monitor(
937 &self,
938 min_rssi_dbm: i8,
939 max_rssi_dbm: i8,
940 ) -> Self::StartRssiMonitorResponseFut;
941 type StopRssiMonitorResponseFut: std::future::Future<Output = Result<ClientSmeStopRssiMonitorResult, fidl::Error>>
942 + Send;
943 fn r#stop_rssi_monitor(&self) -> Self::StopRssiMonitorResponseFut;
944}
945#[derive(Debug)]
946#[cfg(target_os = "fuchsia")]
947pub struct ClientSmeSynchronousProxy {
948 client: fidl::client::sync::Client,
949}
950
951#[cfg(target_os = "fuchsia")]
952impl fidl::endpoints::SynchronousProxy for ClientSmeSynchronousProxy {
953 type Proxy = ClientSmeProxy;
954 type Protocol = ClientSmeMarker;
955
956 fn from_channel(inner: fidl::Channel) -> Self {
957 Self::new(inner)
958 }
959
960 fn into_channel(self) -> fidl::Channel {
961 self.client.into_channel()
962 }
963
964 fn as_channel(&self) -> &fidl::Channel {
965 self.client.as_channel()
966 }
967}
968
969#[cfg(target_os = "fuchsia")]
970impl ClientSmeSynchronousProxy {
971 pub fn new(channel: fidl::Channel) -> Self {
972 Self { client: fidl::client::sync::Client::new(channel) }
973 }
974
975 pub fn into_channel(self) -> fidl::Channel {
976 self.client.into_channel()
977 }
978
979 pub fn wait_for_event(
982 &self,
983 deadline: zx::MonotonicInstant,
984 ) -> Result<ClientSmeEvent, fidl::Error> {
985 ClientSmeEvent::decode(self.client.wait_for_event::<ClientSmeMarker>(deadline)?)
986 }
987
988 pub fn r#scan(
989 &self,
990 mut req: &ScanRequest,
991 ___deadline: zx::MonotonicInstant,
992 ) -> Result<ClientSmeScanResult, fidl::Error> {
993 let _response = self.client.send_query::<ClientSmeScanRequest, fidl::encoding::ResultType<
994 ClientSmeScanResponse,
995 ScanErrorCode,
996 >, ClientSmeMarker>(
997 (req,),
998 0xded0ce3b1685822,
999 fidl::encoding::DynamicFlags::empty(),
1000 ___deadline,
1001 )?;
1002 Ok(_response.map(|x| x.scan_results))
1003 }
1004
1005 pub fn r#start_scheduled_scan(
1007 &self,
1008 mut req: &fidl_fuchsia_wlan_common::ScheduledScanRequest,
1009 mut txn: fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
1010 ___deadline: zx::MonotonicInstant,
1011 ) -> Result<ClientSmeStartScheduledScanResult, fidl::Error> {
1012 let _response = self.client.send_query::<
1013 ClientSmeStartScheduledScanRequest,
1014 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1015 ClientSmeMarker,
1016 >(
1017 (req, txn,),
1018 0x97eedb559e6bdb8,
1019 fidl::encoding::DynamicFlags::empty(),
1020 ___deadline,
1021 )?;
1022 Ok(_response.map(|x| x))
1023 }
1024
1025 pub fn r#get_scheduled_scan_enabled(
1027 &self,
1028 ___deadline: zx::MonotonicInstant,
1029 ) -> Result<ClientSmeGetScheduledScanEnabledResult, fidl::Error> {
1030 let _response = self.client.send_query::<
1031 fidl::encoding::EmptyPayload,
1032 fidl::encoding::ResultType<ClientSmeGetScheduledScanEnabledResponse, i32>,
1033 ClientSmeMarker,
1034 >(
1035 (),
1036 0x777e3c8854ff2710,
1037 fidl::encoding::DynamicFlags::empty(),
1038 ___deadline,
1039 )?;
1040 Ok(_response.map(|x| x.enabled))
1041 }
1042
1043 pub fn r#connect(
1044 &self,
1045 mut req: &ConnectRequest,
1046 mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1047 ) -> Result<(), fidl::Error> {
1048 self.client.send::<ClientSmeConnectRequest>(
1049 (req, txn),
1050 0x250a0f6fe9f85351,
1051 fidl::encoding::DynamicFlags::empty(),
1052 )
1053 }
1054
1055 pub fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1056 self.client.send::<ClientSmeRoamRequest>(
1057 (req,),
1058 0x107ead7d84723921,
1059 fidl::encoding::DynamicFlags::empty(),
1060 )
1061 }
1062
1063 pub fn r#disconnect(
1064 &self,
1065 mut reason: UserDisconnectReason,
1066 ___deadline: zx::MonotonicInstant,
1067 ) -> Result<(), fidl::Error> {
1068 let _response = self.client.send_query::<
1069 ClientSmeDisconnectRequest,
1070 fidl::encoding::EmptyPayload,
1071 ClientSmeMarker,
1072 >(
1073 (reason,),
1074 0x39a578de9a107304,
1075 fidl::encoding::DynamicFlags::empty(),
1076 ___deadline,
1077 )?;
1078 Ok(_response)
1079 }
1080
1081 pub fn r#status(
1082 &self,
1083 ___deadline: zx::MonotonicInstant,
1084 ) -> Result<ClientStatusResponse, fidl::Error> {
1085 let _response = self
1086 .client
1087 .send_query::<fidl::encoding::EmptyPayload, ClientSmeStatusResponse, ClientSmeMarker>(
1088 (),
1089 0xda00b607470faf2,
1090 fidl::encoding::DynamicFlags::empty(),
1091 ___deadline,
1092 )?;
1093 Ok(_response.resp)
1094 }
1095
1096 pub fn r#wmm_status(
1097 &self,
1098 ___deadline: zx::MonotonicInstant,
1099 ) -> Result<ClientSmeWmmStatusResult, fidl::Error> {
1100 let _response = self.client.send_query::<
1101 fidl::encoding::EmptyPayload,
1102 fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>,
1103 ClientSmeMarker,
1104 >(
1105 (),
1106 0x3d0ccc75f6baa9e3,
1107 fidl::encoding::DynamicFlags::empty(),
1108 ___deadline,
1109 )?;
1110 Ok(_response.map(|x| x.resp))
1111 }
1112
1113 pub fn r#scan_for_controller(
1114 &self,
1115 mut req: &ScanRequest,
1116 ___deadline: zx::MonotonicInstant,
1117 ) -> Result<ClientSmeScanForControllerResult, fidl::Error> {
1118 let _response = self.client.send_query::<
1119 ClientSmeScanForControllerRequest,
1120 fidl::encoding::ResultType<ClientSmeScanForControllerResponse, ScanErrorCode>,
1121 ClientSmeMarker,
1122 >(
1123 (req,),
1124 0x21f00ab22ff79a12,
1125 fidl::encoding::DynamicFlags::empty(),
1126 ___deadline,
1127 )?;
1128 Ok(_response.map(|x| x.scan_results))
1129 }
1130
1131 pub fn r#set_mac_address(
1132 &self,
1133 mut mac_addr: &[u8; 6],
1134 ___deadline: zx::MonotonicInstant,
1135 ) -> Result<ClientSmeSetMacAddressResult, fidl::Error> {
1136 let _response = self.client.send_query::<
1137 ClientSmeSetMacAddressRequest,
1138 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1139 ClientSmeMarker,
1140 >(
1141 (mac_addr,),
1142 0x13e0a0bee8962f58,
1143 fidl::encoding::DynamicFlags::empty(),
1144 ___deadline,
1145 )?;
1146 Ok(_response.map(|x| x))
1147 }
1148
1149 pub fn r#install_apf_packet_filter(
1150 &self,
1151 mut program: &[u8],
1152 ___deadline: zx::MonotonicInstant,
1153 ) -> Result<ClientSmeInstallApfPacketFilterResult, fidl::Error> {
1154 let _response = self.client.send_query::<
1155 ClientSmeInstallApfPacketFilterRequest,
1156 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1157 ClientSmeMarker,
1158 >(
1159 (program,),
1160 0x77435965e7bfaf83,
1161 fidl::encoding::DynamicFlags::empty(),
1162 ___deadline,
1163 )?;
1164 Ok(_response.map(|x| x))
1165 }
1166
1167 pub fn r#read_apf_packet_filter_data(
1168 &self,
1169 ___deadline: zx::MonotonicInstant,
1170 ) -> Result<ClientSmeReadApfPacketFilterDataResult, fidl::Error> {
1171 let _response = self.client.send_query::<
1172 fidl::encoding::EmptyPayload,
1173 fidl::encoding::ResultType<ClientSmeReadApfPacketFilterDataResponse, i32>,
1174 ClientSmeMarker,
1175 >(
1176 (),
1177 0x66fc6616b9963023,
1178 fidl::encoding::DynamicFlags::empty(),
1179 ___deadline,
1180 )?;
1181 Ok(_response.map(|x| x.memory))
1182 }
1183
1184 pub fn r#set_apf_packet_filter_enabled(
1185 &self,
1186 mut enabled: bool,
1187 ___deadline: zx::MonotonicInstant,
1188 ) -> Result<ClientSmeSetApfPacketFilterEnabledResult, fidl::Error> {
1189 let _response = self.client.send_query::<
1190 ClientSmeSetApfPacketFilterEnabledRequest,
1191 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1192 ClientSmeMarker,
1193 >(
1194 (enabled,),
1195 0x5070d2ed31580b81,
1196 fidl::encoding::DynamicFlags::empty(),
1197 ___deadline,
1198 )?;
1199 Ok(_response.map(|x| x))
1200 }
1201
1202 pub fn r#get_apf_packet_filter_enabled(
1203 &self,
1204 ___deadline: zx::MonotonicInstant,
1205 ) -> Result<ClientSmeGetApfPacketFilterEnabledResult, fidl::Error> {
1206 let _response =
1207 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1208 ClientSmeGetApfPacketFilterEnabledResponse,
1209 i32,
1210 >, ClientSmeMarker>(
1211 (),
1212 0xdda5c1533526869,
1213 fidl::encoding::DynamicFlags::empty(),
1214 ___deadline,
1215 )?;
1216 Ok(_response.map(|x| x.enabled))
1217 }
1218
1219 pub fn r#start_rssi_monitor(
1220 &self,
1221 mut min_rssi_dbm: i8,
1222 mut max_rssi_dbm: i8,
1223 ___deadline: zx::MonotonicInstant,
1224 ) -> Result<ClientSmeStartRssiMonitorResult, fidl::Error> {
1225 let _response = self.client.send_query::<
1226 ClientSmeStartRssiMonitorRequest,
1227 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1228 ClientSmeMarker,
1229 >(
1230 (min_rssi_dbm, max_rssi_dbm,),
1231 0x7d9b4356b07bd699,
1232 fidl::encoding::DynamicFlags::empty(),
1233 ___deadline,
1234 )?;
1235 Ok(_response.map(|x| x))
1236 }
1237
1238 pub fn r#stop_rssi_monitor(
1239 &self,
1240 ___deadline: zx::MonotonicInstant,
1241 ) -> Result<ClientSmeStopRssiMonitorResult, fidl::Error> {
1242 let _response = self.client.send_query::<
1243 fidl::encoding::EmptyPayload,
1244 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1245 ClientSmeMarker,
1246 >(
1247 (),
1248 0x1f39005f89565adf,
1249 fidl::encoding::DynamicFlags::empty(),
1250 ___deadline,
1251 )?;
1252 Ok(_response.map(|x| x))
1253 }
1254}
1255
1256#[cfg(target_os = "fuchsia")]
1257impl From<ClientSmeSynchronousProxy> for zx::NullableHandle {
1258 fn from(value: ClientSmeSynchronousProxy) -> Self {
1259 value.into_channel().into()
1260 }
1261}
1262
1263#[cfg(target_os = "fuchsia")]
1264impl From<fidl::Channel> for ClientSmeSynchronousProxy {
1265 fn from(value: fidl::Channel) -> Self {
1266 Self::new(value)
1267 }
1268}
1269
1270#[cfg(target_os = "fuchsia")]
1271impl fidl::endpoints::FromClient for ClientSmeSynchronousProxy {
1272 type Protocol = ClientSmeMarker;
1273
1274 fn from_client(value: fidl::endpoints::ClientEnd<ClientSmeMarker>) -> Self {
1275 Self::new(value.into_channel())
1276 }
1277}
1278
1279#[derive(Debug, Clone)]
1280pub struct ClientSmeProxy {
1281 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1282}
1283
1284impl fidl::endpoints::Proxy for ClientSmeProxy {
1285 type Protocol = ClientSmeMarker;
1286
1287 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1288 Self::new(inner)
1289 }
1290
1291 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1292 self.client.into_channel().map_err(|client| Self { client })
1293 }
1294
1295 fn as_channel(&self) -> &::fidl::AsyncChannel {
1296 self.client.as_channel()
1297 }
1298}
1299
1300impl ClientSmeProxy {
1301 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1303 let protocol_name = <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1304 Self { client: fidl::client::Client::new(channel, protocol_name) }
1305 }
1306
1307 pub fn take_event_stream(&self) -> ClientSmeEventStream {
1313 ClientSmeEventStream { event_receiver: self.client.take_event_receiver() }
1314 }
1315
1316 pub fn r#scan(
1317 &self,
1318 mut req: &ScanRequest,
1319 ) -> fidl::client::QueryResponseFut<
1320 ClientSmeScanResult,
1321 fidl::encoding::DefaultFuchsiaResourceDialect,
1322 > {
1323 ClientSmeProxyInterface::r#scan(self, req)
1324 }
1325
1326 pub fn r#start_scheduled_scan(
1328 &self,
1329 mut req: &fidl_fuchsia_wlan_common::ScheduledScanRequest,
1330 mut txn: fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
1331 ) -> fidl::client::QueryResponseFut<
1332 ClientSmeStartScheduledScanResult,
1333 fidl::encoding::DefaultFuchsiaResourceDialect,
1334 > {
1335 ClientSmeProxyInterface::r#start_scheduled_scan(self, req, txn)
1336 }
1337
1338 pub fn r#get_scheduled_scan_enabled(
1340 &self,
1341 ) -> fidl::client::QueryResponseFut<
1342 ClientSmeGetScheduledScanEnabledResult,
1343 fidl::encoding::DefaultFuchsiaResourceDialect,
1344 > {
1345 ClientSmeProxyInterface::r#get_scheduled_scan_enabled(self)
1346 }
1347
1348 pub fn r#connect(
1349 &self,
1350 mut req: &ConnectRequest,
1351 mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1352 ) -> Result<(), fidl::Error> {
1353 ClientSmeProxyInterface::r#connect(self, req, txn)
1354 }
1355
1356 pub fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1357 ClientSmeProxyInterface::r#roam(self, req)
1358 }
1359
1360 pub fn r#disconnect(
1361 &self,
1362 mut reason: UserDisconnectReason,
1363 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
1364 ClientSmeProxyInterface::r#disconnect(self, reason)
1365 }
1366
1367 pub fn r#status(
1368 &self,
1369 ) -> fidl::client::QueryResponseFut<
1370 ClientStatusResponse,
1371 fidl::encoding::DefaultFuchsiaResourceDialect,
1372 > {
1373 ClientSmeProxyInterface::r#status(self)
1374 }
1375
1376 pub fn r#wmm_status(
1377 &self,
1378 ) -> fidl::client::QueryResponseFut<
1379 ClientSmeWmmStatusResult,
1380 fidl::encoding::DefaultFuchsiaResourceDialect,
1381 > {
1382 ClientSmeProxyInterface::r#wmm_status(self)
1383 }
1384
1385 pub fn r#scan_for_controller(
1386 &self,
1387 mut req: &ScanRequest,
1388 ) -> fidl::client::QueryResponseFut<
1389 ClientSmeScanForControllerResult,
1390 fidl::encoding::DefaultFuchsiaResourceDialect,
1391 > {
1392 ClientSmeProxyInterface::r#scan_for_controller(self, req)
1393 }
1394
1395 pub fn r#set_mac_address(
1396 &self,
1397 mut mac_addr: &[u8; 6],
1398 ) -> fidl::client::QueryResponseFut<
1399 ClientSmeSetMacAddressResult,
1400 fidl::encoding::DefaultFuchsiaResourceDialect,
1401 > {
1402 ClientSmeProxyInterface::r#set_mac_address(self, mac_addr)
1403 }
1404
1405 pub fn r#install_apf_packet_filter(
1406 &self,
1407 mut program: &[u8],
1408 ) -> fidl::client::QueryResponseFut<
1409 ClientSmeInstallApfPacketFilterResult,
1410 fidl::encoding::DefaultFuchsiaResourceDialect,
1411 > {
1412 ClientSmeProxyInterface::r#install_apf_packet_filter(self, program)
1413 }
1414
1415 pub fn r#read_apf_packet_filter_data(
1416 &self,
1417 ) -> fidl::client::QueryResponseFut<
1418 ClientSmeReadApfPacketFilterDataResult,
1419 fidl::encoding::DefaultFuchsiaResourceDialect,
1420 > {
1421 ClientSmeProxyInterface::r#read_apf_packet_filter_data(self)
1422 }
1423
1424 pub fn r#set_apf_packet_filter_enabled(
1425 &self,
1426 mut enabled: bool,
1427 ) -> fidl::client::QueryResponseFut<
1428 ClientSmeSetApfPacketFilterEnabledResult,
1429 fidl::encoding::DefaultFuchsiaResourceDialect,
1430 > {
1431 ClientSmeProxyInterface::r#set_apf_packet_filter_enabled(self, enabled)
1432 }
1433
1434 pub fn r#get_apf_packet_filter_enabled(
1435 &self,
1436 ) -> fidl::client::QueryResponseFut<
1437 ClientSmeGetApfPacketFilterEnabledResult,
1438 fidl::encoding::DefaultFuchsiaResourceDialect,
1439 > {
1440 ClientSmeProxyInterface::r#get_apf_packet_filter_enabled(self)
1441 }
1442
1443 pub fn r#start_rssi_monitor(
1444 &self,
1445 mut min_rssi_dbm: i8,
1446 mut max_rssi_dbm: i8,
1447 ) -> fidl::client::QueryResponseFut<
1448 ClientSmeStartRssiMonitorResult,
1449 fidl::encoding::DefaultFuchsiaResourceDialect,
1450 > {
1451 ClientSmeProxyInterface::r#start_rssi_monitor(self, min_rssi_dbm, max_rssi_dbm)
1452 }
1453
1454 pub fn r#stop_rssi_monitor(
1455 &self,
1456 ) -> fidl::client::QueryResponseFut<
1457 ClientSmeStopRssiMonitorResult,
1458 fidl::encoding::DefaultFuchsiaResourceDialect,
1459 > {
1460 ClientSmeProxyInterface::r#stop_rssi_monitor(self)
1461 }
1462}
1463
1464impl ClientSmeProxyInterface for ClientSmeProxy {
1465 type ScanResponseFut = fidl::client::QueryResponseFut<
1466 ClientSmeScanResult,
1467 fidl::encoding::DefaultFuchsiaResourceDialect,
1468 >;
1469 fn r#scan(&self, mut req: &ScanRequest) -> Self::ScanResponseFut {
1470 fn _decode(
1471 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1472 ) -> Result<ClientSmeScanResult, fidl::Error> {
1473 let _response = fidl::client::decode_transaction_body::<
1474 fidl::encoding::ResultType<ClientSmeScanResponse, ScanErrorCode>,
1475 fidl::encoding::DefaultFuchsiaResourceDialect,
1476 0xded0ce3b1685822,
1477 >(_buf?)?;
1478 Ok(_response.map(|x| x.scan_results))
1479 }
1480 self.client.send_query_and_decode::<ClientSmeScanRequest, ClientSmeScanResult>(
1481 (req,),
1482 0xded0ce3b1685822,
1483 fidl::encoding::DynamicFlags::empty(),
1484 _decode,
1485 )
1486 }
1487
1488 type StartScheduledScanResponseFut = fidl::client::QueryResponseFut<
1489 ClientSmeStartScheduledScanResult,
1490 fidl::encoding::DefaultFuchsiaResourceDialect,
1491 >;
1492 fn r#start_scheduled_scan(
1493 &self,
1494 mut req: &fidl_fuchsia_wlan_common::ScheduledScanRequest,
1495 mut txn: fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
1496 ) -> Self::StartScheduledScanResponseFut {
1497 fn _decode(
1498 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1499 ) -> Result<ClientSmeStartScheduledScanResult, fidl::Error> {
1500 let _response = fidl::client::decode_transaction_body::<
1501 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1502 fidl::encoding::DefaultFuchsiaResourceDialect,
1503 0x97eedb559e6bdb8,
1504 >(_buf?)?;
1505 Ok(_response.map(|x| x))
1506 }
1507 self.client.send_query_and_decode::<
1508 ClientSmeStartScheduledScanRequest,
1509 ClientSmeStartScheduledScanResult,
1510 >(
1511 (req, txn,),
1512 0x97eedb559e6bdb8,
1513 fidl::encoding::DynamicFlags::empty(),
1514 _decode,
1515 )
1516 }
1517
1518 type GetScheduledScanEnabledResponseFut = fidl::client::QueryResponseFut<
1519 ClientSmeGetScheduledScanEnabledResult,
1520 fidl::encoding::DefaultFuchsiaResourceDialect,
1521 >;
1522 fn r#get_scheduled_scan_enabled(&self) -> Self::GetScheduledScanEnabledResponseFut {
1523 fn _decode(
1524 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1525 ) -> Result<ClientSmeGetScheduledScanEnabledResult, fidl::Error> {
1526 let _response = fidl::client::decode_transaction_body::<
1527 fidl::encoding::ResultType<ClientSmeGetScheduledScanEnabledResponse, i32>,
1528 fidl::encoding::DefaultFuchsiaResourceDialect,
1529 0x777e3c8854ff2710,
1530 >(_buf?)?;
1531 Ok(_response.map(|x| x.enabled))
1532 }
1533 self.client.send_query_and_decode::<
1534 fidl::encoding::EmptyPayload,
1535 ClientSmeGetScheduledScanEnabledResult,
1536 >(
1537 (),
1538 0x777e3c8854ff2710,
1539 fidl::encoding::DynamicFlags::empty(),
1540 _decode,
1541 )
1542 }
1543
1544 fn r#connect(
1545 &self,
1546 mut req: &ConnectRequest,
1547 mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1548 ) -> Result<(), fidl::Error> {
1549 self.client.send::<ClientSmeConnectRequest>(
1550 (req, txn),
1551 0x250a0f6fe9f85351,
1552 fidl::encoding::DynamicFlags::empty(),
1553 )
1554 }
1555
1556 fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1557 self.client.send::<ClientSmeRoamRequest>(
1558 (req,),
1559 0x107ead7d84723921,
1560 fidl::encoding::DynamicFlags::empty(),
1561 )
1562 }
1563
1564 type DisconnectResponseFut =
1565 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1566 fn r#disconnect(&self, mut reason: UserDisconnectReason) -> Self::DisconnectResponseFut {
1567 fn _decode(
1568 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1569 ) -> Result<(), fidl::Error> {
1570 let _response = fidl::client::decode_transaction_body::<
1571 fidl::encoding::EmptyPayload,
1572 fidl::encoding::DefaultFuchsiaResourceDialect,
1573 0x39a578de9a107304,
1574 >(_buf?)?;
1575 Ok(_response)
1576 }
1577 self.client.send_query_and_decode::<ClientSmeDisconnectRequest, ()>(
1578 (reason,),
1579 0x39a578de9a107304,
1580 fidl::encoding::DynamicFlags::empty(),
1581 _decode,
1582 )
1583 }
1584
1585 type StatusResponseFut = fidl::client::QueryResponseFut<
1586 ClientStatusResponse,
1587 fidl::encoding::DefaultFuchsiaResourceDialect,
1588 >;
1589 fn r#status(&self) -> Self::StatusResponseFut {
1590 fn _decode(
1591 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1592 ) -> Result<ClientStatusResponse, fidl::Error> {
1593 let _response = fidl::client::decode_transaction_body::<
1594 ClientSmeStatusResponse,
1595 fidl::encoding::DefaultFuchsiaResourceDialect,
1596 0xda00b607470faf2,
1597 >(_buf?)?;
1598 Ok(_response.resp)
1599 }
1600 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ClientStatusResponse>(
1601 (),
1602 0xda00b607470faf2,
1603 fidl::encoding::DynamicFlags::empty(),
1604 _decode,
1605 )
1606 }
1607
1608 type WmmStatusResponseFut = fidl::client::QueryResponseFut<
1609 ClientSmeWmmStatusResult,
1610 fidl::encoding::DefaultFuchsiaResourceDialect,
1611 >;
1612 fn r#wmm_status(&self) -> Self::WmmStatusResponseFut {
1613 fn _decode(
1614 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1615 ) -> Result<ClientSmeWmmStatusResult, fidl::Error> {
1616 let _response = fidl::client::decode_transaction_body::<
1617 fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>,
1618 fidl::encoding::DefaultFuchsiaResourceDialect,
1619 0x3d0ccc75f6baa9e3,
1620 >(_buf?)?;
1621 Ok(_response.map(|x| x.resp))
1622 }
1623 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ClientSmeWmmStatusResult>(
1624 (),
1625 0x3d0ccc75f6baa9e3,
1626 fidl::encoding::DynamicFlags::empty(),
1627 _decode,
1628 )
1629 }
1630
1631 type ScanForControllerResponseFut = fidl::client::QueryResponseFut<
1632 ClientSmeScanForControllerResult,
1633 fidl::encoding::DefaultFuchsiaResourceDialect,
1634 >;
1635 fn r#scan_for_controller(&self, mut req: &ScanRequest) -> Self::ScanForControllerResponseFut {
1636 fn _decode(
1637 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1638 ) -> Result<ClientSmeScanForControllerResult, fidl::Error> {
1639 let _response = fidl::client::decode_transaction_body::<
1640 fidl::encoding::ResultType<ClientSmeScanForControllerResponse, ScanErrorCode>,
1641 fidl::encoding::DefaultFuchsiaResourceDialect,
1642 0x21f00ab22ff79a12,
1643 >(_buf?)?;
1644 Ok(_response.map(|x| x.scan_results))
1645 }
1646 self.client.send_query_and_decode::<
1647 ClientSmeScanForControllerRequest,
1648 ClientSmeScanForControllerResult,
1649 >(
1650 (req,),
1651 0x21f00ab22ff79a12,
1652 fidl::encoding::DynamicFlags::empty(),
1653 _decode,
1654 )
1655 }
1656
1657 type SetMacAddressResponseFut = fidl::client::QueryResponseFut<
1658 ClientSmeSetMacAddressResult,
1659 fidl::encoding::DefaultFuchsiaResourceDialect,
1660 >;
1661 fn r#set_mac_address(&self, mut mac_addr: &[u8; 6]) -> Self::SetMacAddressResponseFut {
1662 fn _decode(
1663 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1664 ) -> Result<ClientSmeSetMacAddressResult, fidl::Error> {
1665 let _response = fidl::client::decode_transaction_body::<
1666 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1667 fidl::encoding::DefaultFuchsiaResourceDialect,
1668 0x13e0a0bee8962f58,
1669 >(_buf?)?;
1670 Ok(_response.map(|x| x))
1671 }
1672 self.client
1673 .send_query_and_decode::<ClientSmeSetMacAddressRequest, ClientSmeSetMacAddressResult>(
1674 (mac_addr,),
1675 0x13e0a0bee8962f58,
1676 fidl::encoding::DynamicFlags::empty(),
1677 _decode,
1678 )
1679 }
1680
1681 type InstallApfPacketFilterResponseFut = fidl::client::QueryResponseFut<
1682 ClientSmeInstallApfPacketFilterResult,
1683 fidl::encoding::DefaultFuchsiaResourceDialect,
1684 >;
1685 fn r#install_apf_packet_filter(
1686 &self,
1687 mut program: &[u8],
1688 ) -> Self::InstallApfPacketFilterResponseFut {
1689 fn _decode(
1690 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1691 ) -> Result<ClientSmeInstallApfPacketFilterResult, fidl::Error> {
1692 let _response = fidl::client::decode_transaction_body::<
1693 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1694 fidl::encoding::DefaultFuchsiaResourceDialect,
1695 0x77435965e7bfaf83,
1696 >(_buf?)?;
1697 Ok(_response.map(|x| x))
1698 }
1699 self.client.send_query_and_decode::<
1700 ClientSmeInstallApfPacketFilterRequest,
1701 ClientSmeInstallApfPacketFilterResult,
1702 >(
1703 (program,),
1704 0x77435965e7bfaf83,
1705 fidl::encoding::DynamicFlags::empty(),
1706 _decode,
1707 )
1708 }
1709
1710 type ReadApfPacketFilterDataResponseFut = fidl::client::QueryResponseFut<
1711 ClientSmeReadApfPacketFilterDataResult,
1712 fidl::encoding::DefaultFuchsiaResourceDialect,
1713 >;
1714 fn r#read_apf_packet_filter_data(&self) -> Self::ReadApfPacketFilterDataResponseFut {
1715 fn _decode(
1716 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1717 ) -> Result<ClientSmeReadApfPacketFilterDataResult, fidl::Error> {
1718 let _response = fidl::client::decode_transaction_body::<
1719 fidl::encoding::ResultType<ClientSmeReadApfPacketFilterDataResponse, i32>,
1720 fidl::encoding::DefaultFuchsiaResourceDialect,
1721 0x66fc6616b9963023,
1722 >(_buf?)?;
1723 Ok(_response.map(|x| x.memory))
1724 }
1725 self.client.send_query_and_decode::<
1726 fidl::encoding::EmptyPayload,
1727 ClientSmeReadApfPacketFilterDataResult,
1728 >(
1729 (),
1730 0x66fc6616b9963023,
1731 fidl::encoding::DynamicFlags::empty(),
1732 _decode,
1733 )
1734 }
1735
1736 type SetApfPacketFilterEnabledResponseFut = fidl::client::QueryResponseFut<
1737 ClientSmeSetApfPacketFilterEnabledResult,
1738 fidl::encoding::DefaultFuchsiaResourceDialect,
1739 >;
1740 fn r#set_apf_packet_filter_enabled(
1741 &self,
1742 mut enabled: bool,
1743 ) -> Self::SetApfPacketFilterEnabledResponseFut {
1744 fn _decode(
1745 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1746 ) -> Result<ClientSmeSetApfPacketFilterEnabledResult, fidl::Error> {
1747 let _response = fidl::client::decode_transaction_body::<
1748 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1749 fidl::encoding::DefaultFuchsiaResourceDialect,
1750 0x5070d2ed31580b81,
1751 >(_buf?)?;
1752 Ok(_response.map(|x| x))
1753 }
1754 self.client.send_query_and_decode::<
1755 ClientSmeSetApfPacketFilterEnabledRequest,
1756 ClientSmeSetApfPacketFilterEnabledResult,
1757 >(
1758 (enabled,),
1759 0x5070d2ed31580b81,
1760 fidl::encoding::DynamicFlags::empty(),
1761 _decode,
1762 )
1763 }
1764
1765 type GetApfPacketFilterEnabledResponseFut = fidl::client::QueryResponseFut<
1766 ClientSmeGetApfPacketFilterEnabledResult,
1767 fidl::encoding::DefaultFuchsiaResourceDialect,
1768 >;
1769 fn r#get_apf_packet_filter_enabled(&self) -> Self::GetApfPacketFilterEnabledResponseFut {
1770 fn _decode(
1771 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1772 ) -> Result<ClientSmeGetApfPacketFilterEnabledResult, fidl::Error> {
1773 let _response = fidl::client::decode_transaction_body::<
1774 fidl::encoding::ResultType<ClientSmeGetApfPacketFilterEnabledResponse, i32>,
1775 fidl::encoding::DefaultFuchsiaResourceDialect,
1776 0xdda5c1533526869,
1777 >(_buf?)?;
1778 Ok(_response.map(|x| x.enabled))
1779 }
1780 self.client.send_query_and_decode::<
1781 fidl::encoding::EmptyPayload,
1782 ClientSmeGetApfPacketFilterEnabledResult,
1783 >(
1784 (),
1785 0xdda5c1533526869,
1786 fidl::encoding::DynamicFlags::empty(),
1787 _decode,
1788 )
1789 }
1790
1791 type StartRssiMonitorResponseFut = fidl::client::QueryResponseFut<
1792 ClientSmeStartRssiMonitorResult,
1793 fidl::encoding::DefaultFuchsiaResourceDialect,
1794 >;
1795 fn r#start_rssi_monitor(
1796 &self,
1797 mut min_rssi_dbm: i8,
1798 mut max_rssi_dbm: i8,
1799 ) -> Self::StartRssiMonitorResponseFut {
1800 fn _decode(
1801 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1802 ) -> Result<ClientSmeStartRssiMonitorResult, fidl::Error> {
1803 let _response = fidl::client::decode_transaction_body::<
1804 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1805 fidl::encoding::DefaultFuchsiaResourceDialect,
1806 0x7d9b4356b07bd699,
1807 >(_buf?)?;
1808 Ok(_response.map(|x| x))
1809 }
1810 self.client.send_query_and_decode::<
1811 ClientSmeStartRssiMonitorRequest,
1812 ClientSmeStartRssiMonitorResult,
1813 >(
1814 (min_rssi_dbm, max_rssi_dbm,),
1815 0x7d9b4356b07bd699,
1816 fidl::encoding::DynamicFlags::empty(),
1817 _decode,
1818 )
1819 }
1820
1821 type StopRssiMonitorResponseFut = fidl::client::QueryResponseFut<
1822 ClientSmeStopRssiMonitorResult,
1823 fidl::encoding::DefaultFuchsiaResourceDialect,
1824 >;
1825 fn r#stop_rssi_monitor(&self) -> Self::StopRssiMonitorResponseFut {
1826 fn _decode(
1827 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1828 ) -> Result<ClientSmeStopRssiMonitorResult, fidl::Error> {
1829 let _response = fidl::client::decode_transaction_body::<
1830 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1831 fidl::encoding::DefaultFuchsiaResourceDialect,
1832 0x1f39005f89565adf,
1833 >(_buf?)?;
1834 Ok(_response.map(|x| x))
1835 }
1836 self.client
1837 .send_query_and_decode::<fidl::encoding::EmptyPayload, ClientSmeStopRssiMonitorResult>(
1838 (),
1839 0x1f39005f89565adf,
1840 fidl::encoding::DynamicFlags::empty(),
1841 _decode,
1842 )
1843 }
1844}
1845
1846pub struct ClientSmeEventStream {
1847 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1848}
1849
1850impl std::marker::Unpin for ClientSmeEventStream {}
1851
1852impl futures::stream::FusedStream for ClientSmeEventStream {
1853 fn is_terminated(&self) -> bool {
1854 self.event_receiver.is_terminated()
1855 }
1856}
1857
1858impl futures::Stream for ClientSmeEventStream {
1859 type Item = Result<ClientSmeEvent, fidl::Error>;
1860
1861 fn poll_next(
1862 mut self: std::pin::Pin<&mut Self>,
1863 cx: &mut std::task::Context<'_>,
1864 ) -> std::task::Poll<Option<Self::Item>> {
1865 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1866 &mut self.event_receiver,
1867 cx
1868 )?) {
1869 Some(buf) => std::task::Poll::Ready(Some(ClientSmeEvent::decode(buf))),
1870 None => std::task::Poll::Ready(None),
1871 }
1872 }
1873}
1874
1875#[derive(Debug)]
1876pub enum ClientSmeEvent {}
1877
1878impl ClientSmeEvent {
1879 fn decode(
1881 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1882 ) -> Result<ClientSmeEvent, fidl::Error> {
1883 let (bytes, _handles) = buf.split_mut();
1884 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1885 debug_assert_eq!(tx_header.tx_id, 0);
1886 match tx_header.ordinal {
1887 _ => Err(fidl::Error::UnknownOrdinal {
1888 ordinal: tx_header.ordinal,
1889 protocol_name: <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1890 }),
1891 }
1892 }
1893}
1894
1895pub struct ClientSmeRequestStream {
1897 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1898 is_terminated: bool,
1899}
1900
1901impl std::marker::Unpin for ClientSmeRequestStream {}
1902
1903impl futures::stream::FusedStream for ClientSmeRequestStream {
1904 fn is_terminated(&self) -> bool {
1905 self.is_terminated
1906 }
1907}
1908
1909impl fidl::endpoints::RequestStream for ClientSmeRequestStream {
1910 type Protocol = ClientSmeMarker;
1911 type ControlHandle = ClientSmeControlHandle;
1912
1913 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1914 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1915 }
1916
1917 fn control_handle(&self) -> Self::ControlHandle {
1918 ClientSmeControlHandle { inner: self.inner.clone() }
1919 }
1920
1921 fn into_inner(
1922 self,
1923 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1924 {
1925 (self.inner, self.is_terminated)
1926 }
1927
1928 fn from_inner(
1929 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1930 is_terminated: bool,
1931 ) -> Self {
1932 Self { inner, is_terminated }
1933 }
1934}
1935
1936impl futures::Stream for ClientSmeRequestStream {
1937 type Item = Result<ClientSmeRequest, fidl::Error>;
1938
1939 fn poll_next(
1940 mut self: std::pin::Pin<&mut Self>,
1941 cx: &mut std::task::Context<'_>,
1942 ) -> std::task::Poll<Option<Self::Item>> {
1943 let this = &mut *self;
1944 if this.inner.check_shutdown(cx) {
1945 this.is_terminated = true;
1946 return std::task::Poll::Ready(None);
1947 }
1948 if this.is_terminated {
1949 panic!("polled ClientSmeRequestStream after completion");
1950 }
1951 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1952 |bytes, handles| {
1953 match this.inner.channel().read_etc(cx, bytes, handles) {
1954 std::task::Poll::Ready(Ok(())) => {}
1955 std::task::Poll::Pending => return std::task::Poll::Pending,
1956 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1957 this.is_terminated = true;
1958 return std::task::Poll::Ready(None);
1959 }
1960 std::task::Poll::Ready(Err(e)) => {
1961 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1962 e.into(),
1963 ))));
1964 }
1965 }
1966
1967 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1969
1970 std::task::Poll::Ready(Some(match header.ordinal {
1971 0xded0ce3b1685822 => {
1972 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1973 let mut req = fidl::new_empty!(
1974 ClientSmeScanRequest,
1975 fidl::encoding::DefaultFuchsiaResourceDialect
1976 );
1977 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeScanRequest>(&header, _body_bytes, handles, &mut req)?;
1978 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1979 Ok(ClientSmeRequest::Scan {
1980 req: req.req,
1981
1982 responder: ClientSmeScanResponder {
1983 control_handle: std::mem::ManuallyDrop::new(control_handle),
1984 tx_id: header.tx_id,
1985 },
1986 })
1987 }
1988 0x97eedb559e6bdb8 => {
1989 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1990 let mut req = fidl::new_empty!(
1991 ClientSmeStartScheduledScanRequest,
1992 fidl::encoding::DefaultFuchsiaResourceDialect
1993 );
1994 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeStartScheduledScanRequest>(&header, _body_bytes, handles, &mut req)?;
1995 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1996 Ok(ClientSmeRequest::StartScheduledScan {
1997 req: req.req,
1998 txn: req.txn,
1999
2000 responder: ClientSmeStartScheduledScanResponder {
2001 control_handle: std::mem::ManuallyDrop::new(control_handle),
2002 tx_id: header.tx_id,
2003 },
2004 })
2005 }
2006 0x777e3c8854ff2710 => {
2007 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2008 let mut req = fidl::new_empty!(
2009 fidl::encoding::EmptyPayload,
2010 fidl::encoding::DefaultFuchsiaResourceDialect
2011 );
2012 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2013 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2014 Ok(ClientSmeRequest::GetScheduledScanEnabled {
2015 responder: ClientSmeGetScheduledScanEnabledResponder {
2016 control_handle: std::mem::ManuallyDrop::new(control_handle),
2017 tx_id: header.tx_id,
2018 },
2019 })
2020 }
2021 0x250a0f6fe9f85351 => {
2022 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2023 let mut req = fidl::new_empty!(
2024 ClientSmeConnectRequest,
2025 fidl::encoding::DefaultFuchsiaResourceDialect
2026 );
2027 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeConnectRequest>(&header, _body_bytes, handles, &mut req)?;
2028 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2029 Ok(ClientSmeRequest::Connect { req: req.req, txn: req.txn, control_handle })
2030 }
2031 0x107ead7d84723921 => {
2032 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2033 let mut req = fidl::new_empty!(
2034 ClientSmeRoamRequest,
2035 fidl::encoding::DefaultFuchsiaResourceDialect
2036 );
2037 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeRoamRequest>(&header, _body_bytes, handles, &mut req)?;
2038 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2039 Ok(ClientSmeRequest::Roam { req: req.req, control_handle })
2040 }
2041 0x39a578de9a107304 => {
2042 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2043 let mut req = fidl::new_empty!(
2044 ClientSmeDisconnectRequest,
2045 fidl::encoding::DefaultFuchsiaResourceDialect
2046 );
2047 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeDisconnectRequest>(&header, _body_bytes, handles, &mut req)?;
2048 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2049 Ok(ClientSmeRequest::Disconnect {
2050 reason: req.reason,
2051
2052 responder: ClientSmeDisconnectResponder {
2053 control_handle: std::mem::ManuallyDrop::new(control_handle),
2054 tx_id: header.tx_id,
2055 },
2056 })
2057 }
2058 0xda00b607470faf2 => {
2059 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2060 let mut req = fidl::new_empty!(
2061 fidl::encoding::EmptyPayload,
2062 fidl::encoding::DefaultFuchsiaResourceDialect
2063 );
2064 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2065 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2066 Ok(ClientSmeRequest::Status {
2067 responder: ClientSmeStatusResponder {
2068 control_handle: std::mem::ManuallyDrop::new(control_handle),
2069 tx_id: header.tx_id,
2070 },
2071 })
2072 }
2073 0x3d0ccc75f6baa9e3 => {
2074 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2075 let mut req = fidl::new_empty!(
2076 fidl::encoding::EmptyPayload,
2077 fidl::encoding::DefaultFuchsiaResourceDialect
2078 );
2079 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2080 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2081 Ok(ClientSmeRequest::WmmStatus {
2082 responder: ClientSmeWmmStatusResponder {
2083 control_handle: std::mem::ManuallyDrop::new(control_handle),
2084 tx_id: header.tx_id,
2085 },
2086 })
2087 }
2088 0x21f00ab22ff79a12 => {
2089 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2090 let mut req = fidl::new_empty!(
2091 ClientSmeScanForControllerRequest,
2092 fidl::encoding::DefaultFuchsiaResourceDialect
2093 );
2094 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeScanForControllerRequest>(&header, _body_bytes, handles, &mut req)?;
2095 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2096 Ok(ClientSmeRequest::ScanForController {
2097 req: req.req,
2098
2099 responder: ClientSmeScanForControllerResponder {
2100 control_handle: std::mem::ManuallyDrop::new(control_handle),
2101 tx_id: header.tx_id,
2102 },
2103 })
2104 }
2105 0x13e0a0bee8962f58 => {
2106 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2107 let mut req = fidl::new_empty!(
2108 ClientSmeSetMacAddressRequest,
2109 fidl::encoding::DefaultFuchsiaResourceDialect
2110 );
2111 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeSetMacAddressRequest>(&header, _body_bytes, handles, &mut req)?;
2112 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2113 Ok(ClientSmeRequest::SetMacAddress {
2114 mac_addr: req.mac_addr,
2115
2116 responder: ClientSmeSetMacAddressResponder {
2117 control_handle: std::mem::ManuallyDrop::new(control_handle),
2118 tx_id: header.tx_id,
2119 },
2120 })
2121 }
2122 0x77435965e7bfaf83 => {
2123 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2124 let mut req = fidl::new_empty!(
2125 ClientSmeInstallApfPacketFilterRequest,
2126 fidl::encoding::DefaultFuchsiaResourceDialect
2127 );
2128 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeInstallApfPacketFilterRequest>(&header, _body_bytes, handles, &mut req)?;
2129 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2130 Ok(ClientSmeRequest::InstallApfPacketFilter {
2131 program: req.program,
2132
2133 responder: ClientSmeInstallApfPacketFilterResponder {
2134 control_handle: std::mem::ManuallyDrop::new(control_handle),
2135 tx_id: header.tx_id,
2136 },
2137 })
2138 }
2139 0x66fc6616b9963023 => {
2140 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2141 let mut req = fidl::new_empty!(
2142 fidl::encoding::EmptyPayload,
2143 fidl::encoding::DefaultFuchsiaResourceDialect
2144 );
2145 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2146 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2147 Ok(ClientSmeRequest::ReadApfPacketFilterData {
2148 responder: ClientSmeReadApfPacketFilterDataResponder {
2149 control_handle: std::mem::ManuallyDrop::new(control_handle),
2150 tx_id: header.tx_id,
2151 },
2152 })
2153 }
2154 0x5070d2ed31580b81 => {
2155 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2156 let mut req = fidl::new_empty!(
2157 ClientSmeSetApfPacketFilterEnabledRequest,
2158 fidl::encoding::DefaultFuchsiaResourceDialect
2159 );
2160 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeSetApfPacketFilterEnabledRequest>(&header, _body_bytes, handles, &mut req)?;
2161 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2162 Ok(ClientSmeRequest::SetApfPacketFilterEnabled {
2163 enabled: req.enabled,
2164
2165 responder: ClientSmeSetApfPacketFilterEnabledResponder {
2166 control_handle: std::mem::ManuallyDrop::new(control_handle),
2167 tx_id: header.tx_id,
2168 },
2169 })
2170 }
2171 0xdda5c1533526869 => {
2172 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2173 let mut req = fidl::new_empty!(
2174 fidl::encoding::EmptyPayload,
2175 fidl::encoding::DefaultFuchsiaResourceDialect
2176 );
2177 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2178 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2179 Ok(ClientSmeRequest::GetApfPacketFilterEnabled {
2180 responder: ClientSmeGetApfPacketFilterEnabledResponder {
2181 control_handle: std::mem::ManuallyDrop::new(control_handle),
2182 tx_id: header.tx_id,
2183 },
2184 })
2185 }
2186 0x7d9b4356b07bd699 => {
2187 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2188 let mut req = fidl::new_empty!(
2189 ClientSmeStartRssiMonitorRequest,
2190 fidl::encoding::DefaultFuchsiaResourceDialect
2191 );
2192 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeStartRssiMonitorRequest>(&header, _body_bytes, handles, &mut req)?;
2193 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2194 Ok(ClientSmeRequest::StartRssiMonitor {
2195 min_rssi_dbm: req.min_rssi_dbm,
2196 max_rssi_dbm: req.max_rssi_dbm,
2197
2198 responder: ClientSmeStartRssiMonitorResponder {
2199 control_handle: std::mem::ManuallyDrop::new(control_handle),
2200 tx_id: header.tx_id,
2201 },
2202 })
2203 }
2204 0x1f39005f89565adf => {
2205 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2206 let mut req = fidl::new_empty!(
2207 fidl::encoding::EmptyPayload,
2208 fidl::encoding::DefaultFuchsiaResourceDialect
2209 );
2210 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2211 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
2212 Ok(ClientSmeRequest::StopRssiMonitor {
2213 responder: ClientSmeStopRssiMonitorResponder {
2214 control_handle: std::mem::ManuallyDrop::new(control_handle),
2215 tx_id: header.tx_id,
2216 },
2217 })
2218 }
2219 _ => Err(fidl::Error::UnknownOrdinal {
2220 ordinal: header.ordinal,
2221 protocol_name:
2222 <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2223 }),
2224 }))
2225 },
2226 )
2227 }
2228}
2229
2230#[derive(Debug)]
2231pub enum ClientSmeRequest {
2232 Scan {
2233 req: ScanRequest,
2234 responder: ClientSmeScanResponder,
2235 },
2236 StartScheduledScan {
2238 req: fidl_fuchsia_wlan_common::ScheduledScanRequest,
2239 txn: fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
2240 responder: ClientSmeStartScheduledScanResponder,
2241 },
2242 GetScheduledScanEnabled {
2244 responder: ClientSmeGetScheduledScanEnabledResponder,
2245 },
2246 Connect {
2247 req: ConnectRequest,
2248 txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
2249 control_handle: ClientSmeControlHandle,
2250 },
2251 Roam {
2252 req: RoamRequest,
2253 control_handle: ClientSmeControlHandle,
2254 },
2255 Disconnect {
2256 reason: UserDisconnectReason,
2257 responder: ClientSmeDisconnectResponder,
2258 },
2259 Status {
2260 responder: ClientSmeStatusResponder,
2261 },
2262 WmmStatus {
2263 responder: ClientSmeWmmStatusResponder,
2264 },
2265 ScanForController {
2266 req: ScanRequest,
2267 responder: ClientSmeScanForControllerResponder,
2268 },
2269 SetMacAddress {
2270 mac_addr: [u8; 6],
2271 responder: ClientSmeSetMacAddressResponder,
2272 },
2273 InstallApfPacketFilter {
2274 program: Vec<u8>,
2275 responder: ClientSmeInstallApfPacketFilterResponder,
2276 },
2277 ReadApfPacketFilterData {
2278 responder: ClientSmeReadApfPacketFilterDataResponder,
2279 },
2280 SetApfPacketFilterEnabled {
2281 enabled: bool,
2282 responder: ClientSmeSetApfPacketFilterEnabledResponder,
2283 },
2284 GetApfPacketFilterEnabled {
2285 responder: ClientSmeGetApfPacketFilterEnabledResponder,
2286 },
2287 StartRssiMonitor {
2288 min_rssi_dbm: i8,
2289 max_rssi_dbm: i8,
2290 responder: ClientSmeStartRssiMonitorResponder,
2291 },
2292 StopRssiMonitor {
2293 responder: ClientSmeStopRssiMonitorResponder,
2294 },
2295}
2296
2297impl ClientSmeRequest {
2298 #[allow(irrefutable_let_patterns)]
2299 pub fn into_scan(self) -> Option<(ScanRequest, ClientSmeScanResponder)> {
2300 if let ClientSmeRequest::Scan { req, responder } = self {
2301 Some((req, responder))
2302 } else {
2303 None
2304 }
2305 }
2306
2307 #[allow(irrefutable_let_patterns)]
2308 pub fn into_start_scheduled_scan(
2309 self,
2310 ) -> Option<(
2311 fidl_fuchsia_wlan_common::ScheduledScanRequest,
2312 fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
2313 ClientSmeStartScheduledScanResponder,
2314 )> {
2315 if let ClientSmeRequest::StartScheduledScan { req, txn, responder } = self {
2316 Some((req, txn, responder))
2317 } else {
2318 None
2319 }
2320 }
2321
2322 #[allow(irrefutable_let_patterns)]
2323 pub fn into_get_scheduled_scan_enabled(
2324 self,
2325 ) -> Option<(ClientSmeGetScheduledScanEnabledResponder)> {
2326 if let ClientSmeRequest::GetScheduledScanEnabled { responder } = self {
2327 Some((responder))
2328 } else {
2329 None
2330 }
2331 }
2332
2333 #[allow(irrefutable_let_patterns)]
2334 pub fn into_connect(
2335 self,
2336 ) -> Option<(
2337 ConnectRequest,
2338 Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
2339 ClientSmeControlHandle,
2340 )> {
2341 if let ClientSmeRequest::Connect { req, txn, control_handle } = self {
2342 Some((req, txn, control_handle))
2343 } else {
2344 None
2345 }
2346 }
2347
2348 #[allow(irrefutable_let_patterns)]
2349 pub fn into_roam(self) -> Option<(RoamRequest, ClientSmeControlHandle)> {
2350 if let ClientSmeRequest::Roam { req, control_handle } = self {
2351 Some((req, control_handle))
2352 } else {
2353 None
2354 }
2355 }
2356
2357 #[allow(irrefutable_let_patterns)]
2358 pub fn into_disconnect(self) -> Option<(UserDisconnectReason, ClientSmeDisconnectResponder)> {
2359 if let ClientSmeRequest::Disconnect { reason, responder } = self {
2360 Some((reason, responder))
2361 } else {
2362 None
2363 }
2364 }
2365
2366 #[allow(irrefutable_let_patterns)]
2367 pub fn into_status(self) -> Option<(ClientSmeStatusResponder)> {
2368 if let ClientSmeRequest::Status { responder } = self { Some((responder)) } else { None }
2369 }
2370
2371 #[allow(irrefutable_let_patterns)]
2372 pub fn into_wmm_status(self) -> Option<(ClientSmeWmmStatusResponder)> {
2373 if let ClientSmeRequest::WmmStatus { responder } = self { Some((responder)) } else { None }
2374 }
2375
2376 #[allow(irrefutable_let_patterns)]
2377 pub fn into_scan_for_controller(
2378 self,
2379 ) -> Option<(ScanRequest, ClientSmeScanForControllerResponder)> {
2380 if let ClientSmeRequest::ScanForController { req, responder } = self {
2381 Some((req, responder))
2382 } else {
2383 None
2384 }
2385 }
2386
2387 #[allow(irrefutable_let_patterns)]
2388 pub fn into_set_mac_address(self) -> Option<([u8; 6], ClientSmeSetMacAddressResponder)> {
2389 if let ClientSmeRequest::SetMacAddress { mac_addr, responder } = self {
2390 Some((mac_addr, responder))
2391 } else {
2392 None
2393 }
2394 }
2395
2396 #[allow(irrefutable_let_patterns)]
2397 pub fn into_install_apf_packet_filter(
2398 self,
2399 ) -> Option<(Vec<u8>, ClientSmeInstallApfPacketFilterResponder)> {
2400 if let ClientSmeRequest::InstallApfPacketFilter { program, responder } = self {
2401 Some((program, responder))
2402 } else {
2403 None
2404 }
2405 }
2406
2407 #[allow(irrefutable_let_patterns)]
2408 pub fn into_read_apf_packet_filter_data(
2409 self,
2410 ) -> Option<(ClientSmeReadApfPacketFilterDataResponder)> {
2411 if let ClientSmeRequest::ReadApfPacketFilterData { responder } = self {
2412 Some((responder))
2413 } else {
2414 None
2415 }
2416 }
2417
2418 #[allow(irrefutable_let_patterns)]
2419 pub fn into_set_apf_packet_filter_enabled(
2420 self,
2421 ) -> Option<(bool, ClientSmeSetApfPacketFilterEnabledResponder)> {
2422 if let ClientSmeRequest::SetApfPacketFilterEnabled { enabled, responder } = self {
2423 Some((enabled, responder))
2424 } else {
2425 None
2426 }
2427 }
2428
2429 #[allow(irrefutable_let_patterns)]
2430 pub fn into_get_apf_packet_filter_enabled(
2431 self,
2432 ) -> Option<(ClientSmeGetApfPacketFilterEnabledResponder)> {
2433 if let ClientSmeRequest::GetApfPacketFilterEnabled { responder } = self {
2434 Some((responder))
2435 } else {
2436 None
2437 }
2438 }
2439
2440 #[allow(irrefutable_let_patterns)]
2441 pub fn into_start_rssi_monitor(self) -> Option<(i8, i8, ClientSmeStartRssiMonitorResponder)> {
2442 if let ClientSmeRequest::StartRssiMonitor { min_rssi_dbm, max_rssi_dbm, responder } = self {
2443 Some((min_rssi_dbm, max_rssi_dbm, responder))
2444 } else {
2445 None
2446 }
2447 }
2448
2449 #[allow(irrefutable_let_patterns)]
2450 pub fn into_stop_rssi_monitor(self) -> Option<(ClientSmeStopRssiMonitorResponder)> {
2451 if let ClientSmeRequest::StopRssiMonitor { responder } = self {
2452 Some((responder))
2453 } else {
2454 None
2455 }
2456 }
2457
2458 pub fn method_name(&self) -> &'static str {
2460 match *self {
2461 ClientSmeRequest::Scan { .. } => "scan",
2462 ClientSmeRequest::StartScheduledScan { .. } => "start_scheduled_scan",
2463 ClientSmeRequest::GetScheduledScanEnabled { .. } => "get_scheduled_scan_enabled",
2464 ClientSmeRequest::Connect { .. } => "connect",
2465 ClientSmeRequest::Roam { .. } => "roam",
2466 ClientSmeRequest::Disconnect { .. } => "disconnect",
2467 ClientSmeRequest::Status { .. } => "status",
2468 ClientSmeRequest::WmmStatus { .. } => "wmm_status",
2469 ClientSmeRequest::ScanForController { .. } => "scan_for_controller",
2470 ClientSmeRequest::SetMacAddress { .. } => "set_mac_address",
2471 ClientSmeRequest::InstallApfPacketFilter { .. } => "install_apf_packet_filter",
2472 ClientSmeRequest::ReadApfPacketFilterData { .. } => "read_apf_packet_filter_data",
2473 ClientSmeRequest::SetApfPacketFilterEnabled { .. } => "set_apf_packet_filter_enabled",
2474 ClientSmeRequest::GetApfPacketFilterEnabled { .. } => "get_apf_packet_filter_enabled",
2475 ClientSmeRequest::StartRssiMonitor { .. } => "start_rssi_monitor",
2476 ClientSmeRequest::StopRssiMonitor { .. } => "stop_rssi_monitor",
2477 }
2478 }
2479}
2480
2481#[derive(Debug, Clone)]
2482pub struct ClientSmeControlHandle {
2483 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2484}
2485
2486impl ClientSmeControlHandle {
2487 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
2488 self.inner.shutdown_with_epitaph(status.into())
2489 }
2490}
2491
2492impl fidl::endpoints::ControlHandle for ClientSmeControlHandle {
2493 fn shutdown(&self) {
2494 self.inner.shutdown()
2495 }
2496
2497 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
2498 self.inner.shutdown_with_epitaph(status)
2499 }
2500
2501 fn is_closed(&self) -> bool {
2502 self.inner.channel().is_closed()
2503 }
2504 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2505 self.inner.channel().on_closed()
2506 }
2507
2508 #[cfg(target_os = "fuchsia")]
2509 fn signal_peer(
2510 &self,
2511 clear_mask: zx::Signals,
2512 set_mask: zx::Signals,
2513 ) -> Result<(), zx_status::Status> {
2514 use fidl::Peered;
2515 self.inner.channel().signal_peer(clear_mask, set_mask)
2516 }
2517}
2518
2519impl ClientSmeControlHandle {}
2520
2521#[must_use = "FIDL methods require a response to be sent"]
2522#[derive(Debug)]
2523pub struct ClientSmeScanResponder {
2524 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2525 tx_id: u32,
2526}
2527
2528impl std::ops::Drop for ClientSmeScanResponder {
2532 fn drop(&mut self) {
2533 self.control_handle.shutdown();
2534 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2536 }
2537}
2538
2539impl fidl::endpoints::Responder for ClientSmeScanResponder {
2540 type ControlHandle = ClientSmeControlHandle;
2541
2542 fn control_handle(&self) -> &ClientSmeControlHandle {
2543 &self.control_handle
2544 }
2545
2546 fn drop_without_shutdown(mut self) {
2547 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2549 std::mem::forget(self);
2551 }
2552}
2553
2554impl ClientSmeScanResponder {
2555 pub fn send(self, mut result: Result<fidl::Vmo, ScanErrorCode>) -> Result<(), fidl::Error> {
2559 let _result = self.send_raw(result);
2560 if _result.is_err() {
2561 self.control_handle.shutdown();
2562 }
2563 self.drop_without_shutdown();
2564 _result
2565 }
2566
2567 pub fn send_no_shutdown_on_err(
2569 self,
2570 mut result: Result<fidl::Vmo, ScanErrorCode>,
2571 ) -> Result<(), fidl::Error> {
2572 let _result = self.send_raw(result);
2573 self.drop_without_shutdown();
2574 _result
2575 }
2576
2577 fn send_raw(&self, mut result: Result<fidl::Vmo, ScanErrorCode>) -> Result<(), fidl::Error> {
2578 self.control_handle
2579 .inner
2580 .send::<fidl::encoding::ResultType<ClientSmeScanResponse, ScanErrorCode>>(
2581 result.map(|scan_results| (scan_results,)),
2582 self.tx_id,
2583 0xded0ce3b1685822,
2584 fidl::encoding::DynamicFlags::empty(),
2585 )
2586 }
2587}
2588
2589#[must_use = "FIDL methods require a response to be sent"]
2590#[derive(Debug)]
2591pub struct ClientSmeStartScheduledScanResponder {
2592 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2593 tx_id: u32,
2594}
2595
2596impl std::ops::Drop for ClientSmeStartScheduledScanResponder {
2600 fn drop(&mut self) {
2601 self.control_handle.shutdown();
2602 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2604 }
2605}
2606
2607impl fidl::endpoints::Responder for ClientSmeStartScheduledScanResponder {
2608 type ControlHandle = ClientSmeControlHandle;
2609
2610 fn control_handle(&self) -> &ClientSmeControlHandle {
2611 &self.control_handle
2612 }
2613
2614 fn drop_without_shutdown(mut self) {
2615 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2617 std::mem::forget(self);
2619 }
2620}
2621
2622impl ClientSmeStartScheduledScanResponder {
2623 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2627 let _result = self.send_raw(result);
2628 if _result.is_err() {
2629 self.control_handle.shutdown();
2630 }
2631 self.drop_without_shutdown();
2632 _result
2633 }
2634
2635 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2637 let _result = self.send_raw(result);
2638 self.drop_without_shutdown();
2639 _result
2640 }
2641
2642 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2643 self.control_handle
2644 .inner
2645 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2646 result,
2647 self.tx_id,
2648 0x97eedb559e6bdb8,
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 ClientSmeGetScheduledScanEnabledResponder {
2657 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2658 tx_id: u32,
2659}
2660
2661impl std::ops::Drop for ClientSmeGetScheduledScanEnabledResponder {
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 ClientSmeGetScheduledScanEnabledResponder {
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 ClientSmeGetScheduledScanEnabledResponder {
2688 pub fn send(self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
2692 let _result = self.send_raw(result);
2693 if _result.is_err() {
2694 self.control_handle.shutdown();
2695 }
2696 self.drop_without_shutdown();
2697 _result
2698 }
2699
2700 pub fn send_no_shutdown_on_err(self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
2702 let _result = self.send_raw(result);
2703 self.drop_without_shutdown();
2704 _result
2705 }
2706
2707 fn send_raw(&self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
2708 self.control_handle.inner.send::<fidl::encoding::ResultType<
2709 ClientSmeGetScheduledScanEnabledResponse,
2710 i32,
2711 >>(
2712 result.map(|enabled| (enabled,)),
2713 self.tx_id,
2714 0x777e3c8854ff2710,
2715 fidl::encoding::DynamicFlags::empty(),
2716 )
2717 }
2718}
2719
2720#[must_use = "FIDL methods require a response to be sent"]
2721#[derive(Debug)]
2722pub struct ClientSmeDisconnectResponder {
2723 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2724 tx_id: u32,
2725}
2726
2727impl std::ops::Drop for ClientSmeDisconnectResponder {
2731 fn drop(&mut self) {
2732 self.control_handle.shutdown();
2733 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2735 }
2736}
2737
2738impl fidl::endpoints::Responder for ClientSmeDisconnectResponder {
2739 type ControlHandle = ClientSmeControlHandle;
2740
2741 fn control_handle(&self) -> &ClientSmeControlHandle {
2742 &self.control_handle
2743 }
2744
2745 fn drop_without_shutdown(mut self) {
2746 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2748 std::mem::forget(self);
2750 }
2751}
2752
2753impl ClientSmeDisconnectResponder {
2754 pub fn send(self) -> Result<(), fidl::Error> {
2758 let _result = self.send_raw();
2759 if _result.is_err() {
2760 self.control_handle.shutdown();
2761 }
2762 self.drop_without_shutdown();
2763 _result
2764 }
2765
2766 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
2768 let _result = self.send_raw();
2769 self.drop_without_shutdown();
2770 _result
2771 }
2772
2773 fn send_raw(&self) -> Result<(), fidl::Error> {
2774 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
2775 (),
2776 self.tx_id,
2777 0x39a578de9a107304,
2778 fidl::encoding::DynamicFlags::empty(),
2779 )
2780 }
2781}
2782
2783#[must_use = "FIDL methods require a response to be sent"]
2784#[derive(Debug)]
2785pub struct ClientSmeStatusResponder {
2786 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2787 tx_id: u32,
2788}
2789
2790impl std::ops::Drop for ClientSmeStatusResponder {
2794 fn drop(&mut self) {
2795 self.control_handle.shutdown();
2796 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2798 }
2799}
2800
2801impl fidl::endpoints::Responder for ClientSmeStatusResponder {
2802 type ControlHandle = ClientSmeControlHandle;
2803
2804 fn control_handle(&self) -> &ClientSmeControlHandle {
2805 &self.control_handle
2806 }
2807
2808 fn drop_without_shutdown(mut self) {
2809 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2811 std::mem::forget(self);
2813 }
2814}
2815
2816impl ClientSmeStatusResponder {
2817 pub fn send(self, mut resp: &ClientStatusResponse) -> Result<(), fidl::Error> {
2821 let _result = self.send_raw(resp);
2822 if _result.is_err() {
2823 self.control_handle.shutdown();
2824 }
2825 self.drop_without_shutdown();
2826 _result
2827 }
2828
2829 pub fn send_no_shutdown_on_err(
2831 self,
2832 mut resp: &ClientStatusResponse,
2833 ) -> Result<(), fidl::Error> {
2834 let _result = self.send_raw(resp);
2835 self.drop_without_shutdown();
2836 _result
2837 }
2838
2839 fn send_raw(&self, mut resp: &ClientStatusResponse) -> Result<(), fidl::Error> {
2840 self.control_handle.inner.send::<ClientSmeStatusResponse>(
2841 (resp,),
2842 self.tx_id,
2843 0xda00b607470faf2,
2844 fidl::encoding::DynamicFlags::empty(),
2845 )
2846 }
2847}
2848
2849#[must_use = "FIDL methods require a response to be sent"]
2850#[derive(Debug)]
2851pub struct ClientSmeWmmStatusResponder {
2852 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2853 tx_id: u32,
2854}
2855
2856impl std::ops::Drop for ClientSmeWmmStatusResponder {
2860 fn drop(&mut self) {
2861 self.control_handle.shutdown();
2862 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2864 }
2865}
2866
2867impl fidl::endpoints::Responder for ClientSmeWmmStatusResponder {
2868 type ControlHandle = ClientSmeControlHandle;
2869
2870 fn control_handle(&self) -> &ClientSmeControlHandle {
2871 &self.control_handle
2872 }
2873
2874 fn drop_without_shutdown(mut self) {
2875 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2877 std::mem::forget(self);
2879 }
2880}
2881
2882impl ClientSmeWmmStatusResponder {
2883 pub fn send(
2887 self,
2888 mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
2889 ) -> Result<(), fidl::Error> {
2890 let _result = self.send_raw(result);
2891 if _result.is_err() {
2892 self.control_handle.shutdown();
2893 }
2894 self.drop_without_shutdown();
2895 _result
2896 }
2897
2898 pub fn send_no_shutdown_on_err(
2900 self,
2901 mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
2902 ) -> Result<(), fidl::Error> {
2903 let _result = self.send_raw(result);
2904 self.drop_without_shutdown();
2905 _result
2906 }
2907
2908 fn send_raw(
2909 &self,
2910 mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
2911 ) -> Result<(), fidl::Error> {
2912 self.control_handle
2913 .inner
2914 .send::<fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>>(
2915 result.map(|resp| (resp,)),
2916 self.tx_id,
2917 0x3d0ccc75f6baa9e3,
2918 fidl::encoding::DynamicFlags::empty(),
2919 )
2920 }
2921}
2922
2923#[must_use = "FIDL methods require a response to be sent"]
2924#[derive(Debug)]
2925pub struct ClientSmeScanForControllerResponder {
2926 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2927 tx_id: u32,
2928}
2929
2930impl std::ops::Drop for ClientSmeScanForControllerResponder {
2934 fn drop(&mut self) {
2935 self.control_handle.shutdown();
2936 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2938 }
2939}
2940
2941impl fidl::endpoints::Responder for ClientSmeScanForControllerResponder {
2942 type ControlHandle = ClientSmeControlHandle;
2943
2944 fn control_handle(&self) -> &ClientSmeControlHandle {
2945 &self.control_handle
2946 }
2947
2948 fn drop_without_shutdown(mut self) {
2949 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2951 std::mem::forget(self);
2953 }
2954}
2955
2956impl ClientSmeScanForControllerResponder {
2957 pub fn send(self, mut result: Result<&[ScanResult], ScanErrorCode>) -> Result<(), fidl::Error> {
2961 let _result = self.send_raw(result);
2962 if _result.is_err() {
2963 self.control_handle.shutdown();
2964 }
2965 self.drop_without_shutdown();
2966 _result
2967 }
2968
2969 pub fn send_no_shutdown_on_err(
2971 self,
2972 mut result: Result<&[ScanResult], ScanErrorCode>,
2973 ) -> Result<(), fidl::Error> {
2974 let _result = self.send_raw(result);
2975 self.drop_without_shutdown();
2976 _result
2977 }
2978
2979 fn send_raw(
2980 &self,
2981 mut result: Result<&[ScanResult], ScanErrorCode>,
2982 ) -> Result<(), fidl::Error> {
2983 self.control_handle.inner.send::<fidl::encoding::ResultType<
2984 ClientSmeScanForControllerResponse,
2985 ScanErrorCode,
2986 >>(
2987 result.map(|scan_results| (scan_results,)),
2988 self.tx_id,
2989 0x21f00ab22ff79a12,
2990 fidl::encoding::DynamicFlags::empty(),
2991 )
2992 }
2993}
2994
2995#[must_use = "FIDL methods require a response to be sent"]
2996#[derive(Debug)]
2997pub struct ClientSmeSetMacAddressResponder {
2998 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2999 tx_id: u32,
3000}
3001
3002impl std::ops::Drop for ClientSmeSetMacAddressResponder {
3006 fn drop(&mut self) {
3007 self.control_handle.shutdown();
3008 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3010 }
3011}
3012
3013impl fidl::endpoints::Responder for ClientSmeSetMacAddressResponder {
3014 type ControlHandle = ClientSmeControlHandle;
3015
3016 fn control_handle(&self) -> &ClientSmeControlHandle {
3017 &self.control_handle
3018 }
3019
3020 fn drop_without_shutdown(mut self) {
3021 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3023 std::mem::forget(self);
3025 }
3026}
3027
3028impl ClientSmeSetMacAddressResponder {
3029 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3033 let _result = self.send_raw(result);
3034 if _result.is_err() {
3035 self.control_handle.shutdown();
3036 }
3037 self.drop_without_shutdown();
3038 _result
3039 }
3040
3041 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3043 let _result = self.send_raw(result);
3044 self.drop_without_shutdown();
3045 _result
3046 }
3047
3048 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3049 self.control_handle
3050 .inner
3051 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3052 result,
3053 self.tx_id,
3054 0x13e0a0bee8962f58,
3055 fidl::encoding::DynamicFlags::empty(),
3056 )
3057 }
3058}
3059
3060#[must_use = "FIDL methods require a response to be sent"]
3061#[derive(Debug)]
3062pub struct ClientSmeInstallApfPacketFilterResponder {
3063 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
3064 tx_id: u32,
3065}
3066
3067impl std::ops::Drop for ClientSmeInstallApfPacketFilterResponder {
3071 fn drop(&mut self) {
3072 self.control_handle.shutdown();
3073 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3075 }
3076}
3077
3078impl fidl::endpoints::Responder for ClientSmeInstallApfPacketFilterResponder {
3079 type ControlHandle = ClientSmeControlHandle;
3080
3081 fn control_handle(&self) -> &ClientSmeControlHandle {
3082 &self.control_handle
3083 }
3084
3085 fn drop_without_shutdown(mut self) {
3086 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3088 std::mem::forget(self);
3090 }
3091}
3092
3093impl ClientSmeInstallApfPacketFilterResponder {
3094 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3098 let _result = self.send_raw(result);
3099 if _result.is_err() {
3100 self.control_handle.shutdown();
3101 }
3102 self.drop_without_shutdown();
3103 _result
3104 }
3105
3106 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3108 let _result = self.send_raw(result);
3109 self.drop_without_shutdown();
3110 _result
3111 }
3112
3113 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3114 self.control_handle
3115 .inner
3116 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3117 result,
3118 self.tx_id,
3119 0x77435965e7bfaf83,
3120 fidl::encoding::DynamicFlags::empty(),
3121 )
3122 }
3123}
3124
3125#[must_use = "FIDL methods require a response to be sent"]
3126#[derive(Debug)]
3127pub struct ClientSmeReadApfPacketFilterDataResponder {
3128 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
3129 tx_id: u32,
3130}
3131
3132impl std::ops::Drop for ClientSmeReadApfPacketFilterDataResponder {
3136 fn drop(&mut self) {
3137 self.control_handle.shutdown();
3138 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3140 }
3141}
3142
3143impl fidl::endpoints::Responder for ClientSmeReadApfPacketFilterDataResponder {
3144 type ControlHandle = ClientSmeControlHandle;
3145
3146 fn control_handle(&self) -> &ClientSmeControlHandle {
3147 &self.control_handle
3148 }
3149
3150 fn drop_without_shutdown(mut self) {
3151 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3153 std::mem::forget(self);
3155 }
3156}
3157
3158impl ClientSmeReadApfPacketFilterDataResponder {
3159 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
3163 let _result = self.send_raw(result);
3164 if _result.is_err() {
3165 self.control_handle.shutdown();
3166 }
3167 self.drop_without_shutdown();
3168 _result
3169 }
3170
3171 pub fn send_no_shutdown_on_err(
3173 self,
3174 mut result: Result<&[u8], i32>,
3175 ) -> Result<(), fidl::Error> {
3176 let _result = self.send_raw(result);
3177 self.drop_without_shutdown();
3178 _result
3179 }
3180
3181 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
3182 self.control_handle.inner.send::<fidl::encoding::ResultType<
3183 ClientSmeReadApfPacketFilterDataResponse,
3184 i32,
3185 >>(
3186 result.map(|memory| (memory,)),
3187 self.tx_id,
3188 0x66fc6616b9963023,
3189 fidl::encoding::DynamicFlags::empty(),
3190 )
3191 }
3192}
3193
3194#[must_use = "FIDL methods require a response to be sent"]
3195#[derive(Debug)]
3196pub struct ClientSmeSetApfPacketFilterEnabledResponder {
3197 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
3198 tx_id: u32,
3199}
3200
3201impl std::ops::Drop for ClientSmeSetApfPacketFilterEnabledResponder {
3205 fn drop(&mut self) {
3206 self.control_handle.shutdown();
3207 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3209 }
3210}
3211
3212impl fidl::endpoints::Responder for ClientSmeSetApfPacketFilterEnabledResponder {
3213 type ControlHandle = ClientSmeControlHandle;
3214
3215 fn control_handle(&self) -> &ClientSmeControlHandle {
3216 &self.control_handle
3217 }
3218
3219 fn drop_without_shutdown(mut self) {
3220 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3222 std::mem::forget(self);
3224 }
3225}
3226
3227impl ClientSmeSetApfPacketFilterEnabledResponder {
3228 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3232 let _result = self.send_raw(result);
3233 if _result.is_err() {
3234 self.control_handle.shutdown();
3235 }
3236 self.drop_without_shutdown();
3237 _result
3238 }
3239
3240 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3242 let _result = self.send_raw(result);
3243 self.drop_without_shutdown();
3244 _result
3245 }
3246
3247 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3248 self.control_handle
3249 .inner
3250 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3251 result,
3252 self.tx_id,
3253 0x5070d2ed31580b81,
3254 fidl::encoding::DynamicFlags::empty(),
3255 )
3256 }
3257}
3258
3259#[must_use = "FIDL methods require a response to be sent"]
3260#[derive(Debug)]
3261pub struct ClientSmeGetApfPacketFilterEnabledResponder {
3262 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
3263 tx_id: u32,
3264}
3265
3266impl std::ops::Drop for ClientSmeGetApfPacketFilterEnabledResponder {
3270 fn drop(&mut self) {
3271 self.control_handle.shutdown();
3272 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3274 }
3275}
3276
3277impl fidl::endpoints::Responder for ClientSmeGetApfPacketFilterEnabledResponder {
3278 type ControlHandle = ClientSmeControlHandle;
3279
3280 fn control_handle(&self) -> &ClientSmeControlHandle {
3281 &self.control_handle
3282 }
3283
3284 fn drop_without_shutdown(mut self) {
3285 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3287 std::mem::forget(self);
3289 }
3290}
3291
3292impl ClientSmeGetApfPacketFilterEnabledResponder {
3293 pub fn send(self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
3297 let _result = self.send_raw(result);
3298 if _result.is_err() {
3299 self.control_handle.shutdown();
3300 }
3301 self.drop_without_shutdown();
3302 _result
3303 }
3304
3305 pub fn send_no_shutdown_on_err(self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
3307 let _result = self.send_raw(result);
3308 self.drop_without_shutdown();
3309 _result
3310 }
3311
3312 fn send_raw(&self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
3313 self.control_handle.inner.send::<fidl::encoding::ResultType<
3314 ClientSmeGetApfPacketFilterEnabledResponse,
3315 i32,
3316 >>(
3317 result.map(|enabled| (enabled,)),
3318 self.tx_id,
3319 0xdda5c1533526869,
3320 fidl::encoding::DynamicFlags::empty(),
3321 )
3322 }
3323}
3324
3325#[must_use = "FIDL methods require a response to be sent"]
3326#[derive(Debug)]
3327pub struct ClientSmeStartRssiMonitorResponder {
3328 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
3329 tx_id: u32,
3330}
3331
3332impl std::ops::Drop for ClientSmeStartRssiMonitorResponder {
3336 fn drop(&mut self) {
3337 self.control_handle.shutdown();
3338 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3340 }
3341}
3342
3343impl fidl::endpoints::Responder for ClientSmeStartRssiMonitorResponder {
3344 type ControlHandle = ClientSmeControlHandle;
3345
3346 fn control_handle(&self) -> &ClientSmeControlHandle {
3347 &self.control_handle
3348 }
3349
3350 fn drop_without_shutdown(mut self) {
3351 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3353 std::mem::forget(self);
3355 }
3356}
3357
3358impl ClientSmeStartRssiMonitorResponder {
3359 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3363 let _result = self.send_raw(result);
3364 if _result.is_err() {
3365 self.control_handle.shutdown();
3366 }
3367 self.drop_without_shutdown();
3368 _result
3369 }
3370
3371 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3373 let _result = self.send_raw(result);
3374 self.drop_without_shutdown();
3375 _result
3376 }
3377
3378 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3379 self.control_handle
3380 .inner
3381 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3382 result,
3383 self.tx_id,
3384 0x7d9b4356b07bd699,
3385 fidl::encoding::DynamicFlags::empty(),
3386 )
3387 }
3388}
3389
3390#[must_use = "FIDL methods require a response to be sent"]
3391#[derive(Debug)]
3392pub struct ClientSmeStopRssiMonitorResponder {
3393 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
3394 tx_id: u32,
3395}
3396
3397impl std::ops::Drop for ClientSmeStopRssiMonitorResponder {
3401 fn drop(&mut self) {
3402 self.control_handle.shutdown();
3403 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3405 }
3406}
3407
3408impl fidl::endpoints::Responder for ClientSmeStopRssiMonitorResponder {
3409 type ControlHandle = ClientSmeControlHandle;
3410
3411 fn control_handle(&self) -> &ClientSmeControlHandle {
3412 &self.control_handle
3413 }
3414
3415 fn drop_without_shutdown(mut self) {
3416 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3418 std::mem::forget(self);
3420 }
3421}
3422
3423impl ClientSmeStopRssiMonitorResponder {
3424 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3428 let _result = self.send_raw(result);
3429 if _result.is_err() {
3430 self.control_handle.shutdown();
3431 }
3432 self.drop_without_shutdown();
3433 _result
3434 }
3435
3436 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3438 let _result = self.send_raw(result);
3439 self.drop_without_shutdown();
3440 _result
3441 }
3442
3443 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3444 self.control_handle
3445 .inner
3446 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3447 result,
3448 self.tx_id,
3449 0x1f39005f89565adf,
3450 fidl::encoding::DynamicFlags::empty(),
3451 )
3452 }
3453}
3454
3455#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3456pub struct ConnectTransactionMarker;
3457
3458impl fidl::endpoints::ProtocolMarker for ConnectTransactionMarker {
3459 type Proxy = ConnectTransactionProxy;
3460 type RequestStream = ConnectTransactionRequestStream;
3461 #[cfg(target_os = "fuchsia")]
3462 type SynchronousProxy = ConnectTransactionSynchronousProxy;
3463
3464 const DEBUG_NAME: &'static str = "(anonymous) ConnectTransaction";
3465}
3466
3467pub trait ConnectTransactionProxyInterface: Send + Sync {}
3468#[derive(Debug)]
3469#[cfg(target_os = "fuchsia")]
3470pub struct ConnectTransactionSynchronousProxy {
3471 client: fidl::client::sync::Client,
3472}
3473
3474#[cfg(target_os = "fuchsia")]
3475impl fidl::endpoints::SynchronousProxy for ConnectTransactionSynchronousProxy {
3476 type Proxy = ConnectTransactionProxy;
3477 type Protocol = ConnectTransactionMarker;
3478
3479 fn from_channel(inner: fidl::Channel) -> Self {
3480 Self::new(inner)
3481 }
3482
3483 fn into_channel(self) -> fidl::Channel {
3484 self.client.into_channel()
3485 }
3486
3487 fn as_channel(&self) -> &fidl::Channel {
3488 self.client.as_channel()
3489 }
3490}
3491
3492#[cfg(target_os = "fuchsia")]
3493impl ConnectTransactionSynchronousProxy {
3494 pub fn new(channel: fidl::Channel) -> Self {
3495 Self { client: fidl::client::sync::Client::new(channel) }
3496 }
3497
3498 pub fn into_channel(self) -> fidl::Channel {
3499 self.client.into_channel()
3500 }
3501
3502 pub fn wait_for_event(
3505 &self,
3506 deadline: zx::MonotonicInstant,
3507 ) -> Result<ConnectTransactionEvent, fidl::Error> {
3508 ConnectTransactionEvent::decode(
3509 self.client.wait_for_event::<ConnectTransactionMarker>(deadline)?,
3510 )
3511 }
3512}
3513
3514#[cfg(target_os = "fuchsia")]
3515impl From<ConnectTransactionSynchronousProxy> for zx::NullableHandle {
3516 fn from(value: ConnectTransactionSynchronousProxy) -> Self {
3517 value.into_channel().into()
3518 }
3519}
3520
3521#[cfg(target_os = "fuchsia")]
3522impl From<fidl::Channel> for ConnectTransactionSynchronousProxy {
3523 fn from(value: fidl::Channel) -> Self {
3524 Self::new(value)
3525 }
3526}
3527
3528#[cfg(target_os = "fuchsia")]
3529impl fidl::endpoints::FromClient for ConnectTransactionSynchronousProxy {
3530 type Protocol = ConnectTransactionMarker;
3531
3532 fn from_client(value: fidl::endpoints::ClientEnd<ConnectTransactionMarker>) -> Self {
3533 Self::new(value.into_channel())
3534 }
3535}
3536
3537#[derive(Debug, Clone)]
3538pub struct ConnectTransactionProxy {
3539 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3540}
3541
3542impl fidl::endpoints::Proxy for ConnectTransactionProxy {
3543 type Protocol = ConnectTransactionMarker;
3544
3545 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3546 Self::new(inner)
3547 }
3548
3549 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3550 self.client.into_channel().map_err(|client| Self { client })
3551 }
3552
3553 fn as_channel(&self) -> &::fidl::AsyncChannel {
3554 self.client.as_channel()
3555 }
3556}
3557
3558impl ConnectTransactionProxy {
3559 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3561 let protocol_name =
3562 <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3563 Self { client: fidl::client::Client::new(channel, protocol_name) }
3564 }
3565
3566 pub fn take_event_stream(&self) -> ConnectTransactionEventStream {
3572 ConnectTransactionEventStream { event_receiver: self.client.take_event_receiver() }
3573 }
3574}
3575
3576impl ConnectTransactionProxyInterface for ConnectTransactionProxy {}
3577
3578pub struct ConnectTransactionEventStream {
3579 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3580}
3581
3582impl std::marker::Unpin for ConnectTransactionEventStream {}
3583
3584impl futures::stream::FusedStream for ConnectTransactionEventStream {
3585 fn is_terminated(&self) -> bool {
3586 self.event_receiver.is_terminated()
3587 }
3588}
3589
3590impl futures::Stream for ConnectTransactionEventStream {
3591 type Item = Result<ConnectTransactionEvent, fidl::Error>;
3592
3593 fn poll_next(
3594 mut self: std::pin::Pin<&mut Self>,
3595 cx: &mut std::task::Context<'_>,
3596 ) -> std::task::Poll<Option<Self::Item>> {
3597 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3598 &mut self.event_receiver,
3599 cx
3600 )?) {
3601 Some(buf) => std::task::Poll::Ready(Some(ConnectTransactionEvent::decode(buf))),
3602 None => std::task::Poll::Ready(None),
3603 }
3604 }
3605}
3606
3607#[derive(Debug)]
3608pub enum ConnectTransactionEvent {
3609 OnConnectResult { result: ConnectResult },
3610 OnDisconnect { info: DisconnectInfo },
3611 OnRoamResult { result: RoamResult },
3612 OnSignalReport { ind: fidl_fuchsia_wlan_internal::SignalReportIndication },
3613 OnRssiThresholdBreached { cur_rssi_dbm: i8 },
3614 OnChannelSwitched { info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo },
3615}
3616
3617impl ConnectTransactionEvent {
3618 #[allow(irrefutable_let_patterns)]
3619 pub fn into_on_connect_result(self) -> Option<ConnectResult> {
3620 if let ConnectTransactionEvent::OnConnectResult { result } = self {
3621 Some((result))
3622 } else {
3623 None
3624 }
3625 }
3626 #[allow(irrefutable_let_patterns)]
3627 pub fn into_on_disconnect(self) -> Option<DisconnectInfo> {
3628 if let ConnectTransactionEvent::OnDisconnect { info } = self { Some((info)) } else { None }
3629 }
3630 #[allow(irrefutable_let_patterns)]
3631 pub fn into_on_roam_result(self) -> Option<RoamResult> {
3632 if let ConnectTransactionEvent::OnRoamResult { result } = self {
3633 Some((result))
3634 } else {
3635 None
3636 }
3637 }
3638 #[allow(irrefutable_let_patterns)]
3639 pub fn into_on_signal_report(
3640 self,
3641 ) -> Option<fidl_fuchsia_wlan_internal::SignalReportIndication> {
3642 if let ConnectTransactionEvent::OnSignalReport { ind } = self { Some((ind)) } else { None }
3643 }
3644 #[allow(irrefutable_let_patterns)]
3645 pub fn into_on_rssi_threshold_breached(self) -> Option<i8> {
3646 if let ConnectTransactionEvent::OnRssiThresholdBreached { cur_rssi_dbm } = self {
3647 Some((cur_rssi_dbm))
3648 } else {
3649 None
3650 }
3651 }
3652 #[allow(irrefutable_let_patterns)]
3653 pub fn into_on_channel_switched(self) -> Option<fidl_fuchsia_wlan_internal::ChannelSwitchInfo> {
3654 if let ConnectTransactionEvent::OnChannelSwitched { info } = self {
3655 Some((info))
3656 } else {
3657 None
3658 }
3659 }
3660
3661 fn decode(
3663 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3664 ) -> Result<ConnectTransactionEvent, fidl::Error> {
3665 let (bytes, _handles) = buf.split_mut();
3666 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3667 debug_assert_eq!(tx_header.tx_id, 0);
3668 match tx_header.ordinal {
3669 0x48d2cf407da489a7 => {
3670 let mut out = fidl::new_empty!(
3671 ConnectTransactionOnConnectResultRequest,
3672 fidl::encoding::DefaultFuchsiaResourceDialect
3673 );
3674 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnConnectResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3675 Ok((ConnectTransactionEvent::OnConnectResult { result: out.result }))
3676 }
3677 0x40dea7b1449cc733 => {
3678 let mut out = fidl::new_empty!(
3679 ConnectTransactionOnDisconnectRequest,
3680 fidl::encoding::DefaultFuchsiaResourceDialect
3681 );
3682 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnDisconnectRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3683 Ok((ConnectTransactionEvent::OnDisconnect { info: out.info }))
3684 }
3685 0x656267da4ccf2a41 => {
3686 let mut out = fidl::new_empty!(
3687 ConnectTransactionOnRoamResultRequest,
3688 fidl::encoding::DefaultFuchsiaResourceDialect
3689 );
3690 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnRoamResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3691 Ok((ConnectTransactionEvent::OnRoamResult { result: out.result }))
3692 }
3693 0x5e968bd5e267e262 => {
3694 let mut out = fidl::new_empty!(
3695 ConnectTransactionOnSignalReportRequest,
3696 fidl::encoding::DefaultFuchsiaResourceDialect
3697 );
3698 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnSignalReportRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3699 Ok((ConnectTransactionEvent::OnSignalReport { ind: out.ind }))
3700 }
3701 0xbd0581b057e7f8c => {
3702 let mut out = fidl::new_empty!(
3703 ConnectTransactionOnRssiThresholdBreachedRequest,
3704 fidl::encoding::DefaultFuchsiaResourceDialect
3705 );
3706 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnRssiThresholdBreachedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3707 Ok((ConnectTransactionEvent::OnRssiThresholdBreached {
3708 cur_rssi_dbm: out.cur_rssi_dbm,
3709 }))
3710 }
3711 0x5f5153778cd70512 => {
3712 let mut out = fidl::new_empty!(
3713 ConnectTransactionOnChannelSwitchedRequest,
3714 fidl::encoding::DefaultFuchsiaResourceDialect
3715 );
3716 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnChannelSwitchedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3717 Ok((ConnectTransactionEvent::OnChannelSwitched { info: out.info }))
3718 }
3719 _ => Err(fidl::Error::UnknownOrdinal {
3720 ordinal: tx_header.ordinal,
3721 protocol_name:
3722 <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3723 }),
3724 }
3725 }
3726}
3727
3728pub struct ConnectTransactionRequestStream {
3730 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3731 is_terminated: bool,
3732}
3733
3734impl std::marker::Unpin for ConnectTransactionRequestStream {}
3735
3736impl futures::stream::FusedStream for ConnectTransactionRequestStream {
3737 fn is_terminated(&self) -> bool {
3738 self.is_terminated
3739 }
3740}
3741
3742impl fidl::endpoints::RequestStream for ConnectTransactionRequestStream {
3743 type Protocol = ConnectTransactionMarker;
3744 type ControlHandle = ConnectTransactionControlHandle;
3745
3746 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3747 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3748 }
3749
3750 fn control_handle(&self) -> Self::ControlHandle {
3751 ConnectTransactionControlHandle { inner: self.inner.clone() }
3752 }
3753
3754 fn into_inner(
3755 self,
3756 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3757 {
3758 (self.inner, self.is_terminated)
3759 }
3760
3761 fn from_inner(
3762 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3763 is_terminated: bool,
3764 ) -> Self {
3765 Self { inner, is_terminated }
3766 }
3767}
3768
3769impl futures::Stream for ConnectTransactionRequestStream {
3770 type Item = Result<ConnectTransactionRequest, fidl::Error>;
3771
3772 fn poll_next(
3773 mut self: std::pin::Pin<&mut Self>,
3774 cx: &mut std::task::Context<'_>,
3775 ) -> std::task::Poll<Option<Self::Item>> {
3776 let this = &mut *self;
3777 if this.inner.check_shutdown(cx) {
3778 this.is_terminated = true;
3779 return std::task::Poll::Ready(None);
3780 }
3781 if this.is_terminated {
3782 panic!("polled ConnectTransactionRequestStream after completion");
3783 }
3784 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3785 |bytes, handles| {
3786 match this.inner.channel().read_etc(cx, bytes, handles) {
3787 std::task::Poll::Ready(Ok(())) => {}
3788 std::task::Poll::Pending => return std::task::Poll::Pending,
3789 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3790 this.is_terminated = true;
3791 return std::task::Poll::Ready(None);
3792 }
3793 std::task::Poll::Ready(Err(e)) => {
3794 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3795 e.into(),
3796 ))));
3797 }
3798 }
3799
3800 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3802
3803 std::task::Poll::Ready(Some(match header.ordinal {
3804 _ => Err(fidl::Error::UnknownOrdinal {
3805 ordinal: header.ordinal,
3806 protocol_name: <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3807 }),
3808 }))
3809 },
3810 )
3811 }
3812}
3813
3814#[derive(Debug)]
3815pub enum ConnectTransactionRequest {}
3816
3817impl ConnectTransactionRequest {
3818 pub fn method_name(&self) -> &'static str {
3820 match *self {}
3821 }
3822}
3823
3824#[derive(Debug, Clone)]
3825pub struct ConnectTransactionControlHandle {
3826 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3827}
3828
3829impl ConnectTransactionControlHandle {
3830 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
3831 self.inner.shutdown_with_epitaph(status.into())
3832 }
3833}
3834
3835impl fidl::endpoints::ControlHandle for ConnectTransactionControlHandle {
3836 fn shutdown(&self) {
3837 self.inner.shutdown()
3838 }
3839
3840 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
3841 self.inner.shutdown_with_epitaph(status)
3842 }
3843
3844 fn is_closed(&self) -> bool {
3845 self.inner.channel().is_closed()
3846 }
3847 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3848 self.inner.channel().on_closed()
3849 }
3850
3851 #[cfg(target_os = "fuchsia")]
3852 fn signal_peer(
3853 &self,
3854 clear_mask: zx::Signals,
3855 set_mask: zx::Signals,
3856 ) -> Result<(), zx_status::Status> {
3857 use fidl::Peered;
3858 self.inner.channel().signal_peer(clear_mask, set_mask)
3859 }
3860}
3861
3862impl ConnectTransactionControlHandle {
3863 pub fn send_on_connect_result(&self, mut result: &ConnectResult) -> Result<(), fidl::Error> {
3864 self.inner.send::<ConnectTransactionOnConnectResultRequest>(
3865 (result,),
3866 0,
3867 0x48d2cf407da489a7,
3868 fidl::encoding::DynamicFlags::empty(),
3869 )
3870 }
3871
3872 pub fn send_on_disconnect(&self, mut info: &DisconnectInfo) -> Result<(), fidl::Error> {
3873 self.inner.send::<ConnectTransactionOnDisconnectRequest>(
3874 (info,),
3875 0,
3876 0x40dea7b1449cc733,
3877 fidl::encoding::DynamicFlags::empty(),
3878 )
3879 }
3880
3881 pub fn send_on_roam_result(&self, mut result: &RoamResult) -> Result<(), fidl::Error> {
3882 self.inner.send::<ConnectTransactionOnRoamResultRequest>(
3883 (result,),
3884 0,
3885 0x656267da4ccf2a41,
3886 fidl::encoding::DynamicFlags::empty(),
3887 )
3888 }
3889
3890 pub fn send_on_signal_report(
3891 &self,
3892 mut ind: &fidl_fuchsia_wlan_internal::SignalReportIndication,
3893 ) -> Result<(), fidl::Error> {
3894 self.inner.send::<ConnectTransactionOnSignalReportRequest>(
3895 (ind,),
3896 0,
3897 0x5e968bd5e267e262,
3898 fidl::encoding::DynamicFlags::empty(),
3899 )
3900 }
3901
3902 pub fn send_on_rssi_threshold_breached(&self, mut cur_rssi_dbm: i8) -> Result<(), fidl::Error> {
3903 self.inner.send::<ConnectTransactionOnRssiThresholdBreachedRequest>(
3904 (cur_rssi_dbm,),
3905 0,
3906 0xbd0581b057e7f8c,
3907 fidl::encoding::DynamicFlags::empty(),
3908 )
3909 }
3910
3911 pub fn send_on_channel_switched(
3912 &self,
3913 mut info: &fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
3914 ) -> Result<(), fidl::Error> {
3915 self.inner.send::<ConnectTransactionOnChannelSwitchedRequest>(
3916 (info,),
3917 0,
3918 0x5f5153778cd70512,
3919 fidl::encoding::DynamicFlags::empty(),
3920 )
3921 }
3922}
3923
3924#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3925pub struct GenericSmeMarker;
3926
3927impl fidl::endpoints::ProtocolMarker for GenericSmeMarker {
3928 type Proxy = GenericSmeProxy;
3929 type RequestStream = GenericSmeRequestStream;
3930 #[cfg(target_os = "fuchsia")]
3931 type SynchronousProxy = GenericSmeSynchronousProxy;
3932
3933 const DEBUG_NAME: &'static str = "(anonymous) GenericSme";
3934}
3935pub type GenericSmeQueryIfaceCapabilitiesResult =
3936 Result<GenericSmeQueryIfaceCapabilitiesResponse, i32>;
3937pub type GenericSmeGetClientSmeResult = Result<(), i32>;
3938pub type GenericSmeGetApSmeResult = Result<(), i32>;
3939pub type GenericSmeGetSmeTelemetryResult = Result<(), i32>;
3940
3941pub trait GenericSmeProxyInterface: Send + Sync {
3942 type QueryResponseFut: std::future::Future<Output = Result<GenericSmeQuery, fidl::Error>> + Send;
3943 fn r#query(&self) -> Self::QueryResponseFut;
3944 type QueryIfaceCapabilitiesResponseFut: std::future::Future<Output = Result<GenericSmeQueryIfaceCapabilitiesResult, fidl::Error>>
3945 + Send;
3946 fn r#query_iface_capabilities(&self) -> Self::QueryIfaceCapabilitiesResponseFut;
3947 type GetClientSmeResponseFut: std::future::Future<Output = Result<GenericSmeGetClientSmeResult, fidl::Error>>
3948 + Send;
3949 fn r#get_client_sme(
3950 &self,
3951 sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
3952 ) -> Self::GetClientSmeResponseFut;
3953 type GetApSmeResponseFut: std::future::Future<Output = Result<GenericSmeGetApSmeResult, fidl::Error>>
3954 + Send;
3955 fn r#get_ap_sme(
3956 &self,
3957 sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
3958 ) -> Self::GetApSmeResponseFut;
3959 type GetSmeTelemetryResponseFut: std::future::Future<Output = Result<GenericSmeGetSmeTelemetryResult, fidl::Error>>
3960 + Send;
3961 fn r#get_sme_telemetry(
3962 &self,
3963 telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
3964 ) -> Self::GetSmeTelemetryResponseFut;
3965}
3966#[derive(Debug)]
3967#[cfg(target_os = "fuchsia")]
3968pub struct GenericSmeSynchronousProxy {
3969 client: fidl::client::sync::Client,
3970}
3971
3972#[cfg(target_os = "fuchsia")]
3973impl fidl::endpoints::SynchronousProxy for GenericSmeSynchronousProxy {
3974 type Proxy = GenericSmeProxy;
3975 type Protocol = GenericSmeMarker;
3976
3977 fn from_channel(inner: fidl::Channel) -> Self {
3978 Self::new(inner)
3979 }
3980
3981 fn into_channel(self) -> fidl::Channel {
3982 self.client.into_channel()
3983 }
3984
3985 fn as_channel(&self) -> &fidl::Channel {
3986 self.client.as_channel()
3987 }
3988}
3989
3990#[cfg(target_os = "fuchsia")]
3991impl GenericSmeSynchronousProxy {
3992 pub fn new(channel: fidl::Channel) -> Self {
3993 Self { client: fidl::client::sync::Client::new(channel) }
3994 }
3995
3996 pub fn into_channel(self) -> fidl::Channel {
3997 self.client.into_channel()
3998 }
3999
4000 pub fn wait_for_event(
4003 &self,
4004 deadline: zx::MonotonicInstant,
4005 ) -> Result<GenericSmeEvent, fidl::Error> {
4006 GenericSmeEvent::decode(self.client.wait_for_event::<GenericSmeMarker>(deadline)?)
4007 }
4008
4009 pub fn r#query(
4013 &self,
4014 ___deadline: zx::MonotonicInstant,
4015 ) -> Result<GenericSmeQuery, fidl::Error> {
4016 let _response = self
4017 .client
4018 .send_query::<fidl::encoding::EmptyPayload, GenericSmeQueryResponse, GenericSmeMarker>(
4019 (),
4020 0x6ef4a820c153e249,
4021 fidl::encoding::DynamicFlags::empty(),
4022 ___deadline,
4023 )?;
4024 Ok(_response.resp)
4025 }
4026
4027 pub fn r#query_iface_capabilities(
4029 &self,
4030 ___deadline: zx::MonotonicInstant,
4031 ) -> Result<GenericSmeQueryIfaceCapabilitiesResult, fidl::Error> {
4032 let _response = self.client.send_query::<
4033 fidl::encoding::EmptyPayload,
4034 fidl::encoding::ResultType<GenericSmeQueryIfaceCapabilitiesResponse, i32>,
4035 GenericSmeMarker,
4036 >(
4037 (),
4038 0x2f483964e794fbba,
4039 fidl::encoding::DynamicFlags::empty(),
4040 ___deadline,
4041 )?;
4042 Ok(_response.map(|x| x))
4043 }
4044
4045 pub fn r#get_client_sme(
4052 &self,
4053 mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
4054 ___deadline: zx::MonotonicInstant,
4055 ) -> Result<GenericSmeGetClientSmeResult, fidl::Error> {
4056 let _response = self.client.send_query::<
4057 GenericSmeGetClientSmeRequest,
4058 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4059 GenericSmeMarker,
4060 >(
4061 (sme_server,),
4062 0x2439ad714c642f15,
4063 fidl::encoding::DynamicFlags::empty(),
4064 ___deadline,
4065 )?;
4066 Ok(_response.map(|x| x))
4067 }
4068
4069 pub fn r#get_ap_sme(
4076 &self,
4077 mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
4078 ___deadline: zx::MonotonicInstant,
4079 ) -> Result<GenericSmeGetApSmeResult, fidl::Error> {
4080 let _response = self.client.send_query::<
4081 GenericSmeGetApSmeRequest,
4082 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4083 GenericSmeMarker,
4084 >(
4085 (sme_server,),
4086 0x4d2a40be2b44ad6c,
4087 fidl::encoding::DynamicFlags::empty(),
4088 ___deadline,
4089 )?;
4090 Ok(_response.map(|x| x))
4091 }
4092
4093 pub fn r#get_sme_telemetry(
4101 &self,
4102 mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
4103 ___deadline: zx::MonotonicInstant,
4104 ) -> Result<GenericSmeGetSmeTelemetryResult, fidl::Error> {
4105 let _response = self.client.send_query::<
4106 GenericSmeGetSmeTelemetryRequest,
4107 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4108 GenericSmeMarker,
4109 >(
4110 (telemetry_server,),
4111 0x7ea015b3060fa,
4112 fidl::encoding::DynamicFlags::empty(),
4113 ___deadline,
4114 )?;
4115 Ok(_response.map(|x| x))
4116 }
4117}
4118
4119#[cfg(target_os = "fuchsia")]
4120impl From<GenericSmeSynchronousProxy> for zx::NullableHandle {
4121 fn from(value: GenericSmeSynchronousProxy) -> Self {
4122 value.into_channel().into()
4123 }
4124}
4125
4126#[cfg(target_os = "fuchsia")]
4127impl From<fidl::Channel> for GenericSmeSynchronousProxy {
4128 fn from(value: fidl::Channel) -> Self {
4129 Self::new(value)
4130 }
4131}
4132
4133#[cfg(target_os = "fuchsia")]
4134impl fidl::endpoints::FromClient for GenericSmeSynchronousProxy {
4135 type Protocol = GenericSmeMarker;
4136
4137 fn from_client(value: fidl::endpoints::ClientEnd<GenericSmeMarker>) -> Self {
4138 Self::new(value.into_channel())
4139 }
4140}
4141
4142#[derive(Debug, Clone)]
4143pub struct GenericSmeProxy {
4144 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4145}
4146
4147impl fidl::endpoints::Proxy for GenericSmeProxy {
4148 type Protocol = GenericSmeMarker;
4149
4150 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4151 Self::new(inner)
4152 }
4153
4154 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4155 self.client.into_channel().map_err(|client| Self { client })
4156 }
4157
4158 fn as_channel(&self) -> &::fidl::AsyncChannel {
4159 self.client.as_channel()
4160 }
4161}
4162
4163impl GenericSmeProxy {
4164 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4166 let protocol_name = <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4167 Self { client: fidl::client::Client::new(channel, protocol_name) }
4168 }
4169
4170 pub fn take_event_stream(&self) -> GenericSmeEventStream {
4176 GenericSmeEventStream { event_receiver: self.client.take_event_receiver() }
4177 }
4178
4179 pub fn r#query(
4183 &self,
4184 ) -> fidl::client::QueryResponseFut<
4185 GenericSmeQuery,
4186 fidl::encoding::DefaultFuchsiaResourceDialect,
4187 > {
4188 GenericSmeProxyInterface::r#query(self)
4189 }
4190
4191 pub fn r#query_iface_capabilities(
4193 &self,
4194 ) -> fidl::client::QueryResponseFut<
4195 GenericSmeQueryIfaceCapabilitiesResult,
4196 fidl::encoding::DefaultFuchsiaResourceDialect,
4197 > {
4198 GenericSmeProxyInterface::r#query_iface_capabilities(self)
4199 }
4200
4201 pub fn r#get_client_sme(
4208 &self,
4209 mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
4210 ) -> fidl::client::QueryResponseFut<
4211 GenericSmeGetClientSmeResult,
4212 fidl::encoding::DefaultFuchsiaResourceDialect,
4213 > {
4214 GenericSmeProxyInterface::r#get_client_sme(self, sme_server)
4215 }
4216
4217 pub fn r#get_ap_sme(
4224 &self,
4225 mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
4226 ) -> fidl::client::QueryResponseFut<
4227 GenericSmeGetApSmeResult,
4228 fidl::encoding::DefaultFuchsiaResourceDialect,
4229 > {
4230 GenericSmeProxyInterface::r#get_ap_sme(self, sme_server)
4231 }
4232
4233 pub fn r#get_sme_telemetry(
4241 &self,
4242 mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
4243 ) -> fidl::client::QueryResponseFut<
4244 GenericSmeGetSmeTelemetryResult,
4245 fidl::encoding::DefaultFuchsiaResourceDialect,
4246 > {
4247 GenericSmeProxyInterface::r#get_sme_telemetry(self, telemetry_server)
4248 }
4249}
4250
4251impl GenericSmeProxyInterface for GenericSmeProxy {
4252 type QueryResponseFut = fidl::client::QueryResponseFut<
4253 GenericSmeQuery,
4254 fidl::encoding::DefaultFuchsiaResourceDialect,
4255 >;
4256 fn r#query(&self) -> Self::QueryResponseFut {
4257 fn _decode(
4258 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4259 ) -> Result<GenericSmeQuery, fidl::Error> {
4260 let _response = fidl::client::decode_transaction_body::<
4261 GenericSmeQueryResponse,
4262 fidl::encoding::DefaultFuchsiaResourceDialect,
4263 0x6ef4a820c153e249,
4264 >(_buf?)?;
4265 Ok(_response.resp)
4266 }
4267 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, GenericSmeQuery>(
4268 (),
4269 0x6ef4a820c153e249,
4270 fidl::encoding::DynamicFlags::empty(),
4271 _decode,
4272 )
4273 }
4274
4275 type QueryIfaceCapabilitiesResponseFut = fidl::client::QueryResponseFut<
4276 GenericSmeQueryIfaceCapabilitiesResult,
4277 fidl::encoding::DefaultFuchsiaResourceDialect,
4278 >;
4279 fn r#query_iface_capabilities(&self) -> Self::QueryIfaceCapabilitiesResponseFut {
4280 fn _decode(
4281 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4282 ) -> Result<GenericSmeQueryIfaceCapabilitiesResult, fidl::Error> {
4283 let _response = fidl::client::decode_transaction_body::<
4284 fidl::encoding::ResultType<GenericSmeQueryIfaceCapabilitiesResponse, i32>,
4285 fidl::encoding::DefaultFuchsiaResourceDialect,
4286 0x2f483964e794fbba,
4287 >(_buf?)?;
4288 Ok(_response.map(|x| x))
4289 }
4290 self.client.send_query_and_decode::<
4291 fidl::encoding::EmptyPayload,
4292 GenericSmeQueryIfaceCapabilitiesResult,
4293 >(
4294 (),
4295 0x2f483964e794fbba,
4296 fidl::encoding::DynamicFlags::empty(),
4297 _decode,
4298 )
4299 }
4300
4301 type GetClientSmeResponseFut = fidl::client::QueryResponseFut<
4302 GenericSmeGetClientSmeResult,
4303 fidl::encoding::DefaultFuchsiaResourceDialect,
4304 >;
4305 fn r#get_client_sme(
4306 &self,
4307 mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
4308 ) -> Self::GetClientSmeResponseFut {
4309 fn _decode(
4310 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4311 ) -> Result<GenericSmeGetClientSmeResult, fidl::Error> {
4312 let _response = fidl::client::decode_transaction_body::<
4313 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4314 fidl::encoding::DefaultFuchsiaResourceDialect,
4315 0x2439ad714c642f15,
4316 >(_buf?)?;
4317 Ok(_response.map(|x| x))
4318 }
4319 self.client
4320 .send_query_and_decode::<GenericSmeGetClientSmeRequest, GenericSmeGetClientSmeResult>(
4321 (sme_server,),
4322 0x2439ad714c642f15,
4323 fidl::encoding::DynamicFlags::empty(),
4324 _decode,
4325 )
4326 }
4327
4328 type GetApSmeResponseFut = fidl::client::QueryResponseFut<
4329 GenericSmeGetApSmeResult,
4330 fidl::encoding::DefaultFuchsiaResourceDialect,
4331 >;
4332 fn r#get_ap_sme(
4333 &self,
4334 mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
4335 ) -> Self::GetApSmeResponseFut {
4336 fn _decode(
4337 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4338 ) -> Result<GenericSmeGetApSmeResult, fidl::Error> {
4339 let _response = fidl::client::decode_transaction_body::<
4340 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4341 fidl::encoding::DefaultFuchsiaResourceDialect,
4342 0x4d2a40be2b44ad6c,
4343 >(_buf?)?;
4344 Ok(_response.map(|x| x))
4345 }
4346 self.client.send_query_and_decode::<GenericSmeGetApSmeRequest, GenericSmeGetApSmeResult>(
4347 (sme_server,),
4348 0x4d2a40be2b44ad6c,
4349 fidl::encoding::DynamicFlags::empty(),
4350 _decode,
4351 )
4352 }
4353
4354 type GetSmeTelemetryResponseFut = fidl::client::QueryResponseFut<
4355 GenericSmeGetSmeTelemetryResult,
4356 fidl::encoding::DefaultFuchsiaResourceDialect,
4357 >;
4358 fn r#get_sme_telemetry(
4359 &self,
4360 mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
4361 ) -> Self::GetSmeTelemetryResponseFut {
4362 fn _decode(
4363 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4364 ) -> Result<GenericSmeGetSmeTelemetryResult, fidl::Error> {
4365 let _response = fidl::client::decode_transaction_body::<
4366 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4367 fidl::encoding::DefaultFuchsiaResourceDialect,
4368 0x7ea015b3060fa,
4369 >(_buf?)?;
4370 Ok(_response.map(|x| x))
4371 }
4372 self.client.send_query_and_decode::<
4373 GenericSmeGetSmeTelemetryRequest,
4374 GenericSmeGetSmeTelemetryResult,
4375 >(
4376 (telemetry_server,),
4377 0x7ea015b3060fa,
4378 fidl::encoding::DynamicFlags::empty(),
4379 _decode,
4380 )
4381 }
4382}
4383
4384pub struct GenericSmeEventStream {
4385 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4386}
4387
4388impl std::marker::Unpin for GenericSmeEventStream {}
4389
4390impl futures::stream::FusedStream for GenericSmeEventStream {
4391 fn is_terminated(&self) -> bool {
4392 self.event_receiver.is_terminated()
4393 }
4394}
4395
4396impl futures::Stream for GenericSmeEventStream {
4397 type Item = Result<GenericSmeEvent, fidl::Error>;
4398
4399 fn poll_next(
4400 mut self: std::pin::Pin<&mut Self>,
4401 cx: &mut std::task::Context<'_>,
4402 ) -> std::task::Poll<Option<Self::Item>> {
4403 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4404 &mut self.event_receiver,
4405 cx
4406 )?) {
4407 Some(buf) => std::task::Poll::Ready(Some(GenericSmeEvent::decode(buf))),
4408 None => std::task::Poll::Ready(None),
4409 }
4410 }
4411}
4412
4413#[derive(Debug)]
4414pub enum GenericSmeEvent {}
4415
4416impl GenericSmeEvent {
4417 fn decode(
4419 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4420 ) -> Result<GenericSmeEvent, fidl::Error> {
4421 let (bytes, _handles) = buf.split_mut();
4422 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4423 debug_assert_eq!(tx_header.tx_id, 0);
4424 match tx_header.ordinal {
4425 _ => Err(fidl::Error::UnknownOrdinal {
4426 ordinal: tx_header.ordinal,
4427 protocol_name: <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4428 }),
4429 }
4430 }
4431}
4432
4433pub struct GenericSmeRequestStream {
4435 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4436 is_terminated: bool,
4437}
4438
4439impl std::marker::Unpin for GenericSmeRequestStream {}
4440
4441impl futures::stream::FusedStream for GenericSmeRequestStream {
4442 fn is_terminated(&self) -> bool {
4443 self.is_terminated
4444 }
4445}
4446
4447impl fidl::endpoints::RequestStream for GenericSmeRequestStream {
4448 type Protocol = GenericSmeMarker;
4449 type ControlHandle = GenericSmeControlHandle;
4450
4451 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4452 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4453 }
4454
4455 fn control_handle(&self) -> Self::ControlHandle {
4456 GenericSmeControlHandle { inner: self.inner.clone() }
4457 }
4458
4459 fn into_inner(
4460 self,
4461 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4462 {
4463 (self.inner, self.is_terminated)
4464 }
4465
4466 fn from_inner(
4467 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4468 is_terminated: bool,
4469 ) -> Self {
4470 Self { inner, is_terminated }
4471 }
4472}
4473
4474impl futures::Stream for GenericSmeRequestStream {
4475 type Item = Result<GenericSmeRequest, fidl::Error>;
4476
4477 fn poll_next(
4478 mut self: std::pin::Pin<&mut Self>,
4479 cx: &mut std::task::Context<'_>,
4480 ) -> std::task::Poll<Option<Self::Item>> {
4481 let this = &mut *self;
4482 if this.inner.check_shutdown(cx) {
4483 this.is_terminated = true;
4484 return std::task::Poll::Ready(None);
4485 }
4486 if this.is_terminated {
4487 panic!("polled GenericSmeRequestStream after completion");
4488 }
4489 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4490 |bytes, handles| {
4491 match this.inner.channel().read_etc(cx, bytes, handles) {
4492 std::task::Poll::Ready(Ok(())) => {}
4493 std::task::Poll::Pending => return std::task::Poll::Pending,
4494 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4495 this.is_terminated = true;
4496 return std::task::Poll::Ready(None);
4497 }
4498 std::task::Poll::Ready(Err(e)) => {
4499 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4500 e.into(),
4501 ))));
4502 }
4503 }
4504
4505 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4507
4508 std::task::Poll::Ready(Some(match header.ordinal {
4509 0x6ef4a820c153e249 => {
4510 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4511 let mut req = fidl::new_empty!(
4512 fidl::encoding::EmptyPayload,
4513 fidl::encoding::DefaultFuchsiaResourceDialect
4514 );
4515 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4516 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
4517 Ok(GenericSmeRequest::Query {
4518 responder: GenericSmeQueryResponder {
4519 control_handle: std::mem::ManuallyDrop::new(control_handle),
4520 tx_id: header.tx_id,
4521 },
4522 })
4523 }
4524 0x2f483964e794fbba => {
4525 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4526 let mut req = fidl::new_empty!(
4527 fidl::encoding::EmptyPayload,
4528 fidl::encoding::DefaultFuchsiaResourceDialect
4529 );
4530 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4531 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
4532 Ok(GenericSmeRequest::QueryIfaceCapabilities {
4533 responder: GenericSmeQueryIfaceCapabilitiesResponder {
4534 control_handle: std::mem::ManuallyDrop::new(control_handle),
4535 tx_id: header.tx_id,
4536 },
4537 })
4538 }
4539 0x2439ad714c642f15 => {
4540 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4541 let mut req = fidl::new_empty!(
4542 GenericSmeGetClientSmeRequest,
4543 fidl::encoding::DefaultFuchsiaResourceDialect
4544 );
4545 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetClientSmeRequest>(&header, _body_bytes, handles, &mut req)?;
4546 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
4547 Ok(GenericSmeRequest::GetClientSme {
4548 sme_server: req.sme_server,
4549
4550 responder: GenericSmeGetClientSmeResponder {
4551 control_handle: std::mem::ManuallyDrop::new(control_handle),
4552 tx_id: header.tx_id,
4553 },
4554 })
4555 }
4556 0x4d2a40be2b44ad6c => {
4557 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4558 let mut req = fidl::new_empty!(
4559 GenericSmeGetApSmeRequest,
4560 fidl::encoding::DefaultFuchsiaResourceDialect
4561 );
4562 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetApSmeRequest>(&header, _body_bytes, handles, &mut req)?;
4563 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
4564 Ok(GenericSmeRequest::GetApSme {
4565 sme_server: req.sme_server,
4566
4567 responder: GenericSmeGetApSmeResponder {
4568 control_handle: std::mem::ManuallyDrop::new(control_handle),
4569 tx_id: header.tx_id,
4570 },
4571 })
4572 }
4573 0x7ea015b3060fa => {
4574 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4575 let mut req = fidl::new_empty!(
4576 GenericSmeGetSmeTelemetryRequest,
4577 fidl::encoding::DefaultFuchsiaResourceDialect
4578 );
4579 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetSmeTelemetryRequest>(&header, _body_bytes, handles, &mut req)?;
4580 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
4581 Ok(GenericSmeRequest::GetSmeTelemetry {
4582 telemetry_server: req.telemetry_server,
4583
4584 responder: GenericSmeGetSmeTelemetryResponder {
4585 control_handle: std::mem::ManuallyDrop::new(control_handle),
4586 tx_id: header.tx_id,
4587 },
4588 })
4589 }
4590 _ => Err(fidl::Error::UnknownOrdinal {
4591 ordinal: header.ordinal,
4592 protocol_name:
4593 <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4594 }),
4595 }))
4596 },
4597 )
4598 }
4599}
4600
4601#[derive(Debug)]
4602pub enum GenericSmeRequest {
4603 Query { responder: GenericSmeQueryResponder },
4607 QueryIfaceCapabilities { responder: GenericSmeQueryIfaceCapabilitiesResponder },
4609 GetClientSme {
4616 sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
4617 responder: GenericSmeGetClientSmeResponder,
4618 },
4619 GetApSme {
4626 sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
4627 responder: GenericSmeGetApSmeResponder,
4628 },
4629 GetSmeTelemetry {
4637 telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
4638 responder: GenericSmeGetSmeTelemetryResponder,
4639 },
4640}
4641
4642impl GenericSmeRequest {
4643 #[allow(irrefutable_let_patterns)]
4644 pub fn into_query(self) -> Option<(GenericSmeQueryResponder)> {
4645 if let GenericSmeRequest::Query { responder } = self { Some((responder)) } else { None }
4646 }
4647
4648 #[allow(irrefutable_let_patterns)]
4649 pub fn into_query_iface_capabilities(
4650 self,
4651 ) -> Option<(GenericSmeQueryIfaceCapabilitiesResponder)> {
4652 if let GenericSmeRequest::QueryIfaceCapabilities { responder } = self {
4653 Some((responder))
4654 } else {
4655 None
4656 }
4657 }
4658
4659 #[allow(irrefutable_let_patterns)]
4660 pub fn into_get_client_sme(
4661 self,
4662 ) -> Option<(fidl::endpoints::ServerEnd<ClientSmeMarker>, GenericSmeGetClientSmeResponder)>
4663 {
4664 if let GenericSmeRequest::GetClientSme { sme_server, responder } = self {
4665 Some((sme_server, responder))
4666 } else {
4667 None
4668 }
4669 }
4670
4671 #[allow(irrefutable_let_patterns)]
4672 pub fn into_get_ap_sme(
4673 self,
4674 ) -> Option<(fidl::endpoints::ServerEnd<ApSmeMarker>, GenericSmeGetApSmeResponder)> {
4675 if let GenericSmeRequest::GetApSme { sme_server, responder } = self {
4676 Some((sme_server, responder))
4677 } else {
4678 None
4679 }
4680 }
4681
4682 #[allow(irrefutable_let_patterns)]
4683 pub fn into_get_sme_telemetry(
4684 self,
4685 ) -> Option<(fidl::endpoints::ServerEnd<TelemetryMarker>, GenericSmeGetSmeTelemetryResponder)>
4686 {
4687 if let GenericSmeRequest::GetSmeTelemetry { telemetry_server, responder } = self {
4688 Some((telemetry_server, responder))
4689 } else {
4690 None
4691 }
4692 }
4693
4694 pub fn method_name(&self) -> &'static str {
4696 match *self {
4697 GenericSmeRequest::Query { .. } => "query",
4698 GenericSmeRequest::QueryIfaceCapabilities { .. } => "query_iface_capabilities",
4699 GenericSmeRequest::GetClientSme { .. } => "get_client_sme",
4700 GenericSmeRequest::GetApSme { .. } => "get_ap_sme",
4701 GenericSmeRequest::GetSmeTelemetry { .. } => "get_sme_telemetry",
4702 }
4703 }
4704}
4705
4706#[derive(Debug, Clone)]
4707pub struct GenericSmeControlHandle {
4708 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4709}
4710
4711impl GenericSmeControlHandle {
4712 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
4713 self.inner.shutdown_with_epitaph(status.into())
4714 }
4715}
4716
4717impl fidl::endpoints::ControlHandle for GenericSmeControlHandle {
4718 fn shutdown(&self) {
4719 self.inner.shutdown()
4720 }
4721
4722 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
4723 self.inner.shutdown_with_epitaph(status)
4724 }
4725
4726 fn is_closed(&self) -> bool {
4727 self.inner.channel().is_closed()
4728 }
4729 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4730 self.inner.channel().on_closed()
4731 }
4732
4733 #[cfg(target_os = "fuchsia")]
4734 fn signal_peer(
4735 &self,
4736 clear_mask: zx::Signals,
4737 set_mask: zx::Signals,
4738 ) -> Result<(), zx_status::Status> {
4739 use fidl::Peered;
4740 self.inner.channel().signal_peer(clear_mask, set_mask)
4741 }
4742}
4743
4744impl GenericSmeControlHandle {}
4745
4746#[must_use = "FIDL methods require a response to be sent"]
4747#[derive(Debug)]
4748pub struct GenericSmeQueryResponder {
4749 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4750 tx_id: u32,
4751}
4752
4753impl std::ops::Drop for GenericSmeQueryResponder {
4757 fn drop(&mut self) {
4758 self.control_handle.shutdown();
4759 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4761 }
4762}
4763
4764impl fidl::endpoints::Responder for GenericSmeQueryResponder {
4765 type ControlHandle = GenericSmeControlHandle;
4766
4767 fn control_handle(&self) -> &GenericSmeControlHandle {
4768 &self.control_handle
4769 }
4770
4771 fn drop_without_shutdown(mut self) {
4772 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4774 std::mem::forget(self);
4776 }
4777}
4778
4779impl GenericSmeQueryResponder {
4780 pub fn send(self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
4784 let _result = self.send_raw(resp);
4785 if _result.is_err() {
4786 self.control_handle.shutdown();
4787 }
4788 self.drop_without_shutdown();
4789 _result
4790 }
4791
4792 pub fn send_no_shutdown_on_err(self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
4794 let _result = self.send_raw(resp);
4795 self.drop_without_shutdown();
4796 _result
4797 }
4798
4799 fn send_raw(&self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
4800 self.control_handle.inner.send::<GenericSmeQueryResponse>(
4801 (resp,),
4802 self.tx_id,
4803 0x6ef4a820c153e249,
4804 fidl::encoding::DynamicFlags::empty(),
4805 )
4806 }
4807}
4808
4809#[must_use = "FIDL methods require a response to be sent"]
4810#[derive(Debug)]
4811pub struct GenericSmeQueryIfaceCapabilitiesResponder {
4812 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4813 tx_id: u32,
4814}
4815
4816impl std::ops::Drop for GenericSmeQueryIfaceCapabilitiesResponder {
4820 fn drop(&mut self) {
4821 self.control_handle.shutdown();
4822 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4824 }
4825}
4826
4827impl fidl::endpoints::Responder for GenericSmeQueryIfaceCapabilitiesResponder {
4828 type ControlHandle = GenericSmeControlHandle;
4829
4830 fn control_handle(&self) -> &GenericSmeControlHandle {
4831 &self.control_handle
4832 }
4833
4834 fn drop_without_shutdown(mut self) {
4835 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4837 std::mem::forget(self);
4839 }
4840}
4841
4842impl GenericSmeQueryIfaceCapabilitiesResponder {
4843 pub fn send(
4847 self,
4848 mut result: Result<&GenericSmeQueryIfaceCapabilitiesResponse, i32>,
4849 ) -> Result<(), fidl::Error> {
4850 let _result = self.send_raw(result);
4851 if _result.is_err() {
4852 self.control_handle.shutdown();
4853 }
4854 self.drop_without_shutdown();
4855 _result
4856 }
4857
4858 pub fn send_no_shutdown_on_err(
4860 self,
4861 mut result: Result<&GenericSmeQueryIfaceCapabilitiesResponse, i32>,
4862 ) -> Result<(), fidl::Error> {
4863 let _result = self.send_raw(result);
4864 self.drop_without_shutdown();
4865 _result
4866 }
4867
4868 fn send_raw(
4869 &self,
4870 mut result: Result<&GenericSmeQueryIfaceCapabilitiesResponse, i32>,
4871 ) -> Result<(), fidl::Error> {
4872 self.control_handle.inner.send::<fidl::encoding::ResultType<
4873 GenericSmeQueryIfaceCapabilitiesResponse,
4874 i32,
4875 >>(
4876 result,
4877 self.tx_id,
4878 0x2f483964e794fbba,
4879 fidl::encoding::DynamicFlags::empty(),
4880 )
4881 }
4882}
4883
4884#[must_use = "FIDL methods require a response to be sent"]
4885#[derive(Debug)]
4886pub struct GenericSmeGetClientSmeResponder {
4887 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4888 tx_id: u32,
4889}
4890
4891impl std::ops::Drop for GenericSmeGetClientSmeResponder {
4895 fn drop(&mut self) {
4896 self.control_handle.shutdown();
4897 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4899 }
4900}
4901
4902impl fidl::endpoints::Responder for GenericSmeGetClientSmeResponder {
4903 type ControlHandle = GenericSmeControlHandle;
4904
4905 fn control_handle(&self) -> &GenericSmeControlHandle {
4906 &self.control_handle
4907 }
4908
4909 fn drop_without_shutdown(mut self) {
4910 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4912 std::mem::forget(self);
4914 }
4915}
4916
4917impl GenericSmeGetClientSmeResponder {
4918 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4922 let _result = self.send_raw(result);
4923 if _result.is_err() {
4924 self.control_handle.shutdown();
4925 }
4926 self.drop_without_shutdown();
4927 _result
4928 }
4929
4930 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4932 let _result = self.send_raw(result);
4933 self.drop_without_shutdown();
4934 _result
4935 }
4936
4937 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4938 self.control_handle
4939 .inner
4940 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4941 result,
4942 self.tx_id,
4943 0x2439ad714c642f15,
4944 fidl::encoding::DynamicFlags::empty(),
4945 )
4946 }
4947}
4948
4949#[must_use = "FIDL methods require a response to be sent"]
4950#[derive(Debug)]
4951pub struct GenericSmeGetApSmeResponder {
4952 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4953 tx_id: u32,
4954}
4955
4956impl std::ops::Drop for GenericSmeGetApSmeResponder {
4960 fn drop(&mut self) {
4961 self.control_handle.shutdown();
4962 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4964 }
4965}
4966
4967impl fidl::endpoints::Responder for GenericSmeGetApSmeResponder {
4968 type ControlHandle = GenericSmeControlHandle;
4969
4970 fn control_handle(&self) -> &GenericSmeControlHandle {
4971 &self.control_handle
4972 }
4973
4974 fn drop_without_shutdown(mut self) {
4975 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4977 std::mem::forget(self);
4979 }
4980}
4981
4982impl GenericSmeGetApSmeResponder {
4983 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4987 let _result = self.send_raw(result);
4988 if _result.is_err() {
4989 self.control_handle.shutdown();
4990 }
4991 self.drop_without_shutdown();
4992 _result
4993 }
4994
4995 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4997 let _result = self.send_raw(result);
4998 self.drop_without_shutdown();
4999 _result
5000 }
5001
5002 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5003 self.control_handle
5004 .inner
5005 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5006 result,
5007 self.tx_id,
5008 0x4d2a40be2b44ad6c,
5009 fidl::encoding::DynamicFlags::empty(),
5010 )
5011 }
5012}
5013
5014#[must_use = "FIDL methods require a response to be sent"]
5015#[derive(Debug)]
5016pub struct GenericSmeGetSmeTelemetryResponder {
5017 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
5018 tx_id: u32,
5019}
5020
5021impl std::ops::Drop for GenericSmeGetSmeTelemetryResponder {
5025 fn drop(&mut self) {
5026 self.control_handle.shutdown();
5027 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5029 }
5030}
5031
5032impl fidl::endpoints::Responder for GenericSmeGetSmeTelemetryResponder {
5033 type ControlHandle = GenericSmeControlHandle;
5034
5035 fn control_handle(&self) -> &GenericSmeControlHandle {
5036 &self.control_handle
5037 }
5038
5039 fn drop_without_shutdown(mut self) {
5040 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5042 std::mem::forget(self);
5044 }
5045}
5046
5047impl GenericSmeGetSmeTelemetryResponder {
5048 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5052 let _result = self.send_raw(result);
5053 if _result.is_err() {
5054 self.control_handle.shutdown();
5055 }
5056 self.drop_without_shutdown();
5057 _result
5058 }
5059
5060 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5062 let _result = self.send_raw(result);
5063 self.drop_without_shutdown();
5064 _result
5065 }
5066
5067 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5068 self.control_handle
5069 .inner
5070 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5071 result,
5072 self.tx_id,
5073 0x7ea015b3060fa,
5074 fidl::encoding::DynamicFlags::empty(),
5075 )
5076 }
5077}
5078
5079#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5080pub struct ScheduledScanTransactionMarker;
5081
5082impl fidl::endpoints::ProtocolMarker for ScheduledScanTransactionMarker {
5083 type Proxy = ScheduledScanTransactionProxy;
5084 type RequestStream = ScheduledScanTransactionRequestStream;
5085 #[cfg(target_os = "fuchsia")]
5086 type SynchronousProxy = ScheduledScanTransactionSynchronousProxy;
5087
5088 const DEBUG_NAME: &'static str = "(anonymous) ScheduledScanTransaction";
5089}
5090
5091pub trait ScheduledScanTransactionProxyInterface: Send + Sync {}
5092#[derive(Debug)]
5093#[cfg(target_os = "fuchsia")]
5094pub struct ScheduledScanTransactionSynchronousProxy {
5095 client: fidl::client::sync::Client,
5096}
5097
5098#[cfg(target_os = "fuchsia")]
5099impl fidl::endpoints::SynchronousProxy for ScheduledScanTransactionSynchronousProxy {
5100 type Proxy = ScheduledScanTransactionProxy;
5101 type Protocol = ScheduledScanTransactionMarker;
5102
5103 fn from_channel(inner: fidl::Channel) -> Self {
5104 Self::new(inner)
5105 }
5106
5107 fn into_channel(self) -> fidl::Channel {
5108 self.client.into_channel()
5109 }
5110
5111 fn as_channel(&self) -> &fidl::Channel {
5112 self.client.as_channel()
5113 }
5114}
5115
5116#[cfg(target_os = "fuchsia")]
5117impl ScheduledScanTransactionSynchronousProxy {
5118 pub fn new(channel: fidl::Channel) -> Self {
5119 Self { client: fidl::client::sync::Client::new(channel) }
5120 }
5121
5122 pub fn into_channel(self) -> fidl::Channel {
5123 self.client.into_channel()
5124 }
5125
5126 pub fn wait_for_event(
5129 &self,
5130 deadline: zx::MonotonicInstant,
5131 ) -> Result<ScheduledScanTransactionEvent, fidl::Error> {
5132 ScheduledScanTransactionEvent::decode(
5133 self.client.wait_for_event::<ScheduledScanTransactionMarker>(deadline)?,
5134 )
5135 }
5136}
5137
5138#[cfg(target_os = "fuchsia")]
5139impl From<ScheduledScanTransactionSynchronousProxy> for zx::NullableHandle {
5140 fn from(value: ScheduledScanTransactionSynchronousProxy) -> Self {
5141 value.into_channel().into()
5142 }
5143}
5144
5145#[cfg(target_os = "fuchsia")]
5146impl From<fidl::Channel> for ScheduledScanTransactionSynchronousProxy {
5147 fn from(value: fidl::Channel) -> Self {
5148 Self::new(value)
5149 }
5150}
5151
5152#[cfg(target_os = "fuchsia")]
5153impl fidl::endpoints::FromClient for ScheduledScanTransactionSynchronousProxy {
5154 type Protocol = ScheduledScanTransactionMarker;
5155
5156 fn from_client(value: fidl::endpoints::ClientEnd<ScheduledScanTransactionMarker>) -> Self {
5157 Self::new(value.into_channel())
5158 }
5159}
5160
5161#[derive(Debug, Clone)]
5162pub struct ScheduledScanTransactionProxy {
5163 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5164}
5165
5166impl fidl::endpoints::Proxy for ScheduledScanTransactionProxy {
5167 type Protocol = ScheduledScanTransactionMarker;
5168
5169 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5170 Self::new(inner)
5171 }
5172
5173 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5174 self.client.into_channel().map_err(|client| Self { client })
5175 }
5176
5177 fn as_channel(&self) -> &::fidl::AsyncChannel {
5178 self.client.as_channel()
5179 }
5180}
5181
5182impl ScheduledScanTransactionProxy {
5183 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5185 let protocol_name =
5186 <ScheduledScanTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5187 Self { client: fidl::client::Client::new(channel, protocol_name) }
5188 }
5189
5190 pub fn take_event_stream(&self) -> ScheduledScanTransactionEventStream {
5196 ScheduledScanTransactionEventStream { event_receiver: self.client.take_event_receiver() }
5197 }
5198}
5199
5200impl ScheduledScanTransactionProxyInterface for ScheduledScanTransactionProxy {}
5201
5202pub struct ScheduledScanTransactionEventStream {
5203 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5204}
5205
5206impl std::marker::Unpin for ScheduledScanTransactionEventStream {}
5207
5208impl futures::stream::FusedStream for ScheduledScanTransactionEventStream {
5209 fn is_terminated(&self) -> bool {
5210 self.event_receiver.is_terminated()
5211 }
5212}
5213
5214impl futures::Stream for ScheduledScanTransactionEventStream {
5215 type Item = Result<ScheduledScanTransactionEvent, fidl::Error>;
5216
5217 fn poll_next(
5218 mut self: std::pin::Pin<&mut Self>,
5219 cx: &mut std::task::Context<'_>,
5220 ) -> std::task::Poll<Option<Self::Item>> {
5221 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5222 &mut self.event_receiver,
5223 cx
5224 )?) {
5225 Some(buf) => std::task::Poll::Ready(Some(ScheduledScanTransactionEvent::decode(buf))),
5226 None => std::task::Poll::Ready(None),
5227 }
5228 }
5229}
5230
5231#[derive(Debug)]
5232pub enum ScheduledScanTransactionEvent {
5233 OnScheduledScanMatchesAvailable { scan_results: fidl::Vmo },
5234}
5235
5236impl ScheduledScanTransactionEvent {
5237 #[allow(irrefutable_let_patterns)]
5238 pub fn into_on_scheduled_scan_matches_available(self) -> Option<fidl::Vmo> {
5239 if let ScheduledScanTransactionEvent::OnScheduledScanMatchesAvailable { scan_results } =
5240 self
5241 {
5242 Some((scan_results))
5243 } else {
5244 None
5245 }
5246 }
5247
5248 fn decode(
5250 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5251 ) -> Result<ScheduledScanTransactionEvent, fidl::Error> {
5252 let (bytes, _handles) = buf.split_mut();
5253 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5254 debug_assert_eq!(tx_header.tx_id, 0);
5255 match tx_header.ordinal {
5256 0x49ff004527d01bd8 => {
5257 let mut out = fidl::new_empty!(
5258 ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest,
5259 fidl::encoding::DefaultFuchsiaResourceDialect
5260 );
5261 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
5262 Ok((ScheduledScanTransactionEvent::OnScheduledScanMatchesAvailable {
5263 scan_results: out.scan_results,
5264 }))
5265 }
5266 _ => Err(fidl::Error::UnknownOrdinal {
5267 ordinal: tx_header.ordinal,
5268 protocol_name:
5269 <ScheduledScanTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5270 }),
5271 }
5272 }
5273}
5274
5275pub struct ScheduledScanTransactionRequestStream {
5277 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5278 is_terminated: bool,
5279}
5280
5281impl std::marker::Unpin for ScheduledScanTransactionRequestStream {}
5282
5283impl futures::stream::FusedStream for ScheduledScanTransactionRequestStream {
5284 fn is_terminated(&self) -> bool {
5285 self.is_terminated
5286 }
5287}
5288
5289impl fidl::endpoints::RequestStream for ScheduledScanTransactionRequestStream {
5290 type Protocol = ScheduledScanTransactionMarker;
5291 type ControlHandle = ScheduledScanTransactionControlHandle;
5292
5293 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5294 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5295 }
5296
5297 fn control_handle(&self) -> Self::ControlHandle {
5298 ScheduledScanTransactionControlHandle { inner: self.inner.clone() }
5299 }
5300
5301 fn into_inner(
5302 self,
5303 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5304 {
5305 (self.inner, self.is_terminated)
5306 }
5307
5308 fn from_inner(
5309 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5310 is_terminated: bool,
5311 ) -> Self {
5312 Self { inner, is_terminated }
5313 }
5314}
5315
5316impl futures::Stream for ScheduledScanTransactionRequestStream {
5317 type Item = Result<ScheduledScanTransactionRequest, fidl::Error>;
5318
5319 fn poll_next(
5320 mut self: std::pin::Pin<&mut Self>,
5321 cx: &mut std::task::Context<'_>,
5322 ) -> std::task::Poll<Option<Self::Item>> {
5323 let this = &mut *self;
5324 if this.inner.check_shutdown(cx) {
5325 this.is_terminated = true;
5326 return std::task::Poll::Ready(None);
5327 }
5328 if this.is_terminated {
5329 panic!("polled ScheduledScanTransactionRequestStream after completion");
5330 }
5331 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5332 |bytes, handles| {
5333 match this.inner.channel().read_etc(cx, bytes, handles) {
5334 std::task::Poll::Ready(Ok(())) => {}
5335 std::task::Poll::Pending => return std::task::Poll::Pending,
5336 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5337 this.is_terminated = true;
5338 return std::task::Poll::Ready(None);
5339 }
5340 std::task::Poll::Ready(Err(e)) => {
5341 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5342 e.into(),
5343 ))));
5344 }
5345 }
5346
5347 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5349
5350 std::task::Poll::Ready(Some(match header.ordinal {
5351 _ => Err(fidl::Error::UnknownOrdinal {
5352 ordinal: header.ordinal,
5353 protocol_name: <ScheduledScanTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5354 }),
5355 }))
5356 },
5357 )
5358 }
5359}
5360
5361#[derive(Debug)]
5364pub enum ScheduledScanTransactionRequest {}
5365
5366impl ScheduledScanTransactionRequest {
5367 pub fn method_name(&self) -> &'static str {
5369 match *self {}
5370 }
5371}
5372
5373#[derive(Debug, Clone)]
5374pub struct ScheduledScanTransactionControlHandle {
5375 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5376}
5377
5378impl ScheduledScanTransactionControlHandle {
5379 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
5380 self.inner.shutdown_with_epitaph(status.into())
5381 }
5382}
5383
5384impl fidl::endpoints::ControlHandle for ScheduledScanTransactionControlHandle {
5385 fn shutdown(&self) {
5386 self.inner.shutdown()
5387 }
5388
5389 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
5390 self.inner.shutdown_with_epitaph(status)
5391 }
5392
5393 fn is_closed(&self) -> bool {
5394 self.inner.channel().is_closed()
5395 }
5396 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5397 self.inner.channel().on_closed()
5398 }
5399
5400 #[cfg(target_os = "fuchsia")]
5401 fn signal_peer(
5402 &self,
5403 clear_mask: zx::Signals,
5404 set_mask: zx::Signals,
5405 ) -> Result<(), zx_status::Status> {
5406 use fidl::Peered;
5407 self.inner.channel().signal_peer(clear_mask, set_mask)
5408 }
5409}
5410
5411impl ScheduledScanTransactionControlHandle {
5412 pub fn send_on_scheduled_scan_matches_available(
5413 &self,
5414 mut scan_results: fidl::Vmo,
5415 ) -> Result<(), fidl::Error> {
5416 self.inner.send::<ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest>(
5417 (scan_results,),
5418 0,
5419 0x49ff004527d01bd8,
5420 fidl::encoding::DynamicFlags::empty(),
5421 )
5422 }
5423}
5424
5425#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5426pub struct TelemetryMarker;
5427
5428impl fidl::endpoints::ProtocolMarker for TelemetryMarker {
5429 type Proxy = TelemetryProxy;
5430 type RequestStream = TelemetryRequestStream;
5431 #[cfg(target_os = "fuchsia")]
5432 type SynchronousProxy = TelemetrySynchronousProxy;
5433
5434 const DEBUG_NAME: &'static str = "(anonymous) Telemetry";
5435}
5436pub type TelemetryQueryTelemetrySupportResult =
5437 Result<fidl_fuchsia_wlan_stats::TelemetrySupport, i32>;
5438pub type TelemetryGetIfaceStatsResult = Result<fidl_fuchsia_wlan_stats::IfaceStats, i32>;
5439pub type TelemetryGetHistogramStatsResult =
5440 Result<fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>;
5441pub type TelemetryGetSignalReportResult = Result<fidl_fuchsia_wlan_stats::SignalReport, i32>;
5442pub type TelemetryCloneInspectVmoResult = Result<fidl::Vmo, i32>;
5443
5444pub trait TelemetryProxyInterface: Send + Sync {
5445 type QueryTelemetrySupportResponseFut: std::future::Future<Output = Result<TelemetryQueryTelemetrySupportResult, fidl::Error>>
5446 + Send;
5447 fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut;
5448 type GetIfaceStatsResponseFut: std::future::Future<Output = Result<TelemetryGetIfaceStatsResult, fidl::Error>>
5449 + Send;
5450 fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut;
5451 type GetHistogramStatsResponseFut: std::future::Future<Output = Result<TelemetryGetHistogramStatsResult, fidl::Error>>
5452 + Send;
5453 fn r#get_histogram_stats(&self) -> Self::GetHistogramStatsResponseFut;
5454 type GetSignalReportResponseFut: std::future::Future<Output = Result<TelemetryGetSignalReportResult, fidl::Error>>
5455 + Send;
5456 fn r#get_signal_report(&self) -> Self::GetSignalReportResponseFut;
5457 type CloneInspectVmoResponseFut: std::future::Future<Output = Result<TelemetryCloneInspectVmoResult, fidl::Error>>
5458 + Send;
5459 fn r#clone_inspect_vmo(&self) -> Self::CloneInspectVmoResponseFut;
5460}
5461#[derive(Debug)]
5462#[cfg(target_os = "fuchsia")]
5463pub struct TelemetrySynchronousProxy {
5464 client: fidl::client::sync::Client,
5465}
5466
5467#[cfg(target_os = "fuchsia")]
5468impl fidl::endpoints::SynchronousProxy for TelemetrySynchronousProxy {
5469 type Proxy = TelemetryProxy;
5470 type Protocol = TelemetryMarker;
5471
5472 fn from_channel(inner: fidl::Channel) -> Self {
5473 Self::new(inner)
5474 }
5475
5476 fn into_channel(self) -> fidl::Channel {
5477 self.client.into_channel()
5478 }
5479
5480 fn as_channel(&self) -> &fidl::Channel {
5481 self.client.as_channel()
5482 }
5483}
5484
5485#[cfg(target_os = "fuchsia")]
5486impl TelemetrySynchronousProxy {
5487 pub fn new(channel: fidl::Channel) -> Self {
5488 Self { client: fidl::client::sync::Client::new(channel) }
5489 }
5490
5491 pub fn into_channel(self) -> fidl::Channel {
5492 self.client.into_channel()
5493 }
5494
5495 pub fn wait_for_event(
5498 &self,
5499 deadline: zx::MonotonicInstant,
5500 ) -> Result<TelemetryEvent, fidl::Error> {
5501 TelemetryEvent::decode(self.client.wait_for_event::<TelemetryMarker>(deadline)?)
5502 }
5503
5504 pub fn r#query_telemetry_support(
5505 &self,
5506 ___deadline: zx::MonotonicInstant,
5507 ) -> Result<TelemetryQueryTelemetrySupportResult, fidl::Error> {
5508 let _response = self.client.send_query::<
5509 fidl::encoding::EmptyPayload,
5510 fidl::encoding::ResultType<TelemetryQueryTelemetrySupportResponse, i32>,
5511 TelemetryMarker,
5512 >(
5513 (),
5514 0x69443ad35b204686,
5515 fidl::encoding::DynamicFlags::empty(),
5516 ___deadline,
5517 )?;
5518 Ok(_response.map(|x| x.resp))
5519 }
5520
5521 pub fn r#get_iface_stats(
5522 &self,
5523 ___deadline: zx::MonotonicInstant,
5524 ) -> Result<TelemetryGetIfaceStatsResult, fidl::Error> {
5525 let _response = self.client.send_query::<
5526 fidl::encoding::EmptyPayload,
5527 fidl::encoding::ResultType<TelemetryGetIfaceStatsResponse, i32>,
5528 TelemetryMarker,
5529 >(
5530 (),
5531 0x6af057f3a017f572,
5532 fidl::encoding::DynamicFlags::empty(),
5533 ___deadline,
5534 )?;
5535 Ok(_response.map(|x| x.stats))
5536 }
5537
5538 pub fn r#get_histogram_stats(
5539 &self,
5540 ___deadline: zx::MonotonicInstant,
5541 ) -> Result<TelemetryGetHistogramStatsResult, fidl::Error> {
5542 let _response = self.client.send_query::<
5543 fidl::encoding::EmptyPayload,
5544 fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>,
5545 TelemetryMarker,
5546 >(
5547 (),
5548 0x46d2b6a23f764564,
5549 fidl::encoding::DynamicFlags::empty(),
5550 ___deadline,
5551 )?;
5552 Ok(_response.map(|x| x.stats))
5553 }
5554
5555 pub fn r#get_signal_report(
5556 &self,
5557 ___deadline: zx::MonotonicInstant,
5558 ) -> Result<TelemetryGetSignalReportResult, fidl::Error> {
5559 let _response = self.client.send_query::<
5560 fidl::encoding::EmptyPayload,
5561 fidl::encoding::ResultType<TelemetryGetSignalReportResponse, i32>,
5562 TelemetryMarker,
5563 >(
5564 (),
5565 0x24133aeac3225e28,
5566 fidl::encoding::DynamicFlags::empty(),
5567 ___deadline,
5568 )?;
5569 Ok(_response.map(|x| x.stats))
5570 }
5571
5572 pub fn r#clone_inspect_vmo(
5573 &self,
5574 ___deadline: zx::MonotonicInstant,
5575 ) -> Result<TelemetryCloneInspectVmoResult, fidl::Error> {
5576 let _response = self.client.send_query::<
5577 fidl::encoding::EmptyPayload,
5578 fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>,
5579 TelemetryMarker,
5580 >(
5581 (),
5582 0x47153917e84c5a21,
5583 fidl::encoding::DynamicFlags::empty(),
5584 ___deadline,
5585 )?;
5586 Ok(_response.map(|x| x.inspect_vmo))
5587 }
5588}
5589
5590#[cfg(target_os = "fuchsia")]
5591impl From<TelemetrySynchronousProxy> for zx::NullableHandle {
5592 fn from(value: TelemetrySynchronousProxy) -> Self {
5593 value.into_channel().into()
5594 }
5595}
5596
5597#[cfg(target_os = "fuchsia")]
5598impl From<fidl::Channel> for TelemetrySynchronousProxy {
5599 fn from(value: fidl::Channel) -> Self {
5600 Self::new(value)
5601 }
5602}
5603
5604#[cfg(target_os = "fuchsia")]
5605impl fidl::endpoints::FromClient for TelemetrySynchronousProxy {
5606 type Protocol = TelemetryMarker;
5607
5608 fn from_client(value: fidl::endpoints::ClientEnd<TelemetryMarker>) -> Self {
5609 Self::new(value.into_channel())
5610 }
5611}
5612
5613#[derive(Debug, Clone)]
5614pub struct TelemetryProxy {
5615 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5616}
5617
5618impl fidl::endpoints::Proxy for TelemetryProxy {
5619 type Protocol = TelemetryMarker;
5620
5621 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5622 Self::new(inner)
5623 }
5624
5625 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5626 self.client.into_channel().map_err(|client| Self { client })
5627 }
5628
5629 fn as_channel(&self) -> &::fidl::AsyncChannel {
5630 self.client.as_channel()
5631 }
5632}
5633
5634impl TelemetryProxy {
5635 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5637 let protocol_name = <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5638 Self { client: fidl::client::Client::new(channel, protocol_name) }
5639 }
5640
5641 pub fn take_event_stream(&self) -> TelemetryEventStream {
5647 TelemetryEventStream { event_receiver: self.client.take_event_receiver() }
5648 }
5649
5650 pub fn r#query_telemetry_support(
5651 &self,
5652 ) -> fidl::client::QueryResponseFut<
5653 TelemetryQueryTelemetrySupportResult,
5654 fidl::encoding::DefaultFuchsiaResourceDialect,
5655 > {
5656 TelemetryProxyInterface::r#query_telemetry_support(self)
5657 }
5658
5659 pub fn r#get_iface_stats(
5660 &self,
5661 ) -> fidl::client::QueryResponseFut<
5662 TelemetryGetIfaceStatsResult,
5663 fidl::encoding::DefaultFuchsiaResourceDialect,
5664 > {
5665 TelemetryProxyInterface::r#get_iface_stats(self)
5666 }
5667
5668 pub fn r#get_histogram_stats(
5669 &self,
5670 ) -> fidl::client::QueryResponseFut<
5671 TelemetryGetHistogramStatsResult,
5672 fidl::encoding::DefaultFuchsiaResourceDialect,
5673 > {
5674 TelemetryProxyInterface::r#get_histogram_stats(self)
5675 }
5676
5677 pub fn r#get_signal_report(
5678 &self,
5679 ) -> fidl::client::QueryResponseFut<
5680 TelemetryGetSignalReportResult,
5681 fidl::encoding::DefaultFuchsiaResourceDialect,
5682 > {
5683 TelemetryProxyInterface::r#get_signal_report(self)
5684 }
5685
5686 pub fn r#clone_inspect_vmo(
5687 &self,
5688 ) -> fidl::client::QueryResponseFut<
5689 TelemetryCloneInspectVmoResult,
5690 fidl::encoding::DefaultFuchsiaResourceDialect,
5691 > {
5692 TelemetryProxyInterface::r#clone_inspect_vmo(self)
5693 }
5694}
5695
5696impl TelemetryProxyInterface for TelemetryProxy {
5697 type QueryTelemetrySupportResponseFut = fidl::client::QueryResponseFut<
5698 TelemetryQueryTelemetrySupportResult,
5699 fidl::encoding::DefaultFuchsiaResourceDialect,
5700 >;
5701 fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut {
5702 fn _decode(
5703 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5704 ) -> Result<TelemetryQueryTelemetrySupportResult, fidl::Error> {
5705 let _response = fidl::client::decode_transaction_body::<
5706 fidl::encoding::ResultType<TelemetryQueryTelemetrySupportResponse, i32>,
5707 fidl::encoding::DefaultFuchsiaResourceDialect,
5708 0x69443ad35b204686,
5709 >(_buf?)?;
5710 Ok(_response.map(|x| x.resp))
5711 }
5712 self.client.send_query_and_decode::<
5713 fidl::encoding::EmptyPayload,
5714 TelemetryQueryTelemetrySupportResult,
5715 >(
5716 (),
5717 0x69443ad35b204686,
5718 fidl::encoding::DynamicFlags::empty(),
5719 _decode,
5720 )
5721 }
5722
5723 type GetIfaceStatsResponseFut = fidl::client::QueryResponseFut<
5724 TelemetryGetIfaceStatsResult,
5725 fidl::encoding::DefaultFuchsiaResourceDialect,
5726 >;
5727 fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut {
5728 fn _decode(
5729 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5730 ) -> Result<TelemetryGetIfaceStatsResult, fidl::Error> {
5731 let _response = fidl::client::decode_transaction_body::<
5732 fidl::encoding::ResultType<TelemetryGetIfaceStatsResponse, i32>,
5733 fidl::encoding::DefaultFuchsiaResourceDialect,
5734 0x6af057f3a017f572,
5735 >(_buf?)?;
5736 Ok(_response.map(|x| x.stats))
5737 }
5738 self.client
5739 .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryGetIfaceStatsResult>(
5740 (),
5741 0x6af057f3a017f572,
5742 fidl::encoding::DynamicFlags::empty(),
5743 _decode,
5744 )
5745 }
5746
5747 type GetHistogramStatsResponseFut = fidl::client::QueryResponseFut<
5748 TelemetryGetHistogramStatsResult,
5749 fidl::encoding::DefaultFuchsiaResourceDialect,
5750 >;
5751 fn r#get_histogram_stats(&self) -> Self::GetHistogramStatsResponseFut {
5752 fn _decode(
5753 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5754 ) -> Result<TelemetryGetHistogramStatsResult, fidl::Error> {
5755 let _response = fidl::client::decode_transaction_body::<
5756 fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>,
5757 fidl::encoding::DefaultFuchsiaResourceDialect,
5758 0x46d2b6a23f764564,
5759 >(_buf?)?;
5760 Ok(_response.map(|x| x.stats))
5761 }
5762 self.client.send_query_and_decode::<
5763 fidl::encoding::EmptyPayload,
5764 TelemetryGetHistogramStatsResult,
5765 >(
5766 (),
5767 0x46d2b6a23f764564,
5768 fidl::encoding::DynamicFlags::empty(),
5769 _decode,
5770 )
5771 }
5772
5773 type GetSignalReportResponseFut = fidl::client::QueryResponseFut<
5774 TelemetryGetSignalReportResult,
5775 fidl::encoding::DefaultFuchsiaResourceDialect,
5776 >;
5777 fn r#get_signal_report(&self) -> Self::GetSignalReportResponseFut {
5778 fn _decode(
5779 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5780 ) -> Result<TelemetryGetSignalReportResult, fidl::Error> {
5781 let _response = fidl::client::decode_transaction_body::<
5782 fidl::encoding::ResultType<TelemetryGetSignalReportResponse, i32>,
5783 fidl::encoding::DefaultFuchsiaResourceDialect,
5784 0x24133aeac3225e28,
5785 >(_buf?)?;
5786 Ok(_response.map(|x| x.stats))
5787 }
5788 self.client
5789 .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryGetSignalReportResult>(
5790 (),
5791 0x24133aeac3225e28,
5792 fidl::encoding::DynamicFlags::empty(),
5793 _decode,
5794 )
5795 }
5796
5797 type CloneInspectVmoResponseFut = fidl::client::QueryResponseFut<
5798 TelemetryCloneInspectVmoResult,
5799 fidl::encoding::DefaultFuchsiaResourceDialect,
5800 >;
5801 fn r#clone_inspect_vmo(&self) -> Self::CloneInspectVmoResponseFut {
5802 fn _decode(
5803 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5804 ) -> Result<TelemetryCloneInspectVmoResult, fidl::Error> {
5805 let _response = fidl::client::decode_transaction_body::<
5806 fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>,
5807 fidl::encoding::DefaultFuchsiaResourceDialect,
5808 0x47153917e84c5a21,
5809 >(_buf?)?;
5810 Ok(_response.map(|x| x.inspect_vmo))
5811 }
5812 self.client
5813 .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryCloneInspectVmoResult>(
5814 (),
5815 0x47153917e84c5a21,
5816 fidl::encoding::DynamicFlags::empty(),
5817 _decode,
5818 )
5819 }
5820}
5821
5822pub struct TelemetryEventStream {
5823 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5824}
5825
5826impl std::marker::Unpin for TelemetryEventStream {}
5827
5828impl futures::stream::FusedStream for TelemetryEventStream {
5829 fn is_terminated(&self) -> bool {
5830 self.event_receiver.is_terminated()
5831 }
5832}
5833
5834impl futures::Stream for TelemetryEventStream {
5835 type Item = Result<TelemetryEvent, fidl::Error>;
5836
5837 fn poll_next(
5838 mut self: std::pin::Pin<&mut Self>,
5839 cx: &mut std::task::Context<'_>,
5840 ) -> std::task::Poll<Option<Self::Item>> {
5841 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5842 &mut self.event_receiver,
5843 cx
5844 )?) {
5845 Some(buf) => std::task::Poll::Ready(Some(TelemetryEvent::decode(buf))),
5846 None => std::task::Poll::Ready(None),
5847 }
5848 }
5849}
5850
5851#[derive(Debug)]
5852pub enum TelemetryEvent {}
5853
5854impl TelemetryEvent {
5855 fn decode(
5857 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5858 ) -> Result<TelemetryEvent, fidl::Error> {
5859 let (bytes, _handles) = buf.split_mut();
5860 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5861 debug_assert_eq!(tx_header.tx_id, 0);
5862 match tx_header.ordinal {
5863 _ => Err(fidl::Error::UnknownOrdinal {
5864 ordinal: tx_header.ordinal,
5865 protocol_name: <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5866 }),
5867 }
5868 }
5869}
5870
5871pub struct TelemetryRequestStream {
5873 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5874 is_terminated: bool,
5875}
5876
5877impl std::marker::Unpin for TelemetryRequestStream {}
5878
5879impl futures::stream::FusedStream for TelemetryRequestStream {
5880 fn is_terminated(&self) -> bool {
5881 self.is_terminated
5882 }
5883}
5884
5885impl fidl::endpoints::RequestStream for TelemetryRequestStream {
5886 type Protocol = TelemetryMarker;
5887 type ControlHandle = TelemetryControlHandle;
5888
5889 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5890 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5891 }
5892
5893 fn control_handle(&self) -> Self::ControlHandle {
5894 TelemetryControlHandle { inner: self.inner.clone() }
5895 }
5896
5897 fn into_inner(
5898 self,
5899 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5900 {
5901 (self.inner, self.is_terminated)
5902 }
5903
5904 fn from_inner(
5905 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5906 is_terminated: bool,
5907 ) -> Self {
5908 Self { inner, is_terminated }
5909 }
5910}
5911
5912impl futures::Stream for TelemetryRequestStream {
5913 type Item = Result<TelemetryRequest, fidl::Error>;
5914
5915 fn poll_next(
5916 mut self: std::pin::Pin<&mut Self>,
5917 cx: &mut std::task::Context<'_>,
5918 ) -> std::task::Poll<Option<Self::Item>> {
5919 let this = &mut *self;
5920 if this.inner.check_shutdown(cx) {
5921 this.is_terminated = true;
5922 return std::task::Poll::Ready(None);
5923 }
5924 if this.is_terminated {
5925 panic!("polled TelemetryRequestStream after completion");
5926 }
5927 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5928 |bytes, handles| {
5929 match this.inner.channel().read_etc(cx, bytes, handles) {
5930 std::task::Poll::Ready(Ok(())) => {}
5931 std::task::Poll::Pending => return std::task::Poll::Pending,
5932 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5933 this.is_terminated = true;
5934 return std::task::Poll::Ready(None);
5935 }
5936 std::task::Poll::Ready(Err(e)) => {
5937 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5938 e.into(),
5939 ))));
5940 }
5941 }
5942
5943 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5945
5946 std::task::Poll::Ready(Some(match header.ordinal {
5947 0x69443ad35b204686 => {
5948 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5949 let mut req = fidl::new_empty!(
5950 fidl::encoding::EmptyPayload,
5951 fidl::encoding::DefaultFuchsiaResourceDialect
5952 );
5953 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5954 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
5955 Ok(TelemetryRequest::QueryTelemetrySupport {
5956 responder: TelemetryQueryTelemetrySupportResponder {
5957 control_handle: std::mem::ManuallyDrop::new(control_handle),
5958 tx_id: header.tx_id,
5959 },
5960 })
5961 }
5962 0x6af057f3a017f572 => {
5963 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5964 let mut req = fidl::new_empty!(
5965 fidl::encoding::EmptyPayload,
5966 fidl::encoding::DefaultFuchsiaResourceDialect
5967 );
5968 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5969 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
5970 Ok(TelemetryRequest::GetIfaceStats {
5971 responder: TelemetryGetIfaceStatsResponder {
5972 control_handle: std::mem::ManuallyDrop::new(control_handle),
5973 tx_id: header.tx_id,
5974 },
5975 })
5976 }
5977 0x46d2b6a23f764564 => {
5978 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5979 let mut req = fidl::new_empty!(
5980 fidl::encoding::EmptyPayload,
5981 fidl::encoding::DefaultFuchsiaResourceDialect
5982 );
5983 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5984 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
5985 Ok(TelemetryRequest::GetHistogramStats {
5986 responder: TelemetryGetHistogramStatsResponder {
5987 control_handle: std::mem::ManuallyDrop::new(control_handle),
5988 tx_id: header.tx_id,
5989 },
5990 })
5991 }
5992 0x24133aeac3225e28 => {
5993 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5994 let mut req = fidl::new_empty!(
5995 fidl::encoding::EmptyPayload,
5996 fidl::encoding::DefaultFuchsiaResourceDialect
5997 );
5998 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5999 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
6000 Ok(TelemetryRequest::GetSignalReport {
6001 responder: TelemetryGetSignalReportResponder {
6002 control_handle: std::mem::ManuallyDrop::new(control_handle),
6003 tx_id: header.tx_id,
6004 },
6005 })
6006 }
6007 0x47153917e84c5a21 => {
6008 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6009 let mut req = fidl::new_empty!(
6010 fidl::encoding::EmptyPayload,
6011 fidl::encoding::DefaultFuchsiaResourceDialect
6012 );
6013 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6014 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
6015 Ok(TelemetryRequest::CloneInspectVmo {
6016 responder: TelemetryCloneInspectVmoResponder {
6017 control_handle: std::mem::ManuallyDrop::new(control_handle),
6018 tx_id: header.tx_id,
6019 },
6020 })
6021 }
6022 _ => Err(fidl::Error::UnknownOrdinal {
6023 ordinal: header.ordinal,
6024 protocol_name:
6025 <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6026 }),
6027 }))
6028 },
6029 )
6030 }
6031}
6032
6033#[derive(Debug)]
6034pub enum TelemetryRequest {
6035 QueryTelemetrySupport { responder: TelemetryQueryTelemetrySupportResponder },
6036 GetIfaceStats { responder: TelemetryGetIfaceStatsResponder },
6037 GetHistogramStats { responder: TelemetryGetHistogramStatsResponder },
6038 GetSignalReport { responder: TelemetryGetSignalReportResponder },
6039 CloneInspectVmo { responder: TelemetryCloneInspectVmoResponder },
6040}
6041
6042impl TelemetryRequest {
6043 #[allow(irrefutable_let_patterns)]
6044 pub fn into_query_telemetry_support(self) -> Option<(TelemetryQueryTelemetrySupportResponder)> {
6045 if let TelemetryRequest::QueryTelemetrySupport { responder } = self {
6046 Some((responder))
6047 } else {
6048 None
6049 }
6050 }
6051
6052 #[allow(irrefutable_let_patterns)]
6053 pub fn into_get_iface_stats(self) -> Option<(TelemetryGetIfaceStatsResponder)> {
6054 if let TelemetryRequest::GetIfaceStats { responder } = self {
6055 Some((responder))
6056 } else {
6057 None
6058 }
6059 }
6060
6061 #[allow(irrefutable_let_patterns)]
6062 pub fn into_get_histogram_stats(self) -> Option<(TelemetryGetHistogramStatsResponder)> {
6063 if let TelemetryRequest::GetHistogramStats { responder } = self {
6064 Some((responder))
6065 } else {
6066 None
6067 }
6068 }
6069
6070 #[allow(irrefutable_let_patterns)]
6071 pub fn into_get_signal_report(self) -> Option<(TelemetryGetSignalReportResponder)> {
6072 if let TelemetryRequest::GetSignalReport { responder } = self {
6073 Some((responder))
6074 } else {
6075 None
6076 }
6077 }
6078
6079 #[allow(irrefutable_let_patterns)]
6080 pub fn into_clone_inspect_vmo(self) -> Option<(TelemetryCloneInspectVmoResponder)> {
6081 if let TelemetryRequest::CloneInspectVmo { responder } = self {
6082 Some((responder))
6083 } else {
6084 None
6085 }
6086 }
6087
6088 pub fn method_name(&self) -> &'static str {
6090 match *self {
6091 TelemetryRequest::QueryTelemetrySupport { .. } => "query_telemetry_support",
6092 TelemetryRequest::GetIfaceStats { .. } => "get_iface_stats",
6093 TelemetryRequest::GetHistogramStats { .. } => "get_histogram_stats",
6094 TelemetryRequest::GetSignalReport { .. } => "get_signal_report",
6095 TelemetryRequest::CloneInspectVmo { .. } => "clone_inspect_vmo",
6096 }
6097 }
6098}
6099
6100#[derive(Debug, Clone)]
6101pub struct TelemetryControlHandle {
6102 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6103}
6104
6105impl TelemetryControlHandle {
6106 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
6107 self.inner.shutdown_with_epitaph(status.into())
6108 }
6109}
6110
6111impl fidl::endpoints::ControlHandle for TelemetryControlHandle {
6112 fn shutdown(&self) {
6113 self.inner.shutdown()
6114 }
6115
6116 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
6117 self.inner.shutdown_with_epitaph(status)
6118 }
6119
6120 fn is_closed(&self) -> bool {
6121 self.inner.channel().is_closed()
6122 }
6123 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6124 self.inner.channel().on_closed()
6125 }
6126
6127 #[cfg(target_os = "fuchsia")]
6128 fn signal_peer(
6129 &self,
6130 clear_mask: zx::Signals,
6131 set_mask: zx::Signals,
6132 ) -> Result<(), zx_status::Status> {
6133 use fidl::Peered;
6134 self.inner.channel().signal_peer(clear_mask, set_mask)
6135 }
6136}
6137
6138impl TelemetryControlHandle {}
6139
6140#[must_use = "FIDL methods require a response to be sent"]
6141#[derive(Debug)]
6142pub struct TelemetryQueryTelemetrySupportResponder {
6143 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
6144 tx_id: u32,
6145}
6146
6147impl std::ops::Drop for TelemetryQueryTelemetrySupportResponder {
6151 fn drop(&mut self) {
6152 self.control_handle.shutdown();
6153 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6155 }
6156}
6157
6158impl fidl::endpoints::Responder for TelemetryQueryTelemetrySupportResponder {
6159 type ControlHandle = TelemetryControlHandle;
6160
6161 fn control_handle(&self) -> &TelemetryControlHandle {
6162 &self.control_handle
6163 }
6164
6165 fn drop_without_shutdown(mut self) {
6166 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6168 std::mem::forget(self);
6170 }
6171}
6172
6173impl TelemetryQueryTelemetrySupportResponder {
6174 pub fn send(
6178 self,
6179 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
6180 ) -> Result<(), fidl::Error> {
6181 let _result = self.send_raw(result);
6182 if _result.is_err() {
6183 self.control_handle.shutdown();
6184 }
6185 self.drop_without_shutdown();
6186 _result
6187 }
6188
6189 pub fn send_no_shutdown_on_err(
6191 self,
6192 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
6193 ) -> Result<(), fidl::Error> {
6194 let _result = self.send_raw(result);
6195 self.drop_without_shutdown();
6196 _result
6197 }
6198
6199 fn send_raw(
6200 &self,
6201 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
6202 ) -> Result<(), fidl::Error> {
6203 self.control_handle.inner.send::<fidl::encoding::ResultType<
6204 TelemetryQueryTelemetrySupportResponse,
6205 i32,
6206 >>(
6207 result.map(|resp| (resp,)),
6208 self.tx_id,
6209 0x69443ad35b204686,
6210 fidl::encoding::DynamicFlags::empty(),
6211 )
6212 }
6213}
6214
6215#[must_use = "FIDL methods require a response to be sent"]
6216#[derive(Debug)]
6217pub struct TelemetryGetIfaceStatsResponder {
6218 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
6219 tx_id: u32,
6220}
6221
6222impl std::ops::Drop for TelemetryGetIfaceStatsResponder {
6226 fn drop(&mut self) {
6227 self.control_handle.shutdown();
6228 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6230 }
6231}
6232
6233impl fidl::endpoints::Responder for TelemetryGetIfaceStatsResponder {
6234 type ControlHandle = TelemetryControlHandle;
6235
6236 fn control_handle(&self) -> &TelemetryControlHandle {
6237 &self.control_handle
6238 }
6239
6240 fn drop_without_shutdown(mut self) {
6241 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6243 std::mem::forget(self);
6245 }
6246}
6247
6248impl TelemetryGetIfaceStatsResponder {
6249 pub fn send(
6253 self,
6254 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceStats, i32>,
6255 ) -> Result<(), fidl::Error> {
6256 let _result = self.send_raw(result);
6257 if _result.is_err() {
6258 self.control_handle.shutdown();
6259 }
6260 self.drop_without_shutdown();
6261 _result
6262 }
6263
6264 pub fn send_no_shutdown_on_err(
6266 self,
6267 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceStats, i32>,
6268 ) -> Result<(), fidl::Error> {
6269 let _result = self.send_raw(result);
6270 self.drop_without_shutdown();
6271 _result
6272 }
6273
6274 fn send_raw(
6275 &self,
6276 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceStats, i32>,
6277 ) -> Result<(), fidl::Error> {
6278 self.control_handle
6279 .inner
6280 .send::<fidl::encoding::ResultType<TelemetryGetIfaceStatsResponse, i32>>(
6281 result.map(|stats| (stats,)),
6282 self.tx_id,
6283 0x6af057f3a017f572,
6284 fidl::encoding::DynamicFlags::empty(),
6285 )
6286 }
6287}
6288
6289#[must_use = "FIDL methods require a response to be sent"]
6290#[derive(Debug)]
6291pub struct TelemetryGetHistogramStatsResponder {
6292 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
6293 tx_id: u32,
6294}
6295
6296impl std::ops::Drop for TelemetryGetHistogramStatsResponder {
6300 fn drop(&mut self) {
6301 self.control_handle.shutdown();
6302 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6304 }
6305}
6306
6307impl fidl::endpoints::Responder for TelemetryGetHistogramStatsResponder {
6308 type ControlHandle = TelemetryControlHandle;
6309
6310 fn control_handle(&self) -> &TelemetryControlHandle {
6311 &self.control_handle
6312 }
6313
6314 fn drop_without_shutdown(mut self) {
6315 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6317 std::mem::forget(self);
6319 }
6320}
6321
6322impl TelemetryGetHistogramStatsResponder {
6323 pub fn send(
6327 self,
6328 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
6329 ) -> Result<(), fidl::Error> {
6330 let _result = self.send_raw(result);
6331 if _result.is_err() {
6332 self.control_handle.shutdown();
6333 }
6334 self.drop_without_shutdown();
6335 _result
6336 }
6337
6338 pub fn send_no_shutdown_on_err(
6340 self,
6341 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
6342 ) -> Result<(), fidl::Error> {
6343 let _result = self.send_raw(result);
6344 self.drop_without_shutdown();
6345 _result
6346 }
6347
6348 fn send_raw(
6349 &self,
6350 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
6351 ) -> Result<(), fidl::Error> {
6352 self.control_handle
6353 .inner
6354 .send::<fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>>(
6355 result.map(|stats| (stats,)),
6356 self.tx_id,
6357 0x46d2b6a23f764564,
6358 fidl::encoding::DynamicFlags::empty(),
6359 )
6360 }
6361}
6362
6363#[must_use = "FIDL methods require a response to be sent"]
6364#[derive(Debug)]
6365pub struct TelemetryGetSignalReportResponder {
6366 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
6367 tx_id: u32,
6368}
6369
6370impl std::ops::Drop for TelemetryGetSignalReportResponder {
6374 fn drop(&mut self) {
6375 self.control_handle.shutdown();
6376 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6378 }
6379}
6380
6381impl fidl::endpoints::Responder for TelemetryGetSignalReportResponder {
6382 type ControlHandle = TelemetryControlHandle;
6383
6384 fn control_handle(&self) -> &TelemetryControlHandle {
6385 &self.control_handle
6386 }
6387
6388 fn drop_without_shutdown(mut self) {
6389 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6391 std::mem::forget(self);
6393 }
6394}
6395
6396impl TelemetryGetSignalReportResponder {
6397 pub fn send(
6401 self,
6402 mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
6403 ) -> Result<(), fidl::Error> {
6404 let _result = self.send_raw(result);
6405 if _result.is_err() {
6406 self.control_handle.shutdown();
6407 }
6408 self.drop_without_shutdown();
6409 _result
6410 }
6411
6412 pub fn send_no_shutdown_on_err(
6414 self,
6415 mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
6416 ) -> Result<(), fidl::Error> {
6417 let _result = self.send_raw(result);
6418 self.drop_without_shutdown();
6419 _result
6420 }
6421
6422 fn send_raw(
6423 &self,
6424 mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
6425 ) -> Result<(), fidl::Error> {
6426 self.control_handle
6427 .inner
6428 .send::<fidl::encoding::ResultType<TelemetryGetSignalReportResponse, i32>>(
6429 result.map(|stats| (stats,)),
6430 self.tx_id,
6431 0x24133aeac3225e28,
6432 fidl::encoding::DynamicFlags::empty(),
6433 )
6434 }
6435}
6436
6437#[must_use = "FIDL methods require a response to be sent"]
6438#[derive(Debug)]
6439pub struct TelemetryCloneInspectVmoResponder {
6440 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
6441 tx_id: u32,
6442}
6443
6444impl std::ops::Drop for TelemetryCloneInspectVmoResponder {
6448 fn drop(&mut self) {
6449 self.control_handle.shutdown();
6450 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6452 }
6453}
6454
6455impl fidl::endpoints::Responder for TelemetryCloneInspectVmoResponder {
6456 type ControlHandle = TelemetryControlHandle;
6457
6458 fn control_handle(&self) -> &TelemetryControlHandle {
6459 &self.control_handle
6460 }
6461
6462 fn drop_without_shutdown(mut self) {
6463 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6465 std::mem::forget(self);
6467 }
6468}
6469
6470impl TelemetryCloneInspectVmoResponder {
6471 pub fn send(self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
6475 let _result = self.send_raw(result);
6476 if _result.is_err() {
6477 self.control_handle.shutdown();
6478 }
6479 self.drop_without_shutdown();
6480 _result
6481 }
6482
6483 pub fn send_no_shutdown_on_err(
6485 self,
6486 mut result: Result<fidl::Vmo, i32>,
6487 ) -> Result<(), fidl::Error> {
6488 let _result = self.send_raw(result);
6489 self.drop_without_shutdown();
6490 _result
6491 }
6492
6493 fn send_raw(&self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
6494 self.control_handle
6495 .inner
6496 .send::<fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>>(
6497 result.map(|inspect_vmo| (inspect_vmo,)),
6498 self.tx_id,
6499 0x47153917e84c5a21,
6500 fidl::encoding::DynamicFlags::empty(),
6501 )
6502 }
6503}
6504
6505#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6506pub struct UsmeBootstrapMarker;
6507
6508impl fidl::endpoints::ProtocolMarker for UsmeBootstrapMarker {
6509 type Proxy = UsmeBootstrapProxy;
6510 type RequestStream = UsmeBootstrapRequestStream;
6511 #[cfg(target_os = "fuchsia")]
6512 type SynchronousProxy = UsmeBootstrapSynchronousProxy;
6513
6514 const DEBUG_NAME: &'static str = "(anonymous) UsmeBootstrap";
6515}
6516
6517pub trait UsmeBootstrapProxyInterface: Send + Sync {
6518 type StartResponseFut: std::future::Future<Output = Result<fidl::Vmo, fidl::Error>> + Send;
6519 fn r#start(
6520 &self,
6521 generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
6522 legacy_privacy_support: &LegacyPrivacySupport,
6523 ) -> Self::StartResponseFut;
6524}
6525#[derive(Debug)]
6526#[cfg(target_os = "fuchsia")]
6527pub struct UsmeBootstrapSynchronousProxy {
6528 client: fidl::client::sync::Client,
6529}
6530
6531#[cfg(target_os = "fuchsia")]
6532impl fidl::endpoints::SynchronousProxy for UsmeBootstrapSynchronousProxy {
6533 type Proxy = UsmeBootstrapProxy;
6534 type Protocol = UsmeBootstrapMarker;
6535
6536 fn from_channel(inner: fidl::Channel) -> Self {
6537 Self::new(inner)
6538 }
6539
6540 fn into_channel(self) -> fidl::Channel {
6541 self.client.into_channel()
6542 }
6543
6544 fn as_channel(&self) -> &fidl::Channel {
6545 self.client.as_channel()
6546 }
6547}
6548
6549#[cfg(target_os = "fuchsia")]
6550impl UsmeBootstrapSynchronousProxy {
6551 pub fn new(channel: fidl::Channel) -> Self {
6552 Self { client: fidl::client::sync::Client::new(channel) }
6553 }
6554
6555 pub fn into_channel(self) -> fidl::Channel {
6556 self.client.into_channel()
6557 }
6558
6559 pub fn wait_for_event(
6562 &self,
6563 deadline: zx::MonotonicInstant,
6564 ) -> Result<UsmeBootstrapEvent, fidl::Error> {
6565 UsmeBootstrapEvent::decode(self.client.wait_for_event::<UsmeBootstrapMarker>(deadline)?)
6566 }
6567
6568 pub fn r#start(
6569 &self,
6570 mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
6571 mut legacy_privacy_support: &LegacyPrivacySupport,
6572 ___deadline: zx::MonotonicInstant,
6573 ) -> Result<fidl::Vmo, fidl::Error> {
6574 let _response = self.client.send_query::<
6575 UsmeBootstrapStartRequest,
6576 UsmeBootstrapStartResponse,
6577 UsmeBootstrapMarker,
6578 >(
6579 (generic_sme_server, legacy_privacy_support,),
6580 0x58850dfb76c29a0e,
6581 fidl::encoding::DynamicFlags::empty(),
6582 ___deadline,
6583 )?;
6584 Ok(_response.inspect_vmo)
6585 }
6586}
6587
6588#[cfg(target_os = "fuchsia")]
6589impl From<UsmeBootstrapSynchronousProxy> for zx::NullableHandle {
6590 fn from(value: UsmeBootstrapSynchronousProxy) -> Self {
6591 value.into_channel().into()
6592 }
6593}
6594
6595#[cfg(target_os = "fuchsia")]
6596impl From<fidl::Channel> for UsmeBootstrapSynchronousProxy {
6597 fn from(value: fidl::Channel) -> Self {
6598 Self::new(value)
6599 }
6600}
6601
6602#[cfg(target_os = "fuchsia")]
6603impl fidl::endpoints::FromClient for UsmeBootstrapSynchronousProxy {
6604 type Protocol = UsmeBootstrapMarker;
6605
6606 fn from_client(value: fidl::endpoints::ClientEnd<UsmeBootstrapMarker>) -> Self {
6607 Self::new(value.into_channel())
6608 }
6609}
6610
6611#[derive(Debug, Clone)]
6612pub struct UsmeBootstrapProxy {
6613 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6614}
6615
6616impl fidl::endpoints::Proxy for UsmeBootstrapProxy {
6617 type Protocol = UsmeBootstrapMarker;
6618
6619 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6620 Self::new(inner)
6621 }
6622
6623 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6624 self.client.into_channel().map_err(|client| Self { client })
6625 }
6626
6627 fn as_channel(&self) -> &::fidl::AsyncChannel {
6628 self.client.as_channel()
6629 }
6630}
6631
6632impl UsmeBootstrapProxy {
6633 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6635 let protocol_name = <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6636 Self { client: fidl::client::Client::new(channel, protocol_name) }
6637 }
6638
6639 pub fn take_event_stream(&self) -> UsmeBootstrapEventStream {
6645 UsmeBootstrapEventStream { event_receiver: self.client.take_event_receiver() }
6646 }
6647
6648 pub fn r#start(
6649 &self,
6650 mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
6651 mut legacy_privacy_support: &LegacyPrivacySupport,
6652 ) -> fidl::client::QueryResponseFut<fidl::Vmo, fidl::encoding::DefaultFuchsiaResourceDialect>
6653 {
6654 UsmeBootstrapProxyInterface::r#start(self, generic_sme_server, legacy_privacy_support)
6655 }
6656}
6657
6658impl UsmeBootstrapProxyInterface for UsmeBootstrapProxy {
6659 type StartResponseFut =
6660 fidl::client::QueryResponseFut<fidl::Vmo, fidl::encoding::DefaultFuchsiaResourceDialect>;
6661 fn r#start(
6662 &self,
6663 mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
6664 mut legacy_privacy_support: &LegacyPrivacySupport,
6665 ) -> Self::StartResponseFut {
6666 fn _decode(
6667 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6668 ) -> Result<fidl::Vmo, fidl::Error> {
6669 let _response = fidl::client::decode_transaction_body::<
6670 UsmeBootstrapStartResponse,
6671 fidl::encoding::DefaultFuchsiaResourceDialect,
6672 0x58850dfb76c29a0e,
6673 >(_buf?)?;
6674 Ok(_response.inspect_vmo)
6675 }
6676 self.client.send_query_and_decode::<UsmeBootstrapStartRequest, fidl::Vmo>(
6677 (generic_sme_server, legacy_privacy_support),
6678 0x58850dfb76c29a0e,
6679 fidl::encoding::DynamicFlags::empty(),
6680 _decode,
6681 )
6682 }
6683}
6684
6685pub struct UsmeBootstrapEventStream {
6686 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6687}
6688
6689impl std::marker::Unpin for UsmeBootstrapEventStream {}
6690
6691impl futures::stream::FusedStream for UsmeBootstrapEventStream {
6692 fn is_terminated(&self) -> bool {
6693 self.event_receiver.is_terminated()
6694 }
6695}
6696
6697impl futures::Stream for UsmeBootstrapEventStream {
6698 type Item = Result<UsmeBootstrapEvent, fidl::Error>;
6699
6700 fn poll_next(
6701 mut self: std::pin::Pin<&mut Self>,
6702 cx: &mut std::task::Context<'_>,
6703 ) -> std::task::Poll<Option<Self::Item>> {
6704 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6705 &mut self.event_receiver,
6706 cx
6707 )?) {
6708 Some(buf) => std::task::Poll::Ready(Some(UsmeBootstrapEvent::decode(buf))),
6709 None => std::task::Poll::Ready(None),
6710 }
6711 }
6712}
6713
6714#[derive(Debug)]
6715pub enum UsmeBootstrapEvent {}
6716
6717impl UsmeBootstrapEvent {
6718 fn decode(
6720 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6721 ) -> Result<UsmeBootstrapEvent, fidl::Error> {
6722 let (bytes, _handles) = buf.split_mut();
6723 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6724 debug_assert_eq!(tx_header.tx_id, 0);
6725 match tx_header.ordinal {
6726 _ => Err(fidl::Error::UnknownOrdinal {
6727 ordinal: tx_header.ordinal,
6728 protocol_name: <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6729 }),
6730 }
6731 }
6732}
6733
6734pub struct UsmeBootstrapRequestStream {
6736 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6737 is_terminated: bool,
6738}
6739
6740impl std::marker::Unpin for UsmeBootstrapRequestStream {}
6741
6742impl futures::stream::FusedStream for UsmeBootstrapRequestStream {
6743 fn is_terminated(&self) -> bool {
6744 self.is_terminated
6745 }
6746}
6747
6748impl fidl::endpoints::RequestStream for UsmeBootstrapRequestStream {
6749 type Protocol = UsmeBootstrapMarker;
6750 type ControlHandle = UsmeBootstrapControlHandle;
6751
6752 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6753 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6754 }
6755
6756 fn control_handle(&self) -> Self::ControlHandle {
6757 UsmeBootstrapControlHandle { inner: self.inner.clone() }
6758 }
6759
6760 fn into_inner(
6761 self,
6762 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6763 {
6764 (self.inner, self.is_terminated)
6765 }
6766
6767 fn from_inner(
6768 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6769 is_terminated: bool,
6770 ) -> Self {
6771 Self { inner, is_terminated }
6772 }
6773}
6774
6775impl futures::Stream for UsmeBootstrapRequestStream {
6776 type Item = Result<UsmeBootstrapRequest, fidl::Error>;
6777
6778 fn poll_next(
6779 mut self: std::pin::Pin<&mut Self>,
6780 cx: &mut std::task::Context<'_>,
6781 ) -> std::task::Poll<Option<Self::Item>> {
6782 let this = &mut *self;
6783 if this.inner.check_shutdown(cx) {
6784 this.is_terminated = true;
6785 return std::task::Poll::Ready(None);
6786 }
6787 if this.is_terminated {
6788 panic!("polled UsmeBootstrapRequestStream after completion");
6789 }
6790 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6791 |bytes, handles| {
6792 match this.inner.channel().read_etc(cx, bytes, handles) {
6793 std::task::Poll::Ready(Ok(())) => {}
6794 std::task::Poll::Pending => return std::task::Poll::Pending,
6795 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6796 this.is_terminated = true;
6797 return std::task::Poll::Ready(None);
6798 }
6799 std::task::Poll::Ready(Err(e)) => {
6800 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6801 e.into(),
6802 ))));
6803 }
6804 }
6805
6806 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6808
6809 std::task::Poll::Ready(Some(match header.ordinal {
6810 0x58850dfb76c29a0e => {
6811 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6812 let mut req = fidl::new_empty!(
6813 UsmeBootstrapStartRequest,
6814 fidl::encoding::DefaultFuchsiaResourceDialect
6815 );
6816 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UsmeBootstrapStartRequest>(&header, _body_bytes, handles, &mut req)?;
6817 let control_handle =
6818 UsmeBootstrapControlHandle { inner: this.inner.clone() };
6819 Ok(UsmeBootstrapRequest::Start {
6820 generic_sme_server: req.generic_sme_server,
6821 legacy_privacy_support: req.legacy_privacy_support,
6822
6823 responder: UsmeBootstrapStartResponder {
6824 control_handle: std::mem::ManuallyDrop::new(control_handle),
6825 tx_id: header.tx_id,
6826 },
6827 })
6828 }
6829 _ => Err(fidl::Error::UnknownOrdinal {
6830 ordinal: header.ordinal,
6831 protocol_name:
6832 <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6833 }),
6834 }))
6835 },
6836 )
6837 }
6838}
6839
6840#[derive(Debug)]
6841pub enum UsmeBootstrapRequest {
6842 Start {
6843 generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
6844 legacy_privacy_support: LegacyPrivacySupport,
6845 responder: UsmeBootstrapStartResponder,
6846 },
6847}
6848
6849impl UsmeBootstrapRequest {
6850 #[allow(irrefutable_let_patterns)]
6851 pub fn into_start(
6852 self,
6853 ) -> Option<(
6854 fidl::endpoints::ServerEnd<GenericSmeMarker>,
6855 LegacyPrivacySupport,
6856 UsmeBootstrapStartResponder,
6857 )> {
6858 if let UsmeBootstrapRequest::Start {
6859 generic_sme_server,
6860 legacy_privacy_support,
6861 responder,
6862 } = self
6863 {
6864 Some((generic_sme_server, legacy_privacy_support, responder))
6865 } else {
6866 None
6867 }
6868 }
6869
6870 pub fn method_name(&self) -> &'static str {
6872 match *self {
6873 UsmeBootstrapRequest::Start { .. } => "start",
6874 }
6875 }
6876}
6877
6878#[derive(Debug, Clone)]
6879pub struct UsmeBootstrapControlHandle {
6880 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6881}
6882
6883impl UsmeBootstrapControlHandle {
6884 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
6885 self.inner.shutdown_with_epitaph(status.into())
6886 }
6887}
6888
6889impl fidl::endpoints::ControlHandle for UsmeBootstrapControlHandle {
6890 fn shutdown(&self) {
6891 self.inner.shutdown()
6892 }
6893
6894 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
6895 self.inner.shutdown_with_epitaph(status)
6896 }
6897
6898 fn is_closed(&self) -> bool {
6899 self.inner.channel().is_closed()
6900 }
6901 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6902 self.inner.channel().on_closed()
6903 }
6904
6905 #[cfg(target_os = "fuchsia")]
6906 fn signal_peer(
6907 &self,
6908 clear_mask: zx::Signals,
6909 set_mask: zx::Signals,
6910 ) -> Result<(), zx_status::Status> {
6911 use fidl::Peered;
6912 self.inner.channel().signal_peer(clear_mask, set_mask)
6913 }
6914}
6915
6916impl UsmeBootstrapControlHandle {}
6917
6918#[must_use = "FIDL methods require a response to be sent"]
6919#[derive(Debug)]
6920pub struct UsmeBootstrapStartResponder {
6921 control_handle: std::mem::ManuallyDrop<UsmeBootstrapControlHandle>,
6922 tx_id: u32,
6923}
6924
6925impl std::ops::Drop for UsmeBootstrapStartResponder {
6929 fn drop(&mut self) {
6930 self.control_handle.shutdown();
6931 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6933 }
6934}
6935
6936impl fidl::endpoints::Responder for UsmeBootstrapStartResponder {
6937 type ControlHandle = UsmeBootstrapControlHandle;
6938
6939 fn control_handle(&self) -> &UsmeBootstrapControlHandle {
6940 &self.control_handle
6941 }
6942
6943 fn drop_without_shutdown(mut self) {
6944 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6946 std::mem::forget(self);
6948 }
6949}
6950
6951impl UsmeBootstrapStartResponder {
6952 pub fn send(self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
6956 let _result = self.send_raw(inspect_vmo);
6957 if _result.is_err() {
6958 self.control_handle.shutdown();
6959 }
6960 self.drop_without_shutdown();
6961 _result
6962 }
6963
6964 pub fn send_no_shutdown_on_err(self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
6966 let _result = self.send_raw(inspect_vmo);
6967 self.drop_without_shutdown();
6968 _result
6969 }
6970
6971 fn send_raw(&self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
6972 self.control_handle.inner.send::<UsmeBootstrapStartResponse>(
6973 (inspect_vmo,),
6974 self.tx_id,
6975 0x58850dfb76c29a0e,
6976 fidl::encoding::DynamicFlags::empty(),
6977 )
6978 }
6979}
6980
6981mod internal {
6982 use super::*;
6983
6984 impl fidl::encoding::ResourceTypeMarker for ClientSmeConnectRequest {
6985 type Borrowed<'a> = &'a mut Self;
6986 fn take_or_borrow<'a>(
6987 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6988 ) -> Self::Borrowed<'a> {
6989 value
6990 }
6991 }
6992
6993 unsafe impl fidl::encoding::TypeMarker for ClientSmeConnectRequest {
6994 type Owned = Self;
6995
6996 #[inline(always)]
6997 fn inline_align(_context: fidl::encoding::Context) -> usize {
6998 8
6999 }
7000
7001 #[inline(always)]
7002 fn inline_size(_context: fidl::encoding::Context) -> usize {
7003 112
7004 }
7005 }
7006
7007 unsafe impl
7008 fidl::encoding::Encode<
7009 ClientSmeConnectRequest,
7010 fidl::encoding::DefaultFuchsiaResourceDialect,
7011 > for &mut ClientSmeConnectRequest
7012 {
7013 #[inline]
7014 unsafe fn encode(
7015 self,
7016 encoder: &mut fidl::encoding::Encoder<
7017 '_,
7018 fidl::encoding::DefaultFuchsiaResourceDialect,
7019 >,
7020 offset: usize,
7021 _depth: fidl::encoding::Depth,
7022 ) -> fidl::Result<()> {
7023 encoder.debug_check_bounds::<ClientSmeConnectRequest>(offset);
7024 fidl::encoding::Encode::<
7026 ClientSmeConnectRequest,
7027 fidl::encoding::DefaultFuchsiaResourceDialect,
7028 >::encode(
7029 (
7030 <ConnectRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),
7031 <fidl::encoding::Optional<
7032 fidl::encoding::Endpoint<
7033 fidl::endpoints::ServerEnd<ConnectTransactionMarker>,
7034 >,
7035 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7036 &mut self.txn
7037 ),
7038 ),
7039 encoder,
7040 offset,
7041 _depth,
7042 )
7043 }
7044 }
7045 unsafe impl<
7046 T0: fidl::encoding::Encode<ConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
7047 T1: fidl::encoding::Encode<
7048 fidl::encoding::Optional<
7049 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
7050 >,
7051 fidl::encoding::DefaultFuchsiaResourceDialect,
7052 >,
7053 >
7054 fidl::encoding::Encode<
7055 ClientSmeConnectRequest,
7056 fidl::encoding::DefaultFuchsiaResourceDialect,
7057 > for (T0, T1)
7058 {
7059 #[inline]
7060 unsafe fn encode(
7061 self,
7062 encoder: &mut fidl::encoding::Encoder<
7063 '_,
7064 fidl::encoding::DefaultFuchsiaResourceDialect,
7065 >,
7066 offset: usize,
7067 depth: fidl::encoding::Depth,
7068 ) -> fidl::Result<()> {
7069 encoder.debug_check_bounds::<ClientSmeConnectRequest>(offset);
7070 unsafe {
7073 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(104);
7074 (ptr as *mut u64).write_unaligned(0);
7075 }
7076 self.0.encode(encoder, offset + 0, depth)?;
7078 self.1.encode(encoder, offset + 104, depth)?;
7079 Ok(())
7080 }
7081 }
7082
7083 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7084 for ClientSmeConnectRequest
7085 {
7086 #[inline(always)]
7087 fn new_empty() -> Self {
7088 Self {
7089 req: fidl::new_empty!(
7090 ConnectRequest,
7091 fidl::encoding::DefaultFuchsiaResourceDialect
7092 ),
7093 txn: fidl::new_empty!(
7094 fidl::encoding::Optional<
7095 fidl::encoding::Endpoint<
7096 fidl::endpoints::ServerEnd<ConnectTransactionMarker>,
7097 >,
7098 >,
7099 fidl::encoding::DefaultFuchsiaResourceDialect
7100 ),
7101 }
7102 }
7103
7104 #[inline]
7105 unsafe fn decode(
7106 &mut self,
7107 decoder: &mut fidl::encoding::Decoder<
7108 '_,
7109 fidl::encoding::DefaultFuchsiaResourceDialect,
7110 >,
7111 offset: usize,
7112 _depth: fidl::encoding::Depth,
7113 ) -> fidl::Result<()> {
7114 decoder.debug_check_bounds::<Self>(offset);
7115 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(104) };
7117 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7118 let mask = 0xffffffff00000000u64;
7119 let maskedval = padval & mask;
7120 if maskedval != 0 {
7121 return Err(fidl::Error::NonZeroPadding {
7122 padding_start: offset + 104 + ((mask as u64).trailing_zeros() / 8) as usize,
7123 });
7124 }
7125 fidl::decode!(
7126 ConnectRequest,
7127 fidl::encoding::DefaultFuchsiaResourceDialect,
7128 &mut self.req,
7129 decoder,
7130 offset + 0,
7131 _depth
7132 )?;
7133 fidl::decode!(
7134 fidl::encoding::Optional<
7135 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
7136 >,
7137 fidl::encoding::DefaultFuchsiaResourceDialect,
7138 &mut self.txn,
7139 decoder,
7140 offset + 104,
7141 _depth
7142 )?;
7143 Ok(())
7144 }
7145 }
7146
7147 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanForControllerRequest {
7148 type Borrowed<'a> = &'a mut Self;
7149 fn take_or_borrow<'a>(
7150 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7151 ) -> Self::Borrowed<'a> {
7152 value
7153 }
7154 }
7155
7156 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanForControllerRequest {
7157 type Owned = Self;
7158
7159 #[inline(always)]
7160 fn inline_align(_context: fidl::encoding::Context) -> usize {
7161 8
7162 }
7163
7164 #[inline(always)]
7165 fn inline_size(_context: fidl::encoding::Context) -> usize {
7166 16
7167 }
7168 }
7169
7170 unsafe impl
7171 fidl::encoding::Encode<
7172 ClientSmeScanForControllerRequest,
7173 fidl::encoding::DefaultFuchsiaResourceDialect,
7174 > for &mut ClientSmeScanForControllerRequest
7175 {
7176 #[inline]
7177 unsafe fn encode(
7178 self,
7179 encoder: &mut fidl::encoding::Encoder<
7180 '_,
7181 fidl::encoding::DefaultFuchsiaResourceDialect,
7182 >,
7183 offset: usize,
7184 _depth: fidl::encoding::Depth,
7185 ) -> fidl::Result<()> {
7186 encoder.debug_check_bounds::<ClientSmeScanForControllerRequest>(offset);
7187 fidl::encoding::Encode::<
7189 ClientSmeScanForControllerRequest,
7190 fidl::encoding::DefaultFuchsiaResourceDialect,
7191 >::encode(
7192 (<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
7193 encoder,
7194 offset,
7195 _depth,
7196 )
7197 }
7198 }
7199 unsafe impl<
7200 T0: fidl::encoding::Encode<ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
7201 >
7202 fidl::encoding::Encode<
7203 ClientSmeScanForControllerRequest,
7204 fidl::encoding::DefaultFuchsiaResourceDialect,
7205 > for (T0,)
7206 {
7207 #[inline]
7208 unsafe fn encode(
7209 self,
7210 encoder: &mut fidl::encoding::Encoder<
7211 '_,
7212 fidl::encoding::DefaultFuchsiaResourceDialect,
7213 >,
7214 offset: usize,
7215 depth: fidl::encoding::Depth,
7216 ) -> fidl::Result<()> {
7217 encoder.debug_check_bounds::<ClientSmeScanForControllerRequest>(offset);
7218 self.0.encode(encoder, offset + 0, depth)?;
7222 Ok(())
7223 }
7224 }
7225
7226 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7227 for ClientSmeScanForControllerRequest
7228 {
7229 #[inline(always)]
7230 fn new_empty() -> Self {
7231 Self {
7232 req: fidl::new_empty!(ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect),
7233 }
7234 }
7235
7236 #[inline]
7237 unsafe fn decode(
7238 &mut self,
7239 decoder: &mut fidl::encoding::Decoder<
7240 '_,
7241 fidl::encoding::DefaultFuchsiaResourceDialect,
7242 >,
7243 offset: usize,
7244 _depth: fidl::encoding::Depth,
7245 ) -> fidl::Result<()> {
7246 decoder.debug_check_bounds::<Self>(offset);
7247 fidl::decode!(
7249 ScanRequest,
7250 fidl::encoding::DefaultFuchsiaResourceDialect,
7251 &mut self.req,
7252 decoder,
7253 offset + 0,
7254 _depth
7255 )?;
7256 Ok(())
7257 }
7258 }
7259
7260 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanRequest {
7261 type Borrowed<'a> = &'a mut Self;
7262 fn take_or_borrow<'a>(
7263 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7264 ) -> Self::Borrowed<'a> {
7265 value
7266 }
7267 }
7268
7269 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanRequest {
7270 type Owned = Self;
7271
7272 #[inline(always)]
7273 fn inline_align(_context: fidl::encoding::Context) -> usize {
7274 8
7275 }
7276
7277 #[inline(always)]
7278 fn inline_size(_context: fidl::encoding::Context) -> usize {
7279 16
7280 }
7281 }
7282
7283 unsafe impl
7284 fidl::encoding::Encode<ClientSmeScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
7285 for &mut ClientSmeScanRequest
7286 {
7287 #[inline]
7288 unsafe fn encode(
7289 self,
7290 encoder: &mut fidl::encoding::Encoder<
7291 '_,
7292 fidl::encoding::DefaultFuchsiaResourceDialect,
7293 >,
7294 offset: usize,
7295 _depth: fidl::encoding::Depth,
7296 ) -> fidl::Result<()> {
7297 encoder.debug_check_bounds::<ClientSmeScanRequest>(offset);
7298 fidl::encoding::Encode::<
7300 ClientSmeScanRequest,
7301 fidl::encoding::DefaultFuchsiaResourceDialect,
7302 >::encode(
7303 (<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
7304 encoder,
7305 offset,
7306 _depth,
7307 )
7308 }
7309 }
7310 unsafe impl<
7311 T0: fidl::encoding::Encode<ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
7312 >
7313 fidl::encoding::Encode<ClientSmeScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
7314 for (T0,)
7315 {
7316 #[inline]
7317 unsafe fn encode(
7318 self,
7319 encoder: &mut fidl::encoding::Encoder<
7320 '_,
7321 fidl::encoding::DefaultFuchsiaResourceDialect,
7322 >,
7323 offset: usize,
7324 depth: fidl::encoding::Depth,
7325 ) -> fidl::Result<()> {
7326 encoder.debug_check_bounds::<ClientSmeScanRequest>(offset);
7327 self.0.encode(encoder, offset + 0, depth)?;
7331 Ok(())
7332 }
7333 }
7334
7335 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7336 for ClientSmeScanRequest
7337 {
7338 #[inline(always)]
7339 fn new_empty() -> Self {
7340 Self {
7341 req: fidl::new_empty!(ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect),
7342 }
7343 }
7344
7345 #[inline]
7346 unsafe fn decode(
7347 &mut self,
7348 decoder: &mut fidl::encoding::Decoder<
7349 '_,
7350 fidl::encoding::DefaultFuchsiaResourceDialect,
7351 >,
7352 offset: usize,
7353 _depth: fidl::encoding::Depth,
7354 ) -> fidl::Result<()> {
7355 decoder.debug_check_bounds::<Self>(offset);
7356 fidl::decode!(
7358 ScanRequest,
7359 fidl::encoding::DefaultFuchsiaResourceDialect,
7360 &mut self.req,
7361 decoder,
7362 offset + 0,
7363 _depth
7364 )?;
7365 Ok(())
7366 }
7367 }
7368
7369 impl fidl::encoding::ResourceTypeMarker for ClientSmeStartScheduledScanRequest {
7370 type Borrowed<'a> = &'a mut Self;
7371 fn take_or_borrow<'a>(
7372 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7373 ) -> Self::Borrowed<'a> {
7374 value
7375 }
7376 }
7377
7378 unsafe impl fidl::encoding::TypeMarker for ClientSmeStartScheduledScanRequest {
7379 type Owned = Self;
7380
7381 #[inline(always)]
7382 fn inline_align(_context: fidl::encoding::Context) -> usize {
7383 8
7384 }
7385
7386 #[inline(always)]
7387 fn inline_size(_context: fidl::encoding::Context) -> usize {
7388 24
7389 }
7390 }
7391
7392 unsafe impl
7393 fidl::encoding::Encode<
7394 ClientSmeStartScheduledScanRequest,
7395 fidl::encoding::DefaultFuchsiaResourceDialect,
7396 > for &mut ClientSmeStartScheduledScanRequest
7397 {
7398 #[inline]
7399 unsafe fn encode(
7400 self,
7401 encoder: &mut fidl::encoding::Encoder<
7402 '_,
7403 fidl::encoding::DefaultFuchsiaResourceDialect,
7404 >,
7405 offset: usize,
7406 _depth: fidl::encoding::Depth,
7407 ) -> fidl::Result<()> {
7408 encoder.debug_check_bounds::<ClientSmeStartScheduledScanRequest>(offset);
7409 fidl::encoding::Encode::<ClientSmeStartScheduledScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7411 (
7412 <fidl_fuchsia_wlan_common::ScheduledScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),
7413 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.txn),
7414 ),
7415 encoder, offset, _depth
7416 )
7417 }
7418 }
7419 unsafe impl<
7420 T0: fidl::encoding::Encode<
7421 fidl_fuchsia_wlan_common::ScheduledScanRequest,
7422 fidl::encoding::DefaultFuchsiaResourceDialect,
7423 >,
7424 T1: fidl::encoding::Encode<
7425 fidl::encoding::Endpoint<
7426 fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
7427 >,
7428 fidl::encoding::DefaultFuchsiaResourceDialect,
7429 >,
7430 >
7431 fidl::encoding::Encode<
7432 ClientSmeStartScheduledScanRequest,
7433 fidl::encoding::DefaultFuchsiaResourceDialect,
7434 > for (T0, T1)
7435 {
7436 #[inline]
7437 unsafe fn encode(
7438 self,
7439 encoder: &mut fidl::encoding::Encoder<
7440 '_,
7441 fidl::encoding::DefaultFuchsiaResourceDialect,
7442 >,
7443 offset: usize,
7444 depth: fidl::encoding::Depth,
7445 ) -> fidl::Result<()> {
7446 encoder.debug_check_bounds::<ClientSmeStartScheduledScanRequest>(offset);
7447 unsafe {
7450 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
7451 (ptr as *mut u64).write_unaligned(0);
7452 }
7453 self.0.encode(encoder, offset + 0, depth)?;
7455 self.1.encode(encoder, offset + 16, depth)?;
7456 Ok(())
7457 }
7458 }
7459
7460 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7461 for ClientSmeStartScheduledScanRequest
7462 {
7463 #[inline(always)]
7464 fn new_empty() -> Self {
7465 Self {
7466 req: fidl::new_empty!(
7467 fidl_fuchsia_wlan_common::ScheduledScanRequest,
7468 fidl::encoding::DefaultFuchsiaResourceDialect
7469 ),
7470 txn: fidl::new_empty!(
7471 fidl::encoding::Endpoint<
7472 fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
7473 >,
7474 fidl::encoding::DefaultFuchsiaResourceDialect
7475 ),
7476 }
7477 }
7478
7479 #[inline]
7480 unsafe fn decode(
7481 &mut self,
7482 decoder: &mut fidl::encoding::Decoder<
7483 '_,
7484 fidl::encoding::DefaultFuchsiaResourceDialect,
7485 >,
7486 offset: usize,
7487 _depth: fidl::encoding::Depth,
7488 ) -> fidl::Result<()> {
7489 decoder.debug_check_bounds::<Self>(offset);
7490 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
7492 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7493 let mask = 0xffffffff00000000u64;
7494 let maskedval = padval & mask;
7495 if maskedval != 0 {
7496 return Err(fidl::Error::NonZeroPadding {
7497 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
7498 });
7499 }
7500 fidl::decode!(
7501 fidl_fuchsia_wlan_common::ScheduledScanRequest,
7502 fidl::encoding::DefaultFuchsiaResourceDialect,
7503 &mut self.req,
7504 decoder,
7505 offset + 0,
7506 _depth
7507 )?;
7508 fidl::decode!(
7509 fidl::encoding::Endpoint<
7510 fidl::endpoints::ServerEnd<ScheduledScanTransactionMarker>,
7511 >,
7512 fidl::encoding::DefaultFuchsiaResourceDialect,
7513 &mut self.txn,
7514 decoder,
7515 offset + 16,
7516 _depth
7517 )?;
7518 Ok(())
7519 }
7520 }
7521
7522 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanForControllerResponse {
7523 type Borrowed<'a> = &'a mut Self;
7524 fn take_or_borrow<'a>(
7525 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7526 ) -> Self::Borrowed<'a> {
7527 value
7528 }
7529 }
7530
7531 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanForControllerResponse {
7532 type Owned = Self;
7533
7534 #[inline(always)]
7535 fn inline_align(_context: fidl::encoding::Context) -> usize {
7536 8
7537 }
7538
7539 #[inline(always)]
7540 fn inline_size(_context: fidl::encoding::Context) -> usize {
7541 16
7542 }
7543 }
7544
7545 unsafe impl
7546 fidl::encoding::Encode<
7547 ClientSmeScanForControllerResponse,
7548 fidl::encoding::DefaultFuchsiaResourceDialect,
7549 > for &mut ClientSmeScanForControllerResponse
7550 {
7551 #[inline]
7552 unsafe fn encode(
7553 self,
7554 encoder: &mut fidl::encoding::Encoder<
7555 '_,
7556 fidl::encoding::DefaultFuchsiaResourceDialect,
7557 >,
7558 offset: usize,
7559 _depth: fidl::encoding::Depth,
7560 ) -> fidl::Result<()> {
7561 encoder.debug_check_bounds::<ClientSmeScanForControllerResponse>(offset);
7562 fidl::encoding::Encode::<ClientSmeScanForControllerResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7564 (
7565 <fidl::encoding::UnboundedVector<ScanResult> as fidl::encoding::ValueTypeMarker>::borrow(&self.scan_results),
7566 ),
7567 encoder, offset, _depth
7568 )
7569 }
7570 }
7571 unsafe impl<
7572 T0: fidl::encoding::Encode<
7573 fidl::encoding::UnboundedVector<ScanResult>,
7574 fidl::encoding::DefaultFuchsiaResourceDialect,
7575 >,
7576 >
7577 fidl::encoding::Encode<
7578 ClientSmeScanForControllerResponse,
7579 fidl::encoding::DefaultFuchsiaResourceDialect,
7580 > for (T0,)
7581 {
7582 #[inline]
7583 unsafe fn encode(
7584 self,
7585 encoder: &mut fidl::encoding::Encoder<
7586 '_,
7587 fidl::encoding::DefaultFuchsiaResourceDialect,
7588 >,
7589 offset: usize,
7590 depth: fidl::encoding::Depth,
7591 ) -> fidl::Result<()> {
7592 encoder.debug_check_bounds::<ClientSmeScanForControllerResponse>(offset);
7593 self.0.encode(encoder, offset + 0, depth)?;
7597 Ok(())
7598 }
7599 }
7600
7601 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7602 for ClientSmeScanForControllerResponse
7603 {
7604 #[inline(always)]
7605 fn new_empty() -> Self {
7606 Self {
7607 scan_results: fidl::new_empty!(
7608 fidl::encoding::UnboundedVector<ScanResult>,
7609 fidl::encoding::DefaultFuchsiaResourceDialect
7610 ),
7611 }
7612 }
7613
7614 #[inline]
7615 unsafe fn decode(
7616 &mut self,
7617 decoder: &mut fidl::encoding::Decoder<
7618 '_,
7619 fidl::encoding::DefaultFuchsiaResourceDialect,
7620 >,
7621 offset: usize,
7622 _depth: fidl::encoding::Depth,
7623 ) -> fidl::Result<()> {
7624 decoder.debug_check_bounds::<Self>(offset);
7625 fidl::decode!(
7627 fidl::encoding::UnboundedVector<ScanResult>,
7628 fidl::encoding::DefaultFuchsiaResourceDialect,
7629 &mut self.scan_results,
7630 decoder,
7631 offset + 0,
7632 _depth
7633 )?;
7634 Ok(())
7635 }
7636 }
7637
7638 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanResponse {
7639 type Borrowed<'a> = &'a mut Self;
7640 fn take_or_borrow<'a>(
7641 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7642 ) -> Self::Borrowed<'a> {
7643 value
7644 }
7645 }
7646
7647 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanResponse {
7648 type Owned = Self;
7649
7650 #[inline(always)]
7651 fn inline_align(_context: fidl::encoding::Context) -> usize {
7652 4
7653 }
7654
7655 #[inline(always)]
7656 fn inline_size(_context: fidl::encoding::Context) -> usize {
7657 4
7658 }
7659 }
7660
7661 unsafe impl
7662 fidl::encoding::Encode<ClientSmeScanResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
7663 for &mut ClientSmeScanResponse
7664 {
7665 #[inline]
7666 unsafe fn encode(
7667 self,
7668 encoder: &mut fidl::encoding::Encoder<
7669 '_,
7670 fidl::encoding::DefaultFuchsiaResourceDialect,
7671 >,
7672 offset: usize,
7673 _depth: fidl::encoding::Depth,
7674 ) -> fidl::Result<()> {
7675 encoder.debug_check_bounds::<ClientSmeScanResponse>(offset);
7676 fidl::encoding::Encode::<
7678 ClientSmeScanResponse,
7679 fidl::encoding::DefaultFuchsiaResourceDialect,
7680 >::encode(
7681 (<fidl::encoding::HandleType<
7682 fidl::Vmo,
7683 { fidl::ObjectType::VMO.into_raw() },
7684 2147483648,
7685 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7686 &mut self.scan_results
7687 ),),
7688 encoder,
7689 offset,
7690 _depth,
7691 )
7692 }
7693 }
7694 unsafe impl<
7695 T0: fidl::encoding::Encode<
7696 fidl::encoding::HandleType<
7697 fidl::Vmo,
7698 { fidl::ObjectType::VMO.into_raw() },
7699 2147483648,
7700 >,
7701 fidl::encoding::DefaultFuchsiaResourceDialect,
7702 >,
7703 >
7704 fidl::encoding::Encode<ClientSmeScanResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
7705 for (T0,)
7706 {
7707 #[inline]
7708 unsafe fn encode(
7709 self,
7710 encoder: &mut fidl::encoding::Encoder<
7711 '_,
7712 fidl::encoding::DefaultFuchsiaResourceDialect,
7713 >,
7714 offset: usize,
7715 depth: fidl::encoding::Depth,
7716 ) -> fidl::Result<()> {
7717 encoder.debug_check_bounds::<ClientSmeScanResponse>(offset);
7718 self.0.encode(encoder, offset + 0, depth)?;
7722 Ok(())
7723 }
7724 }
7725
7726 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7727 for ClientSmeScanResponse
7728 {
7729 #[inline(always)]
7730 fn new_empty() -> Self {
7731 Self {
7732 scan_results: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7733 }
7734 }
7735
7736 #[inline]
7737 unsafe fn decode(
7738 &mut self,
7739 decoder: &mut fidl::encoding::Decoder<
7740 '_,
7741 fidl::encoding::DefaultFuchsiaResourceDialect,
7742 >,
7743 offset: usize,
7744 _depth: fidl::encoding::Depth,
7745 ) -> fidl::Result<()> {
7746 decoder.debug_check_bounds::<Self>(offset);
7747 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.scan_results, decoder, offset + 0, _depth)?;
7749 Ok(())
7750 }
7751 }
7752
7753 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetApSmeRequest {
7754 type Borrowed<'a> = &'a mut Self;
7755 fn take_or_borrow<'a>(
7756 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7757 ) -> Self::Borrowed<'a> {
7758 value
7759 }
7760 }
7761
7762 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetApSmeRequest {
7763 type Owned = Self;
7764
7765 #[inline(always)]
7766 fn inline_align(_context: fidl::encoding::Context) -> usize {
7767 4
7768 }
7769
7770 #[inline(always)]
7771 fn inline_size(_context: fidl::encoding::Context) -> usize {
7772 4
7773 }
7774 }
7775
7776 unsafe impl
7777 fidl::encoding::Encode<
7778 GenericSmeGetApSmeRequest,
7779 fidl::encoding::DefaultFuchsiaResourceDialect,
7780 > for &mut GenericSmeGetApSmeRequest
7781 {
7782 #[inline]
7783 unsafe fn encode(
7784 self,
7785 encoder: &mut fidl::encoding::Encoder<
7786 '_,
7787 fidl::encoding::DefaultFuchsiaResourceDialect,
7788 >,
7789 offset: usize,
7790 _depth: fidl::encoding::Depth,
7791 ) -> fidl::Result<()> {
7792 encoder.debug_check_bounds::<GenericSmeGetApSmeRequest>(offset);
7793 fidl::encoding::Encode::<GenericSmeGetApSmeRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7795 (
7796 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sme_server),
7797 ),
7798 encoder, offset, _depth
7799 )
7800 }
7801 }
7802 unsafe impl<
7803 T0: fidl::encoding::Encode<
7804 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
7805 fidl::encoding::DefaultFuchsiaResourceDialect,
7806 >,
7807 >
7808 fidl::encoding::Encode<
7809 GenericSmeGetApSmeRequest,
7810 fidl::encoding::DefaultFuchsiaResourceDialect,
7811 > for (T0,)
7812 {
7813 #[inline]
7814 unsafe fn encode(
7815 self,
7816 encoder: &mut fidl::encoding::Encoder<
7817 '_,
7818 fidl::encoding::DefaultFuchsiaResourceDialect,
7819 >,
7820 offset: usize,
7821 depth: fidl::encoding::Depth,
7822 ) -> fidl::Result<()> {
7823 encoder.debug_check_bounds::<GenericSmeGetApSmeRequest>(offset);
7824 self.0.encode(encoder, offset + 0, depth)?;
7828 Ok(())
7829 }
7830 }
7831
7832 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7833 for GenericSmeGetApSmeRequest
7834 {
7835 #[inline(always)]
7836 fn new_empty() -> Self {
7837 Self {
7838 sme_server: fidl::new_empty!(
7839 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
7840 fidl::encoding::DefaultFuchsiaResourceDialect
7841 ),
7842 }
7843 }
7844
7845 #[inline]
7846 unsafe fn decode(
7847 &mut self,
7848 decoder: &mut fidl::encoding::Decoder<
7849 '_,
7850 fidl::encoding::DefaultFuchsiaResourceDialect,
7851 >,
7852 offset: usize,
7853 _depth: fidl::encoding::Depth,
7854 ) -> fidl::Result<()> {
7855 decoder.debug_check_bounds::<Self>(offset);
7856 fidl::decode!(
7858 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
7859 fidl::encoding::DefaultFuchsiaResourceDialect,
7860 &mut self.sme_server,
7861 decoder,
7862 offset + 0,
7863 _depth
7864 )?;
7865 Ok(())
7866 }
7867 }
7868
7869 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetClientSmeRequest {
7870 type Borrowed<'a> = &'a mut Self;
7871 fn take_or_borrow<'a>(
7872 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7873 ) -> Self::Borrowed<'a> {
7874 value
7875 }
7876 }
7877
7878 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetClientSmeRequest {
7879 type Owned = Self;
7880
7881 #[inline(always)]
7882 fn inline_align(_context: fidl::encoding::Context) -> usize {
7883 4
7884 }
7885
7886 #[inline(always)]
7887 fn inline_size(_context: fidl::encoding::Context) -> usize {
7888 4
7889 }
7890 }
7891
7892 unsafe impl
7893 fidl::encoding::Encode<
7894 GenericSmeGetClientSmeRequest,
7895 fidl::encoding::DefaultFuchsiaResourceDialect,
7896 > for &mut GenericSmeGetClientSmeRequest
7897 {
7898 #[inline]
7899 unsafe fn encode(
7900 self,
7901 encoder: &mut fidl::encoding::Encoder<
7902 '_,
7903 fidl::encoding::DefaultFuchsiaResourceDialect,
7904 >,
7905 offset: usize,
7906 _depth: fidl::encoding::Depth,
7907 ) -> fidl::Result<()> {
7908 encoder.debug_check_bounds::<GenericSmeGetClientSmeRequest>(offset);
7909 fidl::encoding::Encode::<GenericSmeGetClientSmeRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7911 (
7912 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sme_server),
7913 ),
7914 encoder, offset, _depth
7915 )
7916 }
7917 }
7918 unsafe impl<
7919 T0: fidl::encoding::Encode<
7920 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
7921 fidl::encoding::DefaultFuchsiaResourceDialect,
7922 >,
7923 >
7924 fidl::encoding::Encode<
7925 GenericSmeGetClientSmeRequest,
7926 fidl::encoding::DefaultFuchsiaResourceDialect,
7927 > for (T0,)
7928 {
7929 #[inline]
7930 unsafe fn encode(
7931 self,
7932 encoder: &mut fidl::encoding::Encoder<
7933 '_,
7934 fidl::encoding::DefaultFuchsiaResourceDialect,
7935 >,
7936 offset: usize,
7937 depth: fidl::encoding::Depth,
7938 ) -> fidl::Result<()> {
7939 encoder.debug_check_bounds::<GenericSmeGetClientSmeRequest>(offset);
7940 self.0.encode(encoder, offset + 0, depth)?;
7944 Ok(())
7945 }
7946 }
7947
7948 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7949 for GenericSmeGetClientSmeRequest
7950 {
7951 #[inline(always)]
7952 fn new_empty() -> Self {
7953 Self {
7954 sme_server: fidl::new_empty!(
7955 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
7956 fidl::encoding::DefaultFuchsiaResourceDialect
7957 ),
7958 }
7959 }
7960
7961 #[inline]
7962 unsafe fn decode(
7963 &mut self,
7964 decoder: &mut fidl::encoding::Decoder<
7965 '_,
7966 fidl::encoding::DefaultFuchsiaResourceDialect,
7967 >,
7968 offset: usize,
7969 _depth: fidl::encoding::Depth,
7970 ) -> fidl::Result<()> {
7971 decoder.debug_check_bounds::<Self>(offset);
7972 fidl::decode!(
7974 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
7975 fidl::encoding::DefaultFuchsiaResourceDialect,
7976 &mut self.sme_server,
7977 decoder,
7978 offset + 0,
7979 _depth
7980 )?;
7981 Ok(())
7982 }
7983 }
7984
7985 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetSmeTelemetryRequest {
7986 type Borrowed<'a> = &'a mut Self;
7987 fn take_or_borrow<'a>(
7988 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7989 ) -> Self::Borrowed<'a> {
7990 value
7991 }
7992 }
7993
7994 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetSmeTelemetryRequest {
7995 type Owned = Self;
7996
7997 #[inline(always)]
7998 fn inline_align(_context: fidl::encoding::Context) -> usize {
7999 4
8000 }
8001
8002 #[inline(always)]
8003 fn inline_size(_context: fidl::encoding::Context) -> usize {
8004 4
8005 }
8006 }
8007
8008 unsafe impl
8009 fidl::encoding::Encode<
8010 GenericSmeGetSmeTelemetryRequest,
8011 fidl::encoding::DefaultFuchsiaResourceDialect,
8012 > for &mut GenericSmeGetSmeTelemetryRequest
8013 {
8014 #[inline]
8015 unsafe fn encode(
8016 self,
8017 encoder: &mut fidl::encoding::Encoder<
8018 '_,
8019 fidl::encoding::DefaultFuchsiaResourceDialect,
8020 >,
8021 offset: usize,
8022 _depth: fidl::encoding::Depth,
8023 ) -> fidl::Result<()> {
8024 encoder.debug_check_bounds::<GenericSmeGetSmeTelemetryRequest>(offset);
8025 fidl::encoding::Encode::<GenericSmeGetSmeTelemetryRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8027 (
8028 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.telemetry_server),
8029 ),
8030 encoder, offset, _depth
8031 )
8032 }
8033 }
8034 unsafe impl<
8035 T0: fidl::encoding::Encode<
8036 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
8037 fidl::encoding::DefaultFuchsiaResourceDialect,
8038 >,
8039 >
8040 fidl::encoding::Encode<
8041 GenericSmeGetSmeTelemetryRequest,
8042 fidl::encoding::DefaultFuchsiaResourceDialect,
8043 > for (T0,)
8044 {
8045 #[inline]
8046 unsafe fn encode(
8047 self,
8048 encoder: &mut fidl::encoding::Encoder<
8049 '_,
8050 fidl::encoding::DefaultFuchsiaResourceDialect,
8051 >,
8052 offset: usize,
8053 depth: fidl::encoding::Depth,
8054 ) -> fidl::Result<()> {
8055 encoder.debug_check_bounds::<GenericSmeGetSmeTelemetryRequest>(offset);
8056 self.0.encode(encoder, offset + 0, depth)?;
8060 Ok(())
8061 }
8062 }
8063
8064 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8065 for GenericSmeGetSmeTelemetryRequest
8066 {
8067 #[inline(always)]
8068 fn new_empty() -> Self {
8069 Self {
8070 telemetry_server: fidl::new_empty!(
8071 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
8072 fidl::encoding::DefaultFuchsiaResourceDialect
8073 ),
8074 }
8075 }
8076
8077 #[inline]
8078 unsafe fn decode(
8079 &mut self,
8080 decoder: &mut fidl::encoding::Decoder<
8081 '_,
8082 fidl::encoding::DefaultFuchsiaResourceDialect,
8083 >,
8084 offset: usize,
8085 _depth: fidl::encoding::Depth,
8086 ) -> fidl::Result<()> {
8087 decoder.debug_check_bounds::<Self>(offset);
8088 fidl::decode!(
8090 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
8091 fidl::encoding::DefaultFuchsiaResourceDialect,
8092 &mut self.telemetry_server,
8093 decoder,
8094 offset + 0,
8095 _depth
8096 )?;
8097 Ok(())
8098 }
8099 }
8100
8101 impl fidl::encoding::ResourceTypeMarker for GenericSmeQueryResponse {
8102 type Borrowed<'a> = &'a mut Self;
8103 fn take_or_borrow<'a>(
8104 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8105 ) -> Self::Borrowed<'a> {
8106 value
8107 }
8108 }
8109
8110 unsafe impl fidl::encoding::TypeMarker for GenericSmeQueryResponse {
8111 type Owned = Self;
8112
8113 #[inline(always)]
8114 fn inline_align(_context: fidl::encoding::Context) -> usize {
8115 4
8116 }
8117
8118 #[inline(always)]
8119 fn inline_size(_context: fidl::encoding::Context) -> usize {
8120 16
8121 }
8122 }
8123
8124 unsafe impl
8125 fidl::encoding::Encode<
8126 GenericSmeQueryResponse,
8127 fidl::encoding::DefaultFuchsiaResourceDialect,
8128 > for &mut GenericSmeQueryResponse
8129 {
8130 #[inline]
8131 unsafe fn encode(
8132 self,
8133 encoder: &mut fidl::encoding::Encoder<
8134 '_,
8135 fidl::encoding::DefaultFuchsiaResourceDialect,
8136 >,
8137 offset: usize,
8138 _depth: fidl::encoding::Depth,
8139 ) -> fidl::Result<()> {
8140 encoder.debug_check_bounds::<GenericSmeQueryResponse>(offset);
8141 fidl::encoding::Encode::<
8143 GenericSmeQueryResponse,
8144 fidl::encoding::DefaultFuchsiaResourceDialect,
8145 >::encode(
8146 (<GenericSmeQuery as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
8147 encoder,
8148 offset,
8149 _depth,
8150 )
8151 }
8152 }
8153 unsafe impl<
8154 T0: fidl::encoding::Encode<GenericSmeQuery, fidl::encoding::DefaultFuchsiaResourceDialect>,
8155 >
8156 fidl::encoding::Encode<
8157 GenericSmeQueryResponse,
8158 fidl::encoding::DefaultFuchsiaResourceDialect,
8159 > for (T0,)
8160 {
8161 #[inline]
8162 unsafe fn encode(
8163 self,
8164 encoder: &mut fidl::encoding::Encoder<
8165 '_,
8166 fidl::encoding::DefaultFuchsiaResourceDialect,
8167 >,
8168 offset: usize,
8169 depth: fidl::encoding::Depth,
8170 ) -> fidl::Result<()> {
8171 encoder.debug_check_bounds::<GenericSmeQueryResponse>(offset);
8172 self.0.encode(encoder, offset + 0, depth)?;
8176 Ok(())
8177 }
8178 }
8179
8180 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8181 for GenericSmeQueryResponse
8182 {
8183 #[inline(always)]
8184 fn new_empty() -> Self {
8185 Self {
8186 resp: fidl::new_empty!(
8187 GenericSmeQuery,
8188 fidl::encoding::DefaultFuchsiaResourceDialect
8189 ),
8190 }
8191 }
8192
8193 #[inline]
8194 unsafe fn decode(
8195 &mut self,
8196 decoder: &mut fidl::encoding::Decoder<
8197 '_,
8198 fidl::encoding::DefaultFuchsiaResourceDialect,
8199 >,
8200 offset: usize,
8201 _depth: fidl::encoding::Depth,
8202 ) -> fidl::Result<()> {
8203 decoder.debug_check_bounds::<Self>(offset);
8204 fidl::decode!(
8206 GenericSmeQuery,
8207 fidl::encoding::DefaultFuchsiaResourceDialect,
8208 &mut self.resp,
8209 decoder,
8210 offset + 0,
8211 _depth
8212 )?;
8213 Ok(())
8214 }
8215 }
8216
8217 impl fidl::encoding::ResourceTypeMarker
8218 for ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest
8219 {
8220 type Borrowed<'a> = &'a mut Self;
8221 fn take_or_borrow<'a>(
8222 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8223 ) -> Self::Borrowed<'a> {
8224 value
8225 }
8226 }
8227
8228 unsafe impl fidl::encoding::TypeMarker
8229 for ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest
8230 {
8231 type Owned = Self;
8232
8233 #[inline(always)]
8234 fn inline_align(_context: fidl::encoding::Context) -> usize {
8235 4
8236 }
8237
8238 #[inline(always)]
8239 fn inline_size(_context: fidl::encoding::Context) -> usize {
8240 4
8241 }
8242 }
8243
8244 unsafe impl
8245 fidl::encoding::Encode<
8246 ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest,
8247 fidl::encoding::DefaultFuchsiaResourceDialect,
8248 > for &mut ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest
8249 {
8250 #[inline]
8251 unsafe fn encode(
8252 self,
8253 encoder: &mut fidl::encoding::Encoder<
8254 '_,
8255 fidl::encoding::DefaultFuchsiaResourceDialect,
8256 >,
8257 offset: usize,
8258 _depth: fidl::encoding::Depth,
8259 ) -> fidl::Result<()> {
8260 encoder.debug_check_bounds::<ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest>(offset);
8261 fidl::encoding::Encode::<
8263 ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest,
8264 fidl::encoding::DefaultFuchsiaResourceDialect,
8265 >::encode(
8266 (<fidl::encoding::HandleType<
8267 fidl::Vmo,
8268 { fidl::ObjectType::VMO.into_raw() },
8269 2147483648,
8270 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8271 &mut self.scan_results
8272 ),),
8273 encoder,
8274 offset,
8275 _depth,
8276 )
8277 }
8278 }
8279 unsafe impl<
8280 T0: fidl::encoding::Encode<
8281 fidl::encoding::HandleType<
8282 fidl::Vmo,
8283 { fidl::ObjectType::VMO.into_raw() },
8284 2147483648,
8285 >,
8286 fidl::encoding::DefaultFuchsiaResourceDialect,
8287 >,
8288 >
8289 fidl::encoding::Encode<
8290 ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest,
8291 fidl::encoding::DefaultFuchsiaResourceDialect,
8292 > for (T0,)
8293 {
8294 #[inline]
8295 unsafe fn encode(
8296 self,
8297 encoder: &mut fidl::encoding::Encoder<
8298 '_,
8299 fidl::encoding::DefaultFuchsiaResourceDialect,
8300 >,
8301 offset: usize,
8302 depth: fidl::encoding::Depth,
8303 ) -> fidl::Result<()> {
8304 encoder.debug_check_bounds::<ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest>(offset);
8305 self.0.encode(encoder, offset + 0, depth)?;
8309 Ok(())
8310 }
8311 }
8312
8313 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8314 for ScheduledScanTransactionOnScheduledScanMatchesAvailableRequest
8315 {
8316 #[inline(always)]
8317 fn new_empty() -> Self {
8318 Self {
8319 scan_results: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
8320 }
8321 }
8322
8323 #[inline]
8324 unsafe fn decode(
8325 &mut self,
8326 decoder: &mut fidl::encoding::Decoder<
8327 '_,
8328 fidl::encoding::DefaultFuchsiaResourceDialect,
8329 >,
8330 offset: usize,
8331 _depth: fidl::encoding::Depth,
8332 ) -> fidl::Result<()> {
8333 decoder.debug_check_bounds::<Self>(offset);
8334 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.scan_results, decoder, offset + 0, _depth)?;
8336 Ok(())
8337 }
8338 }
8339
8340 impl fidl::encoding::ResourceTypeMarker for TelemetryCloneInspectVmoResponse {
8341 type Borrowed<'a> = &'a mut Self;
8342 fn take_or_borrow<'a>(
8343 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8344 ) -> Self::Borrowed<'a> {
8345 value
8346 }
8347 }
8348
8349 unsafe impl fidl::encoding::TypeMarker for TelemetryCloneInspectVmoResponse {
8350 type Owned = Self;
8351
8352 #[inline(always)]
8353 fn inline_align(_context: fidl::encoding::Context) -> usize {
8354 4
8355 }
8356
8357 #[inline(always)]
8358 fn inline_size(_context: fidl::encoding::Context) -> usize {
8359 4
8360 }
8361 }
8362
8363 unsafe impl
8364 fidl::encoding::Encode<
8365 TelemetryCloneInspectVmoResponse,
8366 fidl::encoding::DefaultFuchsiaResourceDialect,
8367 > for &mut TelemetryCloneInspectVmoResponse
8368 {
8369 #[inline]
8370 unsafe fn encode(
8371 self,
8372 encoder: &mut fidl::encoding::Encoder<
8373 '_,
8374 fidl::encoding::DefaultFuchsiaResourceDialect,
8375 >,
8376 offset: usize,
8377 _depth: fidl::encoding::Depth,
8378 ) -> fidl::Result<()> {
8379 encoder.debug_check_bounds::<TelemetryCloneInspectVmoResponse>(offset);
8380 fidl::encoding::Encode::<
8382 TelemetryCloneInspectVmoResponse,
8383 fidl::encoding::DefaultFuchsiaResourceDialect,
8384 >::encode(
8385 (<fidl::encoding::HandleType<
8386 fidl::Vmo,
8387 { fidl::ObjectType::VMO.into_raw() },
8388 2147483648,
8389 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8390 &mut self.inspect_vmo
8391 ),),
8392 encoder,
8393 offset,
8394 _depth,
8395 )
8396 }
8397 }
8398 unsafe impl<
8399 T0: fidl::encoding::Encode<
8400 fidl::encoding::HandleType<
8401 fidl::Vmo,
8402 { fidl::ObjectType::VMO.into_raw() },
8403 2147483648,
8404 >,
8405 fidl::encoding::DefaultFuchsiaResourceDialect,
8406 >,
8407 >
8408 fidl::encoding::Encode<
8409 TelemetryCloneInspectVmoResponse,
8410 fidl::encoding::DefaultFuchsiaResourceDialect,
8411 > for (T0,)
8412 {
8413 #[inline]
8414 unsafe fn encode(
8415 self,
8416 encoder: &mut fidl::encoding::Encoder<
8417 '_,
8418 fidl::encoding::DefaultFuchsiaResourceDialect,
8419 >,
8420 offset: usize,
8421 depth: fidl::encoding::Depth,
8422 ) -> fidl::Result<()> {
8423 encoder.debug_check_bounds::<TelemetryCloneInspectVmoResponse>(offset);
8424 self.0.encode(encoder, offset + 0, depth)?;
8428 Ok(())
8429 }
8430 }
8431
8432 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8433 for TelemetryCloneInspectVmoResponse
8434 {
8435 #[inline(always)]
8436 fn new_empty() -> Self {
8437 Self {
8438 inspect_vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
8439 }
8440 }
8441
8442 #[inline]
8443 unsafe fn decode(
8444 &mut self,
8445 decoder: &mut fidl::encoding::Decoder<
8446 '_,
8447 fidl::encoding::DefaultFuchsiaResourceDialect,
8448 >,
8449 offset: usize,
8450 _depth: fidl::encoding::Depth,
8451 ) -> fidl::Result<()> {
8452 decoder.debug_check_bounds::<Self>(offset);
8453 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.inspect_vmo, decoder, offset + 0, _depth)?;
8455 Ok(())
8456 }
8457 }
8458
8459 impl fidl::encoding::ResourceTypeMarker for UsmeBootstrapStartRequest {
8460 type Borrowed<'a> = &'a mut Self;
8461 fn take_or_borrow<'a>(
8462 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8463 ) -> Self::Borrowed<'a> {
8464 value
8465 }
8466 }
8467
8468 unsafe impl fidl::encoding::TypeMarker for UsmeBootstrapStartRequest {
8469 type Owned = Self;
8470
8471 #[inline(always)]
8472 fn inline_align(_context: fidl::encoding::Context) -> usize {
8473 4
8474 }
8475
8476 #[inline(always)]
8477 fn inline_size(_context: fidl::encoding::Context) -> usize {
8478 8
8479 }
8480 }
8481
8482 unsafe impl
8483 fidl::encoding::Encode<
8484 UsmeBootstrapStartRequest,
8485 fidl::encoding::DefaultFuchsiaResourceDialect,
8486 > for &mut UsmeBootstrapStartRequest
8487 {
8488 #[inline]
8489 unsafe fn encode(
8490 self,
8491 encoder: &mut fidl::encoding::Encoder<
8492 '_,
8493 fidl::encoding::DefaultFuchsiaResourceDialect,
8494 >,
8495 offset: usize,
8496 _depth: fidl::encoding::Depth,
8497 ) -> fidl::Result<()> {
8498 encoder.debug_check_bounds::<UsmeBootstrapStartRequest>(offset);
8499 fidl::encoding::Encode::<UsmeBootstrapStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8501 (
8502 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.generic_sme_server),
8503 <LegacyPrivacySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.legacy_privacy_support),
8504 ),
8505 encoder, offset, _depth
8506 )
8507 }
8508 }
8509 unsafe impl<
8510 T0: fidl::encoding::Encode<
8511 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
8512 fidl::encoding::DefaultFuchsiaResourceDialect,
8513 >,
8514 T1: fidl::encoding::Encode<LegacyPrivacySupport, fidl::encoding::DefaultFuchsiaResourceDialect>,
8515 >
8516 fidl::encoding::Encode<
8517 UsmeBootstrapStartRequest,
8518 fidl::encoding::DefaultFuchsiaResourceDialect,
8519 > for (T0, T1)
8520 {
8521 #[inline]
8522 unsafe fn encode(
8523 self,
8524 encoder: &mut fidl::encoding::Encoder<
8525 '_,
8526 fidl::encoding::DefaultFuchsiaResourceDialect,
8527 >,
8528 offset: usize,
8529 depth: fidl::encoding::Depth,
8530 ) -> fidl::Result<()> {
8531 encoder.debug_check_bounds::<UsmeBootstrapStartRequest>(offset);
8532 unsafe {
8535 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
8536 (ptr as *mut u32).write_unaligned(0);
8537 }
8538 self.0.encode(encoder, offset + 0, depth)?;
8540 self.1.encode(encoder, offset + 4, depth)?;
8541 Ok(())
8542 }
8543 }
8544
8545 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8546 for UsmeBootstrapStartRequest
8547 {
8548 #[inline(always)]
8549 fn new_empty() -> Self {
8550 Self {
8551 generic_sme_server: fidl::new_empty!(
8552 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
8553 fidl::encoding::DefaultFuchsiaResourceDialect
8554 ),
8555 legacy_privacy_support: fidl::new_empty!(
8556 LegacyPrivacySupport,
8557 fidl::encoding::DefaultFuchsiaResourceDialect
8558 ),
8559 }
8560 }
8561
8562 #[inline]
8563 unsafe fn decode(
8564 &mut self,
8565 decoder: &mut fidl::encoding::Decoder<
8566 '_,
8567 fidl::encoding::DefaultFuchsiaResourceDialect,
8568 >,
8569 offset: usize,
8570 _depth: fidl::encoding::Depth,
8571 ) -> fidl::Result<()> {
8572 decoder.debug_check_bounds::<Self>(offset);
8573 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
8575 let padval = unsafe { (ptr as *const u32).read_unaligned() };
8576 let mask = 0xffff0000u32;
8577 let maskedval = padval & mask;
8578 if maskedval != 0 {
8579 return Err(fidl::Error::NonZeroPadding {
8580 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
8581 });
8582 }
8583 fidl::decode!(
8584 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
8585 fidl::encoding::DefaultFuchsiaResourceDialect,
8586 &mut self.generic_sme_server,
8587 decoder,
8588 offset + 0,
8589 _depth
8590 )?;
8591 fidl::decode!(
8592 LegacyPrivacySupport,
8593 fidl::encoding::DefaultFuchsiaResourceDialect,
8594 &mut self.legacy_privacy_support,
8595 decoder,
8596 offset + 4,
8597 _depth
8598 )?;
8599 Ok(())
8600 }
8601 }
8602
8603 impl fidl::encoding::ResourceTypeMarker for UsmeBootstrapStartResponse {
8604 type Borrowed<'a> = &'a mut Self;
8605 fn take_or_borrow<'a>(
8606 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8607 ) -> Self::Borrowed<'a> {
8608 value
8609 }
8610 }
8611
8612 unsafe impl fidl::encoding::TypeMarker for UsmeBootstrapStartResponse {
8613 type Owned = Self;
8614
8615 #[inline(always)]
8616 fn inline_align(_context: fidl::encoding::Context) -> usize {
8617 4
8618 }
8619
8620 #[inline(always)]
8621 fn inline_size(_context: fidl::encoding::Context) -> usize {
8622 4
8623 }
8624 }
8625
8626 unsafe impl
8627 fidl::encoding::Encode<
8628 UsmeBootstrapStartResponse,
8629 fidl::encoding::DefaultFuchsiaResourceDialect,
8630 > for &mut UsmeBootstrapStartResponse
8631 {
8632 #[inline]
8633 unsafe fn encode(
8634 self,
8635 encoder: &mut fidl::encoding::Encoder<
8636 '_,
8637 fidl::encoding::DefaultFuchsiaResourceDialect,
8638 >,
8639 offset: usize,
8640 _depth: fidl::encoding::Depth,
8641 ) -> fidl::Result<()> {
8642 encoder.debug_check_bounds::<UsmeBootstrapStartResponse>(offset);
8643 fidl::encoding::Encode::<
8645 UsmeBootstrapStartResponse,
8646 fidl::encoding::DefaultFuchsiaResourceDialect,
8647 >::encode(
8648 (<fidl::encoding::HandleType<
8649 fidl::Vmo,
8650 { fidl::ObjectType::VMO.into_raw() },
8651 2147483648,
8652 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8653 &mut self.inspect_vmo
8654 ),),
8655 encoder,
8656 offset,
8657 _depth,
8658 )
8659 }
8660 }
8661 unsafe impl<
8662 T0: fidl::encoding::Encode<
8663 fidl::encoding::HandleType<
8664 fidl::Vmo,
8665 { fidl::ObjectType::VMO.into_raw() },
8666 2147483648,
8667 >,
8668 fidl::encoding::DefaultFuchsiaResourceDialect,
8669 >,
8670 >
8671 fidl::encoding::Encode<
8672 UsmeBootstrapStartResponse,
8673 fidl::encoding::DefaultFuchsiaResourceDialect,
8674 > for (T0,)
8675 {
8676 #[inline]
8677 unsafe fn encode(
8678 self,
8679 encoder: &mut fidl::encoding::Encoder<
8680 '_,
8681 fidl::encoding::DefaultFuchsiaResourceDialect,
8682 >,
8683 offset: usize,
8684 depth: fidl::encoding::Depth,
8685 ) -> fidl::Result<()> {
8686 encoder.debug_check_bounds::<UsmeBootstrapStartResponse>(offset);
8687 self.0.encode(encoder, offset + 0, depth)?;
8691 Ok(())
8692 }
8693 }
8694
8695 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8696 for UsmeBootstrapStartResponse
8697 {
8698 #[inline(always)]
8699 fn new_empty() -> Self {
8700 Self {
8701 inspect_vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
8702 }
8703 }
8704
8705 #[inline]
8706 unsafe fn decode(
8707 &mut self,
8708 decoder: &mut fidl::encoding::Decoder<
8709 '_,
8710 fidl::encoding::DefaultFuchsiaResourceDialect,
8711 >,
8712 offset: usize,
8713 _depth: fidl::encoding::Depth,
8714 ) -> fidl::Result<()> {
8715 decoder.debug_check_bounds::<Self>(offset);
8716 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.inspect_vmo, decoder, offset + 0, _depth)?;
8718 Ok(())
8719 }
8720 }
8721}