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 ClientSmeScanForControllerResponse {
41 pub scan_results: Vec<ScanResult>,
42}
43
44impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
45 for ClientSmeScanForControllerResponse
46{
47}
48
49#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
50pub struct ClientSmeScanResponse {
51 pub scan_results: fidl::Vmo,
52}
53
54impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ClientSmeScanResponse {}
55
56#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
57pub struct GenericSmeGetApSmeRequest {
58 pub sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
59}
60
61impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for GenericSmeGetApSmeRequest {}
62
63#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
64pub struct GenericSmeGetClientSmeRequest {
65 pub sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
66}
67
68impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
69 for GenericSmeGetClientSmeRequest
70{
71}
72
73#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
74pub struct GenericSmeGetSmeTelemetryRequest {
75 pub telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
76}
77
78impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
79 for GenericSmeGetSmeTelemetryRequest
80{
81}
82
83#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
84pub struct GenericSmeQueryResponse {
85 pub resp: GenericSmeQuery,
86}
87
88impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for GenericSmeQueryResponse {}
89
90#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
91pub struct TelemetryCloneInspectVmoResponse {
92 pub inspect_vmo: fidl::Vmo,
93}
94
95impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
96 for TelemetryCloneInspectVmoResponse
97{
98}
99
100#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
101pub struct UsmeBootstrapStartRequest {
102 pub generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
103 pub legacy_privacy_support: LegacyPrivacySupport,
104}
105
106impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for UsmeBootstrapStartRequest {}
107
108#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
109pub struct UsmeBootstrapStartResponse {
110 pub inspect_vmo: fidl::Vmo,
111}
112
113impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
114 for UsmeBootstrapStartResponse
115{
116}
117
118#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
119pub struct ApSmeMarker;
120
121impl fidl::endpoints::ProtocolMarker for ApSmeMarker {
122 type Proxy = ApSmeProxy;
123 type RequestStream = ApSmeRequestStream;
124 #[cfg(target_os = "fuchsia")]
125 type SynchronousProxy = ApSmeSynchronousProxy;
126
127 const DEBUG_NAME: &'static str = "(anonymous) ApSme";
128}
129
130pub trait ApSmeProxyInterface: Send + Sync {
131 type StartResponseFut: std::future::Future<Output = Result<StartApResultCode, fidl::Error>>
132 + Send;
133 fn r#start(&self, config: &ApConfig) -> Self::StartResponseFut;
134 type StopResponseFut: std::future::Future<Output = Result<StopApResultCode, fidl::Error>> + Send;
135 fn r#stop(&self) -> Self::StopResponseFut;
136 type StatusResponseFut: std::future::Future<Output = Result<ApStatusResponse, fidl::Error>>
137 + Send;
138 fn r#status(&self) -> Self::StatusResponseFut;
139}
140#[derive(Debug)]
141#[cfg(target_os = "fuchsia")]
142pub struct ApSmeSynchronousProxy {
143 client: fidl::client::sync::Client,
144}
145
146#[cfg(target_os = "fuchsia")]
147impl fidl::endpoints::SynchronousProxy for ApSmeSynchronousProxy {
148 type Proxy = ApSmeProxy;
149 type Protocol = ApSmeMarker;
150
151 fn from_channel(inner: fidl::Channel) -> Self {
152 Self::new(inner)
153 }
154
155 fn into_channel(self) -> fidl::Channel {
156 self.client.into_channel()
157 }
158
159 fn as_channel(&self) -> &fidl::Channel {
160 self.client.as_channel()
161 }
162}
163
164#[cfg(target_os = "fuchsia")]
165impl ApSmeSynchronousProxy {
166 pub fn new(channel: fidl::Channel) -> Self {
167 let protocol_name = <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
168 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
169 }
170
171 pub fn into_channel(self) -> fidl::Channel {
172 self.client.into_channel()
173 }
174
175 pub fn wait_for_event(
178 &self,
179 deadline: zx::MonotonicInstant,
180 ) -> Result<ApSmeEvent, fidl::Error> {
181 ApSmeEvent::decode(self.client.wait_for_event(deadline)?)
182 }
183
184 pub fn r#start(
185 &self,
186 mut config: &ApConfig,
187 ___deadline: zx::MonotonicInstant,
188 ) -> Result<StartApResultCode, fidl::Error> {
189 let _response = self.client.send_query::<ApSmeStartRequest, ApSmeStartResponse>(
190 (config,),
191 0x33fa134ceda8624d,
192 fidl::encoding::DynamicFlags::empty(),
193 ___deadline,
194 )?;
195 Ok(_response.code)
196 }
197
198 pub fn r#stop(
199 &self,
200 ___deadline: zx::MonotonicInstant,
201 ) -> Result<StopApResultCode, fidl::Error> {
202 let _response = self.client.send_query::<fidl::encoding::EmptyPayload, ApSmeStopResponse>(
203 (),
204 0x56423f5b49a2e851,
205 fidl::encoding::DynamicFlags::empty(),
206 ___deadline,
207 )?;
208 Ok(_response.code)
209 }
210
211 pub fn r#status(
212 &self,
213 ___deadline: zx::MonotonicInstant,
214 ) -> Result<ApStatusResponse, fidl::Error> {
215 let _response =
216 self.client.send_query::<fidl::encoding::EmptyPayload, ApSmeStatusResponse>(
217 (),
218 0x51c688ac7a101606,
219 fidl::encoding::DynamicFlags::empty(),
220 ___deadline,
221 )?;
222 Ok(_response.resp)
223 }
224}
225
226#[cfg(target_os = "fuchsia")]
227impl From<ApSmeSynchronousProxy> for zx::NullableHandle {
228 fn from(value: ApSmeSynchronousProxy) -> Self {
229 value.into_channel().into()
230 }
231}
232
233#[cfg(target_os = "fuchsia")]
234impl From<fidl::Channel> for ApSmeSynchronousProxy {
235 fn from(value: fidl::Channel) -> Self {
236 Self::new(value)
237 }
238}
239
240#[cfg(target_os = "fuchsia")]
241impl fidl::endpoints::FromClient for ApSmeSynchronousProxy {
242 type Protocol = ApSmeMarker;
243
244 fn from_client(value: fidl::endpoints::ClientEnd<ApSmeMarker>) -> Self {
245 Self::new(value.into_channel())
246 }
247}
248
249#[derive(Debug, Clone)]
250pub struct ApSmeProxy {
251 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
252}
253
254impl fidl::endpoints::Proxy for ApSmeProxy {
255 type Protocol = ApSmeMarker;
256
257 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
258 Self::new(inner)
259 }
260
261 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
262 self.client.into_channel().map_err(|client| Self { client })
263 }
264
265 fn as_channel(&self) -> &::fidl::AsyncChannel {
266 self.client.as_channel()
267 }
268}
269
270impl ApSmeProxy {
271 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
273 let protocol_name = <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
274 Self { client: fidl::client::Client::new(channel, protocol_name) }
275 }
276
277 pub fn take_event_stream(&self) -> ApSmeEventStream {
283 ApSmeEventStream { event_receiver: self.client.take_event_receiver() }
284 }
285
286 pub fn r#start(
287 &self,
288 mut config: &ApConfig,
289 ) -> fidl::client::QueryResponseFut<
290 StartApResultCode,
291 fidl::encoding::DefaultFuchsiaResourceDialect,
292 > {
293 ApSmeProxyInterface::r#start(self, config)
294 }
295
296 pub fn r#stop(
297 &self,
298 ) -> fidl::client::QueryResponseFut<
299 StopApResultCode,
300 fidl::encoding::DefaultFuchsiaResourceDialect,
301 > {
302 ApSmeProxyInterface::r#stop(self)
303 }
304
305 pub fn r#status(
306 &self,
307 ) -> fidl::client::QueryResponseFut<
308 ApStatusResponse,
309 fidl::encoding::DefaultFuchsiaResourceDialect,
310 > {
311 ApSmeProxyInterface::r#status(self)
312 }
313}
314
315impl ApSmeProxyInterface for ApSmeProxy {
316 type StartResponseFut = fidl::client::QueryResponseFut<
317 StartApResultCode,
318 fidl::encoding::DefaultFuchsiaResourceDialect,
319 >;
320 fn r#start(&self, mut config: &ApConfig) -> Self::StartResponseFut {
321 fn _decode(
322 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
323 ) -> Result<StartApResultCode, fidl::Error> {
324 let _response = fidl::client::decode_transaction_body::<
325 ApSmeStartResponse,
326 fidl::encoding::DefaultFuchsiaResourceDialect,
327 0x33fa134ceda8624d,
328 >(_buf?)?;
329 Ok(_response.code)
330 }
331 self.client.send_query_and_decode::<ApSmeStartRequest, StartApResultCode>(
332 (config,),
333 0x33fa134ceda8624d,
334 fidl::encoding::DynamicFlags::empty(),
335 _decode,
336 )
337 }
338
339 type StopResponseFut = fidl::client::QueryResponseFut<
340 StopApResultCode,
341 fidl::encoding::DefaultFuchsiaResourceDialect,
342 >;
343 fn r#stop(&self) -> Self::StopResponseFut {
344 fn _decode(
345 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
346 ) -> Result<StopApResultCode, fidl::Error> {
347 let _response = fidl::client::decode_transaction_body::<
348 ApSmeStopResponse,
349 fidl::encoding::DefaultFuchsiaResourceDialect,
350 0x56423f5b49a2e851,
351 >(_buf?)?;
352 Ok(_response.code)
353 }
354 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, StopApResultCode>(
355 (),
356 0x56423f5b49a2e851,
357 fidl::encoding::DynamicFlags::empty(),
358 _decode,
359 )
360 }
361
362 type StatusResponseFut = fidl::client::QueryResponseFut<
363 ApStatusResponse,
364 fidl::encoding::DefaultFuchsiaResourceDialect,
365 >;
366 fn r#status(&self) -> Self::StatusResponseFut {
367 fn _decode(
368 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
369 ) -> Result<ApStatusResponse, fidl::Error> {
370 let _response = fidl::client::decode_transaction_body::<
371 ApSmeStatusResponse,
372 fidl::encoding::DefaultFuchsiaResourceDialect,
373 0x51c688ac7a101606,
374 >(_buf?)?;
375 Ok(_response.resp)
376 }
377 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ApStatusResponse>(
378 (),
379 0x51c688ac7a101606,
380 fidl::encoding::DynamicFlags::empty(),
381 _decode,
382 )
383 }
384}
385
386pub struct ApSmeEventStream {
387 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
388}
389
390impl std::marker::Unpin for ApSmeEventStream {}
391
392impl futures::stream::FusedStream for ApSmeEventStream {
393 fn is_terminated(&self) -> bool {
394 self.event_receiver.is_terminated()
395 }
396}
397
398impl futures::Stream for ApSmeEventStream {
399 type Item = Result<ApSmeEvent, fidl::Error>;
400
401 fn poll_next(
402 mut self: std::pin::Pin<&mut Self>,
403 cx: &mut std::task::Context<'_>,
404 ) -> std::task::Poll<Option<Self::Item>> {
405 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
406 &mut self.event_receiver,
407 cx
408 )?) {
409 Some(buf) => std::task::Poll::Ready(Some(ApSmeEvent::decode(buf))),
410 None => std::task::Poll::Ready(None),
411 }
412 }
413}
414
415#[derive(Debug)]
416pub enum ApSmeEvent {}
417
418impl ApSmeEvent {
419 fn decode(
421 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
422 ) -> Result<ApSmeEvent, fidl::Error> {
423 let (bytes, _handles) = buf.split_mut();
424 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
425 debug_assert_eq!(tx_header.tx_id, 0);
426 match tx_header.ordinal {
427 _ => Err(fidl::Error::UnknownOrdinal {
428 ordinal: tx_header.ordinal,
429 protocol_name: <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
430 }),
431 }
432 }
433}
434
435pub struct ApSmeRequestStream {
437 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
438 is_terminated: bool,
439}
440
441impl std::marker::Unpin for ApSmeRequestStream {}
442
443impl futures::stream::FusedStream for ApSmeRequestStream {
444 fn is_terminated(&self) -> bool {
445 self.is_terminated
446 }
447}
448
449impl fidl::endpoints::RequestStream for ApSmeRequestStream {
450 type Protocol = ApSmeMarker;
451 type ControlHandle = ApSmeControlHandle;
452
453 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
454 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
455 }
456
457 fn control_handle(&self) -> Self::ControlHandle {
458 ApSmeControlHandle { inner: self.inner.clone() }
459 }
460
461 fn into_inner(
462 self,
463 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
464 {
465 (self.inner, self.is_terminated)
466 }
467
468 fn from_inner(
469 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
470 is_terminated: bool,
471 ) -> Self {
472 Self { inner, is_terminated }
473 }
474}
475
476impl futures::Stream for ApSmeRequestStream {
477 type Item = Result<ApSmeRequest, fidl::Error>;
478
479 fn poll_next(
480 mut self: std::pin::Pin<&mut Self>,
481 cx: &mut std::task::Context<'_>,
482 ) -> std::task::Poll<Option<Self::Item>> {
483 let this = &mut *self;
484 if this.inner.check_shutdown(cx) {
485 this.is_terminated = true;
486 return std::task::Poll::Ready(None);
487 }
488 if this.is_terminated {
489 panic!("polled ApSmeRequestStream after completion");
490 }
491 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
492 |bytes, handles| {
493 match this.inner.channel().read_etc(cx, bytes, handles) {
494 std::task::Poll::Ready(Ok(())) => {}
495 std::task::Poll::Pending => return std::task::Poll::Pending,
496 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
497 this.is_terminated = true;
498 return std::task::Poll::Ready(None);
499 }
500 std::task::Poll::Ready(Err(e)) => {
501 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
502 e.into(),
503 ))));
504 }
505 }
506
507 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
509
510 std::task::Poll::Ready(Some(match header.ordinal {
511 0x33fa134ceda8624d => {
512 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
513 let mut req = fidl::new_empty!(
514 ApSmeStartRequest,
515 fidl::encoding::DefaultFuchsiaResourceDialect
516 );
517 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ApSmeStartRequest>(&header, _body_bytes, handles, &mut req)?;
518 let control_handle = ApSmeControlHandle { inner: this.inner.clone() };
519 Ok(ApSmeRequest::Start {
520 config: req.config,
521
522 responder: ApSmeStartResponder {
523 control_handle: std::mem::ManuallyDrop::new(control_handle),
524 tx_id: header.tx_id,
525 },
526 })
527 }
528 0x56423f5b49a2e851 => {
529 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
530 let mut req = fidl::new_empty!(
531 fidl::encoding::EmptyPayload,
532 fidl::encoding::DefaultFuchsiaResourceDialect
533 );
534 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
535 let control_handle = ApSmeControlHandle { inner: this.inner.clone() };
536 Ok(ApSmeRequest::Stop {
537 responder: ApSmeStopResponder {
538 control_handle: std::mem::ManuallyDrop::new(control_handle),
539 tx_id: header.tx_id,
540 },
541 })
542 }
543 0x51c688ac7a101606 => {
544 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
545 let mut req = fidl::new_empty!(
546 fidl::encoding::EmptyPayload,
547 fidl::encoding::DefaultFuchsiaResourceDialect
548 );
549 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
550 let control_handle = ApSmeControlHandle { inner: this.inner.clone() };
551 Ok(ApSmeRequest::Status {
552 responder: ApSmeStatusResponder {
553 control_handle: std::mem::ManuallyDrop::new(control_handle),
554 tx_id: header.tx_id,
555 },
556 })
557 }
558 _ => Err(fidl::Error::UnknownOrdinal {
559 ordinal: header.ordinal,
560 protocol_name: <ApSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
561 }),
562 }))
563 },
564 )
565 }
566}
567
568#[derive(Debug)]
569pub enum ApSmeRequest {
570 Start { config: ApConfig, responder: ApSmeStartResponder },
571 Stop { responder: ApSmeStopResponder },
572 Status { responder: ApSmeStatusResponder },
573}
574
575impl ApSmeRequest {
576 #[allow(irrefutable_let_patterns)]
577 pub fn into_start(self) -> Option<(ApConfig, ApSmeStartResponder)> {
578 if let ApSmeRequest::Start { config, responder } = self {
579 Some((config, responder))
580 } else {
581 None
582 }
583 }
584
585 #[allow(irrefutable_let_patterns)]
586 pub fn into_stop(self) -> Option<(ApSmeStopResponder)> {
587 if let ApSmeRequest::Stop { responder } = self { Some((responder)) } else { None }
588 }
589
590 #[allow(irrefutable_let_patterns)]
591 pub fn into_status(self) -> Option<(ApSmeStatusResponder)> {
592 if let ApSmeRequest::Status { responder } = self { Some((responder)) } else { None }
593 }
594
595 pub fn method_name(&self) -> &'static str {
597 match *self {
598 ApSmeRequest::Start { .. } => "start",
599 ApSmeRequest::Stop { .. } => "stop",
600 ApSmeRequest::Status { .. } => "status",
601 }
602 }
603}
604
605#[derive(Debug, Clone)]
606pub struct ApSmeControlHandle {
607 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
608}
609
610impl fidl::endpoints::ControlHandle for ApSmeControlHandle {
611 fn shutdown(&self) {
612 self.inner.shutdown()
613 }
614
615 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
616 self.inner.shutdown_with_epitaph(status)
617 }
618
619 fn is_closed(&self) -> bool {
620 self.inner.channel().is_closed()
621 }
622 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
623 self.inner.channel().on_closed()
624 }
625
626 #[cfg(target_os = "fuchsia")]
627 fn signal_peer(
628 &self,
629 clear_mask: zx::Signals,
630 set_mask: zx::Signals,
631 ) -> Result<(), zx_status::Status> {
632 use fidl::Peered;
633 self.inner.channel().signal_peer(clear_mask, set_mask)
634 }
635}
636
637impl ApSmeControlHandle {}
638
639#[must_use = "FIDL methods require a response to be sent"]
640#[derive(Debug)]
641pub struct ApSmeStartResponder {
642 control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
643 tx_id: u32,
644}
645
646impl std::ops::Drop for ApSmeStartResponder {
650 fn drop(&mut self) {
651 self.control_handle.shutdown();
652 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
654 }
655}
656
657impl fidl::endpoints::Responder for ApSmeStartResponder {
658 type ControlHandle = ApSmeControlHandle;
659
660 fn control_handle(&self) -> &ApSmeControlHandle {
661 &self.control_handle
662 }
663
664 fn drop_without_shutdown(mut self) {
665 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
667 std::mem::forget(self);
669 }
670}
671
672impl ApSmeStartResponder {
673 pub fn send(self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
677 let _result = self.send_raw(code);
678 if _result.is_err() {
679 self.control_handle.shutdown();
680 }
681 self.drop_without_shutdown();
682 _result
683 }
684
685 pub fn send_no_shutdown_on_err(self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
687 let _result = self.send_raw(code);
688 self.drop_without_shutdown();
689 _result
690 }
691
692 fn send_raw(&self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
693 self.control_handle.inner.send::<ApSmeStartResponse>(
694 (code,),
695 self.tx_id,
696 0x33fa134ceda8624d,
697 fidl::encoding::DynamicFlags::empty(),
698 )
699 }
700}
701
702#[must_use = "FIDL methods require a response to be sent"]
703#[derive(Debug)]
704pub struct ApSmeStopResponder {
705 control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
706 tx_id: u32,
707}
708
709impl std::ops::Drop for ApSmeStopResponder {
713 fn drop(&mut self) {
714 self.control_handle.shutdown();
715 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
717 }
718}
719
720impl fidl::endpoints::Responder for ApSmeStopResponder {
721 type ControlHandle = ApSmeControlHandle;
722
723 fn control_handle(&self) -> &ApSmeControlHandle {
724 &self.control_handle
725 }
726
727 fn drop_without_shutdown(mut self) {
728 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
730 std::mem::forget(self);
732 }
733}
734
735impl ApSmeStopResponder {
736 pub fn send(self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
740 let _result = self.send_raw(code);
741 if _result.is_err() {
742 self.control_handle.shutdown();
743 }
744 self.drop_without_shutdown();
745 _result
746 }
747
748 pub fn send_no_shutdown_on_err(self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
750 let _result = self.send_raw(code);
751 self.drop_without_shutdown();
752 _result
753 }
754
755 fn send_raw(&self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
756 self.control_handle.inner.send::<ApSmeStopResponse>(
757 (code,),
758 self.tx_id,
759 0x56423f5b49a2e851,
760 fidl::encoding::DynamicFlags::empty(),
761 )
762 }
763}
764
765#[must_use = "FIDL methods require a response to be sent"]
766#[derive(Debug)]
767pub struct ApSmeStatusResponder {
768 control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
769 tx_id: u32,
770}
771
772impl std::ops::Drop for ApSmeStatusResponder {
776 fn drop(&mut self) {
777 self.control_handle.shutdown();
778 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
780 }
781}
782
783impl fidl::endpoints::Responder for ApSmeStatusResponder {
784 type ControlHandle = ApSmeControlHandle;
785
786 fn control_handle(&self) -> &ApSmeControlHandle {
787 &self.control_handle
788 }
789
790 fn drop_without_shutdown(mut self) {
791 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
793 std::mem::forget(self);
795 }
796}
797
798impl ApSmeStatusResponder {
799 pub fn send(self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
803 let _result = self.send_raw(resp);
804 if _result.is_err() {
805 self.control_handle.shutdown();
806 }
807 self.drop_without_shutdown();
808 _result
809 }
810
811 pub fn send_no_shutdown_on_err(self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
813 let _result = self.send_raw(resp);
814 self.drop_without_shutdown();
815 _result
816 }
817
818 fn send_raw(&self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
819 self.control_handle.inner.send::<ApSmeStatusResponse>(
820 (resp,),
821 self.tx_id,
822 0x51c688ac7a101606,
823 fidl::encoding::DynamicFlags::empty(),
824 )
825 }
826}
827
828#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
829pub struct ClientSmeMarker;
830
831impl fidl::endpoints::ProtocolMarker for ClientSmeMarker {
832 type Proxy = ClientSmeProxy;
833 type RequestStream = ClientSmeRequestStream;
834 #[cfg(target_os = "fuchsia")]
835 type SynchronousProxy = ClientSmeSynchronousProxy;
836
837 const DEBUG_NAME: &'static str = "(anonymous) ClientSme";
838}
839pub type ClientSmeScanResult = Result<fidl::Vmo, ScanErrorCode>;
840pub type ClientSmeWmmStatusResult = Result<fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>;
841pub type ClientSmeScanForControllerResult = Result<Vec<ScanResult>, ScanErrorCode>;
842pub type ClientSmeSetMacAddressResult = Result<(), i32>;
843pub type ClientSmeInstallApfPacketFilterResult = Result<(), i32>;
844pub type ClientSmeReadApfPacketFilterDataResult = Result<Vec<u8>, i32>;
845pub type ClientSmeSetApfPacketFilterEnabledResult = Result<(), i32>;
846pub type ClientSmeGetApfPacketFilterEnabledResult = Result<bool, i32>;
847
848pub trait ClientSmeProxyInterface: Send + Sync {
849 type ScanResponseFut: std::future::Future<Output = Result<ClientSmeScanResult, fidl::Error>>
850 + Send;
851 fn r#scan(&self, req: &ScanRequest) -> Self::ScanResponseFut;
852 fn r#connect(
853 &self,
854 req: &ConnectRequest,
855 txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
856 ) -> Result<(), fidl::Error>;
857 fn r#roam(&self, req: &RoamRequest) -> Result<(), fidl::Error>;
858 type DisconnectResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
859 fn r#disconnect(&self, reason: UserDisconnectReason) -> Self::DisconnectResponseFut;
860 type StatusResponseFut: std::future::Future<Output = Result<ClientStatusResponse, fidl::Error>>
861 + Send;
862 fn r#status(&self) -> Self::StatusResponseFut;
863 type WmmStatusResponseFut: std::future::Future<Output = Result<ClientSmeWmmStatusResult, fidl::Error>>
864 + Send;
865 fn r#wmm_status(&self) -> Self::WmmStatusResponseFut;
866 type ScanForControllerResponseFut: std::future::Future<Output = Result<ClientSmeScanForControllerResult, fidl::Error>>
867 + Send;
868 fn r#scan_for_controller(&self, req: &ScanRequest) -> Self::ScanForControllerResponseFut;
869 type SetMacAddressResponseFut: std::future::Future<Output = Result<ClientSmeSetMacAddressResult, fidl::Error>>
870 + Send;
871 fn r#set_mac_address(&self, mac_addr: &[u8; 6]) -> Self::SetMacAddressResponseFut;
872 type InstallApfPacketFilterResponseFut: std::future::Future<Output = Result<ClientSmeInstallApfPacketFilterResult, fidl::Error>>
873 + Send;
874 fn r#install_apf_packet_filter(
875 &self,
876 program: &[u8],
877 ) -> Self::InstallApfPacketFilterResponseFut;
878 type ReadApfPacketFilterDataResponseFut: std::future::Future<Output = Result<ClientSmeReadApfPacketFilterDataResult, fidl::Error>>
879 + Send;
880 fn r#read_apf_packet_filter_data(&self) -> Self::ReadApfPacketFilterDataResponseFut;
881 type SetApfPacketFilterEnabledResponseFut: std::future::Future<Output = Result<ClientSmeSetApfPacketFilterEnabledResult, fidl::Error>>
882 + Send;
883 fn r#set_apf_packet_filter_enabled(
884 &self,
885 enabled: bool,
886 ) -> Self::SetApfPacketFilterEnabledResponseFut;
887 type GetApfPacketFilterEnabledResponseFut: std::future::Future<Output = Result<ClientSmeGetApfPacketFilterEnabledResult, fidl::Error>>
888 + Send;
889 fn r#get_apf_packet_filter_enabled(&self) -> Self::GetApfPacketFilterEnabledResponseFut;
890}
891#[derive(Debug)]
892#[cfg(target_os = "fuchsia")]
893pub struct ClientSmeSynchronousProxy {
894 client: fidl::client::sync::Client,
895}
896
897#[cfg(target_os = "fuchsia")]
898impl fidl::endpoints::SynchronousProxy for ClientSmeSynchronousProxy {
899 type Proxy = ClientSmeProxy;
900 type Protocol = ClientSmeMarker;
901
902 fn from_channel(inner: fidl::Channel) -> Self {
903 Self::new(inner)
904 }
905
906 fn into_channel(self) -> fidl::Channel {
907 self.client.into_channel()
908 }
909
910 fn as_channel(&self) -> &fidl::Channel {
911 self.client.as_channel()
912 }
913}
914
915#[cfg(target_os = "fuchsia")]
916impl ClientSmeSynchronousProxy {
917 pub fn new(channel: fidl::Channel) -> Self {
918 let protocol_name = <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
919 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
920 }
921
922 pub fn into_channel(self) -> fidl::Channel {
923 self.client.into_channel()
924 }
925
926 pub fn wait_for_event(
929 &self,
930 deadline: zx::MonotonicInstant,
931 ) -> Result<ClientSmeEvent, fidl::Error> {
932 ClientSmeEvent::decode(self.client.wait_for_event(deadline)?)
933 }
934
935 pub fn r#scan(
936 &self,
937 mut req: &ScanRequest,
938 ___deadline: zx::MonotonicInstant,
939 ) -> Result<ClientSmeScanResult, fidl::Error> {
940 let _response = self.client.send_query::<ClientSmeScanRequest, fidl::encoding::ResultType<
941 ClientSmeScanResponse,
942 ScanErrorCode,
943 >>(
944 (req,),
945 0xded0ce3b1685822,
946 fidl::encoding::DynamicFlags::empty(),
947 ___deadline,
948 )?;
949 Ok(_response.map(|x| x.scan_results))
950 }
951
952 pub fn r#connect(
953 &self,
954 mut req: &ConnectRequest,
955 mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
956 ) -> Result<(), fidl::Error> {
957 self.client.send::<ClientSmeConnectRequest>(
958 (req, txn),
959 0x250a0f6fe9f85351,
960 fidl::encoding::DynamicFlags::empty(),
961 )
962 }
963
964 pub fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
965 self.client.send::<ClientSmeRoamRequest>(
966 (req,),
967 0x107ead7d84723921,
968 fidl::encoding::DynamicFlags::empty(),
969 )
970 }
971
972 pub fn r#disconnect(
973 &self,
974 mut reason: UserDisconnectReason,
975 ___deadline: zx::MonotonicInstant,
976 ) -> Result<(), fidl::Error> {
977 let _response =
978 self.client.send_query::<ClientSmeDisconnectRequest, fidl::encoding::EmptyPayload>(
979 (reason,),
980 0x39a578de9a107304,
981 fidl::encoding::DynamicFlags::empty(),
982 ___deadline,
983 )?;
984 Ok(_response)
985 }
986
987 pub fn r#status(
988 &self,
989 ___deadline: zx::MonotonicInstant,
990 ) -> Result<ClientStatusResponse, fidl::Error> {
991 let _response =
992 self.client.send_query::<fidl::encoding::EmptyPayload, ClientSmeStatusResponse>(
993 (),
994 0xda00b607470faf2,
995 fidl::encoding::DynamicFlags::empty(),
996 ___deadline,
997 )?;
998 Ok(_response.resp)
999 }
1000
1001 pub fn r#wmm_status(
1002 &self,
1003 ___deadline: zx::MonotonicInstant,
1004 ) -> Result<ClientSmeWmmStatusResult, fidl::Error> {
1005 let _response = self.client.send_query::<
1006 fidl::encoding::EmptyPayload,
1007 fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>,
1008 >(
1009 (),
1010 0x3d0ccc75f6baa9e3,
1011 fidl::encoding::DynamicFlags::empty(),
1012 ___deadline,
1013 )?;
1014 Ok(_response.map(|x| x.resp))
1015 }
1016
1017 pub fn r#scan_for_controller(
1018 &self,
1019 mut req: &ScanRequest,
1020 ___deadline: zx::MonotonicInstant,
1021 ) -> Result<ClientSmeScanForControllerResult, fidl::Error> {
1022 let _response = self.client.send_query::<
1023 ClientSmeScanForControllerRequest,
1024 fidl::encoding::ResultType<ClientSmeScanForControllerResponse, ScanErrorCode>,
1025 >(
1026 (req,),
1027 0x21f00ab22ff79a12,
1028 fidl::encoding::DynamicFlags::empty(),
1029 ___deadline,
1030 )?;
1031 Ok(_response.map(|x| x.scan_results))
1032 }
1033
1034 pub fn r#set_mac_address(
1035 &self,
1036 mut mac_addr: &[u8; 6],
1037 ___deadline: zx::MonotonicInstant,
1038 ) -> Result<ClientSmeSetMacAddressResult, fidl::Error> {
1039 let _response = self.client.send_query::<
1040 ClientSmeSetMacAddressRequest,
1041 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1042 >(
1043 (mac_addr,),
1044 0x13e0a0bee8962f58,
1045 fidl::encoding::DynamicFlags::empty(),
1046 ___deadline,
1047 )?;
1048 Ok(_response.map(|x| x))
1049 }
1050
1051 pub fn r#install_apf_packet_filter(
1052 &self,
1053 mut program: &[u8],
1054 ___deadline: zx::MonotonicInstant,
1055 ) -> Result<ClientSmeInstallApfPacketFilterResult, fidl::Error> {
1056 let _response = self.client.send_query::<
1057 ClientSmeInstallApfPacketFilterRequest,
1058 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1059 >(
1060 (program,),
1061 0x77435965e7bfaf83,
1062 fidl::encoding::DynamicFlags::empty(),
1063 ___deadline,
1064 )?;
1065 Ok(_response.map(|x| x))
1066 }
1067
1068 pub fn r#read_apf_packet_filter_data(
1069 &self,
1070 ___deadline: zx::MonotonicInstant,
1071 ) -> Result<ClientSmeReadApfPacketFilterDataResult, fidl::Error> {
1072 let _response = self.client.send_query::<
1073 fidl::encoding::EmptyPayload,
1074 fidl::encoding::ResultType<ClientSmeReadApfPacketFilterDataResponse, i32>,
1075 >(
1076 (),
1077 0x66fc6616b9963023,
1078 fidl::encoding::DynamicFlags::empty(),
1079 ___deadline,
1080 )?;
1081 Ok(_response.map(|x| x.memory))
1082 }
1083
1084 pub fn r#set_apf_packet_filter_enabled(
1085 &self,
1086 mut enabled: bool,
1087 ___deadline: zx::MonotonicInstant,
1088 ) -> Result<ClientSmeSetApfPacketFilterEnabledResult, fidl::Error> {
1089 let _response = self.client.send_query::<
1090 ClientSmeSetApfPacketFilterEnabledRequest,
1091 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1092 >(
1093 (enabled,),
1094 0x5070d2ed31580b81,
1095 fidl::encoding::DynamicFlags::empty(),
1096 ___deadline,
1097 )?;
1098 Ok(_response.map(|x| x))
1099 }
1100
1101 pub fn r#get_apf_packet_filter_enabled(
1102 &self,
1103 ___deadline: zx::MonotonicInstant,
1104 ) -> Result<ClientSmeGetApfPacketFilterEnabledResult, fidl::Error> {
1105 let _response =
1106 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1107 ClientSmeGetApfPacketFilterEnabledResponse,
1108 i32,
1109 >>(
1110 (),
1111 0xdda5c1533526869,
1112 fidl::encoding::DynamicFlags::empty(),
1113 ___deadline,
1114 )?;
1115 Ok(_response.map(|x| x.enabled))
1116 }
1117}
1118
1119#[cfg(target_os = "fuchsia")]
1120impl From<ClientSmeSynchronousProxy> for zx::NullableHandle {
1121 fn from(value: ClientSmeSynchronousProxy) -> Self {
1122 value.into_channel().into()
1123 }
1124}
1125
1126#[cfg(target_os = "fuchsia")]
1127impl From<fidl::Channel> for ClientSmeSynchronousProxy {
1128 fn from(value: fidl::Channel) -> Self {
1129 Self::new(value)
1130 }
1131}
1132
1133#[cfg(target_os = "fuchsia")]
1134impl fidl::endpoints::FromClient for ClientSmeSynchronousProxy {
1135 type Protocol = ClientSmeMarker;
1136
1137 fn from_client(value: fidl::endpoints::ClientEnd<ClientSmeMarker>) -> Self {
1138 Self::new(value.into_channel())
1139 }
1140}
1141
1142#[derive(Debug, Clone)]
1143pub struct ClientSmeProxy {
1144 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1145}
1146
1147impl fidl::endpoints::Proxy for ClientSmeProxy {
1148 type Protocol = ClientSmeMarker;
1149
1150 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1151 Self::new(inner)
1152 }
1153
1154 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1155 self.client.into_channel().map_err(|client| Self { client })
1156 }
1157
1158 fn as_channel(&self) -> &::fidl::AsyncChannel {
1159 self.client.as_channel()
1160 }
1161}
1162
1163impl ClientSmeProxy {
1164 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1166 let protocol_name = <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1167 Self { client: fidl::client::Client::new(channel, protocol_name) }
1168 }
1169
1170 pub fn take_event_stream(&self) -> ClientSmeEventStream {
1176 ClientSmeEventStream { event_receiver: self.client.take_event_receiver() }
1177 }
1178
1179 pub fn r#scan(
1180 &self,
1181 mut req: &ScanRequest,
1182 ) -> fidl::client::QueryResponseFut<
1183 ClientSmeScanResult,
1184 fidl::encoding::DefaultFuchsiaResourceDialect,
1185 > {
1186 ClientSmeProxyInterface::r#scan(self, req)
1187 }
1188
1189 pub fn r#connect(
1190 &self,
1191 mut req: &ConnectRequest,
1192 mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1193 ) -> Result<(), fidl::Error> {
1194 ClientSmeProxyInterface::r#connect(self, req, txn)
1195 }
1196
1197 pub fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1198 ClientSmeProxyInterface::r#roam(self, req)
1199 }
1200
1201 pub fn r#disconnect(
1202 &self,
1203 mut reason: UserDisconnectReason,
1204 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
1205 ClientSmeProxyInterface::r#disconnect(self, reason)
1206 }
1207
1208 pub fn r#status(
1209 &self,
1210 ) -> fidl::client::QueryResponseFut<
1211 ClientStatusResponse,
1212 fidl::encoding::DefaultFuchsiaResourceDialect,
1213 > {
1214 ClientSmeProxyInterface::r#status(self)
1215 }
1216
1217 pub fn r#wmm_status(
1218 &self,
1219 ) -> fidl::client::QueryResponseFut<
1220 ClientSmeWmmStatusResult,
1221 fidl::encoding::DefaultFuchsiaResourceDialect,
1222 > {
1223 ClientSmeProxyInterface::r#wmm_status(self)
1224 }
1225
1226 pub fn r#scan_for_controller(
1227 &self,
1228 mut req: &ScanRequest,
1229 ) -> fidl::client::QueryResponseFut<
1230 ClientSmeScanForControllerResult,
1231 fidl::encoding::DefaultFuchsiaResourceDialect,
1232 > {
1233 ClientSmeProxyInterface::r#scan_for_controller(self, req)
1234 }
1235
1236 pub fn r#set_mac_address(
1237 &self,
1238 mut mac_addr: &[u8; 6],
1239 ) -> fidl::client::QueryResponseFut<
1240 ClientSmeSetMacAddressResult,
1241 fidl::encoding::DefaultFuchsiaResourceDialect,
1242 > {
1243 ClientSmeProxyInterface::r#set_mac_address(self, mac_addr)
1244 }
1245
1246 pub fn r#install_apf_packet_filter(
1247 &self,
1248 mut program: &[u8],
1249 ) -> fidl::client::QueryResponseFut<
1250 ClientSmeInstallApfPacketFilterResult,
1251 fidl::encoding::DefaultFuchsiaResourceDialect,
1252 > {
1253 ClientSmeProxyInterface::r#install_apf_packet_filter(self, program)
1254 }
1255
1256 pub fn r#read_apf_packet_filter_data(
1257 &self,
1258 ) -> fidl::client::QueryResponseFut<
1259 ClientSmeReadApfPacketFilterDataResult,
1260 fidl::encoding::DefaultFuchsiaResourceDialect,
1261 > {
1262 ClientSmeProxyInterface::r#read_apf_packet_filter_data(self)
1263 }
1264
1265 pub fn r#set_apf_packet_filter_enabled(
1266 &self,
1267 mut enabled: bool,
1268 ) -> fidl::client::QueryResponseFut<
1269 ClientSmeSetApfPacketFilterEnabledResult,
1270 fidl::encoding::DefaultFuchsiaResourceDialect,
1271 > {
1272 ClientSmeProxyInterface::r#set_apf_packet_filter_enabled(self, enabled)
1273 }
1274
1275 pub fn r#get_apf_packet_filter_enabled(
1276 &self,
1277 ) -> fidl::client::QueryResponseFut<
1278 ClientSmeGetApfPacketFilterEnabledResult,
1279 fidl::encoding::DefaultFuchsiaResourceDialect,
1280 > {
1281 ClientSmeProxyInterface::r#get_apf_packet_filter_enabled(self)
1282 }
1283}
1284
1285impl ClientSmeProxyInterface for ClientSmeProxy {
1286 type ScanResponseFut = fidl::client::QueryResponseFut<
1287 ClientSmeScanResult,
1288 fidl::encoding::DefaultFuchsiaResourceDialect,
1289 >;
1290 fn r#scan(&self, mut req: &ScanRequest) -> Self::ScanResponseFut {
1291 fn _decode(
1292 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1293 ) -> Result<ClientSmeScanResult, fidl::Error> {
1294 let _response = fidl::client::decode_transaction_body::<
1295 fidl::encoding::ResultType<ClientSmeScanResponse, ScanErrorCode>,
1296 fidl::encoding::DefaultFuchsiaResourceDialect,
1297 0xded0ce3b1685822,
1298 >(_buf?)?;
1299 Ok(_response.map(|x| x.scan_results))
1300 }
1301 self.client.send_query_and_decode::<ClientSmeScanRequest, ClientSmeScanResult>(
1302 (req,),
1303 0xded0ce3b1685822,
1304 fidl::encoding::DynamicFlags::empty(),
1305 _decode,
1306 )
1307 }
1308
1309 fn r#connect(
1310 &self,
1311 mut req: &ConnectRequest,
1312 mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1313 ) -> Result<(), fidl::Error> {
1314 self.client.send::<ClientSmeConnectRequest>(
1315 (req, txn),
1316 0x250a0f6fe9f85351,
1317 fidl::encoding::DynamicFlags::empty(),
1318 )
1319 }
1320
1321 fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1322 self.client.send::<ClientSmeRoamRequest>(
1323 (req,),
1324 0x107ead7d84723921,
1325 fidl::encoding::DynamicFlags::empty(),
1326 )
1327 }
1328
1329 type DisconnectResponseFut =
1330 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1331 fn r#disconnect(&self, mut reason: UserDisconnectReason) -> Self::DisconnectResponseFut {
1332 fn _decode(
1333 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1334 ) -> Result<(), fidl::Error> {
1335 let _response = fidl::client::decode_transaction_body::<
1336 fidl::encoding::EmptyPayload,
1337 fidl::encoding::DefaultFuchsiaResourceDialect,
1338 0x39a578de9a107304,
1339 >(_buf?)?;
1340 Ok(_response)
1341 }
1342 self.client.send_query_and_decode::<ClientSmeDisconnectRequest, ()>(
1343 (reason,),
1344 0x39a578de9a107304,
1345 fidl::encoding::DynamicFlags::empty(),
1346 _decode,
1347 )
1348 }
1349
1350 type StatusResponseFut = fidl::client::QueryResponseFut<
1351 ClientStatusResponse,
1352 fidl::encoding::DefaultFuchsiaResourceDialect,
1353 >;
1354 fn r#status(&self) -> Self::StatusResponseFut {
1355 fn _decode(
1356 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1357 ) -> Result<ClientStatusResponse, fidl::Error> {
1358 let _response = fidl::client::decode_transaction_body::<
1359 ClientSmeStatusResponse,
1360 fidl::encoding::DefaultFuchsiaResourceDialect,
1361 0xda00b607470faf2,
1362 >(_buf?)?;
1363 Ok(_response.resp)
1364 }
1365 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ClientStatusResponse>(
1366 (),
1367 0xda00b607470faf2,
1368 fidl::encoding::DynamicFlags::empty(),
1369 _decode,
1370 )
1371 }
1372
1373 type WmmStatusResponseFut = fidl::client::QueryResponseFut<
1374 ClientSmeWmmStatusResult,
1375 fidl::encoding::DefaultFuchsiaResourceDialect,
1376 >;
1377 fn r#wmm_status(&self) -> Self::WmmStatusResponseFut {
1378 fn _decode(
1379 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1380 ) -> Result<ClientSmeWmmStatusResult, fidl::Error> {
1381 let _response = fidl::client::decode_transaction_body::<
1382 fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>,
1383 fidl::encoding::DefaultFuchsiaResourceDialect,
1384 0x3d0ccc75f6baa9e3,
1385 >(_buf?)?;
1386 Ok(_response.map(|x| x.resp))
1387 }
1388 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ClientSmeWmmStatusResult>(
1389 (),
1390 0x3d0ccc75f6baa9e3,
1391 fidl::encoding::DynamicFlags::empty(),
1392 _decode,
1393 )
1394 }
1395
1396 type ScanForControllerResponseFut = fidl::client::QueryResponseFut<
1397 ClientSmeScanForControllerResult,
1398 fidl::encoding::DefaultFuchsiaResourceDialect,
1399 >;
1400 fn r#scan_for_controller(&self, mut req: &ScanRequest) -> Self::ScanForControllerResponseFut {
1401 fn _decode(
1402 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1403 ) -> Result<ClientSmeScanForControllerResult, fidl::Error> {
1404 let _response = fidl::client::decode_transaction_body::<
1405 fidl::encoding::ResultType<ClientSmeScanForControllerResponse, ScanErrorCode>,
1406 fidl::encoding::DefaultFuchsiaResourceDialect,
1407 0x21f00ab22ff79a12,
1408 >(_buf?)?;
1409 Ok(_response.map(|x| x.scan_results))
1410 }
1411 self.client.send_query_and_decode::<
1412 ClientSmeScanForControllerRequest,
1413 ClientSmeScanForControllerResult,
1414 >(
1415 (req,),
1416 0x21f00ab22ff79a12,
1417 fidl::encoding::DynamicFlags::empty(),
1418 _decode,
1419 )
1420 }
1421
1422 type SetMacAddressResponseFut = fidl::client::QueryResponseFut<
1423 ClientSmeSetMacAddressResult,
1424 fidl::encoding::DefaultFuchsiaResourceDialect,
1425 >;
1426 fn r#set_mac_address(&self, mut mac_addr: &[u8; 6]) -> Self::SetMacAddressResponseFut {
1427 fn _decode(
1428 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1429 ) -> Result<ClientSmeSetMacAddressResult, fidl::Error> {
1430 let _response = fidl::client::decode_transaction_body::<
1431 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1432 fidl::encoding::DefaultFuchsiaResourceDialect,
1433 0x13e0a0bee8962f58,
1434 >(_buf?)?;
1435 Ok(_response.map(|x| x))
1436 }
1437 self.client
1438 .send_query_and_decode::<ClientSmeSetMacAddressRequest, ClientSmeSetMacAddressResult>(
1439 (mac_addr,),
1440 0x13e0a0bee8962f58,
1441 fidl::encoding::DynamicFlags::empty(),
1442 _decode,
1443 )
1444 }
1445
1446 type InstallApfPacketFilterResponseFut = fidl::client::QueryResponseFut<
1447 ClientSmeInstallApfPacketFilterResult,
1448 fidl::encoding::DefaultFuchsiaResourceDialect,
1449 >;
1450 fn r#install_apf_packet_filter(
1451 &self,
1452 mut program: &[u8],
1453 ) -> Self::InstallApfPacketFilterResponseFut {
1454 fn _decode(
1455 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1456 ) -> Result<ClientSmeInstallApfPacketFilterResult, fidl::Error> {
1457 let _response = fidl::client::decode_transaction_body::<
1458 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1459 fidl::encoding::DefaultFuchsiaResourceDialect,
1460 0x77435965e7bfaf83,
1461 >(_buf?)?;
1462 Ok(_response.map(|x| x))
1463 }
1464 self.client.send_query_and_decode::<
1465 ClientSmeInstallApfPacketFilterRequest,
1466 ClientSmeInstallApfPacketFilterResult,
1467 >(
1468 (program,),
1469 0x77435965e7bfaf83,
1470 fidl::encoding::DynamicFlags::empty(),
1471 _decode,
1472 )
1473 }
1474
1475 type ReadApfPacketFilterDataResponseFut = fidl::client::QueryResponseFut<
1476 ClientSmeReadApfPacketFilterDataResult,
1477 fidl::encoding::DefaultFuchsiaResourceDialect,
1478 >;
1479 fn r#read_apf_packet_filter_data(&self) -> Self::ReadApfPacketFilterDataResponseFut {
1480 fn _decode(
1481 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1482 ) -> Result<ClientSmeReadApfPacketFilterDataResult, fidl::Error> {
1483 let _response = fidl::client::decode_transaction_body::<
1484 fidl::encoding::ResultType<ClientSmeReadApfPacketFilterDataResponse, i32>,
1485 fidl::encoding::DefaultFuchsiaResourceDialect,
1486 0x66fc6616b9963023,
1487 >(_buf?)?;
1488 Ok(_response.map(|x| x.memory))
1489 }
1490 self.client.send_query_and_decode::<
1491 fidl::encoding::EmptyPayload,
1492 ClientSmeReadApfPacketFilterDataResult,
1493 >(
1494 (),
1495 0x66fc6616b9963023,
1496 fidl::encoding::DynamicFlags::empty(),
1497 _decode,
1498 )
1499 }
1500
1501 type SetApfPacketFilterEnabledResponseFut = fidl::client::QueryResponseFut<
1502 ClientSmeSetApfPacketFilterEnabledResult,
1503 fidl::encoding::DefaultFuchsiaResourceDialect,
1504 >;
1505 fn r#set_apf_packet_filter_enabled(
1506 &self,
1507 mut enabled: bool,
1508 ) -> Self::SetApfPacketFilterEnabledResponseFut {
1509 fn _decode(
1510 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1511 ) -> Result<ClientSmeSetApfPacketFilterEnabledResult, fidl::Error> {
1512 let _response = fidl::client::decode_transaction_body::<
1513 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1514 fidl::encoding::DefaultFuchsiaResourceDialect,
1515 0x5070d2ed31580b81,
1516 >(_buf?)?;
1517 Ok(_response.map(|x| x))
1518 }
1519 self.client.send_query_and_decode::<
1520 ClientSmeSetApfPacketFilterEnabledRequest,
1521 ClientSmeSetApfPacketFilterEnabledResult,
1522 >(
1523 (enabled,),
1524 0x5070d2ed31580b81,
1525 fidl::encoding::DynamicFlags::empty(),
1526 _decode,
1527 )
1528 }
1529
1530 type GetApfPacketFilterEnabledResponseFut = fidl::client::QueryResponseFut<
1531 ClientSmeGetApfPacketFilterEnabledResult,
1532 fidl::encoding::DefaultFuchsiaResourceDialect,
1533 >;
1534 fn r#get_apf_packet_filter_enabled(&self) -> Self::GetApfPacketFilterEnabledResponseFut {
1535 fn _decode(
1536 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1537 ) -> Result<ClientSmeGetApfPacketFilterEnabledResult, fidl::Error> {
1538 let _response = fidl::client::decode_transaction_body::<
1539 fidl::encoding::ResultType<ClientSmeGetApfPacketFilterEnabledResponse, i32>,
1540 fidl::encoding::DefaultFuchsiaResourceDialect,
1541 0xdda5c1533526869,
1542 >(_buf?)?;
1543 Ok(_response.map(|x| x.enabled))
1544 }
1545 self.client.send_query_and_decode::<
1546 fidl::encoding::EmptyPayload,
1547 ClientSmeGetApfPacketFilterEnabledResult,
1548 >(
1549 (),
1550 0xdda5c1533526869,
1551 fidl::encoding::DynamicFlags::empty(),
1552 _decode,
1553 )
1554 }
1555}
1556
1557pub struct ClientSmeEventStream {
1558 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1559}
1560
1561impl std::marker::Unpin for ClientSmeEventStream {}
1562
1563impl futures::stream::FusedStream for ClientSmeEventStream {
1564 fn is_terminated(&self) -> bool {
1565 self.event_receiver.is_terminated()
1566 }
1567}
1568
1569impl futures::Stream for ClientSmeEventStream {
1570 type Item = Result<ClientSmeEvent, fidl::Error>;
1571
1572 fn poll_next(
1573 mut self: std::pin::Pin<&mut Self>,
1574 cx: &mut std::task::Context<'_>,
1575 ) -> std::task::Poll<Option<Self::Item>> {
1576 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1577 &mut self.event_receiver,
1578 cx
1579 )?) {
1580 Some(buf) => std::task::Poll::Ready(Some(ClientSmeEvent::decode(buf))),
1581 None => std::task::Poll::Ready(None),
1582 }
1583 }
1584}
1585
1586#[derive(Debug)]
1587pub enum ClientSmeEvent {}
1588
1589impl ClientSmeEvent {
1590 fn decode(
1592 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1593 ) -> Result<ClientSmeEvent, fidl::Error> {
1594 let (bytes, _handles) = buf.split_mut();
1595 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1596 debug_assert_eq!(tx_header.tx_id, 0);
1597 match tx_header.ordinal {
1598 _ => Err(fidl::Error::UnknownOrdinal {
1599 ordinal: tx_header.ordinal,
1600 protocol_name: <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1601 }),
1602 }
1603 }
1604}
1605
1606pub struct ClientSmeRequestStream {
1608 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1609 is_terminated: bool,
1610}
1611
1612impl std::marker::Unpin for ClientSmeRequestStream {}
1613
1614impl futures::stream::FusedStream for ClientSmeRequestStream {
1615 fn is_terminated(&self) -> bool {
1616 self.is_terminated
1617 }
1618}
1619
1620impl fidl::endpoints::RequestStream for ClientSmeRequestStream {
1621 type Protocol = ClientSmeMarker;
1622 type ControlHandle = ClientSmeControlHandle;
1623
1624 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1625 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1626 }
1627
1628 fn control_handle(&self) -> Self::ControlHandle {
1629 ClientSmeControlHandle { inner: self.inner.clone() }
1630 }
1631
1632 fn into_inner(
1633 self,
1634 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1635 {
1636 (self.inner, self.is_terminated)
1637 }
1638
1639 fn from_inner(
1640 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1641 is_terminated: bool,
1642 ) -> Self {
1643 Self { inner, is_terminated }
1644 }
1645}
1646
1647impl futures::Stream for ClientSmeRequestStream {
1648 type Item = Result<ClientSmeRequest, fidl::Error>;
1649
1650 fn poll_next(
1651 mut self: std::pin::Pin<&mut Self>,
1652 cx: &mut std::task::Context<'_>,
1653 ) -> std::task::Poll<Option<Self::Item>> {
1654 let this = &mut *self;
1655 if this.inner.check_shutdown(cx) {
1656 this.is_terminated = true;
1657 return std::task::Poll::Ready(None);
1658 }
1659 if this.is_terminated {
1660 panic!("polled ClientSmeRequestStream after completion");
1661 }
1662 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1663 |bytes, handles| {
1664 match this.inner.channel().read_etc(cx, bytes, handles) {
1665 std::task::Poll::Ready(Ok(())) => {}
1666 std::task::Poll::Pending => return std::task::Poll::Pending,
1667 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1668 this.is_terminated = true;
1669 return std::task::Poll::Ready(None);
1670 }
1671 std::task::Poll::Ready(Err(e)) => {
1672 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1673 e.into(),
1674 ))));
1675 }
1676 }
1677
1678 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1680
1681 std::task::Poll::Ready(Some(match header.ordinal {
1682 0xded0ce3b1685822 => {
1683 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1684 let mut req = fidl::new_empty!(
1685 ClientSmeScanRequest,
1686 fidl::encoding::DefaultFuchsiaResourceDialect
1687 );
1688 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeScanRequest>(&header, _body_bytes, handles, &mut req)?;
1689 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1690 Ok(ClientSmeRequest::Scan {
1691 req: req.req,
1692
1693 responder: ClientSmeScanResponder {
1694 control_handle: std::mem::ManuallyDrop::new(control_handle),
1695 tx_id: header.tx_id,
1696 },
1697 })
1698 }
1699 0x250a0f6fe9f85351 => {
1700 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1701 let mut req = fidl::new_empty!(
1702 ClientSmeConnectRequest,
1703 fidl::encoding::DefaultFuchsiaResourceDialect
1704 );
1705 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeConnectRequest>(&header, _body_bytes, handles, &mut req)?;
1706 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1707 Ok(ClientSmeRequest::Connect { req: req.req, txn: req.txn, control_handle })
1708 }
1709 0x107ead7d84723921 => {
1710 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1711 let mut req = fidl::new_empty!(
1712 ClientSmeRoamRequest,
1713 fidl::encoding::DefaultFuchsiaResourceDialect
1714 );
1715 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeRoamRequest>(&header, _body_bytes, handles, &mut req)?;
1716 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1717 Ok(ClientSmeRequest::Roam { req: req.req, control_handle })
1718 }
1719 0x39a578de9a107304 => {
1720 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1721 let mut req = fidl::new_empty!(
1722 ClientSmeDisconnectRequest,
1723 fidl::encoding::DefaultFuchsiaResourceDialect
1724 );
1725 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeDisconnectRequest>(&header, _body_bytes, handles, &mut req)?;
1726 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1727 Ok(ClientSmeRequest::Disconnect {
1728 reason: req.reason,
1729
1730 responder: ClientSmeDisconnectResponder {
1731 control_handle: std::mem::ManuallyDrop::new(control_handle),
1732 tx_id: header.tx_id,
1733 },
1734 })
1735 }
1736 0xda00b607470faf2 => {
1737 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1738 let mut req = fidl::new_empty!(
1739 fidl::encoding::EmptyPayload,
1740 fidl::encoding::DefaultFuchsiaResourceDialect
1741 );
1742 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1743 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1744 Ok(ClientSmeRequest::Status {
1745 responder: ClientSmeStatusResponder {
1746 control_handle: std::mem::ManuallyDrop::new(control_handle),
1747 tx_id: header.tx_id,
1748 },
1749 })
1750 }
1751 0x3d0ccc75f6baa9e3 => {
1752 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1753 let mut req = fidl::new_empty!(
1754 fidl::encoding::EmptyPayload,
1755 fidl::encoding::DefaultFuchsiaResourceDialect
1756 );
1757 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1758 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1759 Ok(ClientSmeRequest::WmmStatus {
1760 responder: ClientSmeWmmStatusResponder {
1761 control_handle: std::mem::ManuallyDrop::new(control_handle),
1762 tx_id: header.tx_id,
1763 },
1764 })
1765 }
1766 0x21f00ab22ff79a12 => {
1767 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1768 let mut req = fidl::new_empty!(
1769 ClientSmeScanForControllerRequest,
1770 fidl::encoding::DefaultFuchsiaResourceDialect
1771 );
1772 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeScanForControllerRequest>(&header, _body_bytes, handles, &mut req)?;
1773 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1774 Ok(ClientSmeRequest::ScanForController {
1775 req: req.req,
1776
1777 responder: ClientSmeScanForControllerResponder {
1778 control_handle: std::mem::ManuallyDrop::new(control_handle),
1779 tx_id: header.tx_id,
1780 },
1781 })
1782 }
1783 0x13e0a0bee8962f58 => {
1784 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1785 let mut req = fidl::new_empty!(
1786 ClientSmeSetMacAddressRequest,
1787 fidl::encoding::DefaultFuchsiaResourceDialect
1788 );
1789 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeSetMacAddressRequest>(&header, _body_bytes, handles, &mut req)?;
1790 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1791 Ok(ClientSmeRequest::SetMacAddress {
1792 mac_addr: req.mac_addr,
1793
1794 responder: ClientSmeSetMacAddressResponder {
1795 control_handle: std::mem::ManuallyDrop::new(control_handle),
1796 tx_id: header.tx_id,
1797 },
1798 })
1799 }
1800 0x77435965e7bfaf83 => {
1801 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1802 let mut req = fidl::new_empty!(
1803 ClientSmeInstallApfPacketFilterRequest,
1804 fidl::encoding::DefaultFuchsiaResourceDialect
1805 );
1806 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeInstallApfPacketFilterRequest>(&header, _body_bytes, handles, &mut req)?;
1807 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1808 Ok(ClientSmeRequest::InstallApfPacketFilter {
1809 program: req.program,
1810
1811 responder: ClientSmeInstallApfPacketFilterResponder {
1812 control_handle: std::mem::ManuallyDrop::new(control_handle),
1813 tx_id: header.tx_id,
1814 },
1815 })
1816 }
1817 0x66fc6616b9963023 => {
1818 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1819 let mut req = fidl::new_empty!(
1820 fidl::encoding::EmptyPayload,
1821 fidl::encoding::DefaultFuchsiaResourceDialect
1822 );
1823 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1824 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1825 Ok(ClientSmeRequest::ReadApfPacketFilterData {
1826 responder: ClientSmeReadApfPacketFilterDataResponder {
1827 control_handle: std::mem::ManuallyDrop::new(control_handle),
1828 tx_id: header.tx_id,
1829 },
1830 })
1831 }
1832 0x5070d2ed31580b81 => {
1833 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1834 let mut req = fidl::new_empty!(
1835 ClientSmeSetApfPacketFilterEnabledRequest,
1836 fidl::encoding::DefaultFuchsiaResourceDialect
1837 );
1838 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeSetApfPacketFilterEnabledRequest>(&header, _body_bytes, handles, &mut req)?;
1839 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1840 Ok(ClientSmeRequest::SetApfPacketFilterEnabled {
1841 enabled: req.enabled,
1842
1843 responder: ClientSmeSetApfPacketFilterEnabledResponder {
1844 control_handle: std::mem::ManuallyDrop::new(control_handle),
1845 tx_id: header.tx_id,
1846 },
1847 })
1848 }
1849 0xdda5c1533526869 => {
1850 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1851 let mut req = fidl::new_empty!(
1852 fidl::encoding::EmptyPayload,
1853 fidl::encoding::DefaultFuchsiaResourceDialect
1854 );
1855 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1856 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1857 Ok(ClientSmeRequest::GetApfPacketFilterEnabled {
1858 responder: ClientSmeGetApfPacketFilterEnabledResponder {
1859 control_handle: std::mem::ManuallyDrop::new(control_handle),
1860 tx_id: header.tx_id,
1861 },
1862 })
1863 }
1864 _ => Err(fidl::Error::UnknownOrdinal {
1865 ordinal: header.ordinal,
1866 protocol_name:
1867 <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1868 }),
1869 }))
1870 },
1871 )
1872 }
1873}
1874
1875#[derive(Debug)]
1876pub enum ClientSmeRequest {
1877 Scan {
1878 req: ScanRequest,
1879 responder: ClientSmeScanResponder,
1880 },
1881 Connect {
1882 req: ConnectRequest,
1883 txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1884 control_handle: ClientSmeControlHandle,
1885 },
1886 Roam {
1887 req: RoamRequest,
1888 control_handle: ClientSmeControlHandle,
1889 },
1890 Disconnect {
1891 reason: UserDisconnectReason,
1892 responder: ClientSmeDisconnectResponder,
1893 },
1894 Status {
1895 responder: ClientSmeStatusResponder,
1896 },
1897 WmmStatus {
1898 responder: ClientSmeWmmStatusResponder,
1899 },
1900 ScanForController {
1901 req: ScanRequest,
1902 responder: ClientSmeScanForControllerResponder,
1903 },
1904 SetMacAddress {
1905 mac_addr: [u8; 6],
1906 responder: ClientSmeSetMacAddressResponder,
1907 },
1908 InstallApfPacketFilter {
1909 program: Vec<u8>,
1910 responder: ClientSmeInstallApfPacketFilterResponder,
1911 },
1912 ReadApfPacketFilterData {
1913 responder: ClientSmeReadApfPacketFilterDataResponder,
1914 },
1915 SetApfPacketFilterEnabled {
1916 enabled: bool,
1917 responder: ClientSmeSetApfPacketFilterEnabledResponder,
1918 },
1919 GetApfPacketFilterEnabled {
1920 responder: ClientSmeGetApfPacketFilterEnabledResponder,
1921 },
1922}
1923
1924impl ClientSmeRequest {
1925 #[allow(irrefutable_let_patterns)]
1926 pub fn into_scan(self) -> Option<(ScanRequest, ClientSmeScanResponder)> {
1927 if let ClientSmeRequest::Scan { req, responder } = self {
1928 Some((req, responder))
1929 } else {
1930 None
1931 }
1932 }
1933
1934 #[allow(irrefutable_let_patterns)]
1935 pub fn into_connect(
1936 self,
1937 ) -> Option<(
1938 ConnectRequest,
1939 Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1940 ClientSmeControlHandle,
1941 )> {
1942 if let ClientSmeRequest::Connect { req, txn, control_handle } = self {
1943 Some((req, txn, control_handle))
1944 } else {
1945 None
1946 }
1947 }
1948
1949 #[allow(irrefutable_let_patterns)]
1950 pub fn into_roam(self) -> Option<(RoamRequest, ClientSmeControlHandle)> {
1951 if let ClientSmeRequest::Roam { req, control_handle } = self {
1952 Some((req, control_handle))
1953 } else {
1954 None
1955 }
1956 }
1957
1958 #[allow(irrefutable_let_patterns)]
1959 pub fn into_disconnect(self) -> Option<(UserDisconnectReason, ClientSmeDisconnectResponder)> {
1960 if let ClientSmeRequest::Disconnect { reason, responder } = self {
1961 Some((reason, responder))
1962 } else {
1963 None
1964 }
1965 }
1966
1967 #[allow(irrefutable_let_patterns)]
1968 pub fn into_status(self) -> Option<(ClientSmeStatusResponder)> {
1969 if let ClientSmeRequest::Status { responder } = self { Some((responder)) } else { None }
1970 }
1971
1972 #[allow(irrefutable_let_patterns)]
1973 pub fn into_wmm_status(self) -> Option<(ClientSmeWmmStatusResponder)> {
1974 if let ClientSmeRequest::WmmStatus { responder } = self { Some((responder)) } else { None }
1975 }
1976
1977 #[allow(irrefutable_let_patterns)]
1978 pub fn into_scan_for_controller(
1979 self,
1980 ) -> Option<(ScanRequest, ClientSmeScanForControllerResponder)> {
1981 if let ClientSmeRequest::ScanForController { req, responder } = self {
1982 Some((req, responder))
1983 } else {
1984 None
1985 }
1986 }
1987
1988 #[allow(irrefutable_let_patterns)]
1989 pub fn into_set_mac_address(self) -> Option<([u8; 6], ClientSmeSetMacAddressResponder)> {
1990 if let ClientSmeRequest::SetMacAddress { mac_addr, responder } = self {
1991 Some((mac_addr, responder))
1992 } else {
1993 None
1994 }
1995 }
1996
1997 #[allow(irrefutable_let_patterns)]
1998 pub fn into_install_apf_packet_filter(
1999 self,
2000 ) -> Option<(Vec<u8>, ClientSmeInstallApfPacketFilterResponder)> {
2001 if let ClientSmeRequest::InstallApfPacketFilter { program, responder } = self {
2002 Some((program, responder))
2003 } else {
2004 None
2005 }
2006 }
2007
2008 #[allow(irrefutable_let_patterns)]
2009 pub fn into_read_apf_packet_filter_data(
2010 self,
2011 ) -> Option<(ClientSmeReadApfPacketFilterDataResponder)> {
2012 if let ClientSmeRequest::ReadApfPacketFilterData { responder } = self {
2013 Some((responder))
2014 } else {
2015 None
2016 }
2017 }
2018
2019 #[allow(irrefutable_let_patterns)]
2020 pub fn into_set_apf_packet_filter_enabled(
2021 self,
2022 ) -> Option<(bool, ClientSmeSetApfPacketFilterEnabledResponder)> {
2023 if let ClientSmeRequest::SetApfPacketFilterEnabled { enabled, responder } = self {
2024 Some((enabled, responder))
2025 } else {
2026 None
2027 }
2028 }
2029
2030 #[allow(irrefutable_let_patterns)]
2031 pub fn into_get_apf_packet_filter_enabled(
2032 self,
2033 ) -> Option<(ClientSmeGetApfPacketFilterEnabledResponder)> {
2034 if let ClientSmeRequest::GetApfPacketFilterEnabled { responder } = self {
2035 Some((responder))
2036 } else {
2037 None
2038 }
2039 }
2040
2041 pub fn method_name(&self) -> &'static str {
2043 match *self {
2044 ClientSmeRequest::Scan { .. } => "scan",
2045 ClientSmeRequest::Connect { .. } => "connect",
2046 ClientSmeRequest::Roam { .. } => "roam",
2047 ClientSmeRequest::Disconnect { .. } => "disconnect",
2048 ClientSmeRequest::Status { .. } => "status",
2049 ClientSmeRequest::WmmStatus { .. } => "wmm_status",
2050 ClientSmeRequest::ScanForController { .. } => "scan_for_controller",
2051 ClientSmeRequest::SetMacAddress { .. } => "set_mac_address",
2052 ClientSmeRequest::InstallApfPacketFilter { .. } => "install_apf_packet_filter",
2053 ClientSmeRequest::ReadApfPacketFilterData { .. } => "read_apf_packet_filter_data",
2054 ClientSmeRequest::SetApfPacketFilterEnabled { .. } => "set_apf_packet_filter_enabled",
2055 ClientSmeRequest::GetApfPacketFilterEnabled { .. } => "get_apf_packet_filter_enabled",
2056 }
2057 }
2058}
2059
2060#[derive(Debug, Clone)]
2061pub struct ClientSmeControlHandle {
2062 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2063}
2064
2065impl fidl::endpoints::ControlHandle for ClientSmeControlHandle {
2066 fn shutdown(&self) {
2067 self.inner.shutdown()
2068 }
2069
2070 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2071 self.inner.shutdown_with_epitaph(status)
2072 }
2073
2074 fn is_closed(&self) -> bool {
2075 self.inner.channel().is_closed()
2076 }
2077 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2078 self.inner.channel().on_closed()
2079 }
2080
2081 #[cfg(target_os = "fuchsia")]
2082 fn signal_peer(
2083 &self,
2084 clear_mask: zx::Signals,
2085 set_mask: zx::Signals,
2086 ) -> Result<(), zx_status::Status> {
2087 use fidl::Peered;
2088 self.inner.channel().signal_peer(clear_mask, set_mask)
2089 }
2090}
2091
2092impl ClientSmeControlHandle {}
2093
2094#[must_use = "FIDL methods require a response to be sent"]
2095#[derive(Debug)]
2096pub struct ClientSmeScanResponder {
2097 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2098 tx_id: u32,
2099}
2100
2101impl std::ops::Drop for ClientSmeScanResponder {
2105 fn drop(&mut self) {
2106 self.control_handle.shutdown();
2107 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2109 }
2110}
2111
2112impl fidl::endpoints::Responder for ClientSmeScanResponder {
2113 type ControlHandle = ClientSmeControlHandle;
2114
2115 fn control_handle(&self) -> &ClientSmeControlHandle {
2116 &self.control_handle
2117 }
2118
2119 fn drop_without_shutdown(mut self) {
2120 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2122 std::mem::forget(self);
2124 }
2125}
2126
2127impl ClientSmeScanResponder {
2128 pub fn send(self, mut result: Result<fidl::Vmo, ScanErrorCode>) -> Result<(), fidl::Error> {
2132 let _result = self.send_raw(result);
2133 if _result.is_err() {
2134 self.control_handle.shutdown();
2135 }
2136 self.drop_without_shutdown();
2137 _result
2138 }
2139
2140 pub fn send_no_shutdown_on_err(
2142 self,
2143 mut result: Result<fidl::Vmo, ScanErrorCode>,
2144 ) -> Result<(), fidl::Error> {
2145 let _result = self.send_raw(result);
2146 self.drop_without_shutdown();
2147 _result
2148 }
2149
2150 fn send_raw(&self, mut result: Result<fidl::Vmo, ScanErrorCode>) -> Result<(), fidl::Error> {
2151 self.control_handle
2152 .inner
2153 .send::<fidl::encoding::ResultType<ClientSmeScanResponse, ScanErrorCode>>(
2154 result.map(|scan_results| (scan_results,)),
2155 self.tx_id,
2156 0xded0ce3b1685822,
2157 fidl::encoding::DynamicFlags::empty(),
2158 )
2159 }
2160}
2161
2162#[must_use = "FIDL methods require a response to be sent"]
2163#[derive(Debug)]
2164pub struct ClientSmeDisconnectResponder {
2165 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2166 tx_id: u32,
2167}
2168
2169impl std::ops::Drop for ClientSmeDisconnectResponder {
2173 fn drop(&mut self) {
2174 self.control_handle.shutdown();
2175 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2177 }
2178}
2179
2180impl fidl::endpoints::Responder for ClientSmeDisconnectResponder {
2181 type ControlHandle = ClientSmeControlHandle;
2182
2183 fn control_handle(&self) -> &ClientSmeControlHandle {
2184 &self.control_handle
2185 }
2186
2187 fn drop_without_shutdown(mut self) {
2188 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2190 std::mem::forget(self);
2192 }
2193}
2194
2195impl ClientSmeDisconnectResponder {
2196 pub fn send(self) -> Result<(), fidl::Error> {
2200 let _result = self.send_raw();
2201 if _result.is_err() {
2202 self.control_handle.shutdown();
2203 }
2204 self.drop_without_shutdown();
2205 _result
2206 }
2207
2208 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
2210 let _result = self.send_raw();
2211 self.drop_without_shutdown();
2212 _result
2213 }
2214
2215 fn send_raw(&self) -> Result<(), fidl::Error> {
2216 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
2217 (),
2218 self.tx_id,
2219 0x39a578de9a107304,
2220 fidl::encoding::DynamicFlags::empty(),
2221 )
2222 }
2223}
2224
2225#[must_use = "FIDL methods require a response to be sent"]
2226#[derive(Debug)]
2227pub struct ClientSmeStatusResponder {
2228 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2229 tx_id: u32,
2230}
2231
2232impl std::ops::Drop for ClientSmeStatusResponder {
2236 fn drop(&mut self) {
2237 self.control_handle.shutdown();
2238 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2240 }
2241}
2242
2243impl fidl::endpoints::Responder for ClientSmeStatusResponder {
2244 type ControlHandle = ClientSmeControlHandle;
2245
2246 fn control_handle(&self) -> &ClientSmeControlHandle {
2247 &self.control_handle
2248 }
2249
2250 fn drop_without_shutdown(mut self) {
2251 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2253 std::mem::forget(self);
2255 }
2256}
2257
2258impl ClientSmeStatusResponder {
2259 pub fn send(self, mut resp: &ClientStatusResponse) -> Result<(), fidl::Error> {
2263 let _result = self.send_raw(resp);
2264 if _result.is_err() {
2265 self.control_handle.shutdown();
2266 }
2267 self.drop_without_shutdown();
2268 _result
2269 }
2270
2271 pub fn send_no_shutdown_on_err(
2273 self,
2274 mut resp: &ClientStatusResponse,
2275 ) -> Result<(), fidl::Error> {
2276 let _result = self.send_raw(resp);
2277 self.drop_without_shutdown();
2278 _result
2279 }
2280
2281 fn send_raw(&self, mut resp: &ClientStatusResponse) -> Result<(), fidl::Error> {
2282 self.control_handle.inner.send::<ClientSmeStatusResponse>(
2283 (resp,),
2284 self.tx_id,
2285 0xda00b607470faf2,
2286 fidl::encoding::DynamicFlags::empty(),
2287 )
2288 }
2289}
2290
2291#[must_use = "FIDL methods require a response to be sent"]
2292#[derive(Debug)]
2293pub struct ClientSmeWmmStatusResponder {
2294 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2295 tx_id: u32,
2296}
2297
2298impl std::ops::Drop for ClientSmeWmmStatusResponder {
2302 fn drop(&mut self) {
2303 self.control_handle.shutdown();
2304 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2306 }
2307}
2308
2309impl fidl::endpoints::Responder for ClientSmeWmmStatusResponder {
2310 type ControlHandle = ClientSmeControlHandle;
2311
2312 fn control_handle(&self) -> &ClientSmeControlHandle {
2313 &self.control_handle
2314 }
2315
2316 fn drop_without_shutdown(mut self) {
2317 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2319 std::mem::forget(self);
2321 }
2322}
2323
2324impl ClientSmeWmmStatusResponder {
2325 pub fn send(
2329 self,
2330 mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
2331 ) -> Result<(), fidl::Error> {
2332 let _result = self.send_raw(result);
2333 if _result.is_err() {
2334 self.control_handle.shutdown();
2335 }
2336 self.drop_without_shutdown();
2337 _result
2338 }
2339
2340 pub fn send_no_shutdown_on_err(
2342 self,
2343 mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
2344 ) -> Result<(), fidl::Error> {
2345 let _result = self.send_raw(result);
2346 self.drop_without_shutdown();
2347 _result
2348 }
2349
2350 fn send_raw(
2351 &self,
2352 mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
2353 ) -> Result<(), fidl::Error> {
2354 self.control_handle
2355 .inner
2356 .send::<fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>>(
2357 result.map(|resp| (resp,)),
2358 self.tx_id,
2359 0x3d0ccc75f6baa9e3,
2360 fidl::encoding::DynamicFlags::empty(),
2361 )
2362 }
2363}
2364
2365#[must_use = "FIDL methods require a response to be sent"]
2366#[derive(Debug)]
2367pub struct ClientSmeScanForControllerResponder {
2368 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2369 tx_id: u32,
2370}
2371
2372impl std::ops::Drop for ClientSmeScanForControllerResponder {
2376 fn drop(&mut self) {
2377 self.control_handle.shutdown();
2378 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2380 }
2381}
2382
2383impl fidl::endpoints::Responder for ClientSmeScanForControllerResponder {
2384 type ControlHandle = ClientSmeControlHandle;
2385
2386 fn control_handle(&self) -> &ClientSmeControlHandle {
2387 &self.control_handle
2388 }
2389
2390 fn drop_without_shutdown(mut self) {
2391 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2393 std::mem::forget(self);
2395 }
2396}
2397
2398impl ClientSmeScanForControllerResponder {
2399 pub fn send(self, mut result: Result<&[ScanResult], ScanErrorCode>) -> Result<(), fidl::Error> {
2403 let _result = self.send_raw(result);
2404 if _result.is_err() {
2405 self.control_handle.shutdown();
2406 }
2407 self.drop_without_shutdown();
2408 _result
2409 }
2410
2411 pub fn send_no_shutdown_on_err(
2413 self,
2414 mut result: Result<&[ScanResult], ScanErrorCode>,
2415 ) -> Result<(), fidl::Error> {
2416 let _result = self.send_raw(result);
2417 self.drop_without_shutdown();
2418 _result
2419 }
2420
2421 fn send_raw(
2422 &self,
2423 mut result: Result<&[ScanResult], ScanErrorCode>,
2424 ) -> Result<(), fidl::Error> {
2425 self.control_handle.inner.send::<fidl::encoding::ResultType<
2426 ClientSmeScanForControllerResponse,
2427 ScanErrorCode,
2428 >>(
2429 result.map(|scan_results| (scan_results,)),
2430 self.tx_id,
2431 0x21f00ab22ff79a12,
2432 fidl::encoding::DynamicFlags::empty(),
2433 )
2434 }
2435}
2436
2437#[must_use = "FIDL methods require a response to be sent"]
2438#[derive(Debug)]
2439pub struct ClientSmeSetMacAddressResponder {
2440 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2441 tx_id: u32,
2442}
2443
2444impl std::ops::Drop for ClientSmeSetMacAddressResponder {
2448 fn drop(&mut self) {
2449 self.control_handle.shutdown();
2450 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2452 }
2453}
2454
2455impl fidl::endpoints::Responder for ClientSmeSetMacAddressResponder {
2456 type ControlHandle = ClientSmeControlHandle;
2457
2458 fn control_handle(&self) -> &ClientSmeControlHandle {
2459 &self.control_handle
2460 }
2461
2462 fn drop_without_shutdown(mut self) {
2463 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2465 std::mem::forget(self);
2467 }
2468}
2469
2470impl ClientSmeSetMacAddressResponder {
2471 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2475 let _result = self.send_raw(result);
2476 if _result.is_err() {
2477 self.control_handle.shutdown();
2478 }
2479 self.drop_without_shutdown();
2480 _result
2481 }
2482
2483 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2485 let _result = self.send_raw(result);
2486 self.drop_without_shutdown();
2487 _result
2488 }
2489
2490 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2491 self.control_handle
2492 .inner
2493 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2494 result,
2495 self.tx_id,
2496 0x13e0a0bee8962f58,
2497 fidl::encoding::DynamicFlags::empty(),
2498 )
2499 }
2500}
2501
2502#[must_use = "FIDL methods require a response to be sent"]
2503#[derive(Debug)]
2504pub struct ClientSmeInstallApfPacketFilterResponder {
2505 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2506 tx_id: u32,
2507}
2508
2509impl std::ops::Drop for ClientSmeInstallApfPacketFilterResponder {
2513 fn drop(&mut self) {
2514 self.control_handle.shutdown();
2515 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2517 }
2518}
2519
2520impl fidl::endpoints::Responder for ClientSmeInstallApfPacketFilterResponder {
2521 type ControlHandle = ClientSmeControlHandle;
2522
2523 fn control_handle(&self) -> &ClientSmeControlHandle {
2524 &self.control_handle
2525 }
2526
2527 fn drop_without_shutdown(mut self) {
2528 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2530 std::mem::forget(self);
2532 }
2533}
2534
2535impl ClientSmeInstallApfPacketFilterResponder {
2536 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2540 let _result = self.send_raw(result);
2541 if _result.is_err() {
2542 self.control_handle.shutdown();
2543 }
2544 self.drop_without_shutdown();
2545 _result
2546 }
2547
2548 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2550 let _result = self.send_raw(result);
2551 self.drop_without_shutdown();
2552 _result
2553 }
2554
2555 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2556 self.control_handle
2557 .inner
2558 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2559 result,
2560 self.tx_id,
2561 0x77435965e7bfaf83,
2562 fidl::encoding::DynamicFlags::empty(),
2563 )
2564 }
2565}
2566
2567#[must_use = "FIDL methods require a response to be sent"]
2568#[derive(Debug)]
2569pub struct ClientSmeReadApfPacketFilterDataResponder {
2570 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2571 tx_id: u32,
2572}
2573
2574impl std::ops::Drop for ClientSmeReadApfPacketFilterDataResponder {
2578 fn drop(&mut self) {
2579 self.control_handle.shutdown();
2580 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2582 }
2583}
2584
2585impl fidl::endpoints::Responder for ClientSmeReadApfPacketFilterDataResponder {
2586 type ControlHandle = ClientSmeControlHandle;
2587
2588 fn control_handle(&self) -> &ClientSmeControlHandle {
2589 &self.control_handle
2590 }
2591
2592 fn drop_without_shutdown(mut self) {
2593 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2595 std::mem::forget(self);
2597 }
2598}
2599
2600impl ClientSmeReadApfPacketFilterDataResponder {
2601 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
2605 let _result = self.send_raw(result);
2606 if _result.is_err() {
2607 self.control_handle.shutdown();
2608 }
2609 self.drop_without_shutdown();
2610 _result
2611 }
2612
2613 pub fn send_no_shutdown_on_err(
2615 self,
2616 mut result: Result<&[u8], i32>,
2617 ) -> Result<(), fidl::Error> {
2618 let _result = self.send_raw(result);
2619 self.drop_without_shutdown();
2620 _result
2621 }
2622
2623 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
2624 self.control_handle.inner.send::<fidl::encoding::ResultType<
2625 ClientSmeReadApfPacketFilterDataResponse,
2626 i32,
2627 >>(
2628 result.map(|memory| (memory,)),
2629 self.tx_id,
2630 0x66fc6616b9963023,
2631 fidl::encoding::DynamicFlags::empty(),
2632 )
2633 }
2634}
2635
2636#[must_use = "FIDL methods require a response to be sent"]
2637#[derive(Debug)]
2638pub struct ClientSmeSetApfPacketFilterEnabledResponder {
2639 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2640 tx_id: u32,
2641}
2642
2643impl std::ops::Drop for ClientSmeSetApfPacketFilterEnabledResponder {
2647 fn drop(&mut self) {
2648 self.control_handle.shutdown();
2649 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2651 }
2652}
2653
2654impl fidl::endpoints::Responder for ClientSmeSetApfPacketFilterEnabledResponder {
2655 type ControlHandle = ClientSmeControlHandle;
2656
2657 fn control_handle(&self) -> &ClientSmeControlHandle {
2658 &self.control_handle
2659 }
2660
2661 fn drop_without_shutdown(mut self) {
2662 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2664 std::mem::forget(self);
2666 }
2667}
2668
2669impl ClientSmeSetApfPacketFilterEnabledResponder {
2670 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2674 let _result = self.send_raw(result);
2675 if _result.is_err() {
2676 self.control_handle.shutdown();
2677 }
2678 self.drop_without_shutdown();
2679 _result
2680 }
2681
2682 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2684 let _result = self.send_raw(result);
2685 self.drop_without_shutdown();
2686 _result
2687 }
2688
2689 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2690 self.control_handle
2691 .inner
2692 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2693 result,
2694 self.tx_id,
2695 0x5070d2ed31580b81,
2696 fidl::encoding::DynamicFlags::empty(),
2697 )
2698 }
2699}
2700
2701#[must_use = "FIDL methods require a response to be sent"]
2702#[derive(Debug)]
2703pub struct ClientSmeGetApfPacketFilterEnabledResponder {
2704 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
2705 tx_id: u32,
2706}
2707
2708impl std::ops::Drop for ClientSmeGetApfPacketFilterEnabledResponder {
2712 fn drop(&mut self) {
2713 self.control_handle.shutdown();
2714 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2716 }
2717}
2718
2719impl fidl::endpoints::Responder for ClientSmeGetApfPacketFilterEnabledResponder {
2720 type ControlHandle = ClientSmeControlHandle;
2721
2722 fn control_handle(&self) -> &ClientSmeControlHandle {
2723 &self.control_handle
2724 }
2725
2726 fn drop_without_shutdown(mut self) {
2727 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2729 std::mem::forget(self);
2731 }
2732}
2733
2734impl ClientSmeGetApfPacketFilterEnabledResponder {
2735 pub fn send(self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
2739 let _result = self.send_raw(result);
2740 if _result.is_err() {
2741 self.control_handle.shutdown();
2742 }
2743 self.drop_without_shutdown();
2744 _result
2745 }
2746
2747 pub fn send_no_shutdown_on_err(self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
2749 let _result = self.send_raw(result);
2750 self.drop_without_shutdown();
2751 _result
2752 }
2753
2754 fn send_raw(&self, mut result: Result<bool, i32>) -> Result<(), fidl::Error> {
2755 self.control_handle.inner.send::<fidl::encoding::ResultType<
2756 ClientSmeGetApfPacketFilterEnabledResponse,
2757 i32,
2758 >>(
2759 result.map(|enabled| (enabled,)),
2760 self.tx_id,
2761 0xdda5c1533526869,
2762 fidl::encoding::DynamicFlags::empty(),
2763 )
2764 }
2765}
2766
2767#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2768pub struct ConnectTransactionMarker;
2769
2770impl fidl::endpoints::ProtocolMarker for ConnectTransactionMarker {
2771 type Proxy = ConnectTransactionProxy;
2772 type RequestStream = ConnectTransactionRequestStream;
2773 #[cfg(target_os = "fuchsia")]
2774 type SynchronousProxy = ConnectTransactionSynchronousProxy;
2775
2776 const DEBUG_NAME: &'static str = "(anonymous) ConnectTransaction";
2777}
2778
2779pub trait ConnectTransactionProxyInterface: Send + Sync {}
2780#[derive(Debug)]
2781#[cfg(target_os = "fuchsia")]
2782pub struct ConnectTransactionSynchronousProxy {
2783 client: fidl::client::sync::Client,
2784}
2785
2786#[cfg(target_os = "fuchsia")]
2787impl fidl::endpoints::SynchronousProxy for ConnectTransactionSynchronousProxy {
2788 type Proxy = ConnectTransactionProxy;
2789 type Protocol = ConnectTransactionMarker;
2790
2791 fn from_channel(inner: fidl::Channel) -> Self {
2792 Self::new(inner)
2793 }
2794
2795 fn into_channel(self) -> fidl::Channel {
2796 self.client.into_channel()
2797 }
2798
2799 fn as_channel(&self) -> &fidl::Channel {
2800 self.client.as_channel()
2801 }
2802}
2803
2804#[cfg(target_os = "fuchsia")]
2805impl ConnectTransactionSynchronousProxy {
2806 pub fn new(channel: fidl::Channel) -> Self {
2807 let protocol_name =
2808 <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2809 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2810 }
2811
2812 pub fn into_channel(self) -> fidl::Channel {
2813 self.client.into_channel()
2814 }
2815
2816 pub fn wait_for_event(
2819 &self,
2820 deadline: zx::MonotonicInstant,
2821 ) -> Result<ConnectTransactionEvent, fidl::Error> {
2822 ConnectTransactionEvent::decode(self.client.wait_for_event(deadline)?)
2823 }
2824}
2825
2826#[cfg(target_os = "fuchsia")]
2827impl From<ConnectTransactionSynchronousProxy> for zx::NullableHandle {
2828 fn from(value: ConnectTransactionSynchronousProxy) -> Self {
2829 value.into_channel().into()
2830 }
2831}
2832
2833#[cfg(target_os = "fuchsia")]
2834impl From<fidl::Channel> for ConnectTransactionSynchronousProxy {
2835 fn from(value: fidl::Channel) -> Self {
2836 Self::new(value)
2837 }
2838}
2839
2840#[cfg(target_os = "fuchsia")]
2841impl fidl::endpoints::FromClient for ConnectTransactionSynchronousProxy {
2842 type Protocol = ConnectTransactionMarker;
2843
2844 fn from_client(value: fidl::endpoints::ClientEnd<ConnectTransactionMarker>) -> Self {
2845 Self::new(value.into_channel())
2846 }
2847}
2848
2849#[derive(Debug, Clone)]
2850pub struct ConnectTransactionProxy {
2851 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2852}
2853
2854impl fidl::endpoints::Proxy for ConnectTransactionProxy {
2855 type Protocol = ConnectTransactionMarker;
2856
2857 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2858 Self::new(inner)
2859 }
2860
2861 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2862 self.client.into_channel().map_err(|client| Self { client })
2863 }
2864
2865 fn as_channel(&self) -> &::fidl::AsyncChannel {
2866 self.client.as_channel()
2867 }
2868}
2869
2870impl ConnectTransactionProxy {
2871 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2873 let protocol_name =
2874 <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2875 Self { client: fidl::client::Client::new(channel, protocol_name) }
2876 }
2877
2878 pub fn take_event_stream(&self) -> ConnectTransactionEventStream {
2884 ConnectTransactionEventStream { event_receiver: self.client.take_event_receiver() }
2885 }
2886}
2887
2888impl ConnectTransactionProxyInterface for ConnectTransactionProxy {}
2889
2890pub struct ConnectTransactionEventStream {
2891 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2892}
2893
2894impl std::marker::Unpin for ConnectTransactionEventStream {}
2895
2896impl futures::stream::FusedStream for ConnectTransactionEventStream {
2897 fn is_terminated(&self) -> bool {
2898 self.event_receiver.is_terminated()
2899 }
2900}
2901
2902impl futures::Stream for ConnectTransactionEventStream {
2903 type Item = Result<ConnectTransactionEvent, fidl::Error>;
2904
2905 fn poll_next(
2906 mut self: std::pin::Pin<&mut Self>,
2907 cx: &mut std::task::Context<'_>,
2908 ) -> std::task::Poll<Option<Self::Item>> {
2909 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2910 &mut self.event_receiver,
2911 cx
2912 )?) {
2913 Some(buf) => std::task::Poll::Ready(Some(ConnectTransactionEvent::decode(buf))),
2914 None => std::task::Poll::Ready(None),
2915 }
2916 }
2917}
2918
2919#[derive(Debug)]
2920pub enum ConnectTransactionEvent {
2921 OnConnectResult { result: ConnectResult },
2922 OnDisconnect { info: DisconnectInfo },
2923 OnRoamResult { result: RoamResult },
2924 OnSignalReport { ind: fidl_fuchsia_wlan_internal::SignalReportIndication },
2925 OnChannelSwitched { info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo },
2926}
2927
2928impl ConnectTransactionEvent {
2929 #[allow(irrefutable_let_patterns)]
2930 pub fn into_on_connect_result(self) -> Option<ConnectResult> {
2931 if let ConnectTransactionEvent::OnConnectResult { result } = self {
2932 Some((result))
2933 } else {
2934 None
2935 }
2936 }
2937 #[allow(irrefutable_let_patterns)]
2938 pub fn into_on_disconnect(self) -> Option<DisconnectInfo> {
2939 if let ConnectTransactionEvent::OnDisconnect { info } = self { Some((info)) } else { None }
2940 }
2941 #[allow(irrefutable_let_patterns)]
2942 pub fn into_on_roam_result(self) -> Option<RoamResult> {
2943 if let ConnectTransactionEvent::OnRoamResult { result } = self {
2944 Some((result))
2945 } else {
2946 None
2947 }
2948 }
2949 #[allow(irrefutable_let_patterns)]
2950 pub fn into_on_signal_report(
2951 self,
2952 ) -> Option<fidl_fuchsia_wlan_internal::SignalReportIndication> {
2953 if let ConnectTransactionEvent::OnSignalReport { ind } = self { Some((ind)) } else { None }
2954 }
2955 #[allow(irrefutable_let_patterns)]
2956 pub fn into_on_channel_switched(self) -> Option<fidl_fuchsia_wlan_internal::ChannelSwitchInfo> {
2957 if let ConnectTransactionEvent::OnChannelSwitched { info } = self {
2958 Some((info))
2959 } else {
2960 None
2961 }
2962 }
2963
2964 fn decode(
2966 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2967 ) -> Result<ConnectTransactionEvent, fidl::Error> {
2968 let (bytes, _handles) = buf.split_mut();
2969 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2970 debug_assert_eq!(tx_header.tx_id, 0);
2971 match tx_header.ordinal {
2972 0x48d2cf407da489a7 => {
2973 let mut out = fidl::new_empty!(
2974 ConnectTransactionOnConnectResultRequest,
2975 fidl::encoding::DefaultFuchsiaResourceDialect
2976 );
2977 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnConnectResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2978 Ok((ConnectTransactionEvent::OnConnectResult { result: out.result }))
2979 }
2980 0x40dea7b1449cc733 => {
2981 let mut out = fidl::new_empty!(
2982 ConnectTransactionOnDisconnectRequest,
2983 fidl::encoding::DefaultFuchsiaResourceDialect
2984 );
2985 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnDisconnectRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2986 Ok((ConnectTransactionEvent::OnDisconnect { info: out.info }))
2987 }
2988 0x656267da4ccf2a41 => {
2989 let mut out = fidl::new_empty!(
2990 ConnectTransactionOnRoamResultRequest,
2991 fidl::encoding::DefaultFuchsiaResourceDialect
2992 );
2993 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnRoamResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2994 Ok((ConnectTransactionEvent::OnRoamResult { result: out.result }))
2995 }
2996 0x5e968bd5e267e262 => {
2997 let mut out = fidl::new_empty!(
2998 ConnectTransactionOnSignalReportRequest,
2999 fidl::encoding::DefaultFuchsiaResourceDialect
3000 );
3001 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnSignalReportRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3002 Ok((ConnectTransactionEvent::OnSignalReport { ind: out.ind }))
3003 }
3004 0x5f5153778cd70512 => {
3005 let mut out = fidl::new_empty!(
3006 ConnectTransactionOnChannelSwitchedRequest,
3007 fidl::encoding::DefaultFuchsiaResourceDialect
3008 );
3009 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnChannelSwitchedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3010 Ok((ConnectTransactionEvent::OnChannelSwitched { info: out.info }))
3011 }
3012 _ => Err(fidl::Error::UnknownOrdinal {
3013 ordinal: tx_header.ordinal,
3014 protocol_name:
3015 <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3016 }),
3017 }
3018 }
3019}
3020
3021pub struct ConnectTransactionRequestStream {
3023 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3024 is_terminated: bool,
3025}
3026
3027impl std::marker::Unpin for ConnectTransactionRequestStream {}
3028
3029impl futures::stream::FusedStream for ConnectTransactionRequestStream {
3030 fn is_terminated(&self) -> bool {
3031 self.is_terminated
3032 }
3033}
3034
3035impl fidl::endpoints::RequestStream for ConnectTransactionRequestStream {
3036 type Protocol = ConnectTransactionMarker;
3037 type ControlHandle = ConnectTransactionControlHandle;
3038
3039 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3040 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3041 }
3042
3043 fn control_handle(&self) -> Self::ControlHandle {
3044 ConnectTransactionControlHandle { inner: self.inner.clone() }
3045 }
3046
3047 fn into_inner(
3048 self,
3049 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3050 {
3051 (self.inner, self.is_terminated)
3052 }
3053
3054 fn from_inner(
3055 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3056 is_terminated: bool,
3057 ) -> Self {
3058 Self { inner, is_terminated }
3059 }
3060}
3061
3062impl futures::Stream for ConnectTransactionRequestStream {
3063 type Item = Result<ConnectTransactionRequest, fidl::Error>;
3064
3065 fn poll_next(
3066 mut self: std::pin::Pin<&mut Self>,
3067 cx: &mut std::task::Context<'_>,
3068 ) -> std::task::Poll<Option<Self::Item>> {
3069 let this = &mut *self;
3070 if this.inner.check_shutdown(cx) {
3071 this.is_terminated = true;
3072 return std::task::Poll::Ready(None);
3073 }
3074 if this.is_terminated {
3075 panic!("polled ConnectTransactionRequestStream after completion");
3076 }
3077 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3078 |bytes, handles| {
3079 match this.inner.channel().read_etc(cx, bytes, handles) {
3080 std::task::Poll::Ready(Ok(())) => {}
3081 std::task::Poll::Pending => return std::task::Poll::Pending,
3082 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3083 this.is_terminated = true;
3084 return std::task::Poll::Ready(None);
3085 }
3086 std::task::Poll::Ready(Err(e)) => {
3087 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3088 e.into(),
3089 ))));
3090 }
3091 }
3092
3093 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3095
3096 std::task::Poll::Ready(Some(match header.ordinal {
3097 _ => Err(fidl::Error::UnknownOrdinal {
3098 ordinal: header.ordinal,
3099 protocol_name: <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3100 }),
3101 }))
3102 },
3103 )
3104 }
3105}
3106
3107#[derive(Debug)]
3108pub enum ConnectTransactionRequest {}
3109
3110impl ConnectTransactionRequest {
3111 pub fn method_name(&self) -> &'static str {
3113 match *self {}
3114 }
3115}
3116
3117#[derive(Debug, Clone)]
3118pub struct ConnectTransactionControlHandle {
3119 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3120}
3121
3122impl fidl::endpoints::ControlHandle for ConnectTransactionControlHandle {
3123 fn shutdown(&self) {
3124 self.inner.shutdown()
3125 }
3126
3127 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3128 self.inner.shutdown_with_epitaph(status)
3129 }
3130
3131 fn is_closed(&self) -> bool {
3132 self.inner.channel().is_closed()
3133 }
3134 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3135 self.inner.channel().on_closed()
3136 }
3137
3138 #[cfg(target_os = "fuchsia")]
3139 fn signal_peer(
3140 &self,
3141 clear_mask: zx::Signals,
3142 set_mask: zx::Signals,
3143 ) -> Result<(), zx_status::Status> {
3144 use fidl::Peered;
3145 self.inner.channel().signal_peer(clear_mask, set_mask)
3146 }
3147}
3148
3149impl ConnectTransactionControlHandle {
3150 pub fn send_on_connect_result(&self, mut result: &ConnectResult) -> Result<(), fidl::Error> {
3151 self.inner.send::<ConnectTransactionOnConnectResultRequest>(
3152 (result,),
3153 0,
3154 0x48d2cf407da489a7,
3155 fidl::encoding::DynamicFlags::empty(),
3156 )
3157 }
3158
3159 pub fn send_on_disconnect(&self, mut info: &DisconnectInfo) -> Result<(), fidl::Error> {
3160 self.inner.send::<ConnectTransactionOnDisconnectRequest>(
3161 (info,),
3162 0,
3163 0x40dea7b1449cc733,
3164 fidl::encoding::DynamicFlags::empty(),
3165 )
3166 }
3167
3168 pub fn send_on_roam_result(&self, mut result: &RoamResult) -> Result<(), fidl::Error> {
3169 self.inner.send::<ConnectTransactionOnRoamResultRequest>(
3170 (result,),
3171 0,
3172 0x656267da4ccf2a41,
3173 fidl::encoding::DynamicFlags::empty(),
3174 )
3175 }
3176
3177 pub fn send_on_signal_report(
3178 &self,
3179 mut ind: &fidl_fuchsia_wlan_internal::SignalReportIndication,
3180 ) -> Result<(), fidl::Error> {
3181 self.inner.send::<ConnectTransactionOnSignalReportRequest>(
3182 (ind,),
3183 0,
3184 0x5e968bd5e267e262,
3185 fidl::encoding::DynamicFlags::empty(),
3186 )
3187 }
3188
3189 pub fn send_on_channel_switched(
3190 &self,
3191 mut info: &fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
3192 ) -> Result<(), fidl::Error> {
3193 self.inner.send::<ConnectTransactionOnChannelSwitchedRequest>(
3194 (info,),
3195 0,
3196 0x5f5153778cd70512,
3197 fidl::encoding::DynamicFlags::empty(),
3198 )
3199 }
3200}
3201
3202#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3203pub struct GenericSmeMarker;
3204
3205impl fidl::endpoints::ProtocolMarker for GenericSmeMarker {
3206 type Proxy = GenericSmeProxy;
3207 type RequestStream = GenericSmeRequestStream;
3208 #[cfg(target_os = "fuchsia")]
3209 type SynchronousProxy = GenericSmeSynchronousProxy;
3210
3211 const DEBUG_NAME: &'static str = "(anonymous) GenericSme";
3212}
3213pub type GenericSmeQueryIfaceCapabilitiesResult =
3214 Result<fidl_fuchsia_wlan_common::ApfPacketFilterSupport, i32>;
3215pub type GenericSmeGetClientSmeResult = Result<(), i32>;
3216pub type GenericSmeGetApSmeResult = Result<(), i32>;
3217pub type GenericSmeGetSmeTelemetryResult = Result<(), i32>;
3218
3219pub trait GenericSmeProxyInterface: Send + Sync {
3220 type QueryResponseFut: std::future::Future<Output = Result<GenericSmeQuery, fidl::Error>> + Send;
3221 fn r#query(&self) -> Self::QueryResponseFut;
3222 type QueryIfaceCapabilitiesResponseFut: std::future::Future<Output = Result<GenericSmeQueryIfaceCapabilitiesResult, fidl::Error>>
3223 + Send;
3224 fn r#query_iface_capabilities(&self) -> Self::QueryIfaceCapabilitiesResponseFut;
3225 type GetClientSmeResponseFut: std::future::Future<Output = Result<GenericSmeGetClientSmeResult, fidl::Error>>
3226 + Send;
3227 fn r#get_client_sme(
3228 &self,
3229 sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
3230 ) -> Self::GetClientSmeResponseFut;
3231 type GetApSmeResponseFut: std::future::Future<Output = Result<GenericSmeGetApSmeResult, fidl::Error>>
3232 + Send;
3233 fn r#get_ap_sme(
3234 &self,
3235 sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
3236 ) -> Self::GetApSmeResponseFut;
3237 type GetSmeTelemetryResponseFut: std::future::Future<Output = Result<GenericSmeGetSmeTelemetryResult, fidl::Error>>
3238 + Send;
3239 fn r#get_sme_telemetry(
3240 &self,
3241 telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
3242 ) -> Self::GetSmeTelemetryResponseFut;
3243}
3244#[derive(Debug)]
3245#[cfg(target_os = "fuchsia")]
3246pub struct GenericSmeSynchronousProxy {
3247 client: fidl::client::sync::Client,
3248}
3249
3250#[cfg(target_os = "fuchsia")]
3251impl fidl::endpoints::SynchronousProxy for GenericSmeSynchronousProxy {
3252 type Proxy = GenericSmeProxy;
3253 type Protocol = GenericSmeMarker;
3254
3255 fn from_channel(inner: fidl::Channel) -> Self {
3256 Self::new(inner)
3257 }
3258
3259 fn into_channel(self) -> fidl::Channel {
3260 self.client.into_channel()
3261 }
3262
3263 fn as_channel(&self) -> &fidl::Channel {
3264 self.client.as_channel()
3265 }
3266}
3267
3268#[cfg(target_os = "fuchsia")]
3269impl GenericSmeSynchronousProxy {
3270 pub fn new(channel: fidl::Channel) -> Self {
3271 let protocol_name = <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3272 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3273 }
3274
3275 pub fn into_channel(self) -> fidl::Channel {
3276 self.client.into_channel()
3277 }
3278
3279 pub fn wait_for_event(
3282 &self,
3283 deadline: zx::MonotonicInstant,
3284 ) -> Result<GenericSmeEvent, fidl::Error> {
3285 GenericSmeEvent::decode(self.client.wait_for_event(deadline)?)
3286 }
3287
3288 pub fn r#query(
3292 &self,
3293 ___deadline: zx::MonotonicInstant,
3294 ) -> Result<GenericSmeQuery, fidl::Error> {
3295 let _response =
3296 self.client.send_query::<fidl::encoding::EmptyPayload, GenericSmeQueryResponse>(
3297 (),
3298 0x6ef4a820c153e249,
3299 fidl::encoding::DynamicFlags::empty(),
3300 ___deadline,
3301 )?;
3302 Ok(_response.resp)
3303 }
3304
3305 pub fn r#query_iface_capabilities(
3307 &self,
3308 ___deadline: zx::MonotonicInstant,
3309 ) -> Result<GenericSmeQueryIfaceCapabilitiesResult, fidl::Error> {
3310 let _response = self.client.send_query::<
3311 fidl::encoding::EmptyPayload,
3312 fidl::encoding::ResultType<GenericSmeQueryIfaceCapabilitiesResponse, i32>,
3313 >(
3314 (),
3315 0x2f483964e794fbba,
3316 fidl::encoding::DynamicFlags::empty(),
3317 ___deadline,
3318 )?;
3319 Ok(_response.map(|x| x.apf_support))
3320 }
3321
3322 pub fn r#get_client_sme(
3329 &self,
3330 mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
3331 ___deadline: zx::MonotonicInstant,
3332 ) -> Result<GenericSmeGetClientSmeResult, fidl::Error> {
3333 let _response = self.client.send_query::<
3334 GenericSmeGetClientSmeRequest,
3335 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3336 >(
3337 (sme_server,),
3338 0x2439ad714c642f15,
3339 fidl::encoding::DynamicFlags::empty(),
3340 ___deadline,
3341 )?;
3342 Ok(_response.map(|x| x))
3343 }
3344
3345 pub fn r#get_ap_sme(
3352 &self,
3353 mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
3354 ___deadline: zx::MonotonicInstant,
3355 ) -> Result<GenericSmeGetApSmeResult, fidl::Error> {
3356 let _response = self.client.send_query::<
3357 GenericSmeGetApSmeRequest,
3358 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3359 >(
3360 (sme_server,),
3361 0x4d2a40be2b44ad6c,
3362 fidl::encoding::DynamicFlags::empty(),
3363 ___deadline,
3364 )?;
3365 Ok(_response.map(|x| x))
3366 }
3367
3368 pub fn r#get_sme_telemetry(
3376 &self,
3377 mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
3378 ___deadline: zx::MonotonicInstant,
3379 ) -> Result<GenericSmeGetSmeTelemetryResult, fidl::Error> {
3380 let _response = self.client.send_query::<
3381 GenericSmeGetSmeTelemetryRequest,
3382 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3383 >(
3384 (telemetry_server,),
3385 0x7ea015b3060fa,
3386 fidl::encoding::DynamicFlags::empty(),
3387 ___deadline,
3388 )?;
3389 Ok(_response.map(|x| x))
3390 }
3391}
3392
3393#[cfg(target_os = "fuchsia")]
3394impl From<GenericSmeSynchronousProxy> for zx::NullableHandle {
3395 fn from(value: GenericSmeSynchronousProxy) -> Self {
3396 value.into_channel().into()
3397 }
3398}
3399
3400#[cfg(target_os = "fuchsia")]
3401impl From<fidl::Channel> for GenericSmeSynchronousProxy {
3402 fn from(value: fidl::Channel) -> Self {
3403 Self::new(value)
3404 }
3405}
3406
3407#[cfg(target_os = "fuchsia")]
3408impl fidl::endpoints::FromClient for GenericSmeSynchronousProxy {
3409 type Protocol = GenericSmeMarker;
3410
3411 fn from_client(value: fidl::endpoints::ClientEnd<GenericSmeMarker>) -> Self {
3412 Self::new(value.into_channel())
3413 }
3414}
3415
3416#[derive(Debug, Clone)]
3417pub struct GenericSmeProxy {
3418 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3419}
3420
3421impl fidl::endpoints::Proxy for GenericSmeProxy {
3422 type Protocol = GenericSmeMarker;
3423
3424 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3425 Self::new(inner)
3426 }
3427
3428 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3429 self.client.into_channel().map_err(|client| Self { client })
3430 }
3431
3432 fn as_channel(&self) -> &::fidl::AsyncChannel {
3433 self.client.as_channel()
3434 }
3435}
3436
3437impl GenericSmeProxy {
3438 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3440 let protocol_name = <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3441 Self { client: fidl::client::Client::new(channel, protocol_name) }
3442 }
3443
3444 pub fn take_event_stream(&self) -> GenericSmeEventStream {
3450 GenericSmeEventStream { event_receiver: self.client.take_event_receiver() }
3451 }
3452
3453 pub fn r#query(
3457 &self,
3458 ) -> fidl::client::QueryResponseFut<
3459 GenericSmeQuery,
3460 fidl::encoding::DefaultFuchsiaResourceDialect,
3461 > {
3462 GenericSmeProxyInterface::r#query(self)
3463 }
3464
3465 pub fn r#query_iface_capabilities(
3467 &self,
3468 ) -> fidl::client::QueryResponseFut<
3469 GenericSmeQueryIfaceCapabilitiesResult,
3470 fidl::encoding::DefaultFuchsiaResourceDialect,
3471 > {
3472 GenericSmeProxyInterface::r#query_iface_capabilities(self)
3473 }
3474
3475 pub fn r#get_client_sme(
3482 &self,
3483 mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
3484 ) -> fidl::client::QueryResponseFut<
3485 GenericSmeGetClientSmeResult,
3486 fidl::encoding::DefaultFuchsiaResourceDialect,
3487 > {
3488 GenericSmeProxyInterface::r#get_client_sme(self, sme_server)
3489 }
3490
3491 pub fn r#get_ap_sme(
3498 &self,
3499 mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
3500 ) -> fidl::client::QueryResponseFut<
3501 GenericSmeGetApSmeResult,
3502 fidl::encoding::DefaultFuchsiaResourceDialect,
3503 > {
3504 GenericSmeProxyInterface::r#get_ap_sme(self, sme_server)
3505 }
3506
3507 pub fn r#get_sme_telemetry(
3515 &self,
3516 mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
3517 ) -> fidl::client::QueryResponseFut<
3518 GenericSmeGetSmeTelemetryResult,
3519 fidl::encoding::DefaultFuchsiaResourceDialect,
3520 > {
3521 GenericSmeProxyInterface::r#get_sme_telemetry(self, telemetry_server)
3522 }
3523}
3524
3525impl GenericSmeProxyInterface for GenericSmeProxy {
3526 type QueryResponseFut = fidl::client::QueryResponseFut<
3527 GenericSmeQuery,
3528 fidl::encoding::DefaultFuchsiaResourceDialect,
3529 >;
3530 fn r#query(&self) -> Self::QueryResponseFut {
3531 fn _decode(
3532 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3533 ) -> Result<GenericSmeQuery, fidl::Error> {
3534 let _response = fidl::client::decode_transaction_body::<
3535 GenericSmeQueryResponse,
3536 fidl::encoding::DefaultFuchsiaResourceDialect,
3537 0x6ef4a820c153e249,
3538 >(_buf?)?;
3539 Ok(_response.resp)
3540 }
3541 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, GenericSmeQuery>(
3542 (),
3543 0x6ef4a820c153e249,
3544 fidl::encoding::DynamicFlags::empty(),
3545 _decode,
3546 )
3547 }
3548
3549 type QueryIfaceCapabilitiesResponseFut = fidl::client::QueryResponseFut<
3550 GenericSmeQueryIfaceCapabilitiesResult,
3551 fidl::encoding::DefaultFuchsiaResourceDialect,
3552 >;
3553 fn r#query_iface_capabilities(&self) -> Self::QueryIfaceCapabilitiesResponseFut {
3554 fn _decode(
3555 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3556 ) -> Result<GenericSmeQueryIfaceCapabilitiesResult, fidl::Error> {
3557 let _response = fidl::client::decode_transaction_body::<
3558 fidl::encoding::ResultType<GenericSmeQueryIfaceCapabilitiesResponse, i32>,
3559 fidl::encoding::DefaultFuchsiaResourceDialect,
3560 0x2f483964e794fbba,
3561 >(_buf?)?;
3562 Ok(_response.map(|x| x.apf_support))
3563 }
3564 self.client.send_query_and_decode::<
3565 fidl::encoding::EmptyPayload,
3566 GenericSmeQueryIfaceCapabilitiesResult,
3567 >(
3568 (),
3569 0x2f483964e794fbba,
3570 fidl::encoding::DynamicFlags::empty(),
3571 _decode,
3572 )
3573 }
3574
3575 type GetClientSmeResponseFut = fidl::client::QueryResponseFut<
3576 GenericSmeGetClientSmeResult,
3577 fidl::encoding::DefaultFuchsiaResourceDialect,
3578 >;
3579 fn r#get_client_sme(
3580 &self,
3581 mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
3582 ) -> Self::GetClientSmeResponseFut {
3583 fn _decode(
3584 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3585 ) -> Result<GenericSmeGetClientSmeResult, fidl::Error> {
3586 let _response = fidl::client::decode_transaction_body::<
3587 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3588 fidl::encoding::DefaultFuchsiaResourceDialect,
3589 0x2439ad714c642f15,
3590 >(_buf?)?;
3591 Ok(_response.map(|x| x))
3592 }
3593 self.client
3594 .send_query_and_decode::<GenericSmeGetClientSmeRequest, GenericSmeGetClientSmeResult>(
3595 (sme_server,),
3596 0x2439ad714c642f15,
3597 fidl::encoding::DynamicFlags::empty(),
3598 _decode,
3599 )
3600 }
3601
3602 type GetApSmeResponseFut = fidl::client::QueryResponseFut<
3603 GenericSmeGetApSmeResult,
3604 fidl::encoding::DefaultFuchsiaResourceDialect,
3605 >;
3606 fn r#get_ap_sme(
3607 &self,
3608 mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
3609 ) -> Self::GetApSmeResponseFut {
3610 fn _decode(
3611 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3612 ) -> Result<GenericSmeGetApSmeResult, fidl::Error> {
3613 let _response = fidl::client::decode_transaction_body::<
3614 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3615 fidl::encoding::DefaultFuchsiaResourceDialect,
3616 0x4d2a40be2b44ad6c,
3617 >(_buf?)?;
3618 Ok(_response.map(|x| x))
3619 }
3620 self.client.send_query_and_decode::<GenericSmeGetApSmeRequest, GenericSmeGetApSmeResult>(
3621 (sme_server,),
3622 0x4d2a40be2b44ad6c,
3623 fidl::encoding::DynamicFlags::empty(),
3624 _decode,
3625 )
3626 }
3627
3628 type GetSmeTelemetryResponseFut = fidl::client::QueryResponseFut<
3629 GenericSmeGetSmeTelemetryResult,
3630 fidl::encoding::DefaultFuchsiaResourceDialect,
3631 >;
3632 fn r#get_sme_telemetry(
3633 &self,
3634 mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
3635 ) -> Self::GetSmeTelemetryResponseFut {
3636 fn _decode(
3637 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3638 ) -> Result<GenericSmeGetSmeTelemetryResult, fidl::Error> {
3639 let _response = fidl::client::decode_transaction_body::<
3640 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3641 fidl::encoding::DefaultFuchsiaResourceDialect,
3642 0x7ea015b3060fa,
3643 >(_buf?)?;
3644 Ok(_response.map(|x| x))
3645 }
3646 self.client.send_query_and_decode::<
3647 GenericSmeGetSmeTelemetryRequest,
3648 GenericSmeGetSmeTelemetryResult,
3649 >(
3650 (telemetry_server,),
3651 0x7ea015b3060fa,
3652 fidl::encoding::DynamicFlags::empty(),
3653 _decode,
3654 )
3655 }
3656}
3657
3658pub struct GenericSmeEventStream {
3659 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3660}
3661
3662impl std::marker::Unpin for GenericSmeEventStream {}
3663
3664impl futures::stream::FusedStream for GenericSmeEventStream {
3665 fn is_terminated(&self) -> bool {
3666 self.event_receiver.is_terminated()
3667 }
3668}
3669
3670impl futures::Stream for GenericSmeEventStream {
3671 type Item = Result<GenericSmeEvent, fidl::Error>;
3672
3673 fn poll_next(
3674 mut self: std::pin::Pin<&mut Self>,
3675 cx: &mut std::task::Context<'_>,
3676 ) -> std::task::Poll<Option<Self::Item>> {
3677 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3678 &mut self.event_receiver,
3679 cx
3680 )?) {
3681 Some(buf) => std::task::Poll::Ready(Some(GenericSmeEvent::decode(buf))),
3682 None => std::task::Poll::Ready(None),
3683 }
3684 }
3685}
3686
3687#[derive(Debug)]
3688pub enum GenericSmeEvent {}
3689
3690impl GenericSmeEvent {
3691 fn decode(
3693 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3694 ) -> Result<GenericSmeEvent, fidl::Error> {
3695 let (bytes, _handles) = buf.split_mut();
3696 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3697 debug_assert_eq!(tx_header.tx_id, 0);
3698 match tx_header.ordinal {
3699 _ => Err(fidl::Error::UnknownOrdinal {
3700 ordinal: tx_header.ordinal,
3701 protocol_name: <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3702 }),
3703 }
3704 }
3705}
3706
3707pub struct GenericSmeRequestStream {
3709 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3710 is_terminated: bool,
3711}
3712
3713impl std::marker::Unpin for GenericSmeRequestStream {}
3714
3715impl futures::stream::FusedStream for GenericSmeRequestStream {
3716 fn is_terminated(&self) -> bool {
3717 self.is_terminated
3718 }
3719}
3720
3721impl fidl::endpoints::RequestStream for GenericSmeRequestStream {
3722 type Protocol = GenericSmeMarker;
3723 type ControlHandle = GenericSmeControlHandle;
3724
3725 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3726 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3727 }
3728
3729 fn control_handle(&self) -> Self::ControlHandle {
3730 GenericSmeControlHandle { inner: self.inner.clone() }
3731 }
3732
3733 fn into_inner(
3734 self,
3735 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3736 {
3737 (self.inner, self.is_terminated)
3738 }
3739
3740 fn from_inner(
3741 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3742 is_terminated: bool,
3743 ) -> Self {
3744 Self { inner, is_terminated }
3745 }
3746}
3747
3748impl futures::Stream for GenericSmeRequestStream {
3749 type Item = Result<GenericSmeRequest, fidl::Error>;
3750
3751 fn poll_next(
3752 mut self: std::pin::Pin<&mut Self>,
3753 cx: &mut std::task::Context<'_>,
3754 ) -> std::task::Poll<Option<Self::Item>> {
3755 let this = &mut *self;
3756 if this.inner.check_shutdown(cx) {
3757 this.is_terminated = true;
3758 return std::task::Poll::Ready(None);
3759 }
3760 if this.is_terminated {
3761 panic!("polled GenericSmeRequestStream after completion");
3762 }
3763 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3764 |bytes, handles| {
3765 match this.inner.channel().read_etc(cx, bytes, handles) {
3766 std::task::Poll::Ready(Ok(())) => {}
3767 std::task::Poll::Pending => return std::task::Poll::Pending,
3768 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3769 this.is_terminated = true;
3770 return std::task::Poll::Ready(None);
3771 }
3772 std::task::Poll::Ready(Err(e)) => {
3773 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3774 e.into(),
3775 ))));
3776 }
3777 }
3778
3779 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3781
3782 std::task::Poll::Ready(Some(match header.ordinal {
3783 0x6ef4a820c153e249 => {
3784 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3785 let mut req = fidl::new_empty!(
3786 fidl::encoding::EmptyPayload,
3787 fidl::encoding::DefaultFuchsiaResourceDialect
3788 );
3789 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3790 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
3791 Ok(GenericSmeRequest::Query {
3792 responder: GenericSmeQueryResponder {
3793 control_handle: std::mem::ManuallyDrop::new(control_handle),
3794 tx_id: header.tx_id,
3795 },
3796 })
3797 }
3798 0x2f483964e794fbba => {
3799 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3800 let mut req = fidl::new_empty!(
3801 fidl::encoding::EmptyPayload,
3802 fidl::encoding::DefaultFuchsiaResourceDialect
3803 );
3804 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3805 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
3806 Ok(GenericSmeRequest::QueryIfaceCapabilities {
3807 responder: GenericSmeQueryIfaceCapabilitiesResponder {
3808 control_handle: std::mem::ManuallyDrop::new(control_handle),
3809 tx_id: header.tx_id,
3810 },
3811 })
3812 }
3813 0x2439ad714c642f15 => {
3814 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3815 let mut req = fidl::new_empty!(
3816 GenericSmeGetClientSmeRequest,
3817 fidl::encoding::DefaultFuchsiaResourceDialect
3818 );
3819 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetClientSmeRequest>(&header, _body_bytes, handles, &mut req)?;
3820 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
3821 Ok(GenericSmeRequest::GetClientSme {
3822 sme_server: req.sme_server,
3823
3824 responder: GenericSmeGetClientSmeResponder {
3825 control_handle: std::mem::ManuallyDrop::new(control_handle),
3826 tx_id: header.tx_id,
3827 },
3828 })
3829 }
3830 0x4d2a40be2b44ad6c => {
3831 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3832 let mut req = fidl::new_empty!(
3833 GenericSmeGetApSmeRequest,
3834 fidl::encoding::DefaultFuchsiaResourceDialect
3835 );
3836 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetApSmeRequest>(&header, _body_bytes, handles, &mut req)?;
3837 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
3838 Ok(GenericSmeRequest::GetApSme {
3839 sme_server: req.sme_server,
3840
3841 responder: GenericSmeGetApSmeResponder {
3842 control_handle: std::mem::ManuallyDrop::new(control_handle),
3843 tx_id: header.tx_id,
3844 },
3845 })
3846 }
3847 0x7ea015b3060fa => {
3848 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3849 let mut req = fidl::new_empty!(
3850 GenericSmeGetSmeTelemetryRequest,
3851 fidl::encoding::DefaultFuchsiaResourceDialect
3852 );
3853 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetSmeTelemetryRequest>(&header, _body_bytes, handles, &mut req)?;
3854 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
3855 Ok(GenericSmeRequest::GetSmeTelemetry {
3856 telemetry_server: req.telemetry_server,
3857
3858 responder: GenericSmeGetSmeTelemetryResponder {
3859 control_handle: std::mem::ManuallyDrop::new(control_handle),
3860 tx_id: header.tx_id,
3861 },
3862 })
3863 }
3864 _ => Err(fidl::Error::UnknownOrdinal {
3865 ordinal: header.ordinal,
3866 protocol_name:
3867 <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3868 }),
3869 }))
3870 },
3871 )
3872 }
3873}
3874
3875#[derive(Debug)]
3876pub enum GenericSmeRequest {
3877 Query { responder: GenericSmeQueryResponder },
3881 QueryIfaceCapabilities { responder: GenericSmeQueryIfaceCapabilitiesResponder },
3883 GetClientSme {
3890 sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
3891 responder: GenericSmeGetClientSmeResponder,
3892 },
3893 GetApSme {
3900 sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
3901 responder: GenericSmeGetApSmeResponder,
3902 },
3903 GetSmeTelemetry {
3911 telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
3912 responder: GenericSmeGetSmeTelemetryResponder,
3913 },
3914}
3915
3916impl GenericSmeRequest {
3917 #[allow(irrefutable_let_patterns)]
3918 pub fn into_query(self) -> Option<(GenericSmeQueryResponder)> {
3919 if let GenericSmeRequest::Query { responder } = self { Some((responder)) } else { None }
3920 }
3921
3922 #[allow(irrefutable_let_patterns)]
3923 pub fn into_query_iface_capabilities(
3924 self,
3925 ) -> Option<(GenericSmeQueryIfaceCapabilitiesResponder)> {
3926 if let GenericSmeRequest::QueryIfaceCapabilities { responder } = self {
3927 Some((responder))
3928 } else {
3929 None
3930 }
3931 }
3932
3933 #[allow(irrefutable_let_patterns)]
3934 pub fn into_get_client_sme(
3935 self,
3936 ) -> Option<(fidl::endpoints::ServerEnd<ClientSmeMarker>, GenericSmeGetClientSmeResponder)>
3937 {
3938 if let GenericSmeRequest::GetClientSme { sme_server, responder } = self {
3939 Some((sme_server, responder))
3940 } else {
3941 None
3942 }
3943 }
3944
3945 #[allow(irrefutable_let_patterns)]
3946 pub fn into_get_ap_sme(
3947 self,
3948 ) -> Option<(fidl::endpoints::ServerEnd<ApSmeMarker>, GenericSmeGetApSmeResponder)> {
3949 if let GenericSmeRequest::GetApSme { sme_server, responder } = self {
3950 Some((sme_server, responder))
3951 } else {
3952 None
3953 }
3954 }
3955
3956 #[allow(irrefutable_let_patterns)]
3957 pub fn into_get_sme_telemetry(
3958 self,
3959 ) -> Option<(fidl::endpoints::ServerEnd<TelemetryMarker>, GenericSmeGetSmeTelemetryResponder)>
3960 {
3961 if let GenericSmeRequest::GetSmeTelemetry { telemetry_server, responder } = self {
3962 Some((telemetry_server, responder))
3963 } else {
3964 None
3965 }
3966 }
3967
3968 pub fn method_name(&self) -> &'static str {
3970 match *self {
3971 GenericSmeRequest::Query { .. } => "query",
3972 GenericSmeRequest::QueryIfaceCapabilities { .. } => "query_iface_capabilities",
3973 GenericSmeRequest::GetClientSme { .. } => "get_client_sme",
3974 GenericSmeRequest::GetApSme { .. } => "get_ap_sme",
3975 GenericSmeRequest::GetSmeTelemetry { .. } => "get_sme_telemetry",
3976 }
3977 }
3978}
3979
3980#[derive(Debug, Clone)]
3981pub struct GenericSmeControlHandle {
3982 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3983}
3984
3985impl fidl::endpoints::ControlHandle for GenericSmeControlHandle {
3986 fn shutdown(&self) {
3987 self.inner.shutdown()
3988 }
3989
3990 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3991 self.inner.shutdown_with_epitaph(status)
3992 }
3993
3994 fn is_closed(&self) -> bool {
3995 self.inner.channel().is_closed()
3996 }
3997 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3998 self.inner.channel().on_closed()
3999 }
4000
4001 #[cfg(target_os = "fuchsia")]
4002 fn signal_peer(
4003 &self,
4004 clear_mask: zx::Signals,
4005 set_mask: zx::Signals,
4006 ) -> Result<(), zx_status::Status> {
4007 use fidl::Peered;
4008 self.inner.channel().signal_peer(clear_mask, set_mask)
4009 }
4010}
4011
4012impl GenericSmeControlHandle {}
4013
4014#[must_use = "FIDL methods require a response to be sent"]
4015#[derive(Debug)]
4016pub struct GenericSmeQueryResponder {
4017 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4018 tx_id: u32,
4019}
4020
4021impl std::ops::Drop for GenericSmeQueryResponder {
4025 fn drop(&mut self) {
4026 self.control_handle.shutdown();
4027 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4029 }
4030}
4031
4032impl fidl::endpoints::Responder for GenericSmeQueryResponder {
4033 type ControlHandle = GenericSmeControlHandle;
4034
4035 fn control_handle(&self) -> &GenericSmeControlHandle {
4036 &self.control_handle
4037 }
4038
4039 fn drop_without_shutdown(mut self) {
4040 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4042 std::mem::forget(self);
4044 }
4045}
4046
4047impl GenericSmeQueryResponder {
4048 pub fn send(self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
4052 let _result = self.send_raw(resp);
4053 if _result.is_err() {
4054 self.control_handle.shutdown();
4055 }
4056 self.drop_without_shutdown();
4057 _result
4058 }
4059
4060 pub fn send_no_shutdown_on_err(self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
4062 let _result = self.send_raw(resp);
4063 self.drop_without_shutdown();
4064 _result
4065 }
4066
4067 fn send_raw(&self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
4068 self.control_handle.inner.send::<GenericSmeQueryResponse>(
4069 (resp,),
4070 self.tx_id,
4071 0x6ef4a820c153e249,
4072 fidl::encoding::DynamicFlags::empty(),
4073 )
4074 }
4075}
4076
4077#[must_use = "FIDL methods require a response to be sent"]
4078#[derive(Debug)]
4079pub struct GenericSmeQueryIfaceCapabilitiesResponder {
4080 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4081 tx_id: u32,
4082}
4083
4084impl std::ops::Drop for GenericSmeQueryIfaceCapabilitiesResponder {
4088 fn drop(&mut self) {
4089 self.control_handle.shutdown();
4090 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4092 }
4093}
4094
4095impl fidl::endpoints::Responder for GenericSmeQueryIfaceCapabilitiesResponder {
4096 type ControlHandle = GenericSmeControlHandle;
4097
4098 fn control_handle(&self) -> &GenericSmeControlHandle {
4099 &self.control_handle
4100 }
4101
4102 fn drop_without_shutdown(mut self) {
4103 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4105 std::mem::forget(self);
4107 }
4108}
4109
4110impl GenericSmeQueryIfaceCapabilitiesResponder {
4111 pub fn send(
4115 self,
4116 mut result: Result<&fidl_fuchsia_wlan_common::ApfPacketFilterSupport, i32>,
4117 ) -> Result<(), fidl::Error> {
4118 let _result = self.send_raw(result);
4119 if _result.is_err() {
4120 self.control_handle.shutdown();
4121 }
4122 self.drop_without_shutdown();
4123 _result
4124 }
4125
4126 pub fn send_no_shutdown_on_err(
4128 self,
4129 mut result: Result<&fidl_fuchsia_wlan_common::ApfPacketFilterSupport, i32>,
4130 ) -> Result<(), fidl::Error> {
4131 let _result = self.send_raw(result);
4132 self.drop_without_shutdown();
4133 _result
4134 }
4135
4136 fn send_raw(
4137 &self,
4138 mut result: Result<&fidl_fuchsia_wlan_common::ApfPacketFilterSupport, i32>,
4139 ) -> Result<(), fidl::Error> {
4140 self.control_handle.inner.send::<fidl::encoding::ResultType<
4141 GenericSmeQueryIfaceCapabilitiesResponse,
4142 i32,
4143 >>(
4144 result.map(|apf_support| (apf_support,)),
4145 self.tx_id,
4146 0x2f483964e794fbba,
4147 fidl::encoding::DynamicFlags::empty(),
4148 )
4149 }
4150}
4151
4152#[must_use = "FIDL methods require a response to be sent"]
4153#[derive(Debug)]
4154pub struct GenericSmeGetClientSmeResponder {
4155 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4156 tx_id: u32,
4157}
4158
4159impl std::ops::Drop for GenericSmeGetClientSmeResponder {
4163 fn drop(&mut self) {
4164 self.control_handle.shutdown();
4165 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4167 }
4168}
4169
4170impl fidl::endpoints::Responder for GenericSmeGetClientSmeResponder {
4171 type ControlHandle = GenericSmeControlHandle;
4172
4173 fn control_handle(&self) -> &GenericSmeControlHandle {
4174 &self.control_handle
4175 }
4176
4177 fn drop_without_shutdown(mut self) {
4178 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4180 std::mem::forget(self);
4182 }
4183}
4184
4185impl GenericSmeGetClientSmeResponder {
4186 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4190 let _result = self.send_raw(result);
4191 if _result.is_err() {
4192 self.control_handle.shutdown();
4193 }
4194 self.drop_without_shutdown();
4195 _result
4196 }
4197
4198 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4200 let _result = self.send_raw(result);
4201 self.drop_without_shutdown();
4202 _result
4203 }
4204
4205 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4206 self.control_handle
4207 .inner
4208 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4209 result,
4210 self.tx_id,
4211 0x2439ad714c642f15,
4212 fidl::encoding::DynamicFlags::empty(),
4213 )
4214 }
4215}
4216
4217#[must_use = "FIDL methods require a response to be sent"]
4218#[derive(Debug)]
4219pub struct GenericSmeGetApSmeResponder {
4220 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4221 tx_id: u32,
4222}
4223
4224impl std::ops::Drop for GenericSmeGetApSmeResponder {
4228 fn drop(&mut self) {
4229 self.control_handle.shutdown();
4230 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4232 }
4233}
4234
4235impl fidl::endpoints::Responder for GenericSmeGetApSmeResponder {
4236 type ControlHandle = GenericSmeControlHandle;
4237
4238 fn control_handle(&self) -> &GenericSmeControlHandle {
4239 &self.control_handle
4240 }
4241
4242 fn drop_without_shutdown(mut self) {
4243 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4245 std::mem::forget(self);
4247 }
4248}
4249
4250impl GenericSmeGetApSmeResponder {
4251 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4255 let _result = self.send_raw(result);
4256 if _result.is_err() {
4257 self.control_handle.shutdown();
4258 }
4259 self.drop_without_shutdown();
4260 _result
4261 }
4262
4263 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4265 let _result = self.send_raw(result);
4266 self.drop_without_shutdown();
4267 _result
4268 }
4269
4270 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4271 self.control_handle
4272 .inner
4273 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4274 result,
4275 self.tx_id,
4276 0x4d2a40be2b44ad6c,
4277 fidl::encoding::DynamicFlags::empty(),
4278 )
4279 }
4280}
4281
4282#[must_use = "FIDL methods require a response to be sent"]
4283#[derive(Debug)]
4284pub struct GenericSmeGetSmeTelemetryResponder {
4285 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
4286 tx_id: u32,
4287}
4288
4289impl std::ops::Drop for GenericSmeGetSmeTelemetryResponder {
4293 fn drop(&mut self) {
4294 self.control_handle.shutdown();
4295 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4297 }
4298}
4299
4300impl fidl::endpoints::Responder for GenericSmeGetSmeTelemetryResponder {
4301 type ControlHandle = GenericSmeControlHandle;
4302
4303 fn control_handle(&self) -> &GenericSmeControlHandle {
4304 &self.control_handle
4305 }
4306
4307 fn drop_without_shutdown(mut self) {
4308 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4310 std::mem::forget(self);
4312 }
4313}
4314
4315impl GenericSmeGetSmeTelemetryResponder {
4316 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4320 let _result = self.send_raw(result);
4321 if _result.is_err() {
4322 self.control_handle.shutdown();
4323 }
4324 self.drop_without_shutdown();
4325 _result
4326 }
4327
4328 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4330 let _result = self.send_raw(result);
4331 self.drop_without_shutdown();
4332 _result
4333 }
4334
4335 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4336 self.control_handle
4337 .inner
4338 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4339 result,
4340 self.tx_id,
4341 0x7ea015b3060fa,
4342 fidl::encoding::DynamicFlags::empty(),
4343 )
4344 }
4345}
4346
4347#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4348pub struct TelemetryMarker;
4349
4350impl fidl::endpoints::ProtocolMarker for TelemetryMarker {
4351 type Proxy = TelemetryProxy;
4352 type RequestStream = TelemetryRequestStream;
4353 #[cfg(target_os = "fuchsia")]
4354 type SynchronousProxy = TelemetrySynchronousProxy;
4355
4356 const DEBUG_NAME: &'static str = "(anonymous) Telemetry";
4357}
4358pub type TelemetryQueryTelemetrySupportResult =
4359 Result<fidl_fuchsia_wlan_stats::TelemetrySupport, i32>;
4360pub type TelemetryGetIfaceStatsResult = Result<fidl_fuchsia_wlan_stats::IfaceStats, i32>;
4361pub type TelemetryGetHistogramStatsResult =
4362 Result<fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>;
4363pub type TelemetryGetSignalReportResult = Result<fidl_fuchsia_wlan_stats::SignalReport, i32>;
4364pub type TelemetryCloneInspectVmoResult = Result<fidl::Vmo, i32>;
4365
4366pub trait TelemetryProxyInterface: Send + Sync {
4367 type QueryTelemetrySupportResponseFut: std::future::Future<Output = Result<TelemetryQueryTelemetrySupportResult, fidl::Error>>
4368 + Send;
4369 fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut;
4370 type GetIfaceStatsResponseFut: std::future::Future<Output = Result<TelemetryGetIfaceStatsResult, fidl::Error>>
4371 + Send;
4372 fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut;
4373 type GetHistogramStatsResponseFut: std::future::Future<Output = Result<TelemetryGetHistogramStatsResult, fidl::Error>>
4374 + Send;
4375 fn r#get_histogram_stats(&self) -> Self::GetHistogramStatsResponseFut;
4376 type GetSignalReportResponseFut: std::future::Future<Output = Result<TelemetryGetSignalReportResult, fidl::Error>>
4377 + Send;
4378 fn r#get_signal_report(&self) -> Self::GetSignalReportResponseFut;
4379 type CloneInspectVmoResponseFut: std::future::Future<Output = Result<TelemetryCloneInspectVmoResult, fidl::Error>>
4380 + Send;
4381 fn r#clone_inspect_vmo(&self) -> Self::CloneInspectVmoResponseFut;
4382}
4383#[derive(Debug)]
4384#[cfg(target_os = "fuchsia")]
4385pub struct TelemetrySynchronousProxy {
4386 client: fidl::client::sync::Client,
4387}
4388
4389#[cfg(target_os = "fuchsia")]
4390impl fidl::endpoints::SynchronousProxy for TelemetrySynchronousProxy {
4391 type Proxy = TelemetryProxy;
4392 type Protocol = TelemetryMarker;
4393
4394 fn from_channel(inner: fidl::Channel) -> Self {
4395 Self::new(inner)
4396 }
4397
4398 fn into_channel(self) -> fidl::Channel {
4399 self.client.into_channel()
4400 }
4401
4402 fn as_channel(&self) -> &fidl::Channel {
4403 self.client.as_channel()
4404 }
4405}
4406
4407#[cfg(target_os = "fuchsia")]
4408impl TelemetrySynchronousProxy {
4409 pub fn new(channel: fidl::Channel) -> Self {
4410 let protocol_name = <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4411 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4412 }
4413
4414 pub fn into_channel(self) -> fidl::Channel {
4415 self.client.into_channel()
4416 }
4417
4418 pub fn wait_for_event(
4421 &self,
4422 deadline: zx::MonotonicInstant,
4423 ) -> Result<TelemetryEvent, fidl::Error> {
4424 TelemetryEvent::decode(self.client.wait_for_event(deadline)?)
4425 }
4426
4427 pub fn r#query_telemetry_support(
4428 &self,
4429 ___deadline: zx::MonotonicInstant,
4430 ) -> Result<TelemetryQueryTelemetrySupportResult, fidl::Error> {
4431 let _response = self.client.send_query::<
4432 fidl::encoding::EmptyPayload,
4433 fidl::encoding::ResultType<TelemetryQueryTelemetrySupportResponse, i32>,
4434 >(
4435 (),
4436 0x69443ad35b204686,
4437 fidl::encoding::DynamicFlags::empty(),
4438 ___deadline,
4439 )?;
4440 Ok(_response.map(|x| x.resp))
4441 }
4442
4443 pub fn r#get_iface_stats(
4444 &self,
4445 ___deadline: zx::MonotonicInstant,
4446 ) -> Result<TelemetryGetIfaceStatsResult, fidl::Error> {
4447 let _response = self.client.send_query::<
4448 fidl::encoding::EmptyPayload,
4449 fidl::encoding::ResultType<TelemetryGetIfaceStatsResponse, i32>,
4450 >(
4451 (),
4452 0x6af057f3a017f572,
4453 fidl::encoding::DynamicFlags::empty(),
4454 ___deadline,
4455 )?;
4456 Ok(_response.map(|x| x.stats))
4457 }
4458
4459 pub fn r#get_histogram_stats(
4460 &self,
4461 ___deadline: zx::MonotonicInstant,
4462 ) -> Result<TelemetryGetHistogramStatsResult, fidl::Error> {
4463 let _response = self.client.send_query::<
4464 fidl::encoding::EmptyPayload,
4465 fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>,
4466 >(
4467 (),
4468 0x46d2b6a23f764564,
4469 fidl::encoding::DynamicFlags::empty(),
4470 ___deadline,
4471 )?;
4472 Ok(_response.map(|x| x.stats))
4473 }
4474
4475 pub fn r#get_signal_report(
4476 &self,
4477 ___deadline: zx::MonotonicInstant,
4478 ) -> Result<TelemetryGetSignalReportResult, fidl::Error> {
4479 let _response = self.client.send_query::<
4480 fidl::encoding::EmptyPayload,
4481 fidl::encoding::ResultType<TelemetryGetSignalReportResponse, i32>,
4482 >(
4483 (),
4484 0x24133aeac3225e28,
4485 fidl::encoding::DynamicFlags::empty(),
4486 ___deadline,
4487 )?;
4488 Ok(_response.map(|x| x.stats))
4489 }
4490
4491 pub fn r#clone_inspect_vmo(
4492 &self,
4493 ___deadline: zx::MonotonicInstant,
4494 ) -> Result<TelemetryCloneInspectVmoResult, fidl::Error> {
4495 let _response = self.client.send_query::<
4496 fidl::encoding::EmptyPayload,
4497 fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>,
4498 >(
4499 (),
4500 0x47153917e84c5a21,
4501 fidl::encoding::DynamicFlags::empty(),
4502 ___deadline,
4503 )?;
4504 Ok(_response.map(|x| x.inspect_vmo))
4505 }
4506}
4507
4508#[cfg(target_os = "fuchsia")]
4509impl From<TelemetrySynchronousProxy> for zx::NullableHandle {
4510 fn from(value: TelemetrySynchronousProxy) -> Self {
4511 value.into_channel().into()
4512 }
4513}
4514
4515#[cfg(target_os = "fuchsia")]
4516impl From<fidl::Channel> for TelemetrySynchronousProxy {
4517 fn from(value: fidl::Channel) -> Self {
4518 Self::new(value)
4519 }
4520}
4521
4522#[cfg(target_os = "fuchsia")]
4523impl fidl::endpoints::FromClient for TelemetrySynchronousProxy {
4524 type Protocol = TelemetryMarker;
4525
4526 fn from_client(value: fidl::endpoints::ClientEnd<TelemetryMarker>) -> Self {
4527 Self::new(value.into_channel())
4528 }
4529}
4530
4531#[derive(Debug, Clone)]
4532pub struct TelemetryProxy {
4533 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4534}
4535
4536impl fidl::endpoints::Proxy for TelemetryProxy {
4537 type Protocol = TelemetryMarker;
4538
4539 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4540 Self::new(inner)
4541 }
4542
4543 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4544 self.client.into_channel().map_err(|client| Self { client })
4545 }
4546
4547 fn as_channel(&self) -> &::fidl::AsyncChannel {
4548 self.client.as_channel()
4549 }
4550}
4551
4552impl TelemetryProxy {
4553 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4555 let protocol_name = <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4556 Self { client: fidl::client::Client::new(channel, protocol_name) }
4557 }
4558
4559 pub fn take_event_stream(&self) -> TelemetryEventStream {
4565 TelemetryEventStream { event_receiver: self.client.take_event_receiver() }
4566 }
4567
4568 pub fn r#query_telemetry_support(
4569 &self,
4570 ) -> fidl::client::QueryResponseFut<
4571 TelemetryQueryTelemetrySupportResult,
4572 fidl::encoding::DefaultFuchsiaResourceDialect,
4573 > {
4574 TelemetryProxyInterface::r#query_telemetry_support(self)
4575 }
4576
4577 pub fn r#get_iface_stats(
4578 &self,
4579 ) -> fidl::client::QueryResponseFut<
4580 TelemetryGetIfaceStatsResult,
4581 fidl::encoding::DefaultFuchsiaResourceDialect,
4582 > {
4583 TelemetryProxyInterface::r#get_iface_stats(self)
4584 }
4585
4586 pub fn r#get_histogram_stats(
4587 &self,
4588 ) -> fidl::client::QueryResponseFut<
4589 TelemetryGetHistogramStatsResult,
4590 fidl::encoding::DefaultFuchsiaResourceDialect,
4591 > {
4592 TelemetryProxyInterface::r#get_histogram_stats(self)
4593 }
4594
4595 pub fn r#get_signal_report(
4596 &self,
4597 ) -> fidl::client::QueryResponseFut<
4598 TelemetryGetSignalReportResult,
4599 fidl::encoding::DefaultFuchsiaResourceDialect,
4600 > {
4601 TelemetryProxyInterface::r#get_signal_report(self)
4602 }
4603
4604 pub fn r#clone_inspect_vmo(
4605 &self,
4606 ) -> fidl::client::QueryResponseFut<
4607 TelemetryCloneInspectVmoResult,
4608 fidl::encoding::DefaultFuchsiaResourceDialect,
4609 > {
4610 TelemetryProxyInterface::r#clone_inspect_vmo(self)
4611 }
4612}
4613
4614impl TelemetryProxyInterface for TelemetryProxy {
4615 type QueryTelemetrySupportResponseFut = fidl::client::QueryResponseFut<
4616 TelemetryQueryTelemetrySupportResult,
4617 fidl::encoding::DefaultFuchsiaResourceDialect,
4618 >;
4619 fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut {
4620 fn _decode(
4621 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4622 ) -> Result<TelemetryQueryTelemetrySupportResult, fidl::Error> {
4623 let _response = fidl::client::decode_transaction_body::<
4624 fidl::encoding::ResultType<TelemetryQueryTelemetrySupportResponse, i32>,
4625 fidl::encoding::DefaultFuchsiaResourceDialect,
4626 0x69443ad35b204686,
4627 >(_buf?)?;
4628 Ok(_response.map(|x| x.resp))
4629 }
4630 self.client.send_query_and_decode::<
4631 fidl::encoding::EmptyPayload,
4632 TelemetryQueryTelemetrySupportResult,
4633 >(
4634 (),
4635 0x69443ad35b204686,
4636 fidl::encoding::DynamicFlags::empty(),
4637 _decode,
4638 )
4639 }
4640
4641 type GetIfaceStatsResponseFut = fidl::client::QueryResponseFut<
4642 TelemetryGetIfaceStatsResult,
4643 fidl::encoding::DefaultFuchsiaResourceDialect,
4644 >;
4645 fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut {
4646 fn _decode(
4647 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4648 ) -> Result<TelemetryGetIfaceStatsResult, fidl::Error> {
4649 let _response = fidl::client::decode_transaction_body::<
4650 fidl::encoding::ResultType<TelemetryGetIfaceStatsResponse, i32>,
4651 fidl::encoding::DefaultFuchsiaResourceDialect,
4652 0x6af057f3a017f572,
4653 >(_buf?)?;
4654 Ok(_response.map(|x| x.stats))
4655 }
4656 self.client
4657 .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryGetIfaceStatsResult>(
4658 (),
4659 0x6af057f3a017f572,
4660 fidl::encoding::DynamicFlags::empty(),
4661 _decode,
4662 )
4663 }
4664
4665 type GetHistogramStatsResponseFut = fidl::client::QueryResponseFut<
4666 TelemetryGetHistogramStatsResult,
4667 fidl::encoding::DefaultFuchsiaResourceDialect,
4668 >;
4669 fn r#get_histogram_stats(&self) -> Self::GetHistogramStatsResponseFut {
4670 fn _decode(
4671 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4672 ) -> Result<TelemetryGetHistogramStatsResult, fidl::Error> {
4673 let _response = fidl::client::decode_transaction_body::<
4674 fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>,
4675 fidl::encoding::DefaultFuchsiaResourceDialect,
4676 0x46d2b6a23f764564,
4677 >(_buf?)?;
4678 Ok(_response.map(|x| x.stats))
4679 }
4680 self.client.send_query_and_decode::<
4681 fidl::encoding::EmptyPayload,
4682 TelemetryGetHistogramStatsResult,
4683 >(
4684 (),
4685 0x46d2b6a23f764564,
4686 fidl::encoding::DynamicFlags::empty(),
4687 _decode,
4688 )
4689 }
4690
4691 type GetSignalReportResponseFut = fidl::client::QueryResponseFut<
4692 TelemetryGetSignalReportResult,
4693 fidl::encoding::DefaultFuchsiaResourceDialect,
4694 >;
4695 fn r#get_signal_report(&self) -> Self::GetSignalReportResponseFut {
4696 fn _decode(
4697 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4698 ) -> Result<TelemetryGetSignalReportResult, fidl::Error> {
4699 let _response = fidl::client::decode_transaction_body::<
4700 fidl::encoding::ResultType<TelemetryGetSignalReportResponse, i32>,
4701 fidl::encoding::DefaultFuchsiaResourceDialect,
4702 0x24133aeac3225e28,
4703 >(_buf?)?;
4704 Ok(_response.map(|x| x.stats))
4705 }
4706 self.client
4707 .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryGetSignalReportResult>(
4708 (),
4709 0x24133aeac3225e28,
4710 fidl::encoding::DynamicFlags::empty(),
4711 _decode,
4712 )
4713 }
4714
4715 type CloneInspectVmoResponseFut = fidl::client::QueryResponseFut<
4716 TelemetryCloneInspectVmoResult,
4717 fidl::encoding::DefaultFuchsiaResourceDialect,
4718 >;
4719 fn r#clone_inspect_vmo(&self) -> Self::CloneInspectVmoResponseFut {
4720 fn _decode(
4721 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4722 ) -> Result<TelemetryCloneInspectVmoResult, fidl::Error> {
4723 let _response = fidl::client::decode_transaction_body::<
4724 fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>,
4725 fidl::encoding::DefaultFuchsiaResourceDialect,
4726 0x47153917e84c5a21,
4727 >(_buf?)?;
4728 Ok(_response.map(|x| x.inspect_vmo))
4729 }
4730 self.client
4731 .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryCloneInspectVmoResult>(
4732 (),
4733 0x47153917e84c5a21,
4734 fidl::encoding::DynamicFlags::empty(),
4735 _decode,
4736 )
4737 }
4738}
4739
4740pub struct TelemetryEventStream {
4741 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4742}
4743
4744impl std::marker::Unpin for TelemetryEventStream {}
4745
4746impl futures::stream::FusedStream for TelemetryEventStream {
4747 fn is_terminated(&self) -> bool {
4748 self.event_receiver.is_terminated()
4749 }
4750}
4751
4752impl futures::Stream for TelemetryEventStream {
4753 type Item = Result<TelemetryEvent, fidl::Error>;
4754
4755 fn poll_next(
4756 mut self: std::pin::Pin<&mut Self>,
4757 cx: &mut std::task::Context<'_>,
4758 ) -> std::task::Poll<Option<Self::Item>> {
4759 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4760 &mut self.event_receiver,
4761 cx
4762 )?) {
4763 Some(buf) => std::task::Poll::Ready(Some(TelemetryEvent::decode(buf))),
4764 None => std::task::Poll::Ready(None),
4765 }
4766 }
4767}
4768
4769#[derive(Debug)]
4770pub enum TelemetryEvent {}
4771
4772impl TelemetryEvent {
4773 fn decode(
4775 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4776 ) -> Result<TelemetryEvent, fidl::Error> {
4777 let (bytes, _handles) = buf.split_mut();
4778 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4779 debug_assert_eq!(tx_header.tx_id, 0);
4780 match tx_header.ordinal {
4781 _ => Err(fidl::Error::UnknownOrdinal {
4782 ordinal: tx_header.ordinal,
4783 protocol_name: <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4784 }),
4785 }
4786 }
4787}
4788
4789pub struct TelemetryRequestStream {
4791 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4792 is_terminated: bool,
4793}
4794
4795impl std::marker::Unpin for TelemetryRequestStream {}
4796
4797impl futures::stream::FusedStream for TelemetryRequestStream {
4798 fn is_terminated(&self) -> bool {
4799 self.is_terminated
4800 }
4801}
4802
4803impl fidl::endpoints::RequestStream for TelemetryRequestStream {
4804 type Protocol = TelemetryMarker;
4805 type ControlHandle = TelemetryControlHandle;
4806
4807 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4808 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4809 }
4810
4811 fn control_handle(&self) -> Self::ControlHandle {
4812 TelemetryControlHandle { inner: self.inner.clone() }
4813 }
4814
4815 fn into_inner(
4816 self,
4817 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4818 {
4819 (self.inner, self.is_terminated)
4820 }
4821
4822 fn from_inner(
4823 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4824 is_terminated: bool,
4825 ) -> Self {
4826 Self { inner, is_terminated }
4827 }
4828}
4829
4830impl futures::Stream for TelemetryRequestStream {
4831 type Item = Result<TelemetryRequest, fidl::Error>;
4832
4833 fn poll_next(
4834 mut self: std::pin::Pin<&mut Self>,
4835 cx: &mut std::task::Context<'_>,
4836 ) -> std::task::Poll<Option<Self::Item>> {
4837 let this = &mut *self;
4838 if this.inner.check_shutdown(cx) {
4839 this.is_terminated = true;
4840 return std::task::Poll::Ready(None);
4841 }
4842 if this.is_terminated {
4843 panic!("polled TelemetryRequestStream after completion");
4844 }
4845 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4846 |bytes, handles| {
4847 match this.inner.channel().read_etc(cx, bytes, handles) {
4848 std::task::Poll::Ready(Ok(())) => {}
4849 std::task::Poll::Pending => return std::task::Poll::Pending,
4850 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4851 this.is_terminated = true;
4852 return std::task::Poll::Ready(None);
4853 }
4854 std::task::Poll::Ready(Err(e)) => {
4855 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4856 e.into(),
4857 ))));
4858 }
4859 }
4860
4861 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4863
4864 std::task::Poll::Ready(Some(match header.ordinal {
4865 0x69443ad35b204686 => {
4866 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4867 let mut req = fidl::new_empty!(
4868 fidl::encoding::EmptyPayload,
4869 fidl::encoding::DefaultFuchsiaResourceDialect
4870 );
4871 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4872 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
4873 Ok(TelemetryRequest::QueryTelemetrySupport {
4874 responder: TelemetryQueryTelemetrySupportResponder {
4875 control_handle: std::mem::ManuallyDrop::new(control_handle),
4876 tx_id: header.tx_id,
4877 },
4878 })
4879 }
4880 0x6af057f3a017f572 => {
4881 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4882 let mut req = fidl::new_empty!(
4883 fidl::encoding::EmptyPayload,
4884 fidl::encoding::DefaultFuchsiaResourceDialect
4885 );
4886 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4887 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
4888 Ok(TelemetryRequest::GetIfaceStats {
4889 responder: TelemetryGetIfaceStatsResponder {
4890 control_handle: std::mem::ManuallyDrop::new(control_handle),
4891 tx_id: header.tx_id,
4892 },
4893 })
4894 }
4895 0x46d2b6a23f764564 => {
4896 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4897 let mut req = fidl::new_empty!(
4898 fidl::encoding::EmptyPayload,
4899 fidl::encoding::DefaultFuchsiaResourceDialect
4900 );
4901 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4902 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
4903 Ok(TelemetryRequest::GetHistogramStats {
4904 responder: TelemetryGetHistogramStatsResponder {
4905 control_handle: std::mem::ManuallyDrop::new(control_handle),
4906 tx_id: header.tx_id,
4907 },
4908 })
4909 }
4910 0x24133aeac3225e28 => {
4911 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4912 let mut req = fidl::new_empty!(
4913 fidl::encoding::EmptyPayload,
4914 fidl::encoding::DefaultFuchsiaResourceDialect
4915 );
4916 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4917 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
4918 Ok(TelemetryRequest::GetSignalReport {
4919 responder: TelemetryGetSignalReportResponder {
4920 control_handle: std::mem::ManuallyDrop::new(control_handle),
4921 tx_id: header.tx_id,
4922 },
4923 })
4924 }
4925 0x47153917e84c5a21 => {
4926 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4927 let mut req = fidl::new_empty!(
4928 fidl::encoding::EmptyPayload,
4929 fidl::encoding::DefaultFuchsiaResourceDialect
4930 );
4931 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4932 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
4933 Ok(TelemetryRequest::CloneInspectVmo {
4934 responder: TelemetryCloneInspectVmoResponder {
4935 control_handle: std::mem::ManuallyDrop::new(control_handle),
4936 tx_id: header.tx_id,
4937 },
4938 })
4939 }
4940 _ => Err(fidl::Error::UnknownOrdinal {
4941 ordinal: header.ordinal,
4942 protocol_name:
4943 <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4944 }),
4945 }))
4946 },
4947 )
4948 }
4949}
4950
4951#[derive(Debug)]
4952pub enum TelemetryRequest {
4953 QueryTelemetrySupport { responder: TelemetryQueryTelemetrySupportResponder },
4954 GetIfaceStats { responder: TelemetryGetIfaceStatsResponder },
4955 GetHistogramStats { responder: TelemetryGetHistogramStatsResponder },
4956 GetSignalReport { responder: TelemetryGetSignalReportResponder },
4957 CloneInspectVmo { responder: TelemetryCloneInspectVmoResponder },
4958}
4959
4960impl TelemetryRequest {
4961 #[allow(irrefutable_let_patterns)]
4962 pub fn into_query_telemetry_support(self) -> Option<(TelemetryQueryTelemetrySupportResponder)> {
4963 if let TelemetryRequest::QueryTelemetrySupport { responder } = self {
4964 Some((responder))
4965 } else {
4966 None
4967 }
4968 }
4969
4970 #[allow(irrefutable_let_patterns)]
4971 pub fn into_get_iface_stats(self) -> Option<(TelemetryGetIfaceStatsResponder)> {
4972 if let TelemetryRequest::GetIfaceStats { responder } = self {
4973 Some((responder))
4974 } else {
4975 None
4976 }
4977 }
4978
4979 #[allow(irrefutable_let_patterns)]
4980 pub fn into_get_histogram_stats(self) -> Option<(TelemetryGetHistogramStatsResponder)> {
4981 if let TelemetryRequest::GetHistogramStats { responder } = self {
4982 Some((responder))
4983 } else {
4984 None
4985 }
4986 }
4987
4988 #[allow(irrefutable_let_patterns)]
4989 pub fn into_get_signal_report(self) -> Option<(TelemetryGetSignalReportResponder)> {
4990 if let TelemetryRequest::GetSignalReport { responder } = self {
4991 Some((responder))
4992 } else {
4993 None
4994 }
4995 }
4996
4997 #[allow(irrefutable_let_patterns)]
4998 pub fn into_clone_inspect_vmo(self) -> Option<(TelemetryCloneInspectVmoResponder)> {
4999 if let TelemetryRequest::CloneInspectVmo { responder } = self {
5000 Some((responder))
5001 } else {
5002 None
5003 }
5004 }
5005
5006 pub fn method_name(&self) -> &'static str {
5008 match *self {
5009 TelemetryRequest::QueryTelemetrySupport { .. } => "query_telemetry_support",
5010 TelemetryRequest::GetIfaceStats { .. } => "get_iface_stats",
5011 TelemetryRequest::GetHistogramStats { .. } => "get_histogram_stats",
5012 TelemetryRequest::GetSignalReport { .. } => "get_signal_report",
5013 TelemetryRequest::CloneInspectVmo { .. } => "clone_inspect_vmo",
5014 }
5015 }
5016}
5017
5018#[derive(Debug, Clone)]
5019pub struct TelemetryControlHandle {
5020 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5021}
5022
5023impl fidl::endpoints::ControlHandle for TelemetryControlHandle {
5024 fn shutdown(&self) {
5025 self.inner.shutdown()
5026 }
5027
5028 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5029 self.inner.shutdown_with_epitaph(status)
5030 }
5031
5032 fn is_closed(&self) -> bool {
5033 self.inner.channel().is_closed()
5034 }
5035 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5036 self.inner.channel().on_closed()
5037 }
5038
5039 #[cfg(target_os = "fuchsia")]
5040 fn signal_peer(
5041 &self,
5042 clear_mask: zx::Signals,
5043 set_mask: zx::Signals,
5044 ) -> Result<(), zx_status::Status> {
5045 use fidl::Peered;
5046 self.inner.channel().signal_peer(clear_mask, set_mask)
5047 }
5048}
5049
5050impl TelemetryControlHandle {}
5051
5052#[must_use = "FIDL methods require a response to be sent"]
5053#[derive(Debug)]
5054pub struct TelemetryQueryTelemetrySupportResponder {
5055 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
5056 tx_id: u32,
5057}
5058
5059impl std::ops::Drop for TelemetryQueryTelemetrySupportResponder {
5063 fn drop(&mut self) {
5064 self.control_handle.shutdown();
5065 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5067 }
5068}
5069
5070impl fidl::endpoints::Responder for TelemetryQueryTelemetrySupportResponder {
5071 type ControlHandle = TelemetryControlHandle;
5072
5073 fn control_handle(&self) -> &TelemetryControlHandle {
5074 &self.control_handle
5075 }
5076
5077 fn drop_without_shutdown(mut self) {
5078 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5080 std::mem::forget(self);
5082 }
5083}
5084
5085impl TelemetryQueryTelemetrySupportResponder {
5086 pub fn send(
5090 self,
5091 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
5092 ) -> Result<(), fidl::Error> {
5093 let _result = self.send_raw(result);
5094 if _result.is_err() {
5095 self.control_handle.shutdown();
5096 }
5097 self.drop_without_shutdown();
5098 _result
5099 }
5100
5101 pub fn send_no_shutdown_on_err(
5103 self,
5104 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
5105 ) -> Result<(), fidl::Error> {
5106 let _result = self.send_raw(result);
5107 self.drop_without_shutdown();
5108 _result
5109 }
5110
5111 fn send_raw(
5112 &self,
5113 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
5114 ) -> Result<(), fidl::Error> {
5115 self.control_handle.inner.send::<fidl::encoding::ResultType<
5116 TelemetryQueryTelemetrySupportResponse,
5117 i32,
5118 >>(
5119 result.map(|resp| (resp,)),
5120 self.tx_id,
5121 0x69443ad35b204686,
5122 fidl::encoding::DynamicFlags::empty(),
5123 )
5124 }
5125}
5126
5127#[must_use = "FIDL methods require a response to be sent"]
5128#[derive(Debug)]
5129pub struct TelemetryGetIfaceStatsResponder {
5130 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
5131 tx_id: u32,
5132}
5133
5134impl std::ops::Drop for TelemetryGetIfaceStatsResponder {
5138 fn drop(&mut self) {
5139 self.control_handle.shutdown();
5140 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5142 }
5143}
5144
5145impl fidl::endpoints::Responder for TelemetryGetIfaceStatsResponder {
5146 type ControlHandle = TelemetryControlHandle;
5147
5148 fn control_handle(&self) -> &TelemetryControlHandle {
5149 &self.control_handle
5150 }
5151
5152 fn drop_without_shutdown(mut self) {
5153 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5155 std::mem::forget(self);
5157 }
5158}
5159
5160impl TelemetryGetIfaceStatsResponder {
5161 pub fn send(
5165 self,
5166 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceStats, i32>,
5167 ) -> Result<(), fidl::Error> {
5168 let _result = self.send_raw(result);
5169 if _result.is_err() {
5170 self.control_handle.shutdown();
5171 }
5172 self.drop_without_shutdown();
5173 _result
5174 }
5175
5176 pub fn send_no_shutdown_on_err(
5178 self,
5179 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceStats, i32>,
5180 ) -> Result<(), fidl::Error> {
5181 let _result = self.send_raw(result);
5182 self.drop_without_shutdown();
5183 _result
5184 }
5185
5186 fn send_raw(
5187 &self,
5188 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceStats, i32>,
5189 ) -> Result<(), fidl::Error> {
5190 self.control_handle
5191 .inner
5192 .send::<fidl::encoding::ResultType<TelemetryGetIfaceStatsResponse, i32>>(
5193 result.map(|stats| (stats,)),
5194 self.tx_id,
5195 0x6af057f3a017f572,
5196 fidl::encoding::DynamicFlags::empty(),
5197 )
5198 }
5199}
5200
5201#[must_use = "FIDL methods require a response to be sent"]
5202#[derive(Debug)]
5203pub struct TelemetryGetHistogramStatsResponder {
5204 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
5205 tx_id: u32,
5206}
5207
5208impl std::ops::Drop for TelemetryGetHistogramStatsResponder {
5212 fn drop(&mut self) {
5213 self.control_handle.shutdown();
5214 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5216 }
5217}
5218
5219impl fidl::endpoints::Responder for TelemetryGetHistogramStatsResponder {
5220 type ControlHandle = TelemetryControlHandle;
5221
5222 fn control_handle(&self) -> &TelemetryControlHandle {
5223 &self.control_handle
5224 }
5225
5226 fn drop_without_shutdown(mut self) {
5227 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5229 std::mem::forget(self);
5231 }
5232}
5233
5234impl TelemetryGetHistogramStatsResponder {
5235 pub fn send(
5239 self,
5240 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
5241 ) -> Result<(), fidl::Error> {
5242 let _result = self.send_raw(result);
5243 if _result.is_err() {
5244 self.control_handle.shutdown();
5245 }
5246 self.drop_without_shutdown();
5247 _result
5248 }
5249
5250 pub fn send_no_shutdown_on_err(
5252 self,
5253 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
5254 ) -> Result<(), fidl::Error> {
5255 let _result = self.send_raw(result);
5256 self.drop_without_shutdown();
5257 _result
5258 }
5259
5260 fn send_raw(
5261 &self,
5262 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
5263 ) -> Result<(), fidl::Error> {
5264 self.control_handle
5265 .inner
5266 .send::<fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>>(
5267 result.map(|stats| (stats,)),
5268 self.tx_id,
5269 0x46d2b6a23f764564,
5270 fidl::encoding::DynamicFlags::empty(),
5271 )
5272 }
5273}
5274
5275#[must_use = "FIDL methods require a response to be sent"]
5276#[derive(Debug)]
5277pub struct TelemetryGetSignalReportResponder {
5278 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
5279 tx_id: u32,
5280}
5281
5282impl std::ops::Drop for TelemetryGetSignalReportResponder {
5286 fn drop(&mut self) {
5287 self.control_handle.shutdown();
5288 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5290 }
5291}
5292
5293impl fidl::endpoints::Responder for TelemetryGetSignalReportResponder {
5294 type ControlHandle = TelemetryControlHandle;
5295
5296 fn control_handle(&self) -> &TelemetryControlHandle {
5297 &self.control_handle
5298 }
5299
5300 fn drop_without_shutdown(mut self) {
5301 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5303 std::mem::forget(self);
5305 }
5306}
5307
5308impl TelemetryGetSignalReportResponder {
5309 pub fn send(
5313 self,
5314 mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
5315 ) -> Result<(), fidl::Error> {
5316 let _result = self.send_raw(result);
5317 if _result.is_err() {
5318 self.control_handle.shutdown();
5319 }
5320 self.drop_without_shutdown();
5321 _result
5322 }
5323
5324 pub fn send_no_shutdown_on_err(
5326 self,
5327 mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
5328 ) -> Result<(), fidl::Error> {
5329 let _result = self.send_raw(result);
5330 self.drop_without_shutdown();
5331 _result
5332 }
5333
5334 fn send_raw(
5335 &self,
5336 mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
5337 ) -> Result<(), fidl::Error> {
5338 self.control_handle
5339 .inner
5340 .send::<fidl::encoding::ResultType<TelemetryGetSignalReportResponse, i32>>(
5341 result.map(|stats| (stats,)),
5342 self.tx_id,
5343 0x24133aeac3225e28,
5344 fidl::encoding::DynamicFlags::empty(),
5345 )
5346 }
5347}
5348
5349#[must_use = "FIDL methods require a response to be sent"]
5350#[derive(Debug)]
5351pub struct TelemetryCloneInspectVmoResponder {
5352 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
5353 tx_id: u32,
5354}
5355
5356impl std::ops::Drop for TelemetryCloneInspectVmoResponder {
5360 fn drop(&mut self) {
5361 self.control_handle.shutdown();
5362 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5364 }
5365}
5366
5367impl fidl::endpoints::Responder for TelemetryCloneInspectVmoResponder {
5368 type ControlHandle = TelemetryControlHandle;
5369
5370 fn control_handle(&self) -> &TelemetryControlHandle {
5371 &self.control_handle
5372 }
5373
5374 fn drop_without_shutdown(mut self) {
5375 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5377 std::mem::forget(self);
5379 }
5380}
5381
5382impl TelemetryCloneInspectVmoResponder {
5383 pub fn send(self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
5387 let _result = self.send_raw(result);
5388 if _result.is_err() {
5389 self.control_handle.shutdown();
5390 }
5391 self.drop_without_shutdown();
5392 _result
5393 }
5394
5395 pub fn send_no_shutdown_on_err(
5397 self,
5398 mut result: Result<fidl::Vmo, i32>,
5399 ) -> Result<(), fidl::Error> {
5400 let _result = self.send_raw(result);
5401 self.drop_without_shutdown();
5402 _result
5403 }
5404
5405 fn send_raw(&self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
5406 self.control_handle
5407 .inner
5408 .send::<fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>>(
5409 result.map(|inspect_vmo| (inspect_vmo,)),
5410 self.tx_id,
5411 0x47153917e84c5a21,
5412 fidl::encoding::DynamicFlags::empty(),
5413 )
5414 }
5415}
5416
5417#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5418pub struct UsmeBootstrapMarker;
5419
5420impl fidl::endpoints::ProtocolMarker for UsmeBootstrapMarker {
5421 type Proxy = UsmeBootstrapProxy;
5422 type RequestStream = UsmeBootstrapRequestStream;
5423 #[cfg(target_os = "fuchsia")]
5424 type SynchronousProxy = UsmeBootstrapSynchronousProxy;
5425
5426 const DEBUG_NAME: &'static str = "(anonymous) UsmeBootstrap";
5427}
5428
5429pub trait UsmeBootstrapProxyInterface: Send + Sync {
5430 type StartResponseFut: std::future::Future<Output = Result<fidl::Vmo, fidl::Error>> + Send;
5431 fn r#start(
5432 &self,
5433 generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
5434 legacy_privacy_support: &LegacyPrivacySupport,
5435 ) -> Self::StartResponseFut;
5436}
5437#[derive(Debug)]
5438#[cfg(target_os = "fuchsia")]
5439pub struct UsmeBootstrapSynchronousProxy {
5440 client: fidl::client::sync::Client,
5441}
5442
5443#[cfg(target_os = "fuchsia")]
5444impl fidl::endpoints::SynchronousProxy for UsmeBootstrapSynchronousProxy {
5445 type Proxy = UsmeBootstrapProxy;
5446 type Protocol = UsmeBootstrapMarker;
5447
5448 fn from_channel(inner: fidl::Channel) -> Self {
5449 Self::new(inner)
5450 }
5451
5452 fn into_channel(self) -> fidl::Channel {
5453 self.client.into_channel()
5454 }
5455
5456 fn as_channel(&self) -> &fidl::Channel {
5457 self.client.as_channel()
5458 }
5459}
5460
5461#[cfg(target_os = "fuchsia")]
5462impl UsmeBootstrapSynchronousProxy {
5463 pub fn new(channel: fidl::Channel) -> Self {
5464 let protocol_name = <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5465 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
5466 }
5467
5468 pub fn into_channel(self) -> fidl::Channel {
5469 self.client.into_channel()
5470 }
5471
5472 pub fn wait_for_event(
5475 &self,
5476 deadline: zx::MonotonicInstant,
5477 ) -> Result<UsmeBootstrapEvent, fidl::Error> {
5478 UsmeBootstrapEvent::decode(self.client.wait_for_event(deadline)?)
5479 }
5480
5481 pub fn r#start(
5482 &self,
5483 mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
5484 mut legacy_privacy_support: &LegacyPrivacySupport,
5485 ___deadline: zx::MonotonicInstant,
5486 ) -> Result<fidl::Vmo, fidl::Error> {
5487 let _response =
5488 self.client.send_query::<UsmeBootstrapStartRequest, UsmeBootstrapStartResponse>(
5489 (generic_sme_server, legacy_privacy_support),
5490 0x58850dfb76c29a0e,
5491 fidl::encoding::DynamicFlags::empty(),
5492 ___deadline,
5493 )?;
5494 Ok(_response.inspect_vmo)
5495 }
5496}
5497
5498#[cfg(target_os = "fuchsia")]
5499impl From<UsmeBootstrapSynchronousProxy> for zx::NullableHandle {
5500 fn from(value: UsmeBootstrapSynchronousProxy) -> Self {
5501 value.into_channel().into()
5502 }
5503}
5504
5505#[cfg(target_os = "fuchsia")]
5506impl From<fidl::Channel> for UsmeBootstrapSynchronousProxy {
5507 fn from(value: fidl::Channel) -> Self {
5508 Self::new(value)
5509 }
5510}
5511
5512#[cfg(target_os = "fuchsia")]
5513impl fidl::endpoints::FromClient for UsmeBootstrapSynchronousProxy {
5514 type Protocol = UsmeBootstrapMarker;
5515
5516 fn from_client(value: fidl::endpoints::ClientEnd<UsmeBootstrapMarker>) -> Self {
5517 Self::new(value.into_channel())
5518 }
5519}
5520
5521#[derive(Debug, Clone)]
5522pub struct UsmeBootstrapProxy {
5523 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5524}
5525
5526impl fidl::endpoints::Proxy for UsmeBootstrapProxy {
5527 type Protocol = UsmeBootstrapMarker;
5528
5529 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5530 Self::new(inner)
5531 }
5532
5533 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5534 self.client.into_channel().map_err(|client| Self { client })
5535 }
5536
5537 fn as_channel(&self) -> &::fidl::AsyncChannel {
5538 self.client.as_channel()
5539 }
5540}
5541
5542impl UsmeBootstrapProxy {
5543 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5545 let protocol_name = <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5546 Self { client: fidl::client::Client::new(channel, protocol_name) }
5547 }
5548
5549 pub fn take_event_stream(&self) -> UsmeBootstrapEventStream {
5555 UsmeBootstrapEventStream { event_receiver: self.client.take_event_receiver() }
5556 }
5557
5558 pub fn r#start(
5559 &self,
5560 mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
5561 mut legacy_privacy_support: &LegacyPrivacySupport,
5562 ) -> fidl::client::QueryResponseFut<fidl::Vmo, fidl::encoding::DefaultFuchsiaResourceDialect>
5563 {
5564 UsmeBootstrapProxyInterface::r#start(self, generic_sme_server, legacy_privacy_support)
5565 }
5566}
5567
5568impl UsmeBootstrapProxyInterface for UsmeBootstrapProxy {
5569 type StartResponseFut =
5570 fidl::client::QueryResponseFut<fidl::Vmo, fidl::encoding::DefaultFuchsiaResourceDialect>;
5571 fn r#start(
5572 &self,
5573 mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
5574 mut legacy_privacy_support: &LegacyPrivacySupport,
5575 ) -> Self::StartResponseFut {
5576 fn _decode(
5577 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5578 ) -> Result<fidl::Vmo, fidl::Error> {
5579 let _response = fidl::client::decode_transaction_body::<
5580 UsmeBootstrapStartResponse,
5581 fidl::encoding::DefaultFuchsiaResourceDialect,
5582 0x58850dfb76c29a0e,
5583 >(_buf?)?;
5584 Ok(_response.inspect_vmo)
5585 }
5586 self.client.send_query_and_decode::<UsmeBootstrapStartRequest, fidl::Vmo>(
5587 (generic_sme_server, legacy_privacy_support),
5588 0x58850dfb76c29a0e,
5589 fidl::encoding::DynamicFlags::empty(),
5590 _decode,
5591 )
5592 }
5593}
5594
5595pub struct UsmeBootstrapEventStream {
5596 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5597}
5598
5599impl std::marker::Unpin for UsmeBootstrapEventStream {}
5600
5601impl futures::stream::FusedStream for UsmeBootstrapEventStream {
5602 fn is_terminated(&self) -> bool {
5603 self.event_receiver.is_terminated()
5604 }
5605}
5606
5607impl futures::Stream for UsmeBootstrapEventStream {
5608 type Item = Result<UsmeBootstrapEvent, fidl::Error>;
5609
5610 fn poll_next(
5611 mut self: std::pin::Pin<&mut Self>,
5612 cx: &mut std::task::Context<'_>,
5613 ) -> std::task::Poll<Option<Self::Item>> {
5614 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5615 &mut self.event_receiver,
5616 cx
5617 )?) {
5618 Some(buf) => std::task::Poll::Ready(Some(UsmeBootstrapEvent::decode(buf))),
5619 None => std::task::Poll::Ready(None),
5620 }
5621 }
5622}
5623
5624#[derive(Debug)]
5625pub enum UsmeBootstrapEvent {}
5626
5627impl UsmeBootstrapEvent {
5628 fn decode(
5630 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5631 ) -> Result<UsmeBootstrapEvent, fidl::Error> {
5632 let (bytes, _handles) = buf.split_mut();
5633 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5634 debug_assert_eq!(tx_header.tx_id, 0);
5635 match tx_header.ordinal {
5636 _ => Err(fidl::Error::UnknownOrdinal {
5637 ordinal: tx_header.ordinal,
5638 protocol_name: <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5639 }),
5640 }
5641 }
5642}
5643
5644pub struct UsmeBootstrapRequestStream {
5646 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5647 is_terminated: bool,
5648}
5649
5650impl std::marker::Unpin for UsmeBootstrapRequestStream {}
5651
5652impl futures::stream::FusedStream for UsmeBootstrapRequestStream {
5653 fn is_terminated(&self) -> bool {
5654 self.is_terminated
5655 }
5656}
5657
5658impl fidl::endpoints::RequestStream for UsmeBootstrapRequestStream {
5659 type Protocol = UsmeBootstrapMarker;
5660 type ControlHandle = UsmeBootstrapControlHandle;
5661
5662 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5663 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5664 }
5665
5666 fn control_handle(&self) -> Self::ControlHandle {
5667 UsmeBootstrapControlHandle { inner: self.inner.clone() }
5668 }
5669
5670 fn into_inner(
5671 self,
5672 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5673 {
5674 (self.inner, self.is_terminated)
5675 }
5676
5677 fn from_inner(
5678 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5679 is_terminated: bool,
5680 ) -> Self {
5681 Self { inner, is_terminated }
5682 }
5683}
5684
5685impl futures::Stream for UsmeBootstrapRequestStream {
5686 type Item = Result<UsmeBootstrapRequest, fidl::Error>;
5687
5688 fn poll_next(
5689 mut self: std::pin::Pin<&mut Self>,
5690 cx: &mut std::task::Context<'_>,
5691 ) -> std::task::Poll<Option<Self::Item>> {
5692 let this = &mut *self;
5693 if this.inner.check_shutdown(cx) {
5694 this.is_terminated = true;
5695 return std::task::Poll::Ready(None);
5696 }
5697 if this.is_terminated {
5698 panic!("polled UsmeBootstrapRequestStream after completion");
5699 }
5700 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5701 |bytes, handles| {
5702 match this.inner.channel().read_etc(cx, bytes, handles) {
5703 std::task::Poll::Ready(Ok(())) => {}
5704 std::task::Poll::Pending => return std::task::Poll::Pending,
5705 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5706 this.is_terminated = true;
5707 return std::task::Poll::Ready(None);
5708 }
5709 std::task::Poll::Ready(Err(e)) => {
5710 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5711 e.into(),
5712 ))));
5713 }
5714 }
5715
5716 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5718
5719 std::task::Poll::Ready(Some(match header.ordinal {
5720 0x58850dfb76c29a0e => {
5721 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5722 let mut req = fidl::new_empty!(
5723 UsmeBootstrapStartRequest,
5724 fidl::encoding::DefaultFuchsiaResourceDialect
5725 );
5726 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UsmeBootstrapStartRequest>(&header, _body_bytes, handles, &mut req)?;
5727 let control_handle =
5728 UsmeBootstrapControlHandle { inner: this.inner.clone() };
5729 Ok(UsmeBootstrapRequest::Start {
5730 generic_sme_server: req.generic_sme_server,
5731 legacy_privacy_support: req.legacy_privacy_support,
5732
5733 responder: UsmeBootstrapStartResponder {
5734 control_handle: std::mem::ManuallyDrop::new(control_handle),
5735 tx_id: header.tx_id,
5736 },
5737 })
5738 }
5739 _ => Err(fidl::Error::UnknownOrdinal {
5740 ordinal: header.ordinal,
5741 protocol_name:
5742 <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5743 }),
5744 }))
5745 },
5746 )
5747 }
5748}
5749
5750#[derive(Debug)]
5751pub enum UsmeBootstrapRequest {
5752 Start {
5753 generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
5754 legacy_privacy_support: LegacyPrivacySupport,
5755 responder: UsmeBootstrapStartResponder,
5756 },
5757}
5758
5759impl UsmeBootstrapRequest {
5760 #[allow(irrefutable_let_patterns)]
5761 pub fn into_start(
5762 self,
5763 ) -> Option<(
5764 fidl::endpoints::ServerEnd<GenericSmeMarker>,
5765 LegacyPrivacySupport,
5766 UsmeBootstrapStartResponder,
5767 )> {
5768 if let UsmeBootstrapRequest::Start {
5769 generic_sme_server,
5770 legacy_privacy_support,
5771 responder,
5772 } = self
5773 {
5774 Some((generic_sme_server, legacy_privacy_support, responder))
5775 } else {
5776 None
5777 }
5778 }
5779
5780 pub fn method_name(&self) -> &'static str {
5782 match *self {
5783 UsmeBootstrapRequest::Start { .. } => "start",
5784 }
5785 }
5786}
5787
5788#[derive(Debug, Clone)]
5789pub struct UsmeBootstrapControlHandle {
5790 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5791}
5792
5793impl fidl::endpoints::ControlHandle for UsmeBootstrapControlHandle {
5794 fn shutdown(&self) {
5795 self.inner.shutdown()
5796 }
5797
5798 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5799 self.inner.shutdown_with_epitaph(status)
5800 }
5801
5802 fn is_closed(&self) -> bool {
5803 self.inner.channel().is_closed()
5804 }
5805 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5806 self.inner.channel().on_closed()
5807 }
5808
5809 #[cfg(target_os = "fuchsia")]
5810 fn signal_peer(
5811 &self,
5812 clear_mask: zx::Signals,
5813 set_mask: zx::Signals,
5814 ) -> Result<(), zx_status::Status> {
5815 use fidl::Peered;
5816 self.inner.channel().signal_peer(clear_mask, set_mask)
5817 }
5818}
5819
5820impl UsmeBootstrapControlHandle {}
5821
5822#[must_use = "FIDL methods require a response to be sent"]
5823#[derive(Debug)]
5824pub struct UsmeBootstrapStartResponder {
5825 control_handle: std::mem::ManuallyDrop<UsmeBootstrapControlHandle>,
5826 tx_id: u32,
5827}
5828
5829impl std::ops::Drop for UsmeBootstrapStartResponder {
5833 fn drop(&mut self) {
5834 self.control_handle.shutdown();
5835 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5837 }
5838}
5839
5840impl fidl::endpoints::Responder for UsmeBootstrapStartResponder {
5841 type ControlHandle = UsmeBootstrapControlHandle;
5842
5843 fn control_handle(&self) -> &UsmeBootstrapControlHandle {
5844 &self.control_handle
5845 }
5846
5847 fn drop_without_shutdown(mut self) {
5848 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5850 std::mem::forget(self);
5852 }
5853}
5854
5855impl UsmeBootstrapStartResponder {
5856 pub fn send(self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
5860 let _result = self.send_raw(inspect_vmo);
5861 if _result.is_err() {
5862 self.control_handle.shutdown();
5863 }
5864 self.drop_without_shutdown();
5865 _result
5866 }
5867
5868 pub fn send_no_shutdown_on_err(self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
5870 let _result = self.send_raw(inspect_vmo);
5871 self.drop_without_shutdown();
5872 _result
5873 }
5874
5875 fn send_raw(&self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
5876 self.control_handle.inner.send::<UsmeBootstrapStartResponse>(
5877 (inspect_vmo,),
5878 self.tx_id,
5879 0x58850dfb76c29a0e,
5880 fidl::encoding::DynamicFlags::empty(),
5881 )
5882 }
5883}
5884
5885mod internal {
5886 use super::*;
5887
5888 impl fidl::encoding::ResourceTypeMarker for ClientSmeConnectRequest {
5889 type Borrowed<'a> = &'a mut Self;
5890 fn take_or_borrow<'a>(
5891 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5892 ) -> Self::Borrowed<'a> {
5893 value
5894 }
5895 }
5896
5897 unsafe impl fidl::encoding::TypeMarker for ClientSmeConnectRequest {
5898 type Owned = Self;
5899
5900 #[inline(always)]
5901 fn inline_align(_context: fidl::encoding::Context) -> usize {
5902 8
5903 }
5904
5905 #[inline(always)]
5906 fn inline_size(_context: fidl::encoding::Context) -> usize {
5907 112
5908 }
5909 }
5910
5911 unsafe impl
5912 fidl::encoding::Encode<
5913 ClientSmeConnectRequest,
5914 fidl::encoding::DefaultFuchsiaResourceDialect,
5915 > for &mut ClientSmeConnectRequest
5916 {
5917 #[inline]
5918 unsafe fn encode(
5919 self,
5920 encoder: &mut fidl::encoding::Encoder<
5921 '_,
5922 fidl::encoding::DefaultFuchsiaResourceDialect,
5923 >,
5924 offset: usize,
5925 _depth: fidl::encoding::Depth,
5926 ) -> fidl::Result<()> {
5927 encoder.debug_check_bounds::<ClientSmeConnectRequest>(offset);
5928 fidl::encoding::Encode::<
5930 ClientSmeConnectRequest,
5931 fidl::encoding::DefaultFuchsiaResourceDialect,
5932 >::encode(
5933 (
5934 <ConnectRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),
5935 <fidl::encoding::Optional<
5936 fidl::encoding::Endpoint<
5937 fidl::endpoints::ServerEnd<ConnectTransactionMarker>,
5938 >,
5939 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5940 &mut self.txn
5941 ),
5942 ),
5943 encoder,
5944 offset,
5945 _depth,
5946 )
5947 }
5948 }
5949 unsafe impl<
5950 T0: fidl::encoding::Encode<ConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
5951 T1: fidl::encoding::Encode<
5952 fidl::encoding::Optional<
5953 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
5954 >,
5955 fidl::encoding::DefaultFuchsiaResourceDialect,
5956 >,
5957 >
5958 fidl::encoding::Encode<
5959 ClientSmeConnectRequest,
5960 fidl::encoding::DefaultFuchsiaResourceDialect,
5961 > for (T0, T1)
5962 {
5963 #[inline]
5964 unsafe fn encode(
5965 self,
5966 encoder: &mut fidl::encoding::Encoder<
5967 '_,
5968 fidl::encoding::DefaultFuchsiaResourceDialect,
5969 >,
5970 offset: usize,
5971 depth: fidl::encoding::Depth,
5972 ) -> fidl::Result<()> {
5973 encoder.debug_check_bounds::<ClientSmeConnectRequest>(offset);
5974 unsafe {
5977 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(104);
5978 (ptr as *mut u64).write_unaligned(0);
5979 }
5980 self.0.encode(encoder, offset + 0, depth)?;
5982 self.1.encode(encoder, offset + 104, depth)?;
5983 Ok(())
5984 }
5985 }
5986
5987 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5988 for ClientSmeConnectRequest
5989 {
5990 #[inline(always)]
5991 fn new_empty() -> Self {
5992 Self {
5993 req: fidl::new_empty!(
5994 ConnectRequest,
5995 fidl::encoding::DefaultFuchsiaResourceDialect
5996 ),
5997 txn: fidl::new_empty!(
5998 fidl::encoding::Optional<
5999 fidl::encoding::Endpoint<
6000 fidl::endpoints::ServerEnd<ConnectTransactionMarker>,
6001 >,
6002 >,
6003 fidl::encoding::DefaultFuchsiaResourceDialect
6004 ),
6005 }
6006 }
6007
6008 #[inline]
6009 unsafe fn decode(
6010 &mut self,
6011 decoder: &mut fidl::encoding::Decoder<
6012 '_,
6013 fidl::encoding::DefaultFuchsiaResourceDialect,
6014 >,
6015 offset: usize,
6016 _depth: fidl::encoding::Depth,
6017 ) -> fidl::Result<()> {
6018 decoder.debug_check_bounds::<Self>(offset);
6019 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(104) };
6021 let padval = unsafe { (ptr as *const u64).read_unaligned() };
6022 let mask = 0xffffffff00000000u64;
6023 let maskedval = padval & mask;
6024 if maskedval != 0 {
6025 return Err(fidl::Error::NonZeroPadding {
6026 padding_start: offset + 104 + ((mask as u64).trailing_zeros() / 8) as usize,
6027 });
6028 }
6029 fidl::decode!(
6030 ConnectRequest,
6031 fidl::encoding::DefaultFuchsiaResourceDialect,
6032 &mut self.req,
6033 decoder,
6034 offset + 0,
6035 _depth
6036 )?;
6037 fidl::decode!(
6038 fidl::encoding::Optional<
6039 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
6040 >,
6041 fidl::encoding::DefaultFuchsiaResourceDialect,
6042 &mut self.txn,
6043 decoder,
6044 offset + 104,
6045 _depth
6046 )?;
6047 Ok(())
6048 }
6049 }
6050
6051 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanForControllerRequest {
6052 type Borrowed<'a> = &'a mut Self;
6053 fn take_or_borrow<'a>(
6054 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6055 ) -> Self::Borrowed<'a> {
6056 value
6057 }
6058 }
6059
6060 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanForControllerRequest {
6061 type Owned = Self;
6062
6063 #[inline(always)]
6064 fn inline_align(_context: fidl::encoding::Context) -> usize {
6065 8
6066 }
6067
6068 #[inline(always)]
6069 fn inline_size(_context: fidl::encoding::Context) -> usize {
6070 16
6071 }
6072 }
6073
6074 unsafe impl
6075 fidl::encoding::Encode<
6076 ClientSmeScanForControllerRequest,
6077 fidl::encoding::DefaultFuchsiaResourceDialect,
6078 > for &mut ClientSmeScanForControllerRequest
6079 {
6080 #[inline]
6081 unsafe fn encode(
6082 self,
6083 encoder: &mut fidl::encoding::Encoder<
6084 '_,
6085 fidl::encoding::DefaultFuchsiaResourceDialect,
6086 >,
6087 offset: usize,
6088 _depth: fidl::encoding::Depth,
6089 ) -> fidl::Result<()> {
6090 encoder.debug_check_bounds::<ClientSmeScanForControllerRequest>(offset);
6091 fidl::encoding::Encode::<
6093 ClientSmeScanForControllerRequest,
6094 fidl::encoding::DefaultFuchsiaResourceDialect,
6095 >::encode(
6096 (<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
6097 encoder,
6098 offset,
6099 _depth,
6100 )
6101 }
6102 }
6103 unsafe impl<
6104 T0: fidl::encoding::Encode<ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
6105 >
6106 fidl::encoding::Encode<
6107 ClientSmeScanForControllerRequest,
6108 fidl::encoding::DefaultFuchsiaResourceDialect,
6109 > for (T0,)
6110 {
6111 #[inline]
6112 unsafe fn encode(
6113 self,
6114 encoder: &mut fidl::encoding::Encoder<
6115 '_,
6116 fidl::encoding::DefaultFuchsiaResourceDialect,
6117 >,
6118 offset: usize,
6119 depth: fidl::encoding::Depth,
6120 ) -> fidl::Result<()> {
6121 encoder.debug_check_bounds::<ClientSmeScanForControllerRequest>(offset);
6122 self.0.encode(encoder, offset + 0, depth)?;
6126 Ok(())
6127 }
6128 }
6129
6130 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6131 for ClientSmeScanForControllerRequest
6132 {
6133 #[inline(always)]
6134 fn new_empty() -> Self {
6135 Self {
6136 req: fidl::new_empty!(ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect),
6137 }
6138 }
6139
6140 #[inline]
6141 unsafe fn decode(
6142 &mut self,
6143 decoder: &mut fidl::encoding::Decoder<
6144 '_,
6145 fidl::encoding::DefaultFuchsiaResourceDialect,
6146 >,
6147 offset: usize,
6148 _depth: fidl::encoding::Depth,
6149 ) -> fidl::Result<()> {
6150 decoder.debug_check_bounds::<Self>(offset);
6151 fidl::decode!(
6153 ScanRequest,
6154 fidl::encoding::DefaultFuchsiaResourceDialect,
6155 &mut self.req,
6156 decoder,
6157 offset + 0,
6158 _depth
6159 )?;
6160 Ok(())
6161 }
6162 }
6163
6164 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanRequest {
6165 type Borrowed<'a> = &'a mut Self;
6166 fn take_or_borrow<'a>(
6167 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6168 ) -> Self::Borrowed<'a> {
6169 value
6170 }
6171 }
6172
6173 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanRequest {
6174 type Owned = Self;
6175
6176 #[inline(always)]
6177 fn inline_align(_context: fidl::encoding::Context) -> usize {
6178 8
6179 }
6180
6181 #[inline(always)]
6182 fn inline_size(_context: fidl::encoding::Context) -> usize {
6183 16
6184 }
6185 }
6186
6187 unsafe impl
6188 fidl::encoding::Encode<ClientSmeScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
6189 for &mut ClientSmeScanRequest
6190 {
6191 #[inline]
6192 unsafe fn encode(
6193 self,
6194 encoder: &mut fidl::encoding::Encoder<
6195 '_,
6196 fidl::encoding::DefaultFuchsiaResourceDialect,
6197 >,
6198 offset: usize,
6199 _depth: fidl::encoding::Depth,
6200 ) -> fidl::Result<()> {
6201 encoder.debug_check_bounds::<ClientSmeScanRequest>(offset);
6202 fidl::encoding::Encode::<
6204 ClientSmeScanRequest,
6205 fidl::encoding::DefaultFuchsiaResourceDialect,
6206 >::encode(
6207 (<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
6208 encoder,
6209 offset,
6210 _depth,
6211 )
6212 }
6213 }
6214 unsafe impl<
6215 T0: fidl::encoding::Encode<ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
6216 >
6217 fidl::encoding::Encode<ClientSmeScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
6218 for (T0,)
6219 {
6220 #[inline]
6221 unsafe fn encode(
6222 self,
6223 encoder: &mut fidl::encoding::Encoder<
6224 '_,
6225 fidl::encoding::DefaultFuchsiaResourceDialect,
6226 >,
6227 offset: usize,
6228 depth: fidl::encoding::Depth,
6229 ) -> fidl::Result<()> {
6230 encoder.debug_check_bounds::<ClientSmeScanRequest>(offset);
6231 self.0.encode(encoder, offset + 0, depth)?;
6235 Ok(())
6236 }
6237 }
6238
6239 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6240 for ClientSmeScanRequest
6241 {
6242 #[inline(always)]
6243 fn new_empty() -> Self {
6244 Self {
6245 req: fidl::new_empty!(ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect),
6246 }
6247 }
6248
6249 #[inline]
6250 unsafe fn decode(
6251 &mut self,
6252 decoder: &mut fidl::encoding::Decoder<
6253 '_,
6254 fidl::encoding::DefaultFuchsiaResourceDialect,
6255 >,
6256 offset: usize,
6257 _depth: fidl::encoding::Depth,
6258 ) -> fidl::Result<()> {
6259 decoder.debug_check_bounds::<Self>(offset);
6260 fidl::decode!(
6262 ScanRequest,
6263 fidl::encoding::DefaultFuchsiaResourceDialect,
6264 &mut self.req,
6265 decoder,
6266 offset + 0,
6267 _depth
6268 )?;
6269 Ok(())
6270 }
6271 }
6272
6273 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanForControllerResponse {
6274 type Borrowed<'a> = &'a mut Self;
6275 fn take_or_borrow<'a>(
6276 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6277 ) -> Self::Borrowed<'a> {
6278 value
6279 }
6280 }
6281
6282 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanForControllerResponse {
6283 type Owned = Self;
6284
6285 #[inline(always)]
6286 fn inline_align(_context: fidl::encoding::Context) -> usize {
6287 8
6288 }
6289
6290 #[inline(always)]
6291 fn inline_size(_context: fidl::encoding::Context) -> usize {
6292 16
6293 }
6294 }
6295
6296 unsafe impl
6297 fidl::encoding::Encode<
6298 ClientSmeScanForControllerResponse,
6299 fidl::encoding::DefaultFuchsiaResourceDialect,
6300 > for &mut ClientSmeScanForControllerResponse
6301 {
6302 #[inline]
6303 unsafe fn encode(
6304 self,
6305 encoder: &mut fidl::encoding::Encoder<
6306 '_,
6307 fidl::encoding::DefaultFuchsiaResourceDialect,
6308 >,
6309 offset: usize,
6310 _depth: fidl::encoding::Depth,
6311 ) -> fidl::Result<()> {
6312 encoder.debug_check_bounds::<ClientSmeScanForControllerResponse>(offset);
6313 fidl::encoding::Encode::<ClientSmeScanForControllerResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6315 (
6316 <fidl::encoding::UnboundedVector<ScanResult> as fidl::encoding::ValueTypeMarker>::borrow(&self.scan_results),
6317 ),
6318 encoder, offset, _depth
6319 )
6320 }
6321 }
6322 unsafe impl<
6323 T0: fidl::encoding::Encode<
6324 fidl::encoding::UnboundedVector<ScanResult>,
6325 fidl::encoding::DefaultFuchsiaResourceDialect,
6326 >,
6327 >
6328 fidl::encoding::Encode<
6329 ClientSmeScanForControllerResponse,
6330 fidl::encoding::DefaultFuchsiaResourceDialect,
6331 > for (T0,)
6332 {
6333 #[inline]
6334 unsafe fn encode(
6335 self,
6336 encoder: &mut fidl::encoding::Encoder<
6337 '_,
6338 fidl::encoding::DefaultFuchsiaResourceDialect,
6339 >,
6340 offset: usize,
6341 depth: fidl::encoding::Depth,
6342 ) -> fidl::Result<()> {
6343 encoder.debug_check_bounds::<ClientSmeScanForControllerResponse>(offset);
6344 self.0.encode(encoder, offset + 0, depth)?;
6348 Ok(())
6349 }
6350 }
6351
6352 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6353 for ClientSmeScanForControllerResponse
6354 {
6355 #[inline(always)]
6356 fn new_empty() -> Self {
6357 Self {
6358 scan_results: fidl::new_empty!(
6359 fidl::encoding::UnboundedVector<ScanResult>,
6360 fidl::encoding::DefaultFuchsiaResourceDialect
6361 ),
6362 }
6363 }
6364
6365 #[inline]
6366 unsafe fn decode(
6367 &mut self,
6368 decoder: &mut fidl::encoding::Decoder<
6369 '_,
6370 fidl::encoding::DefaultFuchsiaResourceDialect,
6371 >,
6372 offset: usize,
6373 _depth: fidl::encoding::Depth,
6374 ) -> fidl::Result<()> {
6375 decoder.debug_check_bounds::<Self>(offset);
6376 fidl::decode!(
6378 fidl::encoding::UnboundedVector<ScanResult>,
6379 fidl::encoding::DefaultFuchsiaResourceDialect,
6380 &mut self.scan_results,
6381 decoder,
6382 offset + 0,
6383 _depth
6384 )?;
6385 Ok(())
6386 }
6387 }
6388
6389 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanResponse {
6390 type Borrowed<'a> = &'a mut Self;
6391 fn take_or_borrow<'a>(
6392 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6393 ) -> Self::Borrowed<'a> {
6394 value
6395 }
6396 }
6397
6398 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanResponse {
6399 type Owned = Self;
6400
6401 #[inline(always)]
6402 fn inline_align(_context: fidl::encoding::Context) -> usize {
6403 4
6404 }
6405
6406 #[inline(always)]
6407 fn inline_size(_context: fidl::encoding::Context) -> usize {
6408 4
6409 }
6410 }
6411
6412 unsafe impl
6413 fidl::encoding::Encode<ClientSmeScanResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
6414 for &mut ClientSmeScanResponse
6415 {
6416 #[inline]
6417 unsafe fn encode(
6418 self,
6419 encoder: &mut fidl::encoding::Encoder<
6420 '_,
6421 fidl::encoding::DefaultFuchsiaResourceDialect,
6422 >,
6423 offset: usize,
6424 _depth: fidl::encoding::Depth,
6425 ) -> fidl::Result<()> {
6426 encoder.debug_check_bounds::<ClientSmeScanResponse>(offset);
6427 fidl::encoding::Encode::<
6429 ClientSmeScanResponse,
6430 fidl::encoding::DefaultFuchsiaResourceDialect,
6431 >::encode(
6432 (<fidl::encoding::HandleType<
6433 fidl::Vmo,
6434 { fidl::ObjectType::VMO.into_raw() },
6435 2147483648,
6436 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6437 &mut self.scan_results
6438 ),),
6439 encoder,
6440 offset,
6441 _depth,
6442 )
6443 }
6444 }
6445 unsafe impl<
6446 T0: fidl::encoding::Encode<
6447 fidl::encoding::HandleType<
6448 fidl::Vmo,
6449 { fidl::ObjectType::VMO.into_raw() },
6450 2147483648,
6451 >,
6452 fidl::encoding::DefaultFuchsiaResourceDialect,
6453 >,
6454 >
6455 fidl::encoding::Encode<ClientSmeScanResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
6456 for (T0,)
6457 {
6458 #[inline]
6459 unsafe fn encode(
6460 self,
6461 encoder: &mut fidl::encoding::Encoder<
6462 '_,
6463 fidl::encoding::DefaultFuchsiaResourceDialect,
6464 >,
6465 offset: usize,
6466 depth: fidl::encoding::Depth,
6467 ) -> fidl::Result<()> {
6468 encoder.debug_check_bounds::<ClientSmeScanResponse>(offset);
6469 self.0.encode(encoder, offset + 0, depth)?;
6473 Ok(())
6474 }
6475 }
6476
6477 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6478 for ClientSmeScanResponse
6479 {
6480 #[inline(always)]
6481 fn new_empty() -> Self {
6482 Self {
6483 scan_results: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6484 }
6485 }
6486
6487 #[inline]
6488 unsafe fn decode(
6489 &mut self,
6490 decoder: &mut fidl::encoding::Decoder<
6491 '_,
6492 fidl::encoding::DefaultFuchsiaResourceDialect,
6493 >,
6494 offset: usize,
6495 _depth: fidl::encoding::Depth,
6496 ) -> fidl::Result<()> {
6497 decoder.debug_check_bounds::<Self>(offset);
6498 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.scan_results, decoder, offset + 0, _depth)?;
6500 Ok(())
6501 }
6502 }
6503
6504 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetApSmeRequest {
6505 type Borrowed<'a> = &'a mut Self;
6506 fn take_or_borrow<'a>(
6507 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6508 ) -> Self::Borrowed<'a> {
6509 value
6510 }
6511 }
6512
6513 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetApSmeRequest {
6514 type Owned = Self;
6515
6516 #[inline(always)]
6517 fn inline_align(_context: fidl::encoding::Context) -> usize {
6518 4
6519 }
6520
6521 #[inline(always)]
6522 fn inline_size(_context: fidl::encoding::Context) -> usize {
6523 4
6524 }
6525 }
6526
6527 unsafe impl
6528 fidl::encoding::Encode<
6529 GenericSmeGetApSmeRequest,
6530 fidl::encoding::DefaultFuchsiaResourceDialect,
6531 > for &mut GenericSmeGetApSmeRequest
6532 {
6533 #[inline]
6534 unsafe fn encode(
6535 self,
6536 encoder: &mut fidl::encoding::Encoder<
6537 '_,
6538 fidl::encoding::DefaultFuchsiaResourceDialect,
6539 >,
6540 offset: usize,
6541 _depth: fidl::encoding::Depth,
6542 ) -> fidl::Result<()> {
6543 encoder.debug_check_bounds::<GenericSmeGetApSmeRequest>(offset);
6544 fidl::encoding::Encode::<GenericSmeGetApSmeRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6546 (
6547 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sme_server),
6548 ),
6549 encoder, offset, _depth
6550 )
6551 }
6552 }
6553 unsafe impl<
6554 T0: fidl::encoding::Encode<
6555 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
6556 fidl::encoding::DefaultFuchsiaResourceDialect,
6557 >,
6558 >
6559 fidl::encoding::Encode<
6560 GenericSmeGetApSmeRequest,
6561 fidl::encoding::DefaultFuchsiaResourceDialect,
6562 > for (T0,)
6563 {
6564 #[inline]
6565 unsafe fn encode(
6566 self,
6567 encoder: &mut fidl::encoding::Encoder<
6568 '_,
6569 fidl::encoding::DefaultFuchsiaResourceDialect,
6570 >,
6571 offset: usize,
6572 depth: fidl::encoding::Depth,
6573 ) -> fidl::Result<()> {
6574 encoder.debug_check_bounds::<GenericSmeGetApSmeRequest>(offset);
6575 self.0.encode(encoder, offset + 0, depth)?;
6579 Ok(())
6580 }
6581 }
6582
6583 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6584 for GenericSmeGetApSmeRequest
6585 {
6586 #[inline(always)]
6587 fn new_empty() -> Self {
6588 Self {
6589 sme_server: fidl::new_empty!(
6590 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
6591 fidl::encoding::DefaultFuchsiaResourceDialect
6592 ),
6593 }
6594 }
6595
6596 #[inline]
6597 unsafe fn decode(
6598 &mut self,
6599 decoder: &mut fidl::encoding::Decoder<
6600 '_,
6601 fidl::encoding::DefaultFuchsiaResourceDialect,
6602 >,
6603 offset: usize,
6604 _depth: fidl::encoding::Depth,
6605 ) -> fidl::Result<()> {
6606 decoder.debug_check_bounds::<Self>(offset);
6607 fidl::decode!(
6609 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
6610 fidl::encoding::DefaultFuchsiaResourceDialect,
6611 &mut self.sme_server,
6612 decoder,
6613 offset + 0,
6614 _depth
6615 )?;
6616 Ok(())
6617 }
6618 }
6619
6620 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetClientSmeRequest {
6621 type Borrowed<'a> = &'a mut Self;
6622 fn take_or_borrow<'a>(
6623 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6624 ) -> Self::Borrowed<'a> {
6625 value
6626 }
6627 }
6628
6629 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetClientSmeRequest {
6630 type Owned = Self;
6631
6632 #[inline(always)]
6633 fn inline_align(_context: fidl::encoding::Context) -> usize {
6634 4
6635 }
6636
6637 #[inline(always)]
6638 fn inline_size(_context: fidl::encoding::Context) -> usize {
6639 4
6640 }
6641 }
6642
6643 unsafe impl
6644 fidl::encoding::Encode<
6645 GenericSmeGetClientSmeRequest,
6646 fidl::encoding::DefaultFuchsiaResourceDialect,
6647 > for &mut GenericSmeGetClientSmeRequest
6648 {
6649 #[inline]
6650 unsafe fn encode(
6651 self,
6652 encoder: &mut fidl::encoding::Encoder<
6653 '_,
6654 fidl::encoding::DefaultFuchsiaResourceDialect,
6655 >,
6656 offset: usize,
6657 _depth: fidl::encoding::Depth,
6658 ) -> fidl::Result<()> {
6659 encoder.debug_check_bounds::<GenericSmeGetClientSmeRequest>(offset);
6660 fidl::encoding::Encode::<GenericSmeGetClientSmeRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6662 (
6663 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sme_server),
6664 ),
6665 encoder, offset, _depth
6666 )
6667 }
6668 }
6669 unsafe impl<
6670 T0: fidl::encoding::Encode<
6671 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
6672 fidl::encoding::DefaultFuchsiaResourceDialect,
6673 >,
6674 >
6675 fidl::encoding::Encode<
6676 GenericSmeGetClientSmeRequest,
6677 fidl::encoding::DefaultFuchsiaResourceDialect,
6678 > for (T0,)
6679 {
6680 #[inline]
6681 unsafe fn encode(
6682 self,
6683 encoder: &mut fidl::encoding::Encoder<
6684 '_,
6685 fidl::encoding::DefaultFuchsiaResourceDialect,
6686 >,
6687 offset: usize,
6688 depth: fidl::encoding::Depth,
6689 ) -> fidl::Result<()> {
6690 encoder.debug_check_bounds::<GenericSmeGetClientSmeRequest>(offset);
6691 self.0.encode(encoder, offset + 0, depth)?;
6695 Ok(())
6696 }
6697 }
6698
6699 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6700 for GenericSmeGetClientSmeRequest
6701 {
6702 #[inline(always)]
6703 fn new_empty() -> Self {
6704 Self {
6705 sme_server: fidl::new_empty!(
6706 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
6707 fidl::encoding::DefaultFuchsiaResourceDialect
6708 ),
6709 }
6710 }
6711
6712 #[inline]
6713 unsafe fn decode(
6714 &mut self,
6715 decoder: &mut fidl::encoding::Decoder<
6716 '_,
6717 fidl::encoding::DefaultFuchsiaResourceDialect,
6718 >,
6719 offset: usize,
6720 _depth: fidl::encoding::Depth,
6721 ) -> fidl::Result<()> {
6722 decoder.debug_check_bounds::<Self>(offset);
6723 fidl::decode!(
6725 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
6726 fidl::encoding::DefaultFuchsiaResourceDialect,
6727 &mut self.sme_server,
6728 decoder,
6729 offset + 0,
6730 _depth
6731 )?;
6732 Ok(())
6733 }
6734 }
6735
6736 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetSmeTelemetryRequest {
6737 type Borrowed<'a> = &'a mut Self;
6738 fn take_or_borrow<'a>(
6739 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6740 ) -> Self::Borrowed<'a> {
6741 value
6742 }
6743 }
6744
6745 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetSmeTelemetryRequest {
6746 type Owned = Self;
6747
6748 #[inline(always)]
6749 fn inline_align(_context: fidl::encoding::Context) -> usize {
6750 4
6751 }
6752
6753 #[inline(always)]
6754 fn inline_size(_context: fidl::encoding::Context) -> usize {
6755 4
6756 }
6757 }
6758
6759 unsafe impl
6760 fidl::encoding::Encode<
6761 GenericSmeGetSmeTelemetryRequest,
6762 fidl::encoding::DefaultFuchsiaResourceDialect,
6763 > for &mut GenericSmeGetSmeTelemetryRequest
6764 {
6765 #[inline]
6766 unsafe fn encode(
6767 self,
6768 encoder: &mut fidl::encoding::Encoder<
6769 '_,
6770 fidl::encoding::DefaultFuchsiaResourceDialect,
6771 >,
6772 offset: usize,
6773 _depth: fidl::encoding::Depth,
6774 ) -> fidl::Result<()> {
6775 encoder.debug_check_bounds::<GenericSmeGetSmeTelemetryRequest>(offset);
6776 fidl::encoding::Encode::<GenericSmeGetSmeTelemetryRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6778 (
6779 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.telemetry_server),
6780 ),
6781 encoder, offset, _depth
6782 )
6783 }
6784 }
6785 unsafe impl<
6786 T0: fidl::encoding::Encode<
6787 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
6788 fidl::encoding::DefaultFuchsiaResourceDialect,
6789 >,
6790 >
6791 fidl::encoding::Encode<
6792 GenericSmeGetSmeTelemetryRequest,
6793 fidl::encoding::DefaultFuchsiaResourceDialect,
6794 > for (T0,)
6795 {
6796 #[inline]
6797 unsafe fn encode(
6798 self,
6799 encoder: &mut fidl::encoding::Encoder<
6800 '_,
6801 fidl::encoding::DefaultFuchsiaResourceDialect,
6802 >,
6803 offset: usize,
6804 depth: fidl::encoding::Depth,
6805 ) -> fidl::Result<()> {
6806 encoder.debug_check_bounds::<GenericSmeGetSmeTelemetryRequest>(offset);
6807 self.0.encode(encoder, offset + 0, depth)?;
6811 Ok(())
6812 }
6813 }
6814
6815 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6816 for GenericSmeGetSmeTelemetryRequest
6817 {
6818 #[inline(always)]
6819 fn new_empty() -> Self {
6820 Self {
6821 telemetry_server: fidl::new_empty!(
6822 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
6823 fidl::encoding::DefaultFuchsiaResourceDialect
6824 ),
6825 }
6826 }
6827
6828 #[inline]
6829 unsafe fn decode(
6830 &mut self,
6831 decoder: &mut fidl::encoding::Decoder<
6832 '_,
6833 fidl::encoding::DefaultFuchsiaResourceDialect,
6834 >,
6835 offset: usize,
6836 _depth: fidl::encoding::Depth,
6837 ) -> fidl::Result<()> {
6838 decoder.debug_check_bounds::<Self>(offset);
6839 fidl::decode!(
6841 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
6842 fidl::encoding::DefaultFuchsiaResourceDialect,
6843 &mut self.telemetry_server,
6844 decoder,
6845 offset + 0,
6846 _depth
6847 )?;
6848 Ok(())
6849 }
6850 }
6851
6852 impl fidl::encoding::ResourceTypeMarker for GenericSmeQueryResponse {
6853 type Borrowed<'a> = &'a mut Self;
6854 fn take_or_borrow<'a>(
6855 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6856 ) -> Self::Borrowed<'a> {
6857 value
6858 }
6859 }
6860
6861 unsafe impl fidl::encoding::TypeMarker for GenericSmeQueryResponse {
6862 type Owned = Self;
6863
6864 #[inline(always)]
6865 fn inline_align(_context: fidl::encoding::Context) -> usize {
6866 4
6867 }
6868
6869 #[inline(always)]
6870 fn inline_size(_context: fidl::encoding::Context) -> usize {
6871 16
6872 }
6873 }
6874
6875 unsafe impl
6876 fidl::encoding::Encode<
6877 GenericSmeQueryResponse,
6878 fidl::encoding::DefaultFuchsiaResourceDialect,
6879 > for &mut GenericSmeQueryResponse
6880 {
6881 #[inline]
6882 unsafe fn encode(
6883 self,
6884 encoder: &mut fidl::encoding::Encoder<
6885 '_,
6886 fidl::encoding::DefaultFuchsiaResourceDialect,
6887 >,
6888 offset: usize,
6889 _depth: fidl::encoding::Depth,
6890 ) -> fidl::Result<()> {
6891 encoder.debug_check_bounds::<GenericSmeQueryResponse>(offset);
6892 fidl::encoding::Encode::<
6894 GenericSmeQueryResponse,
6895 fidl::encoding::DefaultFuchsiaResourceDialect,
6896 >::encode(
6897 (<GenericSmeQuery as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
6898 encoder,
6899 offset,
6900 _depth,
6901 )
6902 }
6903 }
6904 unsafe impl<
6905 T0: fidl::encoding::Encode<GenericSmeQuery, fidl::encoding::DefaultFuchsiaResourceDialect>,
6906 >
6907 fidl::encoding::Encode<
6908 GenericSmeQueryResponse,
6909 fidl::encoding::DefaultFuchsiaResourceDialect,
6910 > for (T0,)
6911 {
6912 #[inline]
6913 unsafe fn encode(
6914 self,
6915 encoder: &mut fidl::encoding::Encoder<
6916 '_,
6917 fidl::encoding::DefaultFuchsiaResourceDialect,
6918 >,
6919 offset: usize,
6920 depth: fidl::encoding::Depth,
6921 ) -> fidl::Result<()> {
6922 encoder.debug_check_bounds::<GenericSmeQueryResponse>(offset);
6923 self.0.encode(encoder, offset + 0, depth)?;
6927 Ok(())
6928 }
6929 }
6930
6931 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6932 for GenericSmeQueryResponse
6933 {
6934 #[inline(always)]
6935 fn new_empty() -> Self {
6936 Self {
6937 resp: fidl::new_empty!(
6938 GenericSmeQuery,
6939 fidl::encoding::DefaultFuchsiaResourceDialect
6940 ),
6941 }
6942 }
6943
6944 #[inline]
6945 unsafe fn decode(
6946 &mut self,
6947 decoder: &mut fidl::encoding::Decoder<
6948 '_,
6949 fidl::encoding::DefaultFuchsiaResourceDialect,
6950 >,
6951 offset: usize,
6952 _depth: fidl::encoding::Depth,
6953 ) -> fidl::Result<()> {
6954 decoder.debug_check_bounds::<Self>(offset);
6955 fidl::decode!(
6957 GenericSmeQuery,
6958 fidl::encoding::DefaultFuchsiaResourceDialect,
6959 &mut self.resp,
6960 decoder,
6961 offset + 0,
6962 _depth
6963 )?;
6964 Ok(())
6965 }
6966 }
6967
6968 impl fidl::encoding::ResourceTypeMarker for TelemetryCloneInspectVmoResponse {
6969 type Borrowed<'a> = &'a mut Self;
6970 fn take_or_borrow<'a>(
6971 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6972 ) -> Self::Borrowed<'a> {
6973 value
6974 }
6975 }
6976
6977 unsafe impl fidl::encoding::TypeMarker for TelemetryCloneInspectVmoResponse {
6978 type Owned = Self;
6979
6980 #[inline(always)]
6981 fn inline_align(_context: fidl::encoding::Context) -> usize {
6982 4
6983 }
6984
6985 #[inline(always)]
6986 fn inline_size(_context: fidl::encoding::Context) -> usize {
6987 4
6988 }
6989 }
6990
6991 unsafe impl
6992 fidl::encoding::Encode<
6993 TelemetryCloneInspectVmoResponse,
6994 fidl::encoding::DefaultFuchsiaResourceDialect,
6995 > for &mut TelemetryCloneInspectVmoResponse
6996 {
6997 #[inline]
6998 unsafe fn encode(
6999 self,
7000 encoder: &mut fidl::encoding::Encoder<
7001 '_,
7002 fidl::encoding::DefaultFuchsiaResourceDialect,
7003 >,
7004 offset: usize,
7005 _depth: fidl::encoding::Depth,
7006 ) -> fidl::Result<()> {
7007 encoder.debug_check_bounds::<TelemetryCloneInspectVmoResponse>(offset);
7008 fidl::encoding::Encode::<
7010 TelemetryCloneInspectVmoResponse,
7011 fidl::encoding::DefaultFuchsiaResourceDialect,
7012 >::encode(
7013 (<fidl::encoding::HandleType<
7014 fidl::Vmo,
7015 { fidl::ObjectType::VMO.into_raw() },
7016 2147483648,
7017 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7018 &mut self.inspect_vmo
7019 ),),
7020 encoder,
7021 offset,
7022 _depth,
7023 )
7024 }
7025 }
7026 unsafe impl<
7027 T0: fidl::encoding::Encode<
7028 fidl::encoding::HandleType<
7029 fidl::Vmo,
7030 { fidl::ObjectType::VMO.into_raw() },
7031 2147483648,
7032 >,
7033 fidl::encoding::DefaultFuchsiaResourceDialect,
7034 >,
7035 >
7036 fidl::encoding::Encode<
7037 TelemetryCloneInspectVmoResponse,
7038 fidl::encoding::DefaultFuchsiaResourceDialect,
7039 > for (T0,)
7040 {
7041 #[inline]
7042 unsafe fn encode(
7043 self,
7044 encoder: &mut fidl::encoding::Encoder<
7045 '_,
7046 fidl::encoding::DefaultFuchsiaResourceDialect,
7047 >,
7048 offset: usize,
7049 depth: fidl::encoding::Depth,
7050 ) -> fidl::Result<()> {
7051 encoder.debug_check_bounds::<TelemetryCloneInspectVmoResponse>(offset);
7052 self.0.encode(encoder, offset + 0, depth)?;
7056 Ok(())
7057 }
7058 }
7059
7060 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7061 for TelemetryCloneInspectVmoResponse
7062 {
7063 #[inline(always)]
7064 fn new_empty() -> Self {
7065 Self {
7066 inspect_vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7067 }
7068 }
7069
7070 #[inline]
7071 unsafe fn decode(
7072 &mut self,
7073 decoder: &mut fidl::encoding::Decoder<
7074 '_,
7075 fidl::encoding::DefaultFuchsiaResourceDialect,
7076 >,
7077 offset: usize,
7078 _depth: fidl::encoding::Depth,
7079 ) -> fidl::Result<()> {
7080 decoder.debug_check_bounds::<Self>(offset);
7081 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.inspect_vmo, decoder, offset + 0, _depth)?;
7083 Ok(())
7084 }
7085 }
7086
7087 impl fidl::encoding::ResourceTypeMarker for UsmeBootstrapStartRequest {
7088 type Borrowed<'a> = &'a mut Self;
7089 fn take_or_borrow<'a>(
7090 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7091 ) -> Self::Borrowed<'a> {
7092 value
7093 }
7094 }
7095
7096 unsafe impl fidl::encoding::TypeMarker for UsmeBootstrapStartRequest {
7097 type Owned = Self;
7098
7099 #[inline(always)]
7100 fn inline_align(_context: fidl::encoding::Context) -> usize {
7101 4
7102 }
7103
7104 #[inline(always)]
7105 fn inline_size(_context: fidl::encoding::Context) -> usize {
7106 8
7107 }
7108 }
7109
7110 unsafe impl
7111 fidl::encoding::Encode<
7112 UsmeBootstrapStartRequest,
7113 fidl::encoding::DefaultFuchsiaResourceDialect,
7114 > for &mut UsmeBootstrapStartRequest
7115 {
7116 #[inline]
7117 unsafe fn encode(
7118 self,
7119 encoder: &mut fidl::encoding::Encoder<
7120 '_,
7121 fidl::encoding::DefaultFuchsiaResourceDialect,
7122 >,
7123 offset: usize,
7124 _depth: fidl::encoding::Depth,
7125 ) -> fidl::Result<()> {
7126 encoder.debug_check_bounds::<UsmeBootstrapStartRequest>(offset);
7127 fidl::encoding::Encode::<UsmeBootstrapStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7129 (
7130 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.generic_sme_server),
7131 <LegacyPrivacySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.legacy_privacy_support),
7132 ),
7133 encoder, offset, _depth
7134 )
7135 }
7136 }
7137 unsafe impl<
7138 T0: fidl::encoding::Encode<
7139 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
7140 fidl::encoding::DefaultFuchsiaResourceDialect,
7141 >,
7142 T1: fidl::encoding::Encode<LegacyPrivacySupport, fidl::encoding::DefaultFuchsiaResourceDialect>,
7143 >
7144 fidl::encoding::Encode<
7145 UsmeBootstrapStartRequest,
7146 fidl::encoding::DefaultFuchsiaResourceDialect,
7147 > for (T0, T1)
7148 {
7149 #[inline]
7150 unsafe fn encode(
7151 self,
7152 encoder: &mut fidl::encoding::Encoder<
7153 '_,
7154 fidl::encoding::DefaultFuchsiaResourceDialect,
7155 >,
7156 offset: usize,
7157 depth: fidl::encoding::Depth,
7158 ) -> fidl::Result<()> {
7159 encoder.debug_check_bounds::<UsmeBootstrapStartRequest>(offset);
7160 unsafe {
7163 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
7164 (ptr as *mut u32).write_unaligned(0);
7165 }
7166 self.0.encode(encoder, offset + 0, depth)?;
7168 self.1.encode(encoder, offset + 4, depth)?;
7169 Ok(())
7170 }
7171 }
7172
7173 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7174 for UsmeBootstrapStartRequest
7175 {
7176 #[inline(always)]
7177 fn new_empty() -> Self {
7178 Self {
7179 generic_sme_server: fidl::new_empty!(
7180 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
7181 fidl::encoding::DefaultFuchsiaResourceDialect
7182 ),
7183 legacy_privacy_support: fidl::new_empty!(
7184 LegacyPrivacySupport,
7185 fidl::encoding::DefaultFuchsiaResourceDialect
7186 ),
7187 }
7188 }
7189
7190 #[inline]
7191 unsafe fn decode(
7192 &mut self,
7193 decoder: &mut fidl::encoding::Decoder<
7194 '_,
7195 fidl::encoding::DefaultFuchsiaResourceDialect,
7196 >,
7197 offset: usize,
7198 _depth: fidl::encoding::Depth,
7199 ) -> fidl::Result<()> {
7200 decoder.debug_check_bounds::<Self>(offset);
7201 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
7203 let padval = unsafe { (ptr as *const u32).read_unaligned() };
7204 let mask = 0xffff0000u32;
7205 let maskedval = padval & mask;
7206 if maskedval != 0 {
7207 return Err(fidl::Error::NonZeroPadding {
7208 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
7209 });
7210 }
7211 fidl::decode!(
7212 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
7213 fidl::encoding::DefaultFuchsiaResourceDialect,
7214 &mut self.generic_sme_server,
7215 decoder,
7216 offset + 0,
7217 _depth
7218 )?;
7219 fidl::decode!(
7220 LegacyPrivacySupport,
7221 fidl::encoding::DefaultFuchsiaResourceDialect,
7222 &mut self.legacy_privacy_support,
7223 decoder,
7224 offset + 4,
7225 _depth
7226 )?;
7227 Ok(())
7228 }
7229 }
7230
7231 impl fidl::encoding::ResourceTypeMarker for UsmeBootstrapStartResponse {
7232 type Borrowed<'a> = &'a mut Self;
7233 fn take_or_borrow<'a>(
7234 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7235 ) -> Self::Borrowed<'a> {
7236 value
7237 }
7238 }
7239
7240 unsafe impl fidl::encoding::TypeMarker for UsmeBootstrapStartResponse {
7241 type Owned = Self;
7242
7243 #[inline(always)]
7244 fn inline_align(_context: fidl::encoding::Context) -> usize {
7245 4
7246 }
7247
7248 #[inline(always)]
7249 fn inline_size(_context: fidl::encoding::Context) -> usize {
7250 4
7251 }
7252 }
7253
7254 unsafe impl
7255 fidl::encoding::Encode<
7256 UsmeBootstrapStartResponse,
7257 fidl::encoding::DefaultFuchsiaResourceDialect,
7258 > for &mut UsmeBootstrapStartResponse
7259 {
7260 #[inline]
7261 unsafe fn encode(
7262 self,
7263 encoder: &mut fidl::encoding::Encoder<
7264 '_,
7265 fidl::encoding::DefaultFuchsiaResourceDialect,
7266 >,
7267 offset: usize,
7268 _depth: fidl::encoding::Depth,
7269 ) -> fidl::Result<()> {
7270 encoder.debug_check_bounds::<UsmeBootstrapStartResponse>(offset);
7271 fidl::encoding::Encode::<
7273 UsmeBootstrapStartResponse,
7274 fidl::encoding::DefaultFuchsiaResourceDialect,
7275 >::encode(
7276 (<fidl::encoding::HandleType<
7277 fidl::Vmo,
7278 { fidl::ObjectType::VMO.into_raw() },
7279 2147483648,
7280 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7281 &mut self.inspect_vmo
7282 ),),
7283 encoder,
7284 offset,
7285 _depth,
7286 )
7287 }
7288 }
7289 unsafe impl<
7290 T0: fidl::encoding::Encode<
7291 fidl::encoding::HandleType<
7292 fidl::Vmo,
7293 { fidl::ObjectType::VMO.into_raw() },
7294 2147483648,
7295 >,
7296 fidl::encoding::DefaultFuchsiaResourceDialect,
7297 >,
7298 >
7299 fidl::encoding::Encode<
7300 UsmeBootstrapStartResponse,
7301 fidl::encoding::DefaultFuchsiaResourceDialect,
7302 > for (T0,)
7303 {
7304 #[inline]
7305 unsafe fn encode(
7306 self,
7307 encoder: &mut fidl::encoding::Encoder<
7308 '_,
7309 fidl::encoding::DefaultFuchsiaResourceDialect,
7310 >,
7311 offset: usize,
7312 depth: fidl::encoding::Depth,
7313 ) -> fidl::Result<()> {
7314 encoder.debug_check_bounds::<UsmeBootstrapStartResponse>(offset);
7315 self.0.encode(encoder, offset + 0, depth)?;
7319 Ok(())
7320 }
7321 }
7322
7323 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7324 for UsmeBootstrapStartResponse
7325 {
7326 #[inline(always)]
7327 fn new_empty() -> Self {
7328 Self {
7329 inspect_vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7330 }
7331 }
7332
7333 #[inline]
7334 unsafe fn decode(
7335 &mut self,
7336 decoder: &mut fidl::encoding::Decoder<
7337 '_,
7338 fidl::encoding::DefaultFuchsiaResourceDialect,
7339 >,
7340 offset: usize,
7341 _depth: fidl::encoding::Depth,
7342 ) -> fidl::Result<()> {
7343 decoder.debug_check_bounds::<Self>(offset);
7344 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.inspect_vmo, decoder, offset + 0, _depth)?;
7346 Ok(())
7347 }
7348 }
7349}