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::Handle {
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 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
615 self.inner.shutdown_with_epitaph(status)
616 }
617
618 fn is_closed(&self) -> bool {
619 self.inner.channel().is_closed()
620 }
621 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
622 self.inner.channel().on_closed()
623 }
624
625 #[cfg(target_os = "fuchsia")]
626 fn signal_peer(
627 &self,
628 clear_mask: zx::Signals,
629 set_mask: zx::Signals,
630 ) -> Result<(), zx_status::Status> {
631 use fidl::Peered;
632 self.inner.channel().signal_peer(clear_mask, set_mask)
633 }
634}
635
636impl ApSmeControlHandle {}
637
638#[must_use = "FIDL methods require a response to be sent"]
639#[derive(Debug)]
640pub struct ApSmeStartResponder {
641 control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
642 tx_id: u32,
643}
644
645impl std::ops::Drop for ApSmeStartResponder {
649 fn drop(&mut self) {
650 self.control_handle.shutdown();
651 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
653 }
654}
655
656impl fidl::endpoints::Responder for ApSmeStartResponder {
657 type ControlHandle = ApSmeControlHandle;
658
659 fn control_handle(&self) -> &ApSmeControlHandle {
660 &self.control_handle
661 }
662
663 fn drop_without_shutdown(mut self) {
664 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
666 std::mem::forget(self);
668 }
669}
670
671impl ApSmeStartResponder {
672 pub fn send(self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
676 let _result = self.send_raw(code);
677 if _result.is_err() {
678 self.control_handle.shutdown();
679 }
680 self.drop_without_shutdown();
681 _result
682 }
683
684 pub fn send_no_shutdown_on_err(self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
686 let _result = self.send_raw(code);
687 self.drop_without_shutdown();
688 _result
689 }
690
691 fn send_raw(&self, mut code: StartApResultCode) -> Result<(), fidl::Error> {
692 self.control_handle.inner.send::<ApSmeStartResponse>(
693 (code,),
694 self.tx_id,
695 0x33fa134ceda8624d,
696 fidl::encoding::DynamicFlags::empty(),
697 )
698 }
699}
700
701#[must_use = "FIDL methods require a response to be sent"]
702#[derive(Debug)]
703pub struct ApSmeStopResponder {
704 control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
705 tx_id: u32,
706}
707
708impl std::ops::Drop for ApSmeStopResponder {
712 fn drop(&mut self) {
713 self.control_handle.shutdown();
714 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
716 }
717}
718
719impl fidl::endpoints::Responder for ApSmeStopResponder {
720 type ControlHandle = ApSmeControlHandle;
721
722 fn control_handle(&self) -> &ApSmeControlHandle {
723 &self.control_handle
724 }
725
726 fn drop_without_shutdown(mut self) {
727 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
729 std::mem::forget(self);
731 }
732}
733
734impl ApSmeStopResponder {
735 pub fn send(self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
739 let _result = self.send_raw(code);
740 if _result.is_err() {
741 self.control_handle.shutdown();
742 }
743 self.drop_without_shutdown();
744 _result
745 }
746
747 pub fn send_no_shutdown_on_err(self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
749 let _result = self.send_raw(code);
750 self.drop_without_shutdown();
751 _result
752 }
753
754 fn send_raw(&self, mut code: StopApResultCode) -> Result<(), fidl::Error> {
755 self.control_handle.inner.send::<ApSmeStopResponse>(
756 (code,),
757 self.tx_id,
758 0x56423f5b49a2e851,
759 fidl::encoding::DynamicFlags::empty(),
760 )
761 }
762}
763
764#[must_use = "FIDL methods require a response to be sent"]
765#[derive(Debug)]
766pub struct ApSmeStatusResponder {
767 control_handle: std::mem::ManuallyDrop<ApSmeControlHandle>,
768 tx_id: u32,
769}
770
771impl std::ops::Drop for ApSmeStatusResponder {
775 fn drop(&mut self) {
776 self.control_handle.shutdown();
777 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
779 }
780}
781
782impl fidl::endpoints::Responder for ApSmeStatusResponder {
783 type ControlHandle = ApSmeControlHandle;
784
785 fn control_handle(&self) -> &ApSmeControlHandle {
786 &self.control_handle
787 }
788
789 fn drop_without_shutdown(mut self) {
790 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
792 std::mem::forget(self);
794 }
795}
796
797impl ApSmeStatusResponder {
798 pub fn send(self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
802 let _result = self.send_raw(resp);
803 if _result.is_err() {
804 self.control_handle.shutdown();
805 }
806 self.drop_without_shutdown();
807 _result
808 }
809
810 pub fn send_no_shutdown_on_err(self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
812 let _result = self.send_raw(resp);
813 self.drop_without_shutdown();
814 _result
815 }
816
817 fn send_raw(&self, mut resp: &ApStatusResponse) -> Result<(), fidl::Error> {
818 self.control_handle.inner.send::<ApSmeStatusResponse>(
819 (resp,),
820 self.tx_id,
821 0x51c688ac7a101606,
822 fidl::encoding::DynamicFlags::empty(),
823 )
824 }
825}
826
827#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
828pub struct ClientSmeMarker;
829
830impl fidl::endpoints::ProtocolMarker for ClientSmeMarker {
831 type Proxy = ClientSmeProxy;
832 type RequestStream = ClientSmeRequestStream;
833 #[cfg(target_os = "fuchsia")]
834 type SynchronousProxy = ClientSmeSynchronousProxy;
835
836 const DEBUG_NAME: &'static str = "(anonymous) ClientSme";
837}
838pub type ClientSmeScanResult = Result<fidl::Vmo, ScanErrorCode>;
839pub type ClientSmeWmmStatusResult = Result<fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>;
840pub type ClientSmeScanForControllerResult = Result<Vec<ScanResult>, ScanErrorCode>;
841
842pub trait ClientSmeProxyInterface: Send + Sync {
843 type ScanResponseFut: std::future::Future<Output = Result<ClientSmeScanResult, fidl::Error>>
844 + Send;
845 fn r#scan(&self, req: &ScanRequest) -> Self::ScanResponseFut;
846 fn r#connect(
847 &self,
848 req: &ConnectRequest,
849 txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
850 ) -> Result<(), fidl::Error>;
851 fn r#roam(&self, req: &RoamRequest) -> Result<(), fidl::Error>;
852 type DisconnectResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
853 fn r#disconnect(&self, reason: UserDisconnectReason) -> Self::DisconnectResponseFut;
854 type StatusResponseFut: std::future::Future<Output = Result<ClientStatusResponse, fidl::Error>>
855 + Send;
856 fn r#status(&self) -> Self::StatusResponseFut;
857 type WmmStatusResponseFut: std::future::Future<Output = Result<ClientSmeWmmStatusResult, fidl::Error>>
858 + Send;
859 fn r#wmm_status(&self) -> Self::WmmStatusResponseFut;
860 type ScanForControllerResponseFut: std::future::Future<Output = Result<ClientSmeScanForControllerResult, fidl::Error>>
861 + Send;
862 fn r#scan_for_controller(&self, req: &ScanRequest) -> Self::ScanForControllerResponseFut;
863}
864#[derive(Debug)]
865#[cfg(target_os = "fuchsia")]
866pub struct ClientSmeSynchronousProxy {
867 client: fidl::client::sync::Client,
868}
869
870#[cfg(target_os = "fuchsia")]
871impl fidl::endpoints::SynchronousProxy for ClientSmeSynchronousProxy {
872 type Proxy = ClientSmeProxy;
873 type Protocol = ClientSmeMarker;
874
875 fn from_channel(inner: fidl::Channel) -> Self {
876 Self::new(inner)
877 }
878
879 fn into_channel(self) -> fidl::Channel {
880 self.client.into_channel()
881 }
882
883 fn as_channel(&self) -> &fidl::Channel {
884 self.client.as_channel()
885 }
886}
887
888#[cfg(target_os = "fuchsia")]
889impl ClientSmeSynchronousProxy {
890 pub fn new(channel: fidl::Channel) -> Self {
891 let protocol_name = <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
892 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
893 }
894
895 pub fn into_channel(self) -> fidl::Channel {
896 self.client.into_channel()
897 }
898
899 pub fn wait_for_event(
902 &self,
903 deadline: zx::MonotonicInstant,
904 ) -> Result<ClientSmeEvent, fidl::Error> {
905 ClientSmeEvent::decode(self.client.wait_for_event(deadline)?)
906 }
907
908 pub fn r#scan(
909 &self,
910 mut req: &ScanRequest,
911 ___deadline: zx::MonotonicInstant,
912 ) -> Result<ClientSmeScanResult, fidl::Error> {
913 let _response = self.client.send_query::<ClientSmeScanRequest, fidl::encoding::ResultType<
914 ClientSmeScanResponse,
915 ScanErrorCode,
916 >>(
917 (req,),
918 0xded0ce3b1685822,
919 fidl::encoding::DynamicFlags::empty(),
920 ___deadline,
921 )?;
922 Ok(_response.map(|x| x.scan_results))
923 }
924
925 pub fn r#connect(
926 &self,
927 mut req: &ConnectRequest,
928 mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
929 ) -> Result<(), fidl::Error> {
930 self.client.send::<ClientSmeConnectRequest>(
931 (req, txn),
932 0x250a0f6fe9f85351,
933 fidl::encoding::DynamicFlags::empty(),
934 )
935 }
936
937 pub fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
938 self.client.send::<ClientSmeRoamRequest>(
939 (req,),
940 0x107ead7d84723921,
941 fidl::encoding::DynamicFlags::empty(),
942 )
943 }
944
945 pub fn r#disconnect(
946 &self,
947 mut reason: UserDisconnectReason,
948 ___deadline: zx::MonotonicInstant,
949 ) -> Result<(), fidl::Error> {
950 let _response =
951 self.client.send_query::<ClientSmeDisconnectRequest, fidl::encoding::EmptyPayload>(
952 (reason,),
953 0x39a578de9a107304,
954 fidl::encoding::DynamicFlags::empty(),
955 ___deadline,
956 )?;
957 Ok(_response)
958 }
959
960 pub fn r#status(
961 &self,
962 ___deadline: zx::MonotonicInstant,
963 ) -> Result<ClientStatusResponse, fidl::Error> {
964 let _response =
965 self.client.send_query::<fidl::encoding::EmptyPayload, ClientSmeStatusResponse>(
966 (),
967 0xda00b607470faf2,
968 fidl::encoding::DynamicFlags::empty(),
969 ___deadline,
970 )?;
971 Ok(_response.resp)
972 }
973
974 pub fn r#wmm_status(
975 &self,
976 ___deadline: zx::MonotonicInstant,
977 ) -> Result<ClientSmeWmmStatusResult, fidl::Error> {
978 let _response = self.client.send_query::<
979 fidl::encoding::EmptyPayload,
980 fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>,
981 >(
982 (),
983 0x3d0ccc75f6baa9e3,
984 fidl::encoding::DynamicFlags::empty(),
985 ___deadline,
986 )?;
987 Ok(_response.map(|x| x.resp))
988 }
989
990 pub fn r#scan_for_controller(
991 &self,
992 mut req: &ScanRequest,
993 ___deadline: zx::MonotonicInstant,
994 ) -> Result<ClientSmeScanForControllerResult, fidl::Error> {
995 let _response = self.client.send_query::<
996 ClientSmeScanForControllerRequest,
997 fidl::encoding::ResultType<ClientSmeScanForControllerResponse, ScanErrorCode>,
998 >(
999 (req,),
1000 0x21f00ab22ff79a12,
1001 fidl::encoding::DynamicFlags::empty(),
1002 ___deadline,
1003 )?;
1004 Ok(_response.map(|x| x.scan_results))
1005 }
1006}
1007
1008#[cfg(target_os = "fuchsia")]
1009impl From<ClientSmeSynchronousProxy> for zx::Handle {
1010 fn from(value: ClientSmeSynchronousProxy) -> Self {
1011 value.into_channel().into()
1012 }
1013}
1014
1015#[cfg(target_os = "fuchsia")]
1016impl From<fidl::Channel> for ClientSmeSynchronousProxy {
1017 fn from(value: fidl::Channel) -> Self {
1018 Self::new(value)
1019 }
1020}
1021
1022#[cfg(target_os = "fuchsia")]
1023impl fidl::endpoints::FromClient for ClientSmeSynchronousProxy {
1024 type Protocol = ClientSmeMarker;
1025
1026 fn from_client(value: fidl::endpoints::ClientEnd<ClientSmeMarker>) -> Self {
1027 Self::new(value.into_channel())
1028 }
1029}
1030
1031#[derive(Debug, Clone)]
1032pub struct ClientSmeProxy {
1033 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1034}
1035
1036impl fidl::endpoints::Proxy for ClientSmeProxy {
1037 type Protocol = ClientSmeMarker;
1038
1039 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1040 Self::new(inner)
1041 }
1042
1043 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1044 self.client.into_channel().map_err(|client| Self { client })
1045 }
1046
1047 fn as_channel(&self) -> &::fidl::AsyncChannel {
1048 self.client.as_channel()
1049 }
1050}
1051
1052impl ClientSmeProxy {
1053 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1055 let protocol_name = <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1056 Self { client: fidl::client::Client::new(channel, protocol_name) }
1057 }
1058
1059 pub fn take_event_stream(&self) -> ClientSmeEventStream {
1065 ClientSmeEventStream { event_receiver: self.client.take_event_receiver() }
1066 }
1067
1068 pub fn r#scan(
1069 &self,
1070 mut req: &ScanRequest,
1071 ) -> fidl::client::QueryResponseFut<
1072 ClientSmeScanResult,
1073 fidl::encoding::DefaultFuchsiaResourceDialect,
1074 > {
1075 ClientSmeProxyInterface::r#scan(self, req)
1076 }
1077
1078 pub fn r#connect(
1079 &self,
1080 mut req: &ConnectRequest,
1081 mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1082 ) -> Result<(), fidl::Error> {
1083 ClientSmeProxyInterface::r#connect(self, req, txn)
1084 }
1085
1086 pub fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1087 ClientSmeProxyInterface::r#roam(self, req)
1088 }
1089
1090 pub fn r#disconnect(
1091 &self,
1092 mut reason: UserDisconnectReason,
1093 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
1094 ClientSmeProxyInterface::r#disconnect(self, reason)
1095 }
1096
1097 pub fn r#status(
1098 &self,
1099 ) -> fidl::client::QueryResponseFut<
1100 ClientStatusResponse,
1101 fidl::encoding::DefaultFuchsiaResourceDialect,
1102 > {
1103 ClientSmeProxyInterface::r#status(self)
1104 }
1105
1106 pub fn r#wmm_status(
1107 &self,
1108 ) -> fidl::client::QueryResponseFut<
1109 ClientSmeWmmStatusResult,
1110 fidl::encoding::DefaultFuchsiaResourceDialect,
1111 > {
1112 ClientSmeProxyInterface::r#wmm_status(self)
1113 }
1114
1115 pub fn r#scan_for_controller(
1116 &self,
1117 mut req: &ScanRequest,
1118 ) -> fidl::client::QueryResponseFut<
1119 ClientSmeScanForControllerResult,
1120 fidl::encoding::DefaultFuchsiaResourceDialect,
1121 > {
1122 ClientSmeProxyInterface::r#scan_for_controller(self, req)
1123 }
1124}
1125
1126impl ClientSmeProxyInterface for ClientSmeProxy {
1127 type ScanResponseFut = fidl::client::QueryResponseFut<
1128 ClientSmeScanResult,
1129 fidl::encoding::DefaultFuchsiaResourceDialect,
1130 >;
1131 fn r#scan(&self, mut req: &ScanRequest) -> Self::ScanResponseFut {
1132 fn _decode(
1133 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1134 ) -> Result<ClientSmeScanResult, fidl::Error> {
1135 let _response = fidl::client::decode_transaction_body::<
1136 fidl::encoding::ResultType<ClientSmeScanResponse, ScanErrorCode>,
1137 fidl::encoding::DefaultFuchsiaResourceDialect,
1138 0xded0ce3b1685822,
1139 >(_buf?)?;
1140 Ok(_response.map(|x| x.scan_results))
1141 }
1142 self.client.send_query_and_decode::<ClientSmeScanRequest, ClientSmeScanResult>(
1143 (req,),
1144 0xded0ce3b1685822,
1145 fidl::encoding::DynamicFlags::empty(),
1146 _decode,
1147 )
1148 }
1149
1150 fn r#connect(
1151 &self,
1152 mut req: &ConnectRequest,
1153 mut txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1154 ) -> Result<(), fidl::Error> {
1155 self.client.send::<ClientSmeConnectRequest>(
1156 (req, txn),
1157 0x250a0f6fe9f85351,
1158 fidl::encoding::DynamicFlags::empty(),
1159 )
1160 }
1161
1162 fn r#roam(&self, mut req: &RoamRequest) -> Result<(), fidl::Error> {
1163 self.client.send::<ClientSmeRoamRequest>(
1164 (req,),
1165 0x107ead7d84723921,
1166 fidl::encoding::DynamicFlags::empty(),
1167 )
1168 }
1169
1170 type DisconnectResponseFut =
1171 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1172 fn r#disconnect(&self, mut reason: UserDisconnectReason) -> Self::DisconnectResponseFut {
1173 fn _decode(
1174 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1175 ) -> Result<(), fidl::Error> {
1176 let _response = fidl::client::decode_transaction_body::<
1177 fidl::encoding::EmptyPayload,
1178 fidl::encoding::DefaultFuchsiaResourceDialect,
1179 0x39a578de9a107304,
1180 >(_buf?)?;
1181 Ok(_response)
1182 }
1183 self.client.send_query_and_decode::<ClientSmeDisconnectRequest, ()>(
1184 (reason,),
1185 0x39a578de9a107304,
1186 fidl::encoding::DynamicFlags::empty(),
1187 _decode,
1188 )
1189 }
1190
1191 type StatusResponseFut = fidl::client::QueryResponseFut<
1192 ClientStatusResponse,
1193 fidl::encoding::DefaultFuchsiaResourceDialect,
1194 >;
1195 fn r#status(&self) -> Self::StatusResponseFut {
1196 fn _decode(
1197 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1198 ) -> Result<ClientStatusResponse, fidl::Error> {
1199 let _response = fidl::client::decode_transaction_body::<
1200 ClientSmeStatusResponse,
1201 fidl::encoding::DefaultFuchsiaResourceDialect,
1202 0xda00b607470faf2,
1203 >(_buf?)?;
1204 Ok(_response.resp)
1205 }
1206 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ClientStatusResponse>(
1207 (),
1208 0xda00b607470faf2,
1209 fidl::encoding::DynamicFlags::empty(),
1210 _decode,
1211 )
1212 }
1213
1214 type WmmStatusResponseFut = fidl::client::QueryResponseFut<
1215 ClientSmeWmmStatusResult,
1216 fidl::encoding::DefaultFuchsiaResourceDialect,
1217 >;
1218 fn r#wmm_status(&self) -> Self::WmmStatusResponseFut {
1219 fn _decode(
1220 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1221 ) -> Result<ClientSmeWmmStatusResult, fidl::Error> {
1222 let _response = fidl::client::decode_transaction_body::<
1223 fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>,
1224 fidl::encoding::DefaultFuchsiaResourceDialect,
1225 0x3d0ccc75f6baa9e3,
1226 >(_buf?)?;
1227 Ok(_response.map(|x| x.resp))
1228 }
1229 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ClientSmeWmmStatusResult>(
1230 (),
1231 0x3d0ccc75f6baa9e3,
1232 fidl::encoding::DynamicFlags::empty(),
1233 _decode,
1234 )
1235 }
1236
1237 type ScanForControllerResponseFut = fidl::client::QueryResponseFut<
1238 ClientSmeScanForControllerResult,
1239 fidl::encoding::DefaultFuchsiaResourceDialect,
1240 >;
1241 fn r#scan_for_controller(&self, mut req: &ScanRequest) -> Self::ScanForControllerResponseFut {
1242 fn _decode(
1243 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1244 ) -> Result<ClientSmeScanForControllerResult, fidl::Error> {
1245 let _response = fidl::client::decode_transaction_body::<
1246 fidl::encoding::ResultType<ClientSmeScanForControllerResponse, ScanErrorCode>,
1247 fidl::encoding::DefaultFuchsiaResourceDialect,
1248 0x21f00ab22ff79a12,
1249 >(_buf?)?;
1250 Ok(_response.map(|x| x.scan_results))
1251 }
1252 self.client.send_query_and_decode::<
1253 ClientSmeScanForControllerRequest,
1254 ClientSmeScanForControllerResult,
1255 >(
1256 (req,),
1257 0x21f00ab22ff79a12,
1258 fidl::encoding::DynamicFlags::empty(),
1259 _decode,
1260 )
1261 }
1262}
1263
1264pub struct ClientSmeEventStream {
1265 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1266}
1267
1268impl std::marker::Unpin for ClientSmeEventStream {}
1269
1270impl futures::stream::FusedStream for ClientSmeEventStream {
1271 fn is_terminated(&self) -> bool {
1272 self.event_receiver.is_terminated()
1273 }
1274}
1275
1276impl futures::Stream for ClientSmeEventStream {
1277 type Item = Result<ClientSmeEvent, fidl::Error>;
1278
1279 fn poll_next(
1280 mut self: std::pin::Pin<&mut Self>,
1281 cx: &mut std::task::Context<'_>,
1282 ) -> std::task::Poll<Option<Self::Item>> {
1283 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1284 &mut self.event_receiver,
1285 cx
1286 )?) {
1287 Some(buf) => std::task::Poll::Ready(Some(ClientSmeEvent::decode(buf))),
1288 None => std::task::Poll::Ready(None),
1289 }
1290 }
1291}
1292
1293#[derive(Debug)]
1294pub enum ClientSmeEvent {}
1295
1296impl ClientSmeEvent {
1297 fn decode(
1299 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1300 ) -> Result<ClientSmeEvent, fidl::Error> {
1301 let (bytes, _handles) = buf.split_mut();
1302 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1303 debug_assert_eq!(tx_header.tx_id, 0);
1304 match tx_header.ordinal {
1305 _ => Err(fidl::Error::UnknownOrdinal {
1306 ordinal: tx_header.ordinal,
1307 protocol_name: <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1308 }),
1309 }
1310 }
1311}
1312
1313pub struct ClientSmeRequestStream {
1315 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1316 is_terminated: bool,
1317}
1318
1319impl std::marker::Unpin for ClientSmeRequestStream {}
1320
1321impl futures::stream::FusedStream for ClientSmeRequestStream {
1322 fn is_terminated(&self) -> bool {
1323 self.is_terminated
1324 }
1325}
1326
1327impl fidl::endpoints::RequestStream for ClientSmeRequestStream {
1328 type Protocol = ClientSmeMarker;
1329 type ControlHandle = ClientSmeControlHandle;
1330
1331 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1332 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1333 }
1334
1335 fn control_handle(&self) -> Self::ControlHandle {
1336 ClientSmeControlHandle { inner: self.inner.clone() }
1337 }
1338
1339 fn into_inner(
1340 self,
1341 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1342 {
1343 (self.inner, self.is_terminated)
1344 }
1345
1346 fn from_inner(
1347 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1348 is_terminated: bool,
1349 ) -> Self {
1350 Self { inner, is_terminated }
1351 }
1352}
1353
1354impl futures::Stream for ClientSmeRequestStream {
1355 type Item = Result<ClientSmeRequest, fidl::Error>;
1356
1357 fn poll_next(
1358 mut self: std::pin::Pin<&mut Self>,
1359 cx: &mut std::task::Context<'_>,
1360 ) -> std::task::Poll<Option<Self::Item>> {
1361 let this = &mut *self;
1362 if this.inner.check_shutdown(cx) {
1363 this.is_terminated = true;
1364 return std::task::Poll::Ready(None);
1365 }
1366 if this.is_terminated {
1367 panic!("polled ClientSmeRequestStream after completion");
1368 }
1369 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1370 |bytes, handles| {
1371 match this.inner.channel().read_etc(cx, bytes, handles) {
1372 std::task::Poll::Ready(Ok(())) => {}
1373 std::task::Poll::Pending => return std::task::Poll::Pending,
1374 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1375 this.is_terminated = true;
1376 return std::task::Poll::Ready(None);
1377 }
1378 std::task::Poll::Ready(Err(e)) => {
1379 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1380 e.into(),
1381 ))));
1382 }
1383 }
1384
1385 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1387
1388 std::task::Poll::Ready(Some(match header.ordinal {
1389 0xded0ce3b1685822 => {
1390 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1391 let mut req = fidl::new_empty!(
1392 ClientSmeScanRequest,
1393 fidl::encoding::DefaultFuchsiaResourceDialect
1394 );
1395 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeScanRequest>(&header, _body_bytes, handles, &mut req)?;
1396 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1397 Ok(ClientSmeRequest::Scan {
1398 req: req.req,
1399
1400 responder: ClientSmeScanResponder {
1401 control_handle: std::mem::ManuallyDrop::new(control_handle),
1402 tx_id: header.tx_id,
1403 },
1404 })
1405 }
1406 0x250a0f6fe9f85351 => {
1407 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1408 let mut req = fidl::new_empty!(
1409 ClientSmeConnectRequest,
1410 fidl::encoding::DefaultFuchsiaResourceDialect
1411 );
1412 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeConnectRequest>(&header, _body_bytes, handles, &mut req)?;
1413 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1414 Ok(ClientSmeRequest::Connect { req: req.req, txn: req.txn, control_handle })
1415 }
1416 0x107ead7d84723921 => {
1417 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
1418 let mut req = fidl::new_empty!(
1419 ClientSmeRoamRequest,
1420 fidl::encoding::DefaultFuchsiaResourceDialect
1421 );
1422 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeRoamRequest>(&header, _body_bytes, handles, &mut req)?;
1423 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1424 Ok(ClientSmeRequest::Roam { req: req.req, control_handle })
1425 }
1426 0x39a578de9a107304 => {
1427 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1428 let mut req = fidl::new_empty!(
1429 ClientSmeDisconnectRequest,
1430 fidl::encoding::DefaultFuchsiaResourceDialect
1431 );
1432 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeDisconnectRequest>(&header, _body_bytes, handles, &mut req)?;
1433 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1434 Ok(ClientSmeRequest::Disconnect {
1435 reason: req.reason,
1436
1437 responder: ClientSmeDisconnectResponder {
1438 control_handle: std::mem::ManuallyDrop::new(control_handle),
1439 tx_id: header.tx_id,
1440 },
1441 })
1442 }
1443 0xda00b607470faf2 => {
1444 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1445 let mut req = fidl::new_empty!(
1446 fidl::encoding::EmptyPayload,
1447 fidl::encoding::DefaultFuchsiaResourceDialect
1448 );
1449 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1450 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1451 Ok(ClientSmeRequest::Status {
1452 responder: ClientSmeStatusResponder {
1453 control_handle: std::mem::ManuallyDrop::new(control_handle),
1454 tx_id: header.tx_id,
1455 },
1456 })
1457 }
1458 0x3d0ccc75f6baa9e3 => {
1459 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1460 let mut req = fidl::new_empty!(
1461 fidl::encoding::EmptyPayload,
1462 fidl::encoding::DefaultFuchsiaResourceDialect
1463 );
1464 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1465 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1466 Ok(ClientSmeRequest::WmmStatus {
1467 responder: ClientSmeWmmStatusResponder {
1468 control_handle: std::mem::ManuallyDrop::new(control_handle),
1469 tx_id: header.tx_id,
1470 },
1471 })
1472 }
1473 0x21f00ab22ff79a12 => {
1474 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1475 let mut req = fidl::new_empty!(
1476 ClientSmeScanForControllerRequest,
1477 fidl::encoding::DefaultFuchsiaResourceDialect
1478 );
1479 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ClientSmeScanForControllerRequest>(&header, _body_bytes, handles, &mut req)?;
1480 let control_handle = ClientSmeControlHandle { inner: this.inner.clone() };
1481 Ok(ClientSmeRequest::ScanForController {
1482 req: req.req,
1483
1484 responder: ClientSmeScanForControllerResponder {
1485 control_handle: std::mem::ManuallyDrop::new(control_handle),
1486 tx_id: header.tx_id,
1487 },
1488 })
1489 }
1490 _ => Err(fidl::Error::UnknownOrdinal {
1491 ordinal: header.ordinal,
1492 protocol_name:
1493 <ClientSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1494 }),
1495 }))
1496 },
1497 )
1498 }
1499}
1500
1501#[derive(Debug)]
1502pub enum ClientSmeRequest {
1503 Scan {
1504 req: ScanRequest,
1505 responder: ClientSmeScanResponder,
1506 },
1507 Connect {
1508 req: ConnectRequest,
1509 txn: Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1510 control_handle: ClientSmeControlHandle,
1511 },
1512 Roam {
1513 req: RoamRequest,
1514 control_handle: ClientSmeControlHandle,
1515 },
1516 Disconnect {
1517 reason: UserDisconnectReason,
1518 responder: ClientSmeDisconnectResponder,
1519 },
1520 Status {
1521 responder: ClientSmeStatusResponder,
1522 },
1523 WmmStatus {
1524 responder: ClientSmeWmmStatusResponder,
1525 },
1526 ScanForController {
1527 req: ScanRequest,
1528 responder: ClientSmeScanForControllerResponder,
1529 },
1530}
1531
1532impl ClientSmeRequest {
1533 #[allow(irrefutable_let_patterns)]
1534 pub fn into_scan(self) -> Option<(ScanRequest, ClientSmeScanResponder)> {
1535 if let ClientSmeRequest::Scan { req, responder } = self {
1536 Some((req, responder))
1537 } else {
1538 None
1539 }
1540 }
1541
1542 #[allow(irrefutable_let_patterns)]
1543 pub fn into_connect(
1544 self,
1545 ) -> Option<(
1546 ConnectRequest,
1547 Option<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
1548 ClientSmeControlHandle,
1549 )> {
1550 if let ClientSmeRequest::Connect { req, txn, control_handle } = self {
1551 Some((req, txn, control_handle))
1552 } else {
1553 None
1554 }
1555 }
1556
1557 #[allow(irrefutable_let_patterns)]
1558 pub fn into_roam(self) -> Option<(RoamRequest, ClientSmeControlHandle)> {
1559 if let ClientSmeRequest::Roam { req, control_handle } = self {
1560 Some((req, control_handle))
1561 } else {
1562 None
1563 }
1564 }
1565
1566 #[allow(irrefutable_let_patterns)]
1567 pub fn into_disconnect(self) -> Option<(UserDisconnectReason, ClientSmeDisconnectResponder)> {
1568 if let ClientSmeRequest::Disconnect { reason, responder } = self {
1569 Some((reason, responder))
1570 } else {
1571 None
1572 }
1573 }
1574
1575 #[allow(irrefutable_let_patterns)]
1576 pub fn into_status(self) -> Option<(ClientSmeStatusResponder)> {
1577 if let ClientSmeRequest::Status { responder } = self { Some((responder)) } else { None }
1578 }
1579
1580 #[allow(irrefutable_let_patterns)]
1581 pub fn into_wmm_status(self) -> Option<(ClientSmeWmmStatusResponder)> {
1582 if let ClientSmeRequest::WmmStatus { responder } = self { Some((responder)) } else { None }
1583 }
1584
1585 #[allow(irrefutable_let_patterns)]
1586 pub fn into_scan_for_controller(
1587 self,
1588 ) -> Option<(ScanRequest, ClientSmeScanForControllerResponder)> {
1589 if let ClientSmeRequest::ScanForController { req, responder } = self {
1590 Some((req, responder))
1591 } else {
1592 None
1593 }
1594 }
1595
1596 pub fn method_name(&self) -> &'static str {
1598 match *self {
1599 ClientSmeRequest::Scan { .. } => "scan",
1600 ClientSmeRequest::Connect { .. } => "connect",
1601 ClientSmeRequest::Roam { .. } => "roam",
1602 ClientSmeRequest::Disconnect { .. } => "disconnect",
1603 ClientSmeRequest::Status { .. } => "status",
1604 ClientSmeRequest::WmmStatus { .. } => "wmm_status",
1605 ClientSmeRequest::ScanForController { .. } => "scan_for_controller",
1606 }
1607 }
1608}
1609
1610#[derive(Debug, Clone)]
1611pub struct ClientSmeControlHandle {
1612 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1613}
1614
1615impl fidl::endpoints::ControlHandle for ClientSmeControlHandle {
1616 fn shutdown(&self) {
1617 self.inner.shutdown()
1618 }
1619 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1620 self.inner.shutdown_with_epitaph(status)
1621 }
1622
1623 fn is_closed(&self) -> bool {
1624 self.inner.channel().is_closed()
1625 }
1626 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1627 self.inner.channel().on_closed()
1628 }
1629
1630 #[cfg(target_os = "fuchsia")]
1631 fn signal_peer(
1632 &self,
1633 clear_mask: zx::Signals,
1634 set_mask: zx::Signals,
1635 ) -> Result<(), zx_status::Status> {
1636 use fidl::Peered;
1637 self.inner.channel().signal_peer(clear_mask, set_mask)
1638 }
1639}
1640
1641impl ClientSmeControlHandle {}
1642
1643#[must_use = "FIDL methods require a response to be sent"]
1644#[derive(Debug)]
1645pub struct ClientSmeScanResponder {
1646 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
1647 tx_id: u32,
1648}
1649
1650impl std::ops::Drop for ClientSmeScanResponder {
1654 fn drop(&mut self) {
1655 self.control_handle.shutdown();
1656 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1658 }
1659}
1660
1661impl fidl::endpoints::Responder for ClientSmeScanResponder {
1662 type ControlHandle = ClientSmeControlHandle;
1663
1664 fn control_handle(&self) -> &ClientSmeControlHandle {
1665 &self.control_handle
1666 }
1667
1668 fn drop_without_shutdown(mut self) {
1669 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1671 std::mem::forget(self);
1673 }
1674}
1675
1676impl ClientSmeScanResponder {
1677 pub fn send(self, mut result: Result<fidl::Vmo, ScanErrorCode>) -> Result<(), fidl::Error> {
1681 let _result = self.send_raw(result);
1682 if _result.is_err() {
1683 self.control_handle.shutdown();
1684 }
1685 self.drop_without_shutdown();
1686 _result
1687 }
1688
1689 pub fn send_no_shutdown_on_err(
1691 self,
1692 mut result: Result<fidl::Vmo, ScanErrorCode>,
1693 ) -> Result<(), fidl::Error> {
1694 let _result = self.send_raw(result);
1695 self.drop_without_shutdown();
1696 _result
1697 }
1698
1699 fn send_raw(&self, mut result: Result<fidl::Vmo, ScanErrorCode>) -> Result<(), fidl::Error> {
1700 self.control_handle
1701 .inner
1702 .send::<fidl::encoding::ResultType<ClientSmeScanResponse, ScanErrorCode>>(
1703 result.map(|scan_results| (scan_results,)),
1704 self.tx_id,
1705 0xded0ce3b1685822,
1706 fidl::encoding::DynamicFlags::empty(),
1707 )
1708 }
1709}
1710
1711#[must_use = "FIDL methods require a response to be sent"]
1712#[derive(Debug)]
1713pub struct ClientSmeDisconnectResponder {
1714 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
1715 tx_id: u32,
1716}
1717
1718impl std::ops::Drop for ClientSmeDisconnectResponder {
1722 fn drop(&mut self) {
1723 self.control_handle.shutdown();
1724 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1726 }
1727}
1728
1729impl fidl::endpoints::Responder for ClientSmeDisconnectResponder {
1730 type ControlHandle = ClientSmeControlHandle;
1731
1732 fn control_handle(&self) -> &ClientSmeControlHandle {
1733 &self.control_handle
1734 }
1735
1736 fn drop_without_shutdown(mut self) {
1737 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1739 std::mem::forget(self);
1741 }
1742}
1743
1744impl ClientSmeDisconnectResponder {
1745 pub fn send(self) -> Result<(), fidl::Error> {
1749 let _result = self.send_raw();
1750 if _result.is_err() {
1751 self.control_handle.shutdown();
1752 }
1753 self.drop_without_shutdown();
1754 _result
1755 }
1756
1757 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
1759 let _result = self.send_raw();
1760 self.drop_without_shutdown();
1761 _result
1762 }
1763
1764 fn send_raw(&self) -> Result<(), fidl::Error> {
1765 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
1766 (),
1767 self.tx_id,
1768 0x39a578de9a107304,
1769 fidl::encoding::DynamicFlags::empty(),
1770 )
1771 }
1772}
1773
1774#[must_use = "FIDL methods require a response to be sent"]
1775#[derive(Debug)]
1776pub struct ClientSmeStatusResponder {
1777 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
1778 tx_id: u32,
1779}
1780
1781impl std::ops::Drop for ClientSmeStatusResponder {
1785 fn drop(&mut self) {
1786 self.control_handle.shutdown();
1787 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1789 }
1790}
1791
1792impl fidl::endpoints::Responder for ClientSmeStatusResponder {
1793 type ControlHandle = ClientSmeControlHandle;
1794
1795 fn control_handle(&self) -> &ClientSmeControlHandle {
1796 &self.control_handle
1797 }
1798
1799 fn drop_without_shutdown(mut self) {
1800 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1802 std::mem::forget(self);
1804 }
1805}
1806
1807impl ClientSmeStatusResponder {
1808 pub fn send(self, mut resp: &ClientStatusResponse) -> Result<(), fidl::Error> {
1812 let _result = self.send_raw(resp);
1813 if _result.is_err() {
1814 self.control_handle.shutdown();
1815 }
1816 self.drop_without_shutdown();
1817 _result
1818 }
1819
1820 pub fn send_no_shutdown_on_err(
1822 self,
1823 mut resp: &ClientStatusResponse,
1824 ) -> Result<(), fidl::Error> {
1825 let _result = self.send_raw(resp);
1826 self.drop_without_shutdown();
1827 _result
1828 }
1829
1830 fn send_raw(&self, mut resp: &ClientStatusResponse) -> Result<(), fidl::Error> {
1831 self.control_handle.inner.send::<ClientSmeStatusResponse>(
1832 (resp,),
1833 self.tx_id,
1834 0xda00b607470faf2,
1835 fidl::encoding::DynamicFlags::empty(),
1836 )
1837 }
1838}
1839
1840#[must_use = "FIDL methods require a response to be sent"]
1841#[derive(Debug)]
1842pub struct ClientSmeWmmStatusResponder {
1843 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
1844 tx_id: u32,
1845}
1846
1847impl std::ops::Drop for ClientSmeWmmStatusResponder {
1851 fn drop(&mut self) {
1852 self.control_handle.shutdown();
1853 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1855 }
1856}
1857
1858impl fidl::endpoints::Responder for ClientSmeWmmStatusResponder {
1859 type ControlHandle = ClientSmeControlHandle;
1860
1861 fn control_handle(&self) -> &ClientSmeControlHandle {
1862 &self.control_handle
1863 }
1864
1865 fn drop_without_shutdown(mut self) {
1866 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1868 std::mem::forget(self);
1870 }
1871}
1872
1873impl ClientSmeWmmStatusResponder {
1874 pub fn send(
1878 self,
1879 mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
1880 ) -> Result<(), fidl::Error> {
1881 let _result = self.send_raw(result);
1882 if _result.is_err() {
1883 self.control_handle.shutdown();
1884 }
1885 self.drop_without_shutdown();
1886 _result
1887 }
1888
1889 pub fn send_no_shutdown_on_err(
1891 self,
1892 mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
1893 ) -> Result<(), fidl::Error> {
1894 let _result = self.send_raw(result);
1895 self.drop_without_shutdown();
1896 _result
1897 }
1898
1899 fn send_raw(
1900 &self,
1901 mut result: Result<&fidl_fuchsia_wlan_internal::WmmStatusResponse, i32>,
1902 ) -> Result<(), fidl::Error> {
1903 self.control_handle
1904 .inner
1905 .send::<fidl::encoding::ResultType<ClientSmeWmmStatusResponse, i32>>(
1906 result.map(|resp| (resp,)),
1907 self.tx_id,
1908 0x3d0ccc75f6baa9e3,
1909 fidl::encoding::DynamicFlags::empty(),
1910 )
1911 }
1912}
1913
1914#[must_use = "FIDL methods require a response to be sent"]
1915#[derive(Debug)]
1916pub struct ClientSmeScanForControllerResponder {
1917 control_handle: std::mem::ManuallyDrop<ClientSmeControlHandle>,
1918 tx_id: u32,
1919}
1920
1921impl std::ops::Drop for ClientSmeScanForControllerResponder {
1925 fn drop(&mut self) {
1926 self.control_handle.shutdown();
1927 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1929 }
1930}
1931
1932impl fidl::endpoints::Responder for ClientSmeScanForControllerResponder {
1933 type ControlHandle = ClientSmeControlHandle;
1934
1935 fn control_handle(&self) -> &ClientSmeControlHandle {
1936 &self.control_handle
1937 }
1938
1939 fn drop_without_shutdown(mut self) {
1940 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1942 std::mem::forget(self);
1944 }
1945}
1946
1947impl ClientSmeScanForControllerResponder {
1948 pub fn send(self, mut result: Result<&[ScanResult], ScanErrorCode>) -> Result<(), fidl::Error> {
1952 let _result = self.send_raw(result);
1953 if _result.is_err() {
1954 self.control_handle.shutdown();
1955 }
1956 self.drop_without_shutdown();
1957 _result
1958 }
1959
1960 pub fn send_no_shutdown_on_err(
1962 self,
1963 mut result: Result<&[ScanResult], ScanErrorCode>,
1964 ) -> Result<(), fidl::Error> {
1965 let _result = self.send_raw(result);
1966 self.drop_without_shutdown();
1967 _result
1968 }
1969
1970 fn send_raw(
1971 &self,
1972 mut result: Result<&[ScanResult], ScanErrorCode>,
1973 ) -> Result<(), fidl::Error> {
1974 self.control_handle.inner.send::<fidl::encoding::ResultType<
1975 ClientSmeScanForControllerResponse,
1976 ScanErrorCode,
1977 >>(
1978 result.map(|scan_results| (scan_results,)),
1979 self.tx_id,
1980 0x21f00ab22ff79a12,
1981 fidl::encoding::DynamicFlags::empty(),
1982 )
1983 }
1984}
1985
1986#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1987pub struct ConnectTransactionMarker;
1988
1989impl fidl::endpoints::ProtocolMarker for ConnectTransactionMarker {
1990 type Proxy = ConnectTransactionProxy;
1991 type RequestStream = ConnectTransactionRequestStream;
1992 #[cfg(target_os = "fuchsia")]
1993 type SynchronousProxy = ConnectTransactionSynchronousProxy;
1994
1995 const DEBUG_NAME: &'static str = "(anonymous) ConnectTransaction";
1996}
1997
1998pub trait ConnectTransactionProxyInterface: Send + Sync {}
1999#[derive(Debug)]
2000#[cfg(target_os = "fuchsia")]
2001pub struct ConnectTransactionSynchronousProxy {
2002 client: fidl::client::sync::Client,
2003}
2004
2005#[cfg(target_os = "fuchsia")]
2006impl fidl::endpoints::SynchronousProxy for ConnectTransactionSynchronousProxy {
2007 type Proxy = ConnectTransactionProxy;
2008 type Protocol = ConnectTransactionMarker;
2009
2010 fn from_channel(inner: fidl::Channel) -> Self {
2011 Self::new(inner)
2012 }
2013
2014 fn into_channel(self) -> fidl::Channel {
2015 self.client.into_channel()
2016 }
2017
2018 fn as_channel(&self) -> &fidl::Channel {
2019 self.client.as_channel()
2020 }
2021}
2022
2023#[cfg(target_os = "fuchsia")]
2024impl ConnectTransactionSynchronousProxy {
2025 pub fn new(channel: fidl::Channel) -> Self {
2026 let protocol_name =
2027 <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2028 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2029 }
2030
2031 pub fn into_channel(self) -> fidl::Channel {
2032 self.client.into_channel()
2033 }
2034
2035 pub fn wait_for_event(
2038 &self,
2039 deadline: zx::MonotonicInstant,
2040 ) -> Result<ConnectTransactionEvent, fidl::Error> {
2041 ConnectTransactionEvent::decode(self.client.wait_for_event(deadline)?)
2042 }
2043}
2044
2045#[cfg(target_os = "fuchsia")]
2046impl From<ConnectTransactionSynchronousProxy> for zx::Handle {
2047 fn from(value: ConnectTransactionSynchronousProxy) -> Self {
2048 value.into_channel().into()
2049 }
2050}
2051
2052#[cfg(target_os = "fuchsia")]
2053impl From<fidl::Channel> for ConnectTransactionSynchronousProxy {
2054 fn from(value: fidl::Channel) -> Self {
2055 Self::new(value)
2056 }
2057}
2058
2059#[cfg(target_os = "fuchsia")]
2060impl fidl::endpoints::FromClient for ConnectTransactionSynchronousProxy {
2061 type Protocol = ConnectTransactionMarker;
2062
2063 fn from_client(value: fidl::endpoints::ClientEnd<ConnectTransactionMarker>) -> Self {
2064 Self::new(value.into_channel())
2065 }
2066}
2067
2068#[derive(Debug, Clone)]
2069pub struct ConnectTransactionProxy {
2070 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2071}
2072
2073impl fidl::endpoints::Proxy for ConnectTransactionProxy {
2074 type Protocol = ConnectTransactionMarker;
2075
2076 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2077 Self::new(inner)
2078 }
2079
2080 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2081 self.client.into_channel().map_err(|client| Self { client })
2082 }
2083
2084 fn as_channel(&self) -> &::fidl::AsyncChannel {
2085 self.client.as_channel()
2086 }
2087}
2088
2089impl ConnectTransactionProxy {
2090 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2092 let protocol_name =
2093 <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2094 Self { client: fidl::client::Client::new(channel, protocol_name) }
2095 }
2096
2097 pub fn take_event_stream(&self) -> ConnectTransactionEventStream {
2103 ConnectTransactionEventStream { event_receiver: self.client.take_event_receiver() }
2104 }
2105}
2106
2107impl ConnectTransactionProxyInterface for ConnectTransactionProxy {}
2108
2109pub struct ConnectTransactionEventStream {
2110 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2111}
2112
2113impl std::marker::Unpin for ConnectTransactionEventStream {}
2114
2115impl futures::stream::FusedStream for ConnectTransactionEventStream {
2116 fn is_terminated(&self) -> bool {
2117 self.event_receiver.is_terminated()
2118 }
2119}
2120
2121impl futures::Stream for ConnectTransactionEventStream {
2122 type Item = Result<ConnectTransactionEvent, fidl::Error>;
2123
2124 fn poll_next(
2125 mut self: std::pin::Pin<&mut Self>,
2126 cx: &mut std::task::Context<'_>,
2127 ) -> std::task::Poll<Option<Self::Item>> {
2128 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2129 &mut self.event_receiver,
2130 cx
2131 )?) {
2132 Some(buf) => std::task::Poll::Ready(Some(ConnectTransactionEvent::decode(buf))),
2133 None => std::task::Poll::Ready(None),
2134 }
2135 }
2136}
2137
2138#[derive(Debug)]
2139pub enum ConnectTransactionEvent {
2140 OnConnectResult { result: ConnectResult },
2141 OnDisconnect { info: DisconnectInfo },
2142 OnRoamResult { result: RoamResult },
2143 OnSignalReport { ind: fidl_fuchsia_wlan_internal::SignalReportIndication },
2144 OnChannelSwitched { info: fidl_fuchsia_wlan_internal::ChannelSwitchInfo },
2145}
2146
2147impl ConnectTransactionEvent {
2148 #[allow(irrefutable_let_patterns)]
2149 pub fn into_on_connect_result(self) -> Option<ConnectResult> {
2150 if let ConnectTransactionEvent::OnConnectResult { result } = self {
2151 Some((result))
2152 } else {
2153 None
2154 }
2155 }
2156 #[allow(irrefutable_let_patterns)]
2157 pub fn into_on_disconnect(self) -> Option<DisconnectInfo> {
2158 if let ConnectTransactionEvent::OnDisconnect { info } = self { Some((info)) } else { None }
2159 }
2160 #[allow(irrefutable_let_patterns)]
2161 pub fn into_on_roam_result(self) -> Option<RoamResult> {
2162 if let ConnectTransactionEvent::OnRoamResult { result } = self {
2163 Some((result))
2164 } else {
2165 None
2166 }
2167 }
2168 #[allow(irrefutable_let_patterns)]
2169 pub fn into_on_signal_report(
2170 self,
2171 ) -> Option<fidl_fuchsia_wlan_internal::SignalReportIndication> {
2172 if let ConnectTransactionEvent::OnSignalReport { ind } = self { Some((ind)) } else { None }
2173 }
2174 #[allow(irrefutable_let_patterns)]
2175 pub fn into_on_channel_switched(self) -> Option<fidl_fuchsia_wlan_internal::ChannelSwitchInfo> {
2176 if let ConnectTransactionEvent::OnChannelSwitched { info } = self {
2177 Some((info))
2178 } else {
2179 None
2180 }
2181 }
2182
2183 fn decode(
2185 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2186 ) -> Result<ConnectTransactionEvent, fidl::Error> {
2187 let (bytes, _handles) = buf.split_mut();
2188 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2189 debug_assert_eq!(tx_header.tx_id, 0);
2190 match tx_header.ordinal {
2191 0x48d2cf407da489a7 => {
2192 let mut out = fidl::new_empty!(
2193 ConnectTransactionOnConnectResultRequest,
2194 fidl::encoding::DefaultFuchsiaResourceDialect
2195 );
2196 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnConnectResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2197 Ok((ConnectTransactionEvent::OnConnectResult { result: out.result }))
2198 }
2199 0x40dea7b1449cc733 => {
2200 let mut out = fidl::new_empty!(
2201 ConnectTransactionOnDisconnectRequest,
2202 fidl::encoding::DefaultFuchsiaResourceDialect
2203 );
2204 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnDisconnectRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2205 Ok((ConnectTransactionEvent::OnDisconnect { info: out.info }))
2206 }
2207 0x656267da4ccf2a41 => {
2208 let mut out = fidl::new_empty!(
2209 ConnectTransactionOnRoamResultRequest,
2210 fidl::encoding::DefaultFuchsiaResourceDialect
2211 );
2212 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnRoamResultRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2213 Ok((ConnectTransactionEvent::OnRoamResult { result: out.result }))
2214 }
2215 0x5e968bd5e267e262 => {
2216 let mut out = fidl::new_empty!(
2217 ConnectTransactionOnSignalReportRequest,
2218 fidl::encoding::DefaultFuchsiaResourceDialect
2219 );
2220 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnSignalReportRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2221 Ok((ConnectTransactionEvent::OnSignalReport { ind: out.ind }))
2222 }
2223 0x5f5153778cd70512 => {
2224 let mut out = fidl::new_empty!(
2225 ConnectTransactionOnChannelSwitchedRequest,
2226 fidl::encoding::DefaultFuchsiaResourceDialect
2227 );
2228 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ConnectTransactionOnChannelSwitchedRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2229 Ok((ConnectTransactionEvent::OnChannelSwitched { info: out.info }))
2230 }
2231 _ => Err(fidl::Error::UnknownOrdinal {
2232 ordinal: tx_header.ordinal,
2233 protocol_name:
2234 <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2235 }),
2236 }
2237 }
2238}
2239
2240pub struct ConnectTransactionRequestStream {
2242 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2243 is_terminated: bool,
2244}
2245
2246impl std::marker::Unpin for ConnectTransactionRequestStream {}
2247
2248impl futures::stream::FusedStream for ConnectTransactionRequestStream {
2249 fn is_terminated(&self) -> bool {
2250 self.is_terminated
2251 }
2252}
2253
2254impl fidl::endpoints::RequestStream for ConnectTransactionRequestStream {
2255 type Protocol = ConnectTransactionMarker;
2256 type ControlHandle = ConnectTransactionControlHandle;
2257
2258 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2259 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2260 }
2261
2262 fn control_handle(&self) -> Self::ControlHandle {
2263 ConnectTransactionControlHandle { inner: self.inner.clone() }
2264 }
2265
2266 fn into_inner(
2267 self,
2268 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2269 {
2270 (self.inner, self.is_terminated)
2271 }
2272
2273 fn from_inner(
2274 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2275 is_terminated: bool,
2276 ) -> Self {
2277 Self { inner, is_terminated }
2278 }
2279}
2280
2281impl futures::Stream for ConnectTransactionRequestStream {
2282 type Item = Result<ConnectTransactionRequest, fidl::Error>;
2283
2284 fn poll_next(
2285 mut self: std::pin::Pin<&mut Self>,
2286 cx: &mut std::task::Context<'_>,
2287 ) -> std::task::Poll<Option<Self::Item>> {
2288 let this = &mut *self;
2289 if this.inner.check_shutdown(cx) {
2290 this.is_terminated = true;
2291 return std::task::Poll::Ready(None);
2292 }
2293 if this.is_terminated {
2294 panic!("polled ConnectTransactionRequestStream after completion");
2295 }
2296 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2297 |bytes, handles| {
2298 match this.inner.channel().read_etc(cx, bytes, handles) {
2299 std::task::Poll::Ready(Ok(())) => {}
2300 std::task::Poll::Pending => return std::task::Poll::Pending,
2301 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2302 this.is_terminated = true;
2303 return std::task::Poll::Ready(None);
2304 }
2305 std::task::Poll::Ready(Err(e)) => {
2306 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2307 e.into(),
2308 ))));
2309 }
2310 }
2311
2312 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2314
2315 std::task::Poll::Ready(Some(match header.ordinal {
2316 _ => Err(fidl::Error::UnknownOrdinal {
2317 ordinal: header.ordinal,
2318 protocol_name: <ConnectTransactionMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2319 }),
2320 }))
2321 },
2322 )
2323 }
2324}
2325
2326#[derive(Debug)]
2327pub enum ConnectTransactionRequest {}
2328
2329impl ConnectTransactionRequest {
2330 pub fn method_name(&self) -> &'static str {
2332 match *self {}
2333 }
2334}
2335
2336#[derive(Debug, Clone)]
2337pub struct ConnectTransactionControlHandle {
2338 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2339}
2340
2341impl fidl::endpoints::ControlHandle for ConnectTransactionControlHandle {
2342 fn shutdown(&self) {
2343 self.inner.shutdown()
2344 }
2345 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2346 self.inner.shutdown_with_epitaph(status)
2347 }
2348
2349 fn is_closed(&self) -> bool {
2350 self.inner.channel().is_closed()
2351 }
2352 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2353 self.inner.channel().on_closed()
2354 }
2355
2356 #[cfg(target_os = "fuchsia")]
2357 fn signal_peer(
2358 &self,
2359 clear_mask: zx::Signals,
2360 set_mask: zx::Signals,
2361 ) -> Result<(), zx_status::Status> {
2362 use fidl::Peered;
2363 self.inner.channel().signal_peer(clear_mask, set_mask)
2364 }
2365}
2366
2367impl ConnectTransactionControlHandle {
2368 pub fn send_on_connect_result(&self, mut result: &ConnectResult) -> Result<(), fidl::Error> {
2369 self.inner.send::<ConnectTransactionOnConnectResultRequest>(
2370 (result,),
2371 0,
2372 0x48d2cf407da489a7,
2373 fidl::encoding::DynamicFlags::empty(),
2374 )
2375 }
2376
2377 pub fn send_on_disconnect(&self, mut info: &DisconnectInfo) -> Result<(), fidl::Error> {
2378 self.inner.send::<ConnectTransactionOnDisconnectRequest>(
2379 (info,),
2380 0,
2381 0x40dea7b1449cc733,
2382 fidl::encoding::DynamicFlags::empty(),
2383 )
2384 }
2385
2386 pub fn send_on_roam_result(&self, mut result: &RoamResult) -> Result<(), fidl::Error> {
2387 self.inner.send::<ConnectTransactionOnRoamResultRequest>(
2388 (result,),
2389 0,
2390 0x656267da4ccf2a41,
2391 fidl::encoding::DynamicFlags::empty(),
2392 )
2393 }
2394
2395 pub fn send_on_signal_report(
2396 &self,
2397 mut ind: &fidl_fuchsia_wlan_internal::SignalReportIndication,
2398 ) -> Result<(), fidl::Error> {
2399 self.inner.send::<ConnectTransactionOnSignalReportRequest>(
2400 (ind,),
2401 0,
2402 0x5e968bd5e267e262,
2403 fidl::encoding::DynamicFlags::empty(),
2404 )
2405 }
2406
2407 pub fn send_on_channel_switched(
2408 &self,
2409 mut info: &fidl_fuchsia_wlan_internal::ChannelSwitchInfo,
2410 ) -> Result<(), fidl::Error> {
2411 self.inner.send::<ConnectTransactionOnChannelSwitchedRequest>(
2412 (info,),
2413 0,
2414 0x5f5153778cd70512,
2415 fidl::encoding::DynamicFlags::empty(),
2416 )
2417 }
2418}
2419
2420#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2421pub struct GenericSmeMarker;
2422
2423impl fidl::endpoints::ProtocolMarker for GenericSmeMarker {
2424 type Proxy = GenericSmeProxy;
2425 type RequestStream = GenericSmeRequestStream;
2426 #[cfg(target_os = "fuchsia")]
2427 type SynchronousProxy = GenericSmeSynchronousProxy;
2428
2429 const DEBUG_NAME: &'static str = "(anonymous) GenericSme";
2430}
2431pub type GenericSmeGetClientSmeResult = Result<(), i32>;
2432pub type GenericSmeGetApSmeResult = Result<(), i32>;
2433pub type GenericSmeGetSmeTelemetryResult = Result<(), i32>;
2434
2435pub trait GenericSmeProxyInterface: Send + Sync {
2436 type QueryResponseFut: std::future::Future<Output = Result<GenericSmeQuery, fidl::Error>> + Send;
2437 fn r#query(&self) -> Self::QueryResponseFut;
2438 type GetClientSmeResponseFut: std::future::Future<Output = Result<GenericSmeGetClientSmeResult, fidl::Error>>
2439 + Send;
2440 fn r#get_client_sme(
2441 &self,
2442 sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
2443 ) -> Self::GetClientSmeResponseFut;
2444 type GetApSmeResponseFut: std::future::Future<Output = Result<GenericSmeGetApSmeResult, fidl::Error>>
2445 + Send;
2446 fn r#get_ap_sme(
2447 &self,
2448 sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
2449 ) -> Self::GetApSmeResponseFut;
2450 type GetSmeTelemetryResponseFut: std::future::Future<Output = Result<GenericSmeGetSmeTelemetryResult, fidl::Error>>
2451 + Send;
2452 fn r#get_sme_telemetry(
2453 &self,
2454 telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
2455 ) -> Self::GetSmeTelemetryResponseFut;
2456}
2457#[derive(Debug)]
2458#[cfg(target_os = "fuchsia")]
2459pub struct GenericSmeSynchronousProxy {
2460 client: fidl::client::sync::Client,
2461}
2462
2463#[cfg(target_os = "fuchsia")]
2464impl fidl::endpoints::SynchronousProxy for GenericSmeSynchronousProxy {
2465 type Proxy = GenericSmeProxy;
2466 type Protocol = GenericSmeMarker;
2467
2468 fn from_channel(inner: fidl::Channel) -> Self {
2469 Self::new(inner)
2470 }
2471
2472 fn into_channel(self) -> fidl::Channel {
2473 self.client.into_channel()
2474 }
2475
2476 fn as_channel(&self) -> &fidl::Channel {
2477 self.client.as_channel()
2478 }
2479}
2480
2481#[cfg(target_os = "fuchsia")]
2482impl GenericSmeSynchronousProxy {
2483 pub fn new(channel: fidl::Channel) -> Self {
2484 let protocol_name = <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2485 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2486 }
2487
2488 pub fn into_channel(self) -> fidl::Channel {
2489 self.client.into_channel()
2490 }
2491
2492 pub fn wait_for_event(
2495 &self,
2496 deadline: zx::MonotonicInstant,
2497 ) -> Result<GenericSmeEvent, fidl::Error> {
2498 GenericSmeEvent::decode(self.client.wait_for_event(deadline)?)
2499 }
2500
2501 pub fn r#query(
2505 &self,
2506 ___deadline: zx::MonotonicInstant,
2507 ) -> Result<GenericSmeQuery, fidl::Error> {
2508 let _response =
2509 self.client.send_query::<fidl::encoding::EmptyPayload, GenericSmeQueryResponse>(
2510 (),
2511 0x6ef4a820c153e249,
2512 fidl::encoding::DynamicFlags::empty(),
2513 ___deadline,
2514 )?;
2515 Ok(_response.resp)
2516 }
2517
2518 pub fn r#get_client_sme(
2525 &self,
2526 mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
2527 ___deadline: zx::MonotonicInstant,
2528 ) -> Result<GenericSmeGetClientSmeResult, fidl::Error> {
2529 let _response = self.client.send_query::<
2530 GenericSmeGetClientSmeRequest,
2531 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2532 >(
2533 (sme_server,),
2534 0x2439ad714c642f15,
2535 fidl::encoding::DynamicFlags::empty(),
2536 ___deadline,
2537 )?;
2538 Ok(_response.map(|x| x))
2539 }
2540
2541 pub fn r#get_ap_sme(
2548 &self,
2549 mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
2550 ___deadline: zx::MonotonicInstant,
2551 ) -> Result<GenericSmeGetApSmeResult, fidl::Error> {
2552 let _response = self.client.send_query::<
2553 GenericSmeGetApSmeRequest,
2554 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2555 >(
2556 (sme_server,),
2557 0x4d2a40be2b44ad6c,
2558 fidl::encoding::DynamicFlags::empty(),
2559 ___deadline,
2560 )?;
2561 Ok(_response.map(|x| x))
2562 }
2563
2564 pub fn r#get_sme_telemetry(
2572 &self,
2573 mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
2574 ___deadline: zx::MonotonicInstant,
2575 ) -> Result<GenericSmeGetSmeTelemetryResult, fidl::Error> {
2576 let _response = self.client.send_query::<
2577 GenericSmeGetSmeTelemetryRequest,
2578 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2579 >(
2580 (telemetry_server,),
2581 0x7ea015b3060fa,
2582 fidl::encoding::DynamicFlags::empty(),
2583 ___deadline,
2584 )?;
2585 Ok(_response.map(|x| x))
2586 }
2587}
2588
2589#[cfg(target_os = "fuchsia")]
2590impl From<GenericSmeSynchronousProxy> for zx::Handle {
2591 fn from(value: GenericSmeSynchronousProxy) -> Self {
2592 value.into_channel().into()
2593 }
2594}
2595
2596#[cfg(target_os = "fuchsia")]
2597impl From<fidl::Channel> for GenericSmeSynchronousProxy {
2598 fn from(value: fidl::Channel) -> Self {
2599 Self::new(value)
2600 }
2601}
2602
2603#[cfg(target_os = "fuchsia")]
2604impl fidl::endpoints::FromClient for GenericSmeSynchronousProxy {
2605 type Protocol = GenericSmeMarker;
2606
2607 fn from_client(value: fidl::endpoints::ClientEnd<GenericSmeMarker>) -> Self {
2608 Self::new(value.into_channel())
2609 }
2610}
2611
2612#[derive(Debug, Clone)]
2613pub struct GenericSmeProxy {
2614 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2615}
2616
2617impl fidl::endpoints::Proxy for GenericSmeProxy {
2618 type Protocol = GenericSmeMarker;
2619
2620 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2621 Self::new(inner)
2622 }
2623
2624 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2625 self.client.into_channel().map_err(|client| Self { client })
2626 }
2627
2628 fn as_channel(&self) -> &::fidl::AsyncChannel {
2629 self.client.as_channel()
2630 }
2631}
2632
2633impl GenericSmeProxy {
2634 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2636 let protocol_name = <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2637 Self { client: fidl::client::Client::new(channel, protocol_name) }
2638 }
2639
2640 pub fn take_event_stream(&self) -> GenericSmeEventStream {
2646 GenericSmeEventStream { event_receiver: self.client.take_event_receiver() }
2647 }
2648
2649 pub fn r#query(
2653 &self,
2654 ) -> fidl::client::QueryResponseFut<
2655 GenericSmeQuery,
2656 fidl::encoding::DefaultFuchsiaResourceDialect,
2657 > {
2658 GenericSmeProxyInterface::r#query(self)
2659 }
2660
2661 pub fn r#get_client_sme(
2668 &self,
2669 mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
2670 ) -> fidl::client::QueryResponseFut<
2671 GenericSmeGetClientSmeResult,
2672 fidl::encoding::DefaultFuchsiaResourceDialect,
2673 > {
2674 GenericSmeProxyInterface::r#get_client_sme(self, sme_server)
2675 }
2676
2677 pub fn r#get_ap_sme(
2684 &self,
2685 mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
2686 ) -> fidl::client::QueryResponseFut<
2687 GenericSmeGetApSmeResult,
2688 fidl::encoding::DefaultFuchsiaResourceDialect,
2689 > {
2690 GenericSmeProxyInterface::r#get_ap_sme(self, sme_server)
2691 }
2692
2693 pub fn r#get_sme_telemetry(
2701 &self,
2702 mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
2703 ) -> fidl::client::QueryResponseFut<
2704 GenericSmeGetSmeTelemetryResult,
2705 fidl::encoding::DefaultFuchsiaResourceDialect,
2706 > {
2707 GenericSmeProxyInterface::r#get_sme_telemetry(self, telemetry_server)
2708 }
2709}
2710
2711impl GenericSmeProxyInterface for GenericSmeProxy {
2712 type QueryResponseFut = fidl::client::QueryResponseFut<
2713 GenericSmeQuery,
2714 fidl::encoding::DefaultFuchsiaResourceDialect,
2715 >;
2716 fn r#query(&self) -> Self::QueryResponseFut {
2717 fn _decode(
2718 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2719 ) -> Result<GenericSmeQuery, fidl::Error> {
2720 let _response = fidl::client::decode_transaction_body::<
2721 GenericSmeQueryResponse,
2722 fidl::encoding::DefaultFuchsiaResourceDialect,
2723 0x6ef4a820c153e249,
2724 >(_buf?)?;
2725 Ok(_response.resp)
2726 }
2727 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, GenericSmeQuery>(
2728 (),
2729 0x6ef4a820c153e249,
2730 fidl::encoding::DynamicFlags::empty(),
2731 _decode,
2732 )
2733 }
2734
2735 type GetClientSmeResponseFut = fidl::client::QueryResponseFut<
2736 GenericSmeGetClientSmeResult,
2737 fidl::encoding::DefaultFuchsiaResourceDialect,
2738 >;
2739 fn r#get_client_sme(
2740 &self,
2741 mut sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
2742 ) -> Self::GetClientSmeResponseFut {
2743 fn _decode(
2744 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2745 ) -> Result<GenericSmeGetClientSmeResult, fidl::Error> {
2746 let _response = fidl::client::decode_transaction_body::<
2747 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2748 fidl::encoding::DefaultFuchsiaResourceDialect,
2749 0x2439ad714c642f15,
2750 >(_buf?)?;
2751 Ok(_response.map(|x| x))
2752 }
2753 self.client
2754 .send_query_and_decode::<GenericSmeGetClientSmeRequest, GenericSmeGetClientSmeResult>(
2755 (sme_server,),
2756 0x2439ad714c642f15,
2757 fidl::encoding::DynamicFlags::empty(),
2758 _decode,
2759 )
2760 }
2761
2762 type GetApSmeResponseFut = fidl::client::QueryResponseFut<
2763 GenericSmeGetApSmeResult,
2764 fidl::encoding::DefaultFuchsiaResourceDialect,
2765 >;
2766 fn r#get_ap_sme(
2767 &self,
2768 mut sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
2769 ) -> Self::GetApSmeResponseFut {
2770 fn _decode(
2771 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2772 ) -> Result<GenericSmeGetApSmeResult, fidl::Error> {
2773 let _response = fidl::client::decode_transaction_body::<
2774 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2775 fidl::encoding::DefaultFuchsiaResourceDialect,
2776 0x4d2a40be2b44ad6c,
2777 >(_buf?)?;
2778 Ok(_response.map(|x| x))
2779 }
2780 self.client.send_query_and_decode::<GenericSmeGetApSmeRequest, GenericSmeGetApSmeResult>(
2781 (sme_server,),
2782 0x4d2a40be2b44ad6c,
2783 fidl::encoding::DynamicFlags::empty(),
2784 _decode,
2785 )
2786 }
2787
2788 type GetSmeTelemetryResponseFut = fidl::client::QueryResponseFut<
2789 GenericSmeGetSmeTelemetryResult,
2790 fidl::encoding::DefaultFuchsiaResourceDialect,
2791 >;
2792 fn r#get_sme_telemetry(
2793 &self,
2794 mut telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
2795 ) -> Self::GetSmeTelemetryResponseFut {
2796 fn _decode(
2797 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2798 ) -> Result<GenericSmeGetSmeTelemetryResult, fidl::Error> {
2799 let _response = fidl::client::decode_transaction_body::<
2800 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2801 fidl::encoding::DefaultFuchsiaResourceDialect,
2802 0x7ea015b3060fa,
2803 >(_buf?)?;
2804 Ok(_response.map(|x| x))
2805 }
2806 self.client.send_query_and_decode::<
2807 GenericSmeGetSmeTelemetryRequest,
2808 GenericSmeGetSmeTelemetryResult,
2809 >(
2810 (telemetry_server,),
2811 0x7ea015b3060fa,
2812 fidl::encoding::DynamicFlags::empty(),
2813 _decode,
2814 )
2815 }
2816}
2817
2818pub struct GenericSmeEventStream {
2819 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2820}
2821
2822impl std::marker::Unpin for GenericSmeEventStream {}
2823
2824impl futures::stream::FusedStream for GenericSmeEventStream {
2825 fn is_terminated(&self) -> bool {
2826 self.event_receiver.is_terminated()
2827 }
2828}
2829
2830impl futures::Stream for GenericSmeEventStream {
2831 type Item = Result<GenericSmeEvent, fidl::Error>;
2832
2833 fn poll_next(
2834 mut self: std::pin::Pin<&mut Self>,
2835 cx: &mut std::task::Context<'_>,
2836 ) -> std::task::Poll<Option<Self::Item>> {
2837 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2838 &mut self.event_receiver,
2839 cx
2840 )?) {
2841 Some(buf) => std::task::Poll::Ready(Some(GenericSmeEvent::decode(buf))),
2842 None => std::task::Poll::Ready(None),
2843 }
2844 }
2845}
2846
2847#[derive(Debug)]
2848pub enum GenericSmeEvent {}
2849
2850impl GenericSmeEvent {
2851 fn decode(
2853 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2854 ) -> Result<GenericSmeEvent, fidl::Error> {
2855 let (bytes, _handles) = buf.split_mut();
2856 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2857 debug_assert_eq!(tx_header.tx_id, 0);
2858 match tx_header.ordinal {
2859 _ => Err(fidl::Error::UnknownOrdinal {
2860 ordinal: tx_header.ordinal,
2861 protocol_name: <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2862 }),
2863 }
2864 }
2865}
2866
2867pub struct GenericSmeRequestStream {
2869 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2870 is_terminated: bool,
2871}
2872
2873impl std::marker::Unpin for GenericSmeRequestStream {}
2874
2875impl futures::stream::FusedStream for GenericSmeRequestStream {
2876 fn is_terminated(&self) -> bool {
2877 self.is_terminated
2878 }
2879}
2880
2881impl fidl::endpoints::RequestStream for GenericSmeRequestStream {
2882 type Protocol = GenericSmeMarker;
2883 type ControlHandle = GenericSmeControlHandle;
2884
2885 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2886 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2887 }
2888
2889 fn control_handle(&self) -> Self::ControlHandle {
2890 GenericSmeControlHandle { inner: self.inner.clone() }
2891 }
2892
2893 fn into_inner(
2894 self,
2895 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2896 {
2897 (self.inner, self.is_terminated)
2898 }
2899
2900 fn from_inner(
2901 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2902 is_terminated: bool,
2903 ) -> Self {
2904 Self { inner, is_terminated }
2905 }
2906}
2907
2908impl futures::Stream for GenericSmeRequestStream {
2909 type Item = Result<GenericSmeRequest, fidl::Error>;
2910
2911 fn poll_next(
2912 mut self: std::pin::Pin<&mut Self>,
2913 cx: &mut std::task::Context<'_>,
2914 ) -> std::task::Poll<Option<Self::Item>> {
2915 let this = &mut *self;
2916 if this.inner.check_shutdown(cx) {
2917 this.is_terminated = true;
2918 return std::task::Poll::Ready(None);
2919 }
2920 if this.is_terminated {
2921 panic!("polled GenericSmeRequestStream after completion");
2922 }
2923 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2924 |bytes, handles| {
2925 match this.inner.channel().read_etc(cx, bytes, handles) {
2926 std::task::Poll::Ready(Ok(())) => {}
2927 std::task::Poll::Pending => return std::task::Poll::Pending,
2928 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2929 this.is_terminated = true;
2930 return std::task::Poll::Ready(None);
2931 }
2932 std::task::Poll::Ready(Err(e)) => {
2933 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2934 e.into(),
2935 ))));
2936 }
2937 }
2938
2939 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2941
2942 std::task::Poll::Ready(Some(match header.ordinal {
2943 0x6ef4a820c153e249 => {
2944 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2945 let mut req = fidl::new_empty!(
2946 fidl::encoding::EmptyPayload,
2947 fidl::encoding::DefaultFuchsiaResourceDialect
2948 );
2949 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2950 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
2951 Ok(GenericSmeRequest::Query {
2952 responder: GenericSmeQueryResponder {
2953 control_handle: std::mem::ManuallyDrop::new(control_handle),
2954 tx_id: header.tx_id,
2955 },
2956 })
2957 }
2958 0x2439ad714c642f15 => {
2959 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2960 let mut req = fidl::new_empty!(
2961 GenericSmeGetClientSmeRequest,
2962 fidl::encoding::DefaultFuchsiaResourceDialect
2963 );
2964 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetClientSmeRequest>(&header, _body_bytes, handles, &mut req)?;
2965 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
2966 Ok(GenericSmeRequest::GetClientSme {
2967 sme_server: req.sme_server,
2968
2969 responder: GenericSmeGetClientSmeResponder {
2970 control_handle: std::mem::ManuallyDrop::new(control_handle),
2971 tx_id: header.tx_id,
2972 },
2973 })
2974 }
2975 0x4d2a40be2b44ad6c => {
2976 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2977 let mut req = fidl::new_empty!(
2978 GenericSmeGetApSmeRequest,
2979 fidl::encoding::DefaultFuchsiaResourceDialect
2980 );
2981 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetApSmeRequest>(&header, _body_bytes, handles, &mut req)?;
2982 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
2983 Ok(GenericSmeRequest::GetApSme {
2984 sme_server: req.sme_server,
2985
2986 responder: GenericSmeGetApSmeResponder {
2987 control_handle: std::mem::ManuallyDrop::new(control_handle),
2988 tx_id: header.tx_id,
2989 },
2990 })
2991 }
2992 0x7ea015b3060fa => {
2993 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2994 let mut req = fidl::new_empty!(
2995 GenericSmeGetSmeTelemetryRequest,
2996 fidl::encoding::DefaultFuchsiaResourceDialect
2997 );
2998 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<GenericSmeGetSmeTelemetryRequest>(&header, _body_bytes, handles, &mut req)?;
2999 let control_handle = GenericSmeControlHandle { inner: this.inner.clone() };
3000 Ok(GenericSmeRequest::GetSmeTelemetry {
3001 telemetry_server: req.telemetry_server,
3002
3003 responder: GenericSmeGetSmeTelemetryResponder {
3004 control_handle: std::mem::ManuallyDrop::new(control_handle),
3005 tx_id: header.tx_id,
3006 },
3007 })
3008 }
3009 _ => Err(fidl::Error::UnknownOrdinal {
3010 ordinal: header.ordinal,
3011 protocol_name:
3012 <GenericSmeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3013 }),
3014 }))
3015 },
3016 )
3017 }
3018}
3019
3020#[derive(Debug)]
3021pub enum GenericSmeRequest {
3022 Query { responder: GenericSmeQueryResponder },
3026 GetClientSme {
3033 sme_server: fidl::endpoints::ServerEnd<ClientSmeMarker>,
3034 responder: GenericSmeGetClientSmeResponder,
3035 },
3036 GetApSme {
3043 sme_server: fidl::endpoints::ServerEnd<ApSmeMarker>,
3044 responder: GenericSmeGetApSmeResponder,
3045 },
3046 GetSmeTelemetry {
3054 telemetry_server: fidl::endpoints::ServerEnd<TelemetryMarker>,
3055 responder: GenericSmeGetSmeTelemetryResponder,
3056 },
3057}
3058
3059impl GenericSmeRequest {
3060 #[allow(irrefutable_let_patterns)]
3061 pub fn into_query(self) -> Option<(GenericSmeQueryResponder)> {
3062 if let GenericSmeRequest::Query { responder } = self { Some((responder)) } else { None }
3063 }
3064
3065 #[allow(irrefutable_let_patterns)]
3066 pub fn into_get_client_sme(
3067 self,
3068 ) -> Option<(fidl::endpoints::ServerEnd<ClientSmeMarker>, GenericSmeGetClientSmeResponder)>
3069 {
3070 if let GenericSmeRequest::GetClientSme { sme_server, responder } = self {
3071 Some((sme_server, responder))
3072 } else {
3073 None
3074 }
3075 }
3076
3077 #[allow(irrefutable_let_patterns)]
3078 pub fn into_get_ap_sme(
3079 self,
3080 ) -> Option<(fidl::endpoints::ServerEnd<ApSmeMarker>, GenericSmeGetApSmeResponder)> {
3081 if let GenericSmeRequest::GetApSme { sme_server, responder } = self {
3082 Some((sme_server, responder))
3083 } else {
3084 None
3085 }
3086 }
3087
3088 #[allow(irrefutable_let_patterns)]
3089 pub fn into_get_sme_telemetry(
3090 self,
3091 ) -> Option<(fidl::endpoints::ServerEnd<TelemetryMarker>, GenericSmeGetSmeTelemetryResponder)>
3092 {
3093 if let GenericSmeRequest::GetSmeTelemetry { telemetry_server, responder } = self {
3094 Some((telemetry_server, responder))
3095 } else {
3096 None
3097 }
3098 }
3099
3100 pub fn method_name(&self) -> &'static str {
3102 match *self {
3103 GenericSmeRequest::Query { .. } => "query",
3104 GenericSmeRequest::GetClientSme { .. } => "get_client_sme",
3105 GenericSmeRequest::GetApSme { .. } => "get_ap_sme",
3106 GenericSmeRequest::GetSmeTelemetry { .. } => "get_sme_telemetry",
3107 }
3108 }
3109}
3110
3111#[derive(Debug, Clone)]
3112pub struct GenericSmeControlHandle {
3113 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3114}
3115
3116impl fidl::endpoints::ControlHandle for GenericSmeControlHandle {
3117 fn shutdown(&self) {
3118 self.inner.shutdown()
3119 }
3120 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3121 self.inner.shutdown_with_epitaph(status)
3122 }
3123
3124 fn is_closed(&self) -> bool {
3125 self.inner.channel().is_closed()
3126 }
3127 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3128 self.inner.channel().on_closed()
3129 }
3130
3131 #[cfg(target_os = "fuchsia")]
3132 fn signal_peer(
3133 &self,
3134 clear_mask: zx::Signals,
3135 set_mask: zx::Signals,
3136 ) -> Result<(), zx_status::Status> {
3137 use fidl::Peered;
3138 self.inner.channel().signal_peer(clear_mask, set_mask)
3139 }
3140}
3141
3142impl GenericSmeControlHandle {}
3143
3144#[must_use = "FIDL methods require a response to be sent"]
3145#[derive(Debug)]
3146pub struct GenericSmeQueryResponder {
3147 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
3148 tx_id: u32,
3149}
3150
3151impl std::ops::Drop for GenericSmeQueryResponder {
3155 fn drop(&mut self) {
3156 self.control_handle.shutdown();
3157 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3159 }
3160}
3161
3162impl fidl::endpoints::Responder for GenericSmeQueryResponder {
3163 type ControlHandle = GenericSmeControlHandle;
3164
3165 fn control_handle(&self) -> &GenericSmeControlHandle {
3166 &self.control_handle
3167 }
3168
3169 fn drop_without_shutdown(mut self) {
3170 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3172 std::mem::forget(self);
3174 }
3175}
3176
3177impl GenericSmeQueryResponder {
3178 pub fn send(self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
3182 let _result = self.send_raw(resp);
3183 if _result.is_err() {
3184 self.control_handle.shutdown();
3185 }
3186 self.drop_without_shutdown();
3187 _result
3188 }
3189
3190 pub fn send_no_shutdown_on_err(self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
3192 let _result = self.send_raw(resp);
3193 self.drop_without_shutdown();
3194 _result
3195 }
3196
3197 fn send_raw(&self, mut resp: &GenericSmeQuery) -> Result<(), fidl::Error> {
3198 self.control_handle.inner.send::<GenericSmeQueryResponse>(
3199 (resp,),
3200 self.tx_id,
3201 0x6ef4a820c153e249,
3202 fidl::encoding::DynamicFlags::empty(),
3203 )
3204 }
3205}
3206
3207#[must_use = "FIDL methods require a response to be sent"]
3208#[derive(Debug)]
3209pub struct GenericSmeGetClientSmeResponder {
3210 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
3211 tx_id: u32,
3212}
3213
3214impl std::ops::Drop for GenericSmeGetClientSmeResponder {
3218 fn drop(&mut self) {
3219 self.control_handle.shutdown();
3220 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3222 }
3223}
3224
3225impl fidl::endpoints::Responder for GenericSmeGetClientSmeResponder {
3226 type ControlHandle = GenericSmeControlHandle;
3227
3228 fn control_handle(&self) -> &GenericSmeControlHandle {
3229 &self.control_handle
3230 }
3231
3232 fn drop_without_shutdown(mut self) {
3233 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3235 std::mem::forget(self);
3237 }
3238}
3239
3240impl GenericSmeGetClientSmeResponder {
3241 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3245 let _result = self.send_raw(result);
3246 if _result.is_err() {
3247 self.control_handle.shutdown();
3248 }
3249 self.drop_without_shutdown();
3250 _result
3251 }
3252
3253 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3255 let _result = self.send_raw(result);
3256 self.drop_without_shutdown();
3257 _result
3258 }
3259
3260 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3261 self.control_handle
3262 .inner
3263 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3264 result,
3265 self.tx_id,
3266 0x2439ad714c642f15,
3267 fidl::encoding::DynamicFlags::empty(),
3268 )
3269 }
3270}
3271
3272#[must_use = "FIDL methods require a response to be sent"]
3273#[derive(Debug)]
3274pub struct GenericSmeGetApSmeResponder {
3275 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
3276 tx_id: u32,
3277}
3278
3279impl std::ops::Drop for GenericSmeGetApSmeResponder {
3283 fn drop(&mut self) {
3284 self.control_handle.shutdown();
3285 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3287 }
3288}
3289
3290impl fidl::endpoints::Responder for GenericSmeGetApSmeResponder {
3291 type ControlHandle = GenericSmeControlHandle;
3292
3293 fn control_handle(&self) -> &GenericSmeControlHandle {
3294 &self.control_handle
3295 }
3296
3297 fn drop_without_shutdown(mut self) {
3298 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3300 std::mem::forget(self);
3302 }
3303}
3304
3305impl GenericSmeGetApSmeResponder {
3306 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3310 let _result = self.send_raw(result);
3311 if _result.is_err() {
3312 self.control_handle.shutdown();
3313 }
3314 self.drop_without_shutdown();
3315 _result
3316 }
3317
3318 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3320 let _result = self.send_raw(result);
3321 self.drop_without_shutdown();
3322 _result
3323 }
3324
3325 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3326 self.control_handle
3327 .inner
3328 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3329 result,
3330 self.tx_id,
3331 0x4d2a40be2b44ad6c,
3332 fidl::encoding::DynamicFlags::empty(),
3333 )
3334 }
3335}
3336
3337#[must_use = "FIDL methods require a response to be sent"]
3338#[derive(Debug)]
3339pub struct GenericSmeGetSmeTelemetryResponder {
3340 control_handle: std::mem::ManuallyDrop<GenericSmeControlHandle>,
3341 tx_id: u32,
3342}
3343
3344impl std::ops::Drop for GenericSmeGetSmeTelemetryResponder {
3348 fn drop(&mut self) {
3349 self.control_handle.shutdown();
3350 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3352 }
3353}
3354
3355impl fidl::endpoints::Responder for GenericSmeGetSmeTelemetryResponder {
3356 type ControlHandle = GenericSmeControlHandle;
3357
3358 fn control_handle(&self) -> &GenericSmeControlHandle {
3359 &self.control_handle
3360 }
3361
3362 fn drop_without_shutdown(mut self) {
3363 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3365 std::mem::forget(self);
3367 }
3368}
3369
3370impl GenericSmeGetSmeTelemetryResponder {
3371 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3375 let _result = self.send_raw(result);
3376 if _result.is_err() {
3377 self.control_handle.shutdown();
3378 }
3379 self.drop_without_shutdown();
3380 _result
3381 }
3382
3383 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3385 let _result = self.send_raw(result);
3386 self.drop_without_shutdown();
3387 _result
3388 }
3389
3390 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3391 self.control_handle
3392 .inner
3393 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3394 result,
3395 self.tx_id,
3396 0x7ea015b3060fa,
3397 fidl::encoding::DynamicFlags::empty(),
3398 )
3399 }
3400}
3401
3402#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3403pub struct TelemetryMarker;
3404
3405impl fidl::endpoints::ProtocolMarker for TelemetryMarker {
3406 type Proxy = TelemetryProxy;
3407 type RequestStream = TelemetryRequestStream;
3408 #[cfg(target_os = "fuchsia")]
3409 type SynchronousProxy = TelemetrySynchronousProxy;
3410
3411 const DEBUG_NAME: &'static str = "(anonymous) Telemetry";
3412}
3413pub type TelemetryQueryTelemetrySupportResult =
3414 Result<fidl_fuchsia_wlan_stats::TelemetrySupport, i32>;
3415pub type TelemetryGetIfaceStatsResult = Result<fidl_fuchsia_wlan_stats::IfaceStats, i32>;
3416pub type TelemetryGetHistogramStatsResult =
3417 Result<fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>;
3418pub type TelemetryGetSignalReportResult = Result<fidl_fuchsia_wlan_stats::SignalReport, i32>;
3419pub type TelemetryCloneInspectVmoResult = Result<fidl::Vmo, i32>;
3420
3421pub trait TelemetryProxyInterface: Send + Sync {
3422 type QueryTelemetrySupportResponseFut: std::future::Future<Output = Result<TelemetryQueryTelemetrySupportResult, fidl::Error>>
3423 + Send;
3424 fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut;
3425 type GetIfaceStatsResponseFut: std::future::Future<Output = Result<TelemetryGetIfaceStatsResult, fidl::Error>>
3426 + Send;
3427 fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut;
3428 type GetHistogramStatsResponseFut: std::future::Future<Output = Result<TelemetryGetHistogramStatsResult, fidl::Error>>
3429 + Send;
3430 fn r#get_histogram_stats(&self) -> Self::GetHistogramStatsResponseFut;
3431 type GetSignalReportResponseFut: std::future::Future<Output = Result<TelemetryGetSignalReportResult, fidl::Error>>
3432 + Send;
3433 fn r#get_signal_report(&self) -> Self::GetSignalReportResponseFut;
3434 type CloneInspectVmoResponseFut: std::future::Future<Output = Result<TelemetryCloneInspectVmoResult, fidl::Error>>
3435 + Send;
3436 fn r#clone_inspect_vmo(&self) -> Self::CloneInspectVmoResponseFut;
3437}
3438#[derive(Debug)]
3439#[cfg(target_os = "fuchsia")]
3440pub struct TelemetrySynchronousProxy {
3441 client: fidl::client::sync::Client,
3442}
3443
3444#[cfg(target_os = "fuchsia")]
3445impl fidl::endpoints::SynchronousProxy for TelemetrySynchronousProxy {
3446 type Proxy = TelemetryProxy;
3447 type Protocol = TelemetryMarker;
3448
3449 fn from_channel(inner: fidl::Channel) -> Self {
3450 Self::new(inner)
3451 }
3452
3453 fn into_channel(self) -> fidl::Channel {
3454 self.client.into_channel()
3455 }
3456
3457 fn as_channel(&self) -> &fidl::Channel {
3458 self.client.as_channel()
3459 }
3460}
3461
3462#[cfg(target_os = "fuchsia")]
3463impl TelemetrySynchronousProxy {
3464 pub fn new(channel: fidl::Channel) -> Self {
3465 let protocol_name = <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3466 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3467 }
3468
3469 pub fn into_channel(self) -> fidl::Channel {
3470 self.client.into_channel()
3471 }
3472
3473 pub fn wait_for_event(
3476 &self,
3477 deadline: zx::MonotonicInstant,
3478 ) -> Result<TelemetryEvent, fidl::Error> {
3479 TelemetryEvent::decode(self.client.wait_for_event(deadline)?)
3480 }
3481
3482 pub fn r#query_telemetry_support(
3483 &self,
3484 ___deadline: zx::MonotonicInstant,
3485 ) -> Result<TelemetryQueryTelemetrySupportResult, fidl::Error> {
3486 let _response = self.client.send_query::<
3487 fidl::encoding::EmptyPayload,
3488 fidl::encoding::ResultType<TelemetryQueryTelemetrySupportResponse, i32>,
3489 >(
3490 (),
3491 0x69443ad35b204686,
3492 fidl::encoding::DynamicFlags::empty(),
3493 ___deadline,
3494 )?;
3495 Ok(_response.map(|x| x.resp))
3496 }
3497
3498 pub fn r#get_iface_stats(
3499 &self,
3500 ___deadline: zx::MonotonicInstant,
3501 ) -> Result<TelemetryGetIfaceStatsResult, fidl::Error> {
3502 let _response = self.client.send_query::<
3503 fidl::encoding::EmptyPayload,
3504 fidl::encoding::ResultType<TelemetryGetIfaceStatsResponse, i32>,
3505 >(
3506 (),
3507 0x6af057f3a017f572,
3508 fidl::encoding::DynamicFlags::empty(),
3509 ___deadline,
3510 )?;
3511 Ok(_response.map(|x| x.stats))
3512 }
3513
3514 pub fn r#get_histogram_stats(
3515 &self,
3516 ___deadline: zx::MonotonicInstant,
3517 ) -> Result<TelemetryGetHistogramStatsResult, fidl::Error> {
3518 let _response = self.client.send_query::<
3519 fidl::encoding::EmptyPayload,
3520 fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>,
3521 >(
3522 (),
3523 0x46d2b6a23f764564,
3524 fidl::encoding::DynamicFlags::empty(),
3525 ___deadline,
3526 )?;
3527 Ok(_response.map(|x| x.stats))
3528 }
3529
3530 pub fn r#get_signal_report(
3531 &self,
3532 ___deadline: zx::MonotonicInstant,
3533 ) -> Result<TelemetryGetSignalReportResult, fidl::Error> {
3534 let _response = self.client.send_query::<
3535 fidl::encoding::EmptyPayload,
3536 fidl::encoding::ResultType<TelemetryGetSignalReportResponse, i32>,
3537 >(
3538 (),
3539 0x24133aeac3225e28,
3540 fidl::encoding::DynamicFlags::empty(),
3541 ___deadline,
3542 )?;
3543 Ok(_response.map(|x| x.stats))
3544 }
3545
3546 pub fn r#clone_inspect_vmo(
3547 &self,
3548 ___deadline: zx::MonotonicInstant,
3549 ) -> Result<TelemetryCloneInspectVmoResult, fidl::Error> {
3550 let _response = self.client.send_query::<
3551 fidl::encoding::EmptyPayload,
3552 fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>,
3553 >(
3554 (),
3555 0x47153917e84c5a21,
3556 fidl::encoding::DynamicFlags::empty(),
3557 ___deadline,
3558 )?;
3559 Ok(_response.map(|x| x.inspect_vmo))
3560 }
3561}
3562
3563#[cfg(target_os = "fuchsia")]
3564impl From<TelemetrySynchronousProxy> for zx::Handle {
3565 fn from(value: TelemetrySynchronousProxy) -> Self {
3566 value.into_channel().into()
3567 }
3568}
3569
3570#[cfg(target_os = "fuchsia")]
3571impl From<fidl::Channel> for TelemetrySynchronousProxy {
3572 fn from(value: fidl::Channel) -> Self {
3573 Self::new(value)
3574 }
3575}
3576
3577#[cfg(target_os = "fuchsia")]
3578impl fidl::endpoints::FromClient for TelemetrySynchronousProxy {
3579 type Protocol = TelemetryMarker;
3580
3581 fn from_client(value: fidl::endpoints::ClientEnd<TelemetryMarker>) -> Self {
3582 Self::new(value.into_channel())
3583 }
3584}
3585
3586#[derive(Debug, Clone)]
3587pub struct TelemetryProxy {
3588 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3589}
3590
3591impl fidl::endpoints::Proxy for TelemetryProxy {
3592 type Protocol = TelemetryMarker;
3593
3594 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3595 Self::new(inner)
3596 }
3597
3598 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3599 self.client.into_channel().map_err(|client| Self { client })
3600 }
3601
3602 fn as_channel(&self) -> &::fidl::AsyncChannel {
3603 self.client.as_channel()
3604 }
3605}
3606
3607impl TelemetryProxy {
3608 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3610 let protocol_name = <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3611 Self { client: fidl::client::Client::new(channel, protocol_name) }
3612 }
3613
3614 pub fn take_event_stream(&self) -> TelemetryEventStream {
3620 TelemetryEventStream { event_receiver: self.client.take_event_receiver() }
3621 }
3622
3623 pub fn r#query_telemetry_support(
3624 &self,
3625 ) -> fidl::client::QueryResponseFut<
3626 TelemetryQueryTelemetrySupportResult,
3627 fidl::encoding::DefaultFuchsiaResourceDialect,
3628 > {
3629 TelemetryProxyInterface::r#query_telemetry_support(self)
3630 }
3631
3632 pub fn r#get_iface_stats(
3633 &self,
3634 ) -> fidl::client::QueryResponseFut<
3635 TelemetryGetIfaceStatsResult,
3636 fidl::encoding::DefaultFuchsiaResourceDialect,
3637 > {
3638 TelemetryProxyInterface::r#get_iface_stats(self)
3639 }
3640
3641 pub fn r#get_histogram_stats(
3642 &self,
3643 ) -> fidl::client::QueryResponseFut<
3644 TelemetryGetHistogramStatsResult,
3645 fidl::encoding::DefaultFuchsiaResourceDialect,
3646 > {
3647 TelemetryProxyInterface::r#get_histogram_stats(self)
3648 }
3649
3650 pub fn r#get_signal_report(
3651 &self,
3652 ) -> fidl::client::QueryResponseFut<
3653 TelemetryGetSignalReportResult,
3654 fidl::encoding::DefaultFuchsiaResourceDialect,
3655 > {
3656 TelemetryProxyInterface::r#get_signal_report(self)
3657 }
3658
3659 pub fn r#clone_inspect_vmo(
3660 &self,
3661 ) -> fidl::client::QueryResponseFut<
3662 TelemetryCloneInspectVmoResult,
3663 fidl::encoding::DefaultFuchsiaResourceDialect,
3664 > {
3665 TelemetryProxyInterface::r#clone_inspect_vmo(self)
3666 }
3667}
3668
3669impl TelemetryProxyInterface for TelemetryProxy {
3670 type QueryTelemetrySupportResponseFut = fidl::client::QueryResponseFut<
3671 TelemetryQueryTelemetrySupportResult,
3672 fidl::encoding::DefaultFuchsiaResourceDialect,
3673 >;
3674 fn r#query_telemetry_support(&self) -> Self::QueryTelemetrySupportResponseFut {
3675 fn _decode(
3676 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3677 ) -> Result<TelemetryQueryTelemetrySupportResult, fidl::Error> {
3678 let _response = fidl::client::decode_transaction_body::<
3679 fidl::encoding::ResultType<TelemetryQueryTelemetrySupportResponse, i32>,
3680 fidl::encoding::DefaultFuchsiaResourceDialect,
3681 0x69443ad35b204686,
3682 >(_buf?)?;
3683 Ok(_response.map(|x| x.resp))
3684 }
3685 self.client.send_query_and_decode::<
3686 fidl::encoding::EmptyPayload,
3687 TelemetryQueryTelemetrySupportResult,
3688 >(
3689 (),
3690 0x69443ad35b204686,
3691 fidl::encoding::DynamicFlags::empty(),
3692 _decode,
3693 )
3694 }
3695
3696 type GetIfaceStatsResponseFut = fidl::client::QueryResponseFut<
3697 TelemetryGetIfaceStatsResult,
3698 fidl::encoding::DefaultFuchsiaResourceDialect,
3699 >;
3700 fn r#get_iface_stats(&self) -> Self::GetIfaceStatsResponseFut {
3701 fn _decode(
3702 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3703 ) -> Result<TelemetryGetIfaceStatsResult, fidl::Error> {
3704 let _response = fidl::client::decode_transaction_body::<
3705 fidl::encoding::ResultType<TelemetryGetIfaceStatsResponse, i32>,
3706 fidl::encoding::DefaultFuchsiaResourceDialect,
3707 0x6af057f3a017f572,
3708 >(_buf?)?;
3709 Ok(_response.map(|x| x.stats))
3710 }
3711 self.client
3712 .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryGetIfaceStatsResult>(
3713 (),
3714 0x6af057f3a017f572,
3715 fidl::encoding::DynamicFlags::empty(),
3716 _decode,
3717 )
3718 }
3719
3720 type GetHistogramStatsResponseFut = fidl::client::QueryResponseFut<
3721 TelemetryGetHistogramStatsResult,
3722 fidl::encoding::DefaultFuchsiaResourceDialect,
3723 >;
3724 fn r#get_histogram_stats(&self) -> Self::GetHistogramStatsResponseFut {
3725 fn _decode(
3726 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3727 ) -> Result<TelemetryGetHistogramStatsResult, fidl::Error> {
3728 let _response = fidl::client::decode_transaction_body::<
3729 fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>,
3730 fidl::encoding::DefaultFuchsiaResourceDialect,
3731 0x46d2b6a23f764564,
3732 >(_buf?)?;
3733 Ok(_response.map(|x| x.stats))
3734 }
3735 self.client.send_query_and_decode::<
3736 fidl::encoding::EmptyPayload,
3737 TelemetryGetHistogramStatsResult,
3738 >(
3739 (),
3740 0x46d2b6a23f764564,
3741 fidl::encoding::DynamicFlags::empty(),
3742 _decode,
3743 )
3744 }
3745
3746 type GetSignalReportResponseFut = fidl::client::QueryResponseFut<
3747 TelemetryGetSignalReportResult,
3748 fidl::encoding::DefaultFuchsiaResourceDialect,
3749 >;
3750 fn r#get_signal_report(&self) -> Self::GetSignalReportResponseFut {
3751 fn _decode(
3752 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3753 ) -> Result<TelemetryGetSignalReportResult, fidl::Error> {
3754 let _response = fidl::client::decode_transaction_body::<
3755 fidl::encoding::ResultType<TelemetryGetSignalReportResponse, i32>,
3756 fidl::encoding::DefaultFuchsiaResourceDialect,
3757 0x24133aeac3225e28,
3758 >(_buf?)?;
3759 Ok(_response.map(|x| x.stats))
3760 }
3761 self.client
3762 .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryGetSignalReportResult>(
3763 (),
3764 0x24133aeac3225e28,
3765 fidl::encoding::DynamicFlags::empty(),
3766 _decode,
3767 )
3768 }
3769
3770 type CloneInspectVmoResponseFut = fidl::client::QueryResponseFut<
3771 TelemetryCloneInspectVmoResult,
3772 fidl::encoding::DefaultFuchsiaResourceDialect,
3773 >;
3774 fn r#clone_inspect_vmo(&self) -> Self::CloneInspectVmoResponseFut {
3775 fn _decode(
3776 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3777 ) -> Result<TelemetryCloneInspectVmoResult, fidl::Error> {
3778 let _response = fidl::client::decode_transaction_body::<
3779 fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>,
3780 fidl::encoding::DefaultFuchsiaResourceDialect,
3781 0x47153917e84c5a21,
3782 >(_buf?)?;
3783 Ok(_response.map(|x| x.inspect_vmo))
3784 }
3785 self.client
3786 .send_query_and_decode::<fidl::encoding::EmptyPayload, TelemetryCloneInspectVmoResult>(
3787 (),
3788 0x47153917e84c5a21,
3789 fidl::encoding::DynamicFlags::empty(),
3790 _decode,
3791 )
3792 }
3793}
3794
3795pub struct TelemetryEventStream {
3796 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3797}
3798
3799impl std::marker::Unpin for TelemetryEventStream {}
3800
3801impl futures::stream::FusedStream for TelemetryEventStream {
3802 fn is_terminated(&self) -> bool {
3803 self.event_receiver.is_terminated()
3804 }
3805}
3806
3807impl futures::Stream for TelemetryEventStream {
3808 type Item = Result<TelemetryEvent, fidl::Error>;
3809
3810 fn poll_next(
3811 mut self: std::pin::Pin<&mut Self>,
3812 cx: &mut std::task::Context<'_>,
3813 ) -> std::task::Poll<Option<Self::Item>> {
3814 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3815 &mut self.event_receiver,
3816 cx
3817 )?) {
3818 Some(buf) => std::task::Poll::Ready(Some(TelemetryEvent::decode(buf))),
3819 None => std::task::Poll::Ready(None),
3820 }
3821 }
3822}
3823
3824#[derive(Debug)]
3825pub enum TelemetryEvent {}
3826
3827impl TelemetryEvent {
3828 fn decode(
3830 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3831 ) -> Result<TelemetryEvent, fidl::Error> {
3832 let (bytes, _handles) = buf.split_mut();
3833 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3834 debug_assert_eq!(tx_header.tx_id, 0);
3835 match tx_header.ordinal {
3836 _ => Err(fidl::Error::UnknownOrdinal {
3837 ordinal: tx_header.ordinal,
3838 protocol_name: <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3839 }),
3840 }
3841 }
3842}
3843
3844pub struct TelemetryRequestStream {
3846 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3847 is_terminated: bool,
3848}
3849
3850impl std::marker::Unpin for TelemetryRequestStream {}
3851
3852impl futures::stream::FusedStream for TelemetryRequestStream {
3853 fn is_terminated(&self) -> bool {
3854 self.is_terminated
3855 }
3856}
3857
3858impl fidl::endpoints::RequestStream for TelemetryRequestStream {
3859 type Protocol = TelemetryMarker;
3860 type ControlHandle = TelemetryControlHandle;
3861
3862 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3863 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3864 }
3865
3866 fn control_handle(&self) -> Self::ControlHandle {
3867 TelemetryControlHandle { inner: self.inner.clone() }
3868 }
3869
3870 fn into_inner(
3871 self,
3872 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3873 {
3874 (self.inner, self.is_terminated)
3875 }
3876
3877 fn from_inner(
3878 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3879 is_terminated: bool,
3880 ) -> Self {
3881 Self { inner, is_terminated }
3882 }
3883}
3884
3885impl futures::Stream for TelemetryRequestStream {
3886 type Item = Result<TelemetryRequest, fidl::Error>;
3887
3888 fn poll_next(
3889 mut self: std::pin::Pin<&mut Self>,
3890 cx: &mut std::task::Context<'_>,
3891 ) -> std::task::Poll<Option<Self::Item>> {
3892 let this = &mut *self;
3893 if this.inner.check_shutdown(cx) {
3894 this.is_terminated = true;
3895 return std::task::Poll::Ready(None);
3896 }
3897 if this.is_terminated {
3898 panic!("polled TelemetryRequestStream after completion");
3899 }
3900 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3901 |bytes, handles| {
3902 match this.inner.channel().read_etc(cx, bytes, handles) {
3903 std::task::Poll::Ready(Ok(())) => {}
3904 std::task::Poll::Pending => return std::task::Poll::Pending,
3905 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3906 this.is_terminated = true;
3907 return std::task::Poll::Ready(None);
3908 }
3909 std::task::Poll::Ready(Err(e)) => {
3910 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3911 e.into(),
3912 ))));
3913 }
3914 }
3915
3916 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3918
3919 std::task::Poll::Ready(Some(match header.ordinal {
3920 0x69443ad35b204686 => {
3921 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3922 let mut req = fidl::new_empty!(
3923 fidl::encoding::EmptyPayload,
3924 fidl::encoding::DefaultFuchsiaResourceDialect
3925 );
3926 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3927 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
3928 Ok(TelemetryRequest::QueryTelemetrySupport {
3929 responder: TelemetryQueryTelemetrySupportResponder {
3930 control_handle: std::mem::ManuallyDrop::new(control_handle),
3931 tx_id: header.tx_id,
3932 },
3933 })
3934 }
3935 0x6af057f3a017f572 => {
3936 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3937 let mut req = fidl::new_empty!(
3938 fidl::encoding::EmptyPayload,
3939 fidl::encoding::DefaultFuchsiaResourceDialect
3940 );
3941 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3942 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
3943 Ok(TelemetryRequest::GetIfaceStats {
3944 responder: TelemetryGetIfaceStatsResponder {
3945 control_handle: std::mem::ManuallyDrop::new(control_handle),
3946 tx_id: header.tx_id,
3947 },
3948 })
3949 }
3950 0x46d2b6a23f764564 => {
3951 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3952 let mut req = fidl::new_empty!(
3953 fidl::encoding::EmptyPayload,
3954 fidl::encoding::DefaultFuchsiaResourceDialect
3955 );
3956 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3957 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
3958 Ok(TelemetryRequest::GetHistogramStats {
3959 responder: TelemetryGetHistogramStatsResponder {
3960 control_handle: std::mem::ManuallyDrop::new(control_handle),
3961 tx_id: header.tx_id,
3962 },
3963 })
3964 }
3965 0x24133aeac3225e28 => {
3966 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3967 let mut req = fidl::new_empty!(
3968 fidl::encoding::EmptyPayload,
3969 fidl::encoding::DefaultFuchsiaResourceDialect
3970 );
3971 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3972 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
3973 Ok(TelemetryRequest::GetSignalReport {
3974 responder: TelemetryGetSignalReportResponder {
3975 control_handle: std::mem::ManuallyDrop::new(control_handle),
3976 tx_id: header.tx_id,
3977 },
3978 })
3979 }
3980 0x47153917e84c5a21 => {
3981 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3982 let mut req = fidl::new_empty!(
3983 fidl::encoding::EmptyPayload,
3984 fidl::encoding::DefaultFuchsiaResourceDialect
3985 );
3986 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3987 let control_handle = TelemetryControlHandle { inner: this.inner.clone() };
3988 Ok(TelemetryRequest::CloneInspectVmo {
3989 responder: TelemetryCloneInspectVmoResponder {
3990 control_handle: std::mem::ManuallyDrop::new(control_handle),
3991 tx_id: header.tx_id,
3992 },
3993 })
3994 }
3995 _ => Err(fidl::Error::UnknownOrdinal {
3996 ordinal: header.ordinal,
3997 protocol_name:
3998 <TelemetryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3999 }),
4000 }))
4001 },
4002 )
4003 }
4004}
4005
4006#[derive(Debug)]
4007pub enum TelemetryRequest {
4008 QueryTelemetrySupport { responder: TelemetryQueryTelemetrySupportResponder },
4009 GetIfaceStats { responder: TelemetryGetIfaceStatsResponder },
4010 GetHistogramStats { responder: TelemetryGetHistogramStatsResponder },
4011 GetSignalReport { responder: TelemetryGetSignalReportResponder },
4012 CloneInspectVmo { responder: TelemetryCloneInspectVmoResponder },
4013}
4014
4015impl TelemetryRequest {
4016 #[allow(irrefutable_let_patterns)]
4017 pub fn into_query_telemetry_support(self) -> Option<(TelemetryQueryTelemetrySupportResponder)> {
4018 if let TelemetryRequest::QueryTelemetrySupport { responder } = self {
4019 Some((responder))
4020 } else {
4021 None
4022 }
4023 }
4024
4025 #[allow(irrefutable_let_patterns)]
4026 pub fn into_get_iface_stats(self) -> Option<(TelemetryGetIfaceStatsResponder)> {
4027 if let TelemetryRequest::GetIfaceStats { responder } = self {
4028 Some((responder))
4029 } else {
4030 None
4031 }
4032 }
4033
4034 #[allow(irrefutable_let_patterns)]
4035 pub fn into_get_histogram_stats(self) -> Option<(TelemetryGetHistogramStatsResponder)> {
4036 if let TelemetryRequest::GetHistogramStats { responder } = self {
4037 Some((responder))
4038 } else {
4039 None
4040 }
4041 }
4042
4043 #[allow(irrefutable_let_patterns)]
4044 pub fn into_get_signal_report(self) -> Option<(TelemetryGetSignalReportResponder)> {
4045 if let TelemetryRequest::GetSignalReport { responder } = self {
4046 Some((responder))
4047 } else {
4048 None
4049 }
4050 }
4051
4052 #[allow(irrefutable_let_patterns)]
4053 pub fn into_clone_inspect_vmo(self) -> Option<(TelemetryCloneInspectVmoResponder)> {
4054 if let TelemetryRequest::CloneInspectVmo { responder } = self {
4055 Some((responder))
4056 } else {
4057 None
4058 }
4059 }
4060
4061 pub fn method_name(&self) -> &'static str {
4063 match *self {
4064 TelemetryRequest::QueryTelemetrySupport { .. } => "query_telemetry_support",
4065 TelemetryRequest::GetIfaceStats { .. } => "get_iface_stats",
4066 TelemetryRequest::GetHistogramStats { .. } => "get_histogram_stats",
4067 TelemetryRequest::GetSignalReport { .. } => "get_signal_report",
4068 TelemetryRequest::CloneInspectVmo { .. } => "clone_inspect_vmo",
4069 }
4070 }
4071}
4072
4073#[derive(Debug, Clone)]
4074pub struct TelemetryControlHandle {
4075 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4076}
4077
4078impl fidl::endpoints::ControlHandle for TelemetryControlHandle {
4079 fn shutdown(&self) {
4080 self.inner.shutdown()
4081 }
4082 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4083 self.inner.shutdown_with_epitaph(status)
4084 }
4085
4086 fn is_closed(&self) -> bool {
4087 self.inner.channel().is_closed()
4088 }
4089 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4090 self.inner.channel().on_closed()
4091 }
4092
4093 #[cfg(target_os = "fuchsia")]
4094 fn signal_peer(
4095 &self,
4096 clear_mask: zx::Signals,
4097 set_mask: zx::Signals,
4098 ) -> Result<(), zx_status::Status> {
4099 use fidl::Peered;
4100 self.inner.channel().signal_peer(clear_mask, set_mask)
4101 }
4102}
4103
4104impl TelemetryControlHandle {}
4105
4106#[must_use = "FIDL methods require a response to be sent"]
4107#[derive(Debug)]
4108pub struct TelemetryQueryTelemetrySupportResponder {
4109 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
4110 tx_id: u32,
4111}
4112
4113impl std::ops::Drop for TelemetryQueryTelemetrySupportResponder {
4117 fn drop(&mut self) {
4118 self.control_handle.shutdown();
4119 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4121 }
4122}
4123
4124impl fidl::endpoints::Responder for TelemetryQueryTelemetrySupportResponder {
4125 type ControlHandle = TelemetryControlHandle;
4126
4127 fn control_handle(&self) -> &TelemetryControlHandle {
4128 &self.control_handle
4129 }
4130
4131 fn drop_without_shutdown(mut self) {
4132 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4134 std::mem::forget(self);
4136 }
4137}
4138
4139impl TelemetryQueryTelemetrySupportResponder {
4140 pub fn send(
4144 self,
4145 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
4146 ) -> Result<(), fidl::Error> {
4147 let _result = self.send_raw(result);
4148 if _result.is_err() {
4149 self.control_handle.shutdown();
4150 }
4151 self.drop_without_shutdown();
4152 _result
4153 }
4154
4155 pub fn send_no_shutdown_on_err(
4157 self,
4158 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
4159 ) -> Result<(), fidl::Error> {
4160 let _result = self.send_raw(result);
4161 self.drop_without_shutdown();
4162 _result
4163 }
4164
4165 fn send_raw(
4166 &self,
4167 mut result: Result<&fidl_fuchsia_wlan_stats::TelemetrySupport, i32>,
4168 ) -> Result<(), fidl::Error> {
4169 self.control_handle.inner.send::<fidl::encoding::ResultType<
4170 TelemetryQueryTelemetrySupportResponse,
4171 i32,
4172 >>(
4173 result.map(|resp| (resp,)),
4174 self.tx_id,
4175 0x69443ad35b204686,
4176 fidl::encoding::DynamicFlags::empty(),
4177 )
4178 }
4179}
4180
4181#[must_use = "FIDL methods require a response to be sent"]
4182#[derive(Debug)]
4183pub struct TelemetryGetIfaceStatsResponder {
4184 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
4185 tx_id: u32,
4186}
4187
4188impl std::ops::Drop for TelemetryGetIfaceStatsResponder {
4192 fn drop(&mut self) {
4193 self.control_handle.shutdown();
4194 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4196 }
4197}
4198
4199impl fidl::endpoints::Responder for TelemetryGetIfaceStatsResponder {
4200 type ControlHandle = TelemetryControlHandle;
4201
4202 fn control_handle(&self) -> &TelemetryControlHandle {
4203 &self.control_handle
4204 }
4205
4206 fn drop_without_shutdown(mut self) {
4207 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4209 std::mem::forget(self);
4211 }
4212}
4213
4214impl TelemetryGetIfaceStatsResponder {
4215 pub fn send(
4219 self,
4220 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceStats, i32>,
4221 ) -> Result<(), fidl::Error> {
4222 let _result = self.send_raw(result);
4223 if _result.is_err() {
4224 self.control_handle.shutdown();
4225 }
4226 self.drop_without_shutdown();
4227 _result
4228 }
4229
4230 pub fn send_no_shutdown_on_err(
4232 self,
4233 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceStats, i32>,
4234 ) -> Result<(), fidl::Error> {
4235 let _result = self.send_raw(result);
4236 self.drop_without_shutdown();
4237 _result
4238 }
4239
4240 fn send_raw(
4241 &self,
4242 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceStats, i32>,
4243 ) -> Result<(), fidl::Error> {
4244 self.control_handle
4245 .inner
4246 .send::<fidl::encoding::ResultType<TelemetryGetIfaceStatsResponse, i32>>(
4247 result.map(|stats| (stats,)),
4248 self.tx_id,
4249 0x6af057f3a017f572,
4250 fidl::encoding::DynamicFlags::empty(),
4251 )
4252 }
4253}
4254
4255#[must_use = "FIDL methods require a response to be sent"]
4256#[derive(Debug)]
4257pub struct TelemetryGetHistogramStatsResponder {
4258 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
4259 tx_id: u32,
4260}
4261
4262impl std::ops::Drop for TelemetryGetHistogramStatsResponder {
4266 fn drop(&mut self) {
4267 self.control_handle.shutdown();
4268 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4270 }
4271}
4272
4273impl fidl::endpoints::Responder for TelemetryGetHistogramStatsResponder {
4274 type ControlHandle = TelemetryControlHandle;
4275
4276 fn control_handle(&self) -> &TelemetryControlHandle {
4277 &self.control_handle
4278 }
4279
4280 fn drop_without_shutdown(mut self) {
4281 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4283 std::mem::forget(self);
4285 }
4286}
4287
4288impl TelemetryGetHistogramStatsResponder {
4289 pub fn send(
4293 self,
4294 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
4295 ) -> Result<(), fidl::Error> {
4296 let _result = self.send_raw(result);
4297 if _result.is_err() {
4298 self.control_handle.shutdown();
4299 }
4300 self.drop_without_shutdown();
4301 _result
4302 }
4303
4304 pub fn send_no_shutdown_on_err(
4306 self,
4307 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
4308 ) -> Result<(), fidl::Error> {
4309 let _result = self.send_raw(result);
4310 self.drop_without_shutdown();
4311 _result
4312 }
4313
4314 fn send_raw(
4315 &self,
4316 mut result: Result<&fidl_fuchsia_wlan_stats::IfaceHistogramStats, i32>,
4317 ) -> Result<(), fidl::Error> {
4318 self.control_handle
4319 .inner
4320 .send::<fidl::encoding::ResultType<TelemetryGetHistogramStatsResponse, i32>>(
4321 result.map(|stats| (stats,)),
4322 self.tx_id,
4323 0x46d2b6a23f764564,
4324 fidl::encoding::DynamicFlags::empty(),
4325 )
4326 }
4327}
4328
4329#[must_use = "FIDL methods require a response to be sent"]
4330#[derive(Debug)]
4331pub struct TelemetryGetSignalReportResponder {
4332 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
4333 tx_id: u32,
4334}
4335
4336impl std::ops::Drop for TelemetryGetSignalReportResponder {
4340 fn drop(&mut self) {
4341 self.control_handle.shutdown();
4342 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4344 }
4345}
4346
4347impl fidl::endpoints::Responder for TelemetryGetSignalReportResponder {
4348 type ControlHandle = TelemetryControlHandle;
4349
4350 fn control_handle(&self) -> &TelemetryControlHandle {
4351 &self.control_handle
4352 }
4353
4354 fn drop_without_shutdown(mut self) {
4355 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4357 std::mem::forget(self);
4359 }
4360}
4361
4362impl TelemetryGetSignalReportResponder {
4363 pub fn send(
4367 self,
4368 mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
4369 ) -> Result<(), fidl::Error> {
4370 let _result = self.send_raw(result);
4371 if _result.is_err() {
4372 self.control_handle.shutdown();
4373 }
4374 self.drop_without_shutdown();
4375 _result
4376 }
4377
4378 pub fn send_no_shutdown_on_err(
4380 self,
4381 mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
4382 ) -> Result<(), fidl::Error> {
4383 let _result = self.send_raw(result);
4384 self.drop_without_shutdown();
4385 _result
4386 }
4387
4388 fn send_raw(
4389 &self,
4390 mut result: Result<&fidl_fuchsia_wlan_stats::SignalReport, i32>,
4391 ) -> Result<(), fidl::Error> {
4392 self.control_handle
4393 .inner
4394 .send::<fidl::encoding::ResultType<TelemetryGetSignalReportResponse, i32>>(
4395 result.map(|stats| (stats,)),
4396 self.tx_id,
4397 0x24133aeac3225e28,
4398 fidl::encoding::DynamicFlags::empty(),
4399 )
4400 }
4401}
4402
4403#[must_use = "FIDL methods require a response to be sent"]
4404#[derive(Debug)]
4405pub struct TelemetryCloneInspectVmoResponder {
4406 control_handle: std::mem::ManuallyDrop<TelemetryControlHandle>,
4407 tx_id: u32,
4408}
4409
4410impl std::ops::Drop for TelemetryCloneInspectVmoResponder {
4414 fn drop(&mut self) {
4415 self.control_handle.shutdown();
4416 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4418 }
4419}
4420
4421impl fidl::endpoints::Responder for TelemetryCloneInspectVmoResponder {
4422 type ControlHandle = TelemetryControlHandle;
4423
4424 fn control_handle(&self) -> &TelemetryControlHandle {
4425 &self.control_handle
4426 }
4427
4428 fn drop_without_shutdown(mut self) {
4429 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4431 std::mem::forget(self);
4433 }
4434}
4435
4436impl TelemetryCloneInspectVmoResponder {
4437 pub fn send(self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
4441 let _result = self.send_raw(result);
4442 if _result.is_err() {
4443 self.control_handle.shutdown();
4444 }
4445 self.drop_without_shutdown();
4446 _result
4447 }
4448
4449 pub fn send_no_shutdown_on_err(
4451 self,
4452 mut result: Result<fidl::Vmo, i32>,
4453 ) -> Result<(), fidl::Error> {
4454 let _result = self.send_raw(result);
4455 self.drop_without_shutdown();
4456 _result
4457 }
4458
4459 fn send_raw(&self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
4460 self.control_handle
4461 .inner
4462 .send::<fidl::encoding::ResultType<TelemetryCloneInspectVmoResponse, i32>>(
4463 result.map(|inspect_vmo| (inspect_vmo,)),
4464 self.tx_id,
4465 0x47153917e84c5a21,
4466 fidl::encoding::DynamicFlags::empty(),
4467 )
4468 }
4469}
4470
4471#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4472pub struct UsmeBootstrapMarker;
4473
4474impl fidl::endpoints::ProtocolMarker for UsmeBootstrapMarker {
4475 type Proxy = UsmeBootstrapProxy;
4476 type RequestStream = UsmeBootstrapRequestStream;
4477 #[cfg(target_os = "fuchsia")]
4478 type SynchronousProxy = UsmeBootstrapSynchronousProxy;
4479
4480 const DEBUG_NAME: &'static str = "(anonymous) UsmeBootstrap";
4481}
4482
4483pub trait UsmeBootstrapProxyInterface: Send + Sync {
4484 type StartResponseFut: std::future::Future<Output = Result<fidl::Vmo, fidl::Error>> + Send;
4485 fn r#start(
4486 &self,
4487 generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
4488 legacy_privacy_support: &LegacyPrivacySupport,
4489 ) -> Self::StartResponseFut;
4490}
4491#[derive(Debug)]
4492#[cfg(target_os = "fuchsia")]
4493pub struct UsmeBootstrapSynchronousProxy {
4494 client: fidl::client::sync::Client,
4495}
4496
4497#[cfg(target_os = "fuchsia")]
4498impl fidl::endpoints::SynchronousProxy for UsmeBootstrapSynchronousProxy {
4499 type Proxy = UsmeBootstrapProxy;
4500 type Protocol = UsmeBootstrapMarker;
4501
4502 fn from_channel(inner: fidl::Channel) -> Self {
4503 Self::new(inner)
4504 }
4505
4506 fn into_channel(self) -> fidl::Channel {
4507 self.client.into_channel()
4508 }
4509
4510 fn as_channel(&self) -> &fidl::Channel {
4511 self.client.as_channel()
4512 }
4513}
4514
4515#[cfg(target_os = "fuchsia")]
4516impl UsmeBootstrapSynchronousProxy {
4517 pub fn new(channel: fidl::Channel) -> Self {
4518 let protocol_name = <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4519 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4520 }
4521
4522 pub fn into_channel(self) -> fidl::Channel {
4523 self.client.into_channel()
4524 }
4525
4526 pub fn wait_for_event(
4529 &self,
4530 deadline: zx::MonotonicInstant,
4531 ) -> Result<UsmeBootstrapEvent, fidl::Error> {
4532 UsmeBootstrapEvent::decode(self.client.wait_for_event(deadline)?)
4533 }
4534
4535 pub fn r#start(
4536 &self,
4537 mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
4538 mut legacy_privacy_support: &LegacyPrivacySupport,
4539 ___deadline: zx::MonotonicInstant,
4540 ) -> Result<fidl::Vmo, fidl::Error> {
4541 let _response =
4542 self.client.send_query::<UsmeBootstrapStartRequest, UsmeBootstrapStartResponse>(
4543 (generic_sme_server, legacy_privacy_support),
4544 0x58850dfb76c29a0e,
4545 fidl::encoding::DynamicFlags::empty(),
4546 ___deadline,
4547 )?;
4548 Ok(_response.inspect_vmo)
4549 }
4550}
4551
4552#[cfg(target_os = "fuchsia")]
4553impl From<UsmeBootstrapSynchronousProxy> for zx::Handle {
4554 fn from(value: UsmeBootstrapSynchronousProxy) -> Self {
4555 value.into_channel().into()
4556 }
4557}
4558
4559#[cfg(target_os = "fuchsia")]
4560impl From<fidl::Channel> for UsmeBootstrapSynchronousProxy {
4561 fn from(value: fidl::Channel) -> Self {
4562 Self::new(value)
4563 }
4564}
4565
4566#[cfg(target_os = "fuchsia")]
4567impl fidl::endpoints::FromClient for UsmeBootstrapSynchronousProxy {
4568 type Protocol = UsmeBootstrapMarker;
4569
4570 fn from_client(value: fidl::endpoints::ClientEnd<UsmeBootstrapMarker>) -> Self {
4571 Self::new(value.into_channel())
4572 }
4573}
4574
4575#[derive(Debug, Clone)]
4576pub struct UsmeBootstrapProxy {
4577 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4578}
4579
4580impl fidl::endpoints::Proxy for UsmeBootstrapProxy {
4581 type Protocol = UsmeBootstrapMarker;
4582
4583 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4584 Self::new(inner)
4585 }
4586
4587 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4588 self.client.into_channel().map_err(|client| Self { client })
4589 }
4590
4591 fn as_channel(&self) -> &::fidl::AsyncChannel {
4592 self.client.as_channel()
4593 }
4594}
4595
4596impl UsmeBootstrapProxy {
4597 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4599 let protocol_name = <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4600 Self { client: fidl::client::Client::new(channel, protocol_name) }
4601 }
4602
4603 pub fn take_event_stream(&self) -> UsmeBootstrapEventStream {
4609 UsmeBootstrapEventStream { event_receiver: self.client.take_event_receiver() }
4610 }
4611
4612 pub fn r#start(
4613 &self,
4614 mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
4615 mut legacy_privacy_support: &LegacyPrivacySupport,
4616 ) -> fidl::client::QueryResponseFut<fidl::Vmo, fidl::encoding::DefaultFuchsiaResourceDialect>
4617 {
4618 UsmeBootstrapProxyInterface::r#start(self, generic_sme_server, legacy_privacy_support)
4619 }
4620}
4621
4622impl UsmeBootstrapProxyInterface for UsmeBootstrapProxy {
4623 type StartResponseFut =
4624 fidl::client::QueryResponseFut<fidl::Vmo, fidl::encoding::DefaultFuchsiaResourceDialect>;
4625 fn r#start(
4626 &self,
4627 mut generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
4628 mut legacy_privacy_support: &LegacyPrivacySupport,
4629 ) -> Self::StartResponseFut {
4630 fn _decode(
4631 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4632 ) -> Result<fidl::Vmo, fidl::Error> {
4633 let _response = fidl::client::decode_transaction_body::<
4634 UsmeBootstrapStartResponse,
4635 fidl::encoding::DefaultFuchsiaResourceDialect,
4636 0x58850dfb76c29a0e,
4637 >(_buf?)?;
4638 Ok(_response.inspect_vmo)
4639 }
4640 self.client.send_query_and_decode::<UsmeBootstrapStartRequest, fidl::Vmo>(
4641 (generic_sme_server, legacy_privacy_support),
4642 0x58850dfb76c29a0e,
4643 fidl::encoding::DynamicFlags::empty(),
4644 _decode,
4645 )
4646 }
4647}
4648
4649pub struct UsmeBootstrapEventStream {
4650 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4651}
4652
4653impl std::marker::Unpin for UsmeBootstrapEventStream {}
4654
4655impl futures::stream::FusedStream for UsmeBootstrapEventStream {
4656 fn is_terminated(&self) -> bool {
4657 self.event_receiver.is_terminated()
4658 }
4659}
4660
4661impl futures::Stream for UsmeBootstrapEventStream {
4662 type Item = Result<UsmeBootstrapEvent, fidl::Error>;
4663
4664 fn poll_next(
4665 mut self: std::pin::Pin<&mut Self>,
4666 cx: &mut std::task::Context<'_>,
4667 ) -> std::task::Poll<Option<Self::Item>> {
4668 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4669 &mut self.event_receiver,
4670 cx
4671 )?) {
4672 Some(buf) => std::task::Poll::Ready(Some(UsmeBootstrapEvent::decode(buf))),
4673 None => std::task::Poll::Ready(None),
4674 }
4675 }
4676}
4677
4678#[derive(Debug)]
4679pub enum UsmeBootstrapEvent {}
4680
4681impl UsmeBootstrapEvent {
4682 fn decode(
4684 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4685 ) -> Result<UsmeBootstrapEvent, fidl::Error> {
4686 let (bytes, _handles) = buf.split_mut();
4687 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4688 debug_assert_eq!(tx_header.tx_id, 0);
4689 match tx_header.ordinal {
4690 _ => Err(fidl::Error::UnknownOrdinal {
4691 ordinal: tx_header.ordinal,
4692 protocol_name: <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4693 }),
4694 }
4695 }
4696}
4697
4698pub struct UsmeBootstrapRequestStream {
4700 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4701 is_terminated: bool,
4702}
4703
4704impl std::marker::Unpin for UsmeBootstrapRequestStream {}
4705
4706impl futures::stream::FusedStream for UsmeBootstrapRequestStream {
4707 fn is_terminated(&self) -> bool {
4708 self.is_terminated
4709 }
4710}
4711
4712impl fidl::endpoints::RequestStream for UsmeBootstrapRequestStream {
4713 type Protocol = UsmeBootstrapMarker;
4714 type ControlHandle = UsmeBootstrapControlHandle;
4715
4716 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4717 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4718 }
4719
4720 fn control_handle(&self) -> Self::ControlHandle {
4721 UsmeBootstrapControlHandle { inner: self.inner.clone() }
4722 }
4723
4724 fn into_inner(
4725 self,
4726 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4727 {
4728 (self.inner, self.is_terminated)
4729 }
4730
4731 fn from_inner(
4732 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4733 is_terminated: bool,
4734 ) -> Self {
4735 Self { inner, is_terminated }
4736 }
4737}
4738
4739impl futures::Stream for UsmeBootstrapRequestStream {
4740 type Item = Result<UsmeBootstrapRequest, fidl::Error>;
4741
4742 fn poll_next(
4743 mut self: std::pin::Pin<&mut Self>,
4744 cx: &mut std::task::Context<'_>,
4745 ) -> std::task::Poll<Option<Self::Item>> {
4746 let this = &mut *self;
4747 if this.inner.check_shutdown(cx) {
4748 this.is_terminated = true;
4749 return std::task::Poll::Ready(None);
4750 }
4751 if this.is_terminated {
4752 panic!("polled UsmeBootstrapRequestStream after completion");
4753 }
4754 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4755 |bytes, handles| {
4756 match this.inner.channel().read_etc(cx, bytes, handles) {
4757 std::task::Poll::Ready(Ok(())) => {}
4758 std::task::Poll::Pending => return std::task::Poll::Pending,
4759 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4760 this.is_terminated = true;
4761 return std::task::Poll::Ready(None);
4762 }
4763 std::task::Poll::Ready(Err(e)) => {
4764 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4765 e.into(),
4766 ))));
4767 }
4768 }
4769
4770 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4772
4773 std::task::Poll::Ready(Some(match header.ordinal {
4774 0x58850dfb76c29a0e => {
4775 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4776 let mut req = fidl::new_empty!(
4777 UsmeBootstrapStartRequest,
4778 fidl::encoding::DefaultFuchsiaResourceDialect
4779 );
4780 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UsmeBootstrapStartRequest>(&header, _body_bytes, handles, &mut req)?;
4781 let control_handle =
4782 UsmeBootstrapControlHandle { inner: this.inner.clone() };
4783 Ok(UsmeBootstrapRequest::Start {
4784 generic_sme_server: req.generic_sme_server,
4785 legacy_privacy_support: req.legacy_privacy_support,
4786
4787 responder: UsmeBootstrapStartResponder {
4788 control_handle: std::mem::ManuallyDrop::new(control_handle),
4789 tx_id: header.tx_id,
4790 },
4791 })
4792 }
4793 _ => Err(fidl::Error::UnknownOrdinal {
4794 ordinal: header.ordinal,
4795 protocol_name:
4796 <UsmeBootstrapMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4797 }),
4798 }))
4799 },
4800 )
4801 }
4802}
4803
4804#[derive(Debug)]
4805pub enum UsmeBootstrapRequest {
4806 Start {
4807 generic_sme_server: fidl::endpoints::ServerEnd<GenericSmeMarker>,
4808 legacy_privacy_support: LegacyPrivacySupport,
4809 responder: UsmeBootstrapStartResponder,
4810 },
4811}
4812
4813impl UsmeBootstrapRequest {
4814 #[allow(irrefutable_let_patterns)]
4815 pub fn into_start(
4816 self,
4817 ) -> Option<(
4818 fidl::endpoints::ServerEnd<GenericSmeMarker>,
4819 LegacyPrivacySupport,
4820 UsmeBootstrapStartResponder,
4821 )> {
4822 if let UsmeBootstrapRequest::Start {
4823 generic_sme_server,
4824 legacy_privacy_support,
4825 responder,
4826 } = self
4827 {
4828 Some((generic_sme_server, legacy_privacy_support, responder))
4829 } else {
4830 None
4831 }
4832 }
4833
4834 pub fn method_name(&self) -> &'static str {
4836 match *self {
4837 UsmeBootstrapRequest::Start { .. } => "start",
4838 }
4839 }
4840}
4841
4842#[derive(Debug, Clone)]
4843pub struct UsmeBootstrapControlHandle {
4844 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4845}
4846
4847impl fidl::endpoints::ControlHandle for UsmeBootstrapControlHandle {
4848 fn shutdown(&self) {
4849 self.inner.shutdown()
4850 }
4851 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4852 self.inner.shutdown_with_epitaph(status)
4853 }
4854
4855 fn is_closed(&self) -> bool {
4856 self.inner.channel().is_closed()
4857 }
4858 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4859 self.inner.channel().on_closed()
4860 }
4861
4862 #[cfg(target_os = "fuchsia")]
4863 fn signal_peer(
4864 &self,
4865 clear_mask: zx::Signals,
4866 set_mask: zx::Signals,
4867 ) -> Result<(), zx_status::Status> {
4868 use fidl::Peered;
4869 self.inner.channel().signal_peer(clear_mask, set_mask)
4870 }
4871}
4872
4873impl UsmeBootstrapControlHandle {}
4874
4875#[must_use = "FIDL methods require a response to be sent"]
4876#[derive(Debug)]
4877pub struct UsmeBootstrapStartResponder {
4878 control_handle: std::mem::ManuallyDrop<UsmeBootstrapControlHandle>,
4879 tx_id: u32,
4880}
4881
4882impl std::ops::Drop for UsmeBootstrapStartResponder {
4886 fn drop(&mut self) {
4887 self.control_handle.shutdown();
4888 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4890 }
4891}
4892
4893impl fidl::endpoints::Responder for UsmeBootstrapStartResponder {
4894 type ControlHandle = UsmeBootstrapControlHandle;
4895
4896 fn control_handle(&self) -> &UsmeBootstrapControlHandle {
4897 &self.control_handle
4898 }
4899
4900 fn drop_without_shutdown(mut self) {
4901 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4903 std::mem::forget(self);
4905 }
4906}
4907
4908impl UsmeBootstrapStartResponder {
4909 pub fn send(self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
4913 let _result = self.send_raw(inspect_vmo);
4914 if _result.is_err() {
4915 self.control_handle.shutdown();
4916 }
4917 self.drop_without_shutdown();
4918 _result
4919 }
4920
4921 pub fn send_no_shutdown_on_err(self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
4923 let _result = self.send_raw(inspect_vmo);
4924 self.drop_without_shutdown();
4925 _result
4926 }
4927
4928 fn send_raw(&self, mut inspect_vmo: fidl::Vmo) -> Result<(), fidl::Error> {
4929 self.control_handle.inner.send::<UsmeBootstrapStartResponse>(
4930 (inspect_vmo,),
4931 self.tx_id,
4932 0x58850dfb76c29a0e,
4933 fidl::encoding::DynamicFlags::empty(),
4934 )
4935 }
4936}
4937
4938mod internal {
4939 use super::*;
4940
4941 impl fidl::encoding::ResourceTypeMarker for ClientSmeConnectRequest {
4942 type Borrowed<'a> = &'a mut Self;
4943 fn take_or_borrow<'a>(
4944 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4945 ) -> Self::Borrowed<'a> {
4946 value
4947 }
4948 }
4949
4950 unsafe impl fidl::encoding::TypeMarker for ClientSmeConnectRequest {
4951 type Owned = Self;
4952
4953 #[inline(always)]
4954 fn inline_align(_context: fidl::encoding::Context) -> usize {
4955 8
4956 }
4957
4958 #[inline(always)]
4959 fn inline_size(_context: fidl::encoding::Context) -> usize {
4960 112
4961 }
4962 }
4963
4964 unsafe impl
4965 fidl::encoding::Encode<
4966 ClientSmeConnectRequest,
4967 fidl::encoding::DefaultFuchsiaResourceDialect,
4968 > for &mut ClientSmeConnectRequest
4969 {
4970 #[inline]
4971 unsafe fn encode(
4972 self,
4973 encoder: &mut fidl::encoding::Encoder<
4974 '_,
4975 fidl::encoding::DefaultFuchsiaResourceDialect,
4976 >,
4977 offset: usize,
4978 _depth: fidl::encoding::Depth,
4979 ) -> fidl::Result<()> {
4980 encoder.debug_check_bounds::<ClientSmeConnectRequest>(offset);
4981 fidl::encoding::Encode::<
4983 ClientSmeConnectRequest,
4984 fidl::encoding::DefaultFuchsiaResourceDialect,
4985 >::encode(
4986 (
4987 <ConnectRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),
4988 <fidl::encoding::Optional<
4989 fidl::encoding::Endpoint<
4990 fidl::endpoints::ServerEnd<ConnectTransactionMarker>,
4991 >,
4992 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4993 &mut self.txn
4994 ),
4995 ),
4996 encoder,
4997 offset,
4998 _depth,
4999 )
5000 }
5001 }
5002 unsafe impl<
5003 T0: fidl::encoding::Encode<ConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
5004 T1: fidl::encoding::Encode<
5005 fidl::encoding::Optional<
5006 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
5007 >,
5008 fidl::encoding::DefaultFuchsiaResourceDialect,
5009 >,
5010 >
5011 fidl::encoding::Encode<
5012 ClientSmeConnectRequest,
5013 fidl::encoding::DefaultFuchsiaResourceDialect,
5014 > for (T0, T1)
5015 {
5016 #[inline]
5017 unsafe fn encode(
5018 self,
5019 encoder: &mut fidl::encoding::Encoder<
5020 '_,
5021 fidl::encoding::DefaultFuchsiaResourceDialect,
5022 >,
5023 offset: usize,
5024 depth: fidl::encoding::Depth,
5025 ) -> fidl::Result<()> {
5026 encoder.debug_check_bounds::<ClientSmeConnectRequest>(offset);
5027 unsafe {
5030 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(104);
5031 (ptr as *mut u64).write_unaligned(0);
5032 }
5033 self.0.encode(encoder, offset + 0, depth)?;
5035 self.1.encode(encoder, offset + 104, depth)?;
5036 Ok(())
5037 }
5038 }
5039
5040 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5041 for ClientSmeConnectRequest
5042 {
5043 #[inline(always)]
5044 fn new_empty() -> Self {
5045 Self {
5046 req: fidl::new_empty!(
5047 ConnectRequest,
5048 fidl::encoding::DefaultFuchsiaResourceDialect
5049 ),
5050 txn: fidl::new_empty!(
5051 fidl::encoding::Optional<
5052 fidl::encoding::Endpoint<
5053 fidl::endpoints::ServerEnd<ConnectTransactionMarker>,
5054 >,
5055 >,
5056 fidl::encoding::DefaultFuchsiaResourceDialect
5057 ),
5058 }
5059 }
5060
5061 #[inline]
5062 unsafe fn decode(
5063 &mut self,
5064 decoder: &mut fidl::encoding::Decoder<
5065 '_,
5066 fidl::encoding::DefaultFuchsiaResourceDialect,
5067 >,
5068 offset: usize,
5069 _depth: fidl::encoding::Depth,
5070 ) -> fidl::Result<()> {
5071 decoder.debug_check_bounds::<Self>(offset);
5072 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(104) };
5074 let padval = unsafe { (ptr as *const u64).read_unaligned() };
5075 let mask = 0xffffffff00000000u64;
5076 let maskedval = padval & mask;
5077 if maskedval != 0 {
5078 return Err(fidl::Error::NonZeroPadding {
5079 padding_start: offset + 104 + ((mask as u64).trailing_zeros() / 8) as usize,
5080 });
5081 }
5082 fidl::decode!(
5083 ConnectRequest,
5084 fidl::encoding::DefaultFuchsiaResourceDialect,
5085 &mut self.req,
5086 decoder,
5087 offset + 0,
5088 _depth
5089 )?;
5090 fidl::decode!(
5091 fidl::encoding::Optional<
5092 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ConnectTransactionMarker>>,
5093 >,
5094 fidl::encoding::DefaultFuchsiaResourceDialect,
5095 &mut self.txn,
5096 decoder,
5097 offset + 104,
5098 _depth
5099 )?;
5100 Ok(())
5101 }
5102 }
5103
5104 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanForControllerRequest {
5105 type Borrowed<'a> = &'a mut Self;
5106 fn take_or_borrow<'a>(
5107 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5108 ) -> Self::Borrowed<'a> {
5109 value
5110 }
5111 }
5112
5113 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanForControllerRequest {
5114 type Owned = Self;
5115
5116 #[inline(always)]
5117 fn inline_align(_context: fidl::encoding::Context) -> usize {
5118 8
5119 }
5120
5121 #[inline(always)]
5122 fn inline_size(_context: fidl::encoding::Context) -> usize {
5123 16
5124 }
5125 }
5126
5127 unsafe impl
5128 fidl::encoding::Encode<
5129 ClientSmeScanForControllerRequest,
5130 fidl::encoding::DefaultFuchsiaResourceDialect,
5131 > for &mut ClientSmeScanForControllerRequest
5132 {
5133 #[inline]
5134 unsafe fn encode(
5135 self,
5136 encoder: &mut fidl::encoding::Encoder<
5137 '_,
5138 fidl::encoding::DefaultFuchsiaResourceDialect,
5139 >,
5140 offset: usize,
5141 _depth: fidl::encoding::Depth,
5142 ) -> fidl::Result<()> {
5143 encoder.debug_check_bounds::<ClientSmeScanForControllerRequest>(offset);
5144 fidl::encoding::Encode::<
5146 ClientSmeScanForControllerRequest,
5147 fidl::encoding::DefaultFuchsiaResourceDialect,
5148 >::encode(
5149 (<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
5150 encoder,
5151 offset,
5152 _depth,
5153 )
5154 }
5155 }
5156 unsafe impl<
5157 T0: fidl::encoding::Encode<ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
5158 >
5159 fidl::encoding::Encode<
5160 ClientSmeScanForControllerRequest,
5161 fidl::encoding::DefaultFuchsiaResourceDialect,
5162 > for (T0,)
5163 {
5164 #[inline]
5165 unsafe fn encode(
5166 self,
5167 encoder: &mut fidl::encoding::Encoder<
5168 '_,
5169 fidl::encoding::DefaultFuchsiaResourceDialect,
5170 >,
5171 offset: usize,
5172 depth: fidl::encoding::Depth,
5173 ) -> fidl::Result<()> {
5174 encoder.debug_check_bounds::<ClientSmeScanForControllerRequest>(offset);
5175 self.0.encode(encoder, offset + 0, depth)?;
5179 Ok(())
5180 }
5181 }
5182
5183 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5184 for ClientSmeScanForControllerRequest
5185 {
5186 #[inline(always)]
5187 fn new_empty() -> Self {
5188 Self {
5189 req: fidl::new_empty!(ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect),
5190 }
5191 }
5192
5193 #[inline]
5194 unsafe fn decode(
5195 &mut self,
5196 decoder: &mut fidl::encoding::Decoder<
5197 '_,
5198 fidl::encoding::DefaultFuchsiaResourceDialect,
5199 >,
5200 offset: usize,
5201 _depth: fidl::encoding::Depth,
5202 ) -> fidl::Result<()> {
5203 decoder.debug_check_bounds::<Self>(offset);
5204 fidl::decode!(
5206 ScanRequest,
5207 fidl::encoding::DefaultFuchsiaResourceDialect,
5208 &mut self.req,
5209 decoder,
5210 offset + 0,
5211 _depth
5212 )?;
5213 Ok(())
5214 }
5215 }
5216
5217 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanRequest {
5218 type Borrowed<'a> = &'a mut Self;
5219 fn take_or_borrow<'a>(
5220 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5221 ) -> Self::Borrowed<'a> {
5222 value
5223 }
5224 }
5225
5226 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanRequest {
5227 type Owned = Self;
5228
5229 #[inline(always)]
5230 fn inline_align(_context: fidl::encoding::Context) -> usize {
5231 8
5232 }
5233
5234 #[inline(always)]
5235 fn inline_size(_context: fidl::encoding::Context) -> usize {
5236 16
5237 }
5238 }
5239
5240 unsafe impl
5241 fidl::encoding::Encode<ClientSmeScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
5242 for &mut ClientSmeScanRequest
5243 {
5244 #[inline]
5245 unsafe fn encode(
5246 self,
5247 encoder: &mut fidl::encoding::Encoder<
5248 '_,
5249 fidl::encoding::DefaultFuchsiaResourceDialect,
5250 >,
5251 offset: usize,
5252 _depth: fidl::encoding::Depth,
5253 ) -> fidl::Result<()> {
5254 encoder.debug_check_bounds::<ClientSmeScanRequest>(offset);
5255 fidl::encoding::Encode::<
5257 ClientSmeScanRequest,
5258 fidl::encoding::DefaultFuchsiaResourceDialect,
5259 >::encode(
5260 (<ScanRequest as fidl::encoding::ValueTypeMarker>::borrow(&self.req),),
5261 encoder,
5262 offset,
5263 _depth,
5264 )
5265 }
5266 }
5267 unsafe impl<
5268 T0: fidl::encoding::Encode<ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>,
5269 >
5270 fidl::encoding::Encode<ClientSmeScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
5271 for (T0,)
5272 {
5273 #[inline]
5274 unsafe fn encode(
5275 self,
5276 encoder: &mut fidl::encoding::Encoder<
5277 '_,
5278 fidl::encoding::DefaultFuchsiaResourceDialect,
5279 >,
5280 offset: usize,
5281 depth: fidl::encoding::Depth,
5282 ) -> fidl::Result<()> {
5283 encoder.debug_check_bounds::<ClientSmeScanRequest>(offset);
5284 self.0.encode(encoder, offset + 0, depth)?;
5288 Ok(())
5289 }
5290 }
5291
5292 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5293 for ClientSmeScanRequest
5294 {
5295 #[inline(always)]
5296 fn new_empty() -> Self {
5297 Self {
5298 req: fidl::new_empty!(ScanRequest, fidl::encoding::DefaultFuchsiaResourceDialect),
5299 }
5300 }
5301
5302 #[inline]
5303 unsafe fn decode(
5304 &mut self,
5305 decoder: &mut fidl::encoding::Decoder<
5306 '_,
5307 fidl::encoding::DefaultFuchsiaResourceDialect,
5308 >,
5309 offset: usize,
5310 _depth: fidl::encoding::Depth,
5311 ) -> fidl::Result<()> {
5312 decoder.debug_check_bounds::<Self>(offset);
5313 fidl::decode!(
5315 ScanRequest,
5316 fidl::encoding::DefaultFuchsiaResourceDialect,
5317 &mut self.req,
5318 decoder,
5319 offset + 0,
5320 _depth
5321 )?;
5322 Ok(())
5323 }
5324 }
5325
5326 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanForControllerResponse {
5327 type Borrowed<'a> = &'a mut Self;
5328 fn take_or_borrow<'a>(
5329 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5330 ) -> Self::Borrowed<'a> {
5331 value
5332 }
5333 }
5334
5335 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanForControllerResponse {
5336 type Owned = Self;
5337
5338 #[inline(always)]
5339 fn inline_align(_context: fidl::encoding::Context) -> usize {
5340 8
5341 }
5342
5343 #[inline(always)]
5344 fn inline_size(_context: fidl::encoding::Context) -> usize {
5345 16
5346 }
5347 }
5348
5349 unsafe impl
5350 fidl::encoding::Encode<
5351 ClientSmeScanForControllerResponse,
5352 fidl::encoding::DefaultFuchsiaResourceDialect,
5353 > for &mut ClientSmeScanForControllerResponse
5354 {
5355 #[inline]
5356 unsafe fn encode(
5357 self,
5358 encoder: &mut fidl::encoding::Encoder<
5359 '_,
5360 fidl::encoding::DefaultFuchsiaResourceDialect,
5361 >,
5362 offset: usize,
5363 _depth: fidl::encoding::Depth,
5364 ) -> fidl::Result<()> {
5365 encoder.debug_check_bounds::<ClientSmeScanForControllerResponse>(offset);
5366 fidl::encoding::Encode::<ClientSmeScanForControllerResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5368 (
5369 <fidl::encoding::UnboundedVector<ScanResult> as fidl::encoding::ValueTypeMarker>::borrow(&self.scan_results),
5370 ),
5371 encoder, offset, _depth
5372 )
5373 }
5374 }
5375 unsafe impl<
5376 T0: fidl::encoding::Encode<
5377 fidl::encoding::UnboundedVector<ScanResult>,
5378 fidl::encoding::DefaultFuchsiaResourceDialect,
5379 >,
5380 >
5381 fidl::encoding::Encode<
5382 ClientSmeScanForControllerResponse,
5383 fidl::encoding::DefaultFuchsiaResourceDialect,
5384 > for (T0,)
5385 {
5386 #[inline]
5387 unsafe fn encode(
5388 self,
5389 encoder: &mut fidl::encoding::Encoder<
5390 '_,
5391 fidl::encoding::DefaultFuchsiaResourceDialect,
5392 >,
5393 offset: usize,
5394 depth: fidl::encoding::Depth,
5395 ) -> fidl::Result<()> {
5396 encoder.debug_check_bounds::<ClientSmeScanForControllerResponse>(offset);
5397 self.0.encode(encoder, offset + 0, depth)?;
5401 Ok(())
5402 }
5403 }
5404
5405 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5406 for ClientSmeScanForControllerResponse
5407 {
5408 #[inline(always)]
5409 fn new_empty() -> Self {
5410 Self {
5411 scan_results: fidl::new_empty!(
5412 fidl::encoding::UnboundedVector<ScanResult>,
5413 fidl::encoding::DefaultFuchsiaResourceDialect
5414 ),
5415 }
5416 }
5417
5418 #[inline]
5419 unsafe fn decode(
5420 &mut self,
5421 decoder: &mut fidl::encoding::Decoder<
5422 '_,
5423 fidl::encoding::DefaultFuchsiaResourceDialect,
5424 >,
5425 offset: usize,
5426 _depth: fidl::encoding::Depth,
5427 ) -> fidl::Result<()> {
5428 decoder.debug_check_bounds::<Self>(offset);
5429 fidl::decode!(
5431 fidl::encoding::UnboundedVector<ScanResult>,
5432 fidl::encoding::DefaultFuchsiaResourceDialect,
5433 &mut self.scan_results,
5434 decoder,
5435 offset + 0,
5436 _depth
5437 )?;
5438 Ok(())
5439 }
5440 }
5441
5442 impl fidl::encoding::ResourceTypeMarker for ClientSmeScanResponse {
5443 type Borrowed<'a> = &'a mut Self;
5444 fn take_or_borrow<'a>(
5445 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5446 ) -> Self::Borrowed<'a> {
5447 value
5448 }
5449 }
5450
5451 unsafe impl fidl::encoding::TypeMarker for ClientSmeScanResponse {
5452 type Owned = Self;
5453
5454 #[inline(always)]
5455 fn inline_align(_context: fidl::encoding::Context) -> usize {
5456 4
5457 }
5458
5459 #[inline(always)]
5460 fn inline_size(_context: fidl::encoding::Context) -> usize {
5461 4
5462 }
5463 }
5464
5465 unsafe impl
5466 fidl::encoding::Encode<ClientSmeScanResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
5467 for &mut ClientSmeScanResponse
5468 {
5469 #[inline]
5470 unsafe fn encode(
5471 self,
5472 encoder: &mut fidl::encoding::Encoder<
5473 '_,
5474 fidl::encoding::DefaultFuchsiaResourceDialect,
5475 >,
5476 offset: usize,
5477 _depth: fidl::encoding::Depth,
5478 ) -> fidl::Result<()> {
5479 encoder.debug_check_bounds::<ClientSmeScanResponse>(offset);
5480 fidl::encoding::Encode::<
5482 ClientSmeScanResponse,
5483 fidl::encoding::DefaultFuchsiaResourceDialect,
5484 >::encode(
5485 (<fidl::encoding::HandleType<
5486 fidl::Vmo,
5487 { fidl::ObjectType::VMO.into_raw() },
5488 2147483648,
5489 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5490 &mut self.scan_results
5491 ),),
5492 encoder,
5493 offset,
5494 _depth,
5495 )
5496 }
5497 }
5498 unsafe impl<
5499 T0: fidl::encoding::Encode<
5500 fidl::encoding::HandleType<
5501 fidl::Vmo,
5502 { fidl::ObjectType::VMO.into_raw() },
5503 2147483648,
5504 >,
5505 fidl::encoding::DefaultFuchsiaResourceDialect,
5506 >,
5507 >
5508 fidl::encoding::Encode<ClientSmeScanResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
5509 for (T0,)
5510 {
5511 #[inline]
5512 unsafe fn encode(
5513 self,
5514 encoder: &mut fidl::encoding::Encoder<
5515 '_,
5516 fidl::encoding::DefaultFuchsiaResourceDialect,
5517 >,
5518 offset: usize,
5519 depth: fidl::encoding::Depth,
5520 ) -> fidl::Result<()> {
5521 encoder.debug_check_bounds::<ClientSmeScanResponse>(offset);
5522 self.0.encode(encoder, offset + 0, depth)?;
5526 Ok(())
5527 }
5528 }
5529
5530 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5531 for ClientSmeScanResponse
5532 {
5533 #[inline(always)]
5534 fn new_empty() -> Self {
5535 Self {
5536 scan_results: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
5537 }
5538 }
5539
5540 #[inline]
5541 unsafe fn decode(
5542 &mut self,
5543 decoder: &mut fidl::encoding::Decoder<
5544 '_,
5545 fidl::encoding::DefaultFuchsiaResourceDialect,
5546 >,
5547 offset: usize,
5548 _depth: fidl::encoding::Depth,
5549 ) -> fidl::Result<()> {
5550 decoder.debug_check_bounds::<Self>(offset);
5551 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.scan_results, decoder, offset + 0, _depth)?;
5553 Ok(())
5554 }
5555 }
5556
5557 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetApSmeRequest {
5558 type Borrowed<'a> = &'a mut Self;
5559 fn take_or_borrow<'a>(
5560 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5561 ) -> Self::Borrowed<'a> {
5562 value
5563 }
5564 }
5565
5566 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetApSmeRequest {
5567 type Owned = Self;
5568
5569 #[inline(always)]
5570 fn inline_align(_context: fidl::encoding::Context) -> usize {
5571 4
5572 }
5573
5574 #[inline(always)]
5575 fn inline_size(_context: fidl::encoding::Context) -> usize {
5576 4
5577 }
5578 }
5579
5580 unsafe impl
5581 fidl::encoding::Encode<
5582 GenericSmeGetApSmeRequest,
5583 fidl::encoding::DefaultFuchsiaResourceDialect,
5584 > for &mut GenericSmeGetApSmeRequest
5585 {
5586 #[inline]
5587 unsafe fn encode(
5588 self,
5589 encoder: &mut fidl::encoding::Encoder<
5590 '_,
5591 fidl::encoding::DefaultFuchsiaResourceDialect,
5592 >,
5593 offset: usize,
5594 _depth: fidl::encoding::Depth,
5595 ) -> fidl::Result<()> {
5596 encoder.debug_check_bounds::<GenericSmeGetApSmeRequest>(offset);
5597 fidl::encoding::Encode::<GenericSmeGetApSmeRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5599 (
5600 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sme_server),
5601 ),
5602 encoder, offset, _depth
5603 )
5604 }
5605 }
5606 unsafe impl<
5607 T0: fidl::encoding::Encode<
5608 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
5609 fidl::encoding::DefaultFuchsiaResourceDialect,
5610 >,
5611 >
5612 fidl::encoding::Encode<
5613 GenericSmeGetApSmeRequest,
5614 fidl::encoding::DefaultFuchsiaResourceDialect,
5615 > for (T0,)
5616 {
5617 #[inline]
5618 unsafe fn encode(
5619 self,
5620 encoder: &mut fidl::encoding::Encoder<
5621 '_,
5622 fidl::encoding::DefaultFuchsiaResourceDialect,
5623 >,
5624 offset: usize,
5625 depth: fidl::encoding::Depth,
5626 ) -> fidl::Result<()> {
5627 encoder.debug_check_bounds::<GenericSmeGetApSmeRequest>(offset);
5628 self.0.encode(encoder, offset + 0, depth)?;
5632 Ok(())
5633 }
5634 }
5635
5636 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5637 for GenericSmeGetApSmeRequest
5638 {
5639 #[inline(always)]
5640 fn new_empty() -> Self {
5641 Self {
5642 sme_server: fidl::new_empty!(
5643 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
5644 fidl::encoding::DefaultFuchsiaResourceDialect
5645 ),
5646 }
5647 }
5648
5649 #[inline]
5650 unsafe fn decode(
5651 &mut self,
5652 decoder: &mut fidl::encoding::Decoder<
5653 '_,
5654 fidl::encoding::DefaultFuchsiaResourceDialect,
5655 >,
5656 offset: usize,
5657 _depth: fidl::encoding::Depth,
5658 ) -> fidl::Result<()> {
5659 decoder.debug_check_bounds::<Self>(offset);
5660 fidl::decode!(
5662 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ApSmeMarker>>,
5663 fidl::encoding::DefaultFuchsiaResourceDialect,
5664 &mut self.sme_server,
5665 decoder,
5666 offset + 0,
5667 _depth
5668 )?;
5669 Ok(())
5670 }
5671 }
5672
5673 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetClientSmeRequest {
5674 type Borrowed<'a> = &'a mut Self;
5675 fn take_or_borrow<'a>(
5676 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5677 ) -> Self::Borrowed<'a> {
5678 value
5679 }
5680 }
5681
5682 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetClientSmeRequest {
5683 type Owned = Self;
5684
5685 #[inline(always)]
5686 fn inline_align(_context: fidl::encoding::Context) -> usize {
5687 4
5688 }
5689
5690 #[inline(always)]
5691 fn inline_size(_context: fidl::encoding::Context) -> usize {
5692 4
5693 }
5694 }
5695
5696 unsafe impl
5697 fidl::encoding::Encode<
5698 GenericSmeGetClientSmeRequest,
5699 fidl::encoding::DefaultFuchsiaResourceDialect,
5700 > for &mut GenericSmeGetClientSmeRequest
5701 {
5702 #[inline]
5703 unsafe fn encode(
5704 self,
5705 encoder: &mut fidl::encoding::Encoder<
5706 '_,
5707 fidl::encoding::DefaultFuchsiaResourceDialect,
5708 >,
5709 offset: usize,
5710 _depth: fidl::encoding::Depth,
5711 ) -> fidl::Result<()> {
5712 encoder.debug_check_bounds::<GenericSmeGetClientSmeRequest>(offset);
5713 fidl::encoding::Encode::<GenericSmeGetClientSmeRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5715 (
5716 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sme_server),
5717 ),
5718 encoder, offset, _depth
5719 )
5720 }
5721 }
5722 unsafe impl<
5723 T0: fidl::encoding::Encode<
5724 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
5725 fidl::encoding::DefaultFuchsiaResourceDialect,
5726 >,
5727 >
5728 fidl::encoding::Encode<
5729 GenericSmeGetClientSmeRequest,
5730 fidl::encoding::DefaultFuchsiaResourceDialect,
5731 > for (T0,)
5732 {
5733 #[inline]
5734 unsafe fn encode(
5735 self,
5736 encoder: &mut fidl::encoding::Encoder<
5737 '_,
5738 fidl::encoding::DefaultFuchsiaResourceDialect,
5739 >,
5740 offset: usize,
5741 depth: fidl::encoding::Depth,
5742 ) -> fidl::Result<()> {
5743 encoder.debug_check_bounds::<GenericSmeGetClientSmeRequest>(offset);
5744 self.0.encode(encoder, offset + 0, depth)?;
5748 Ok(())
5749 }
5750 }
5751
5752 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5753 for GenericSmeGetClientSmeRequest
5754 {
5755 #[inline(always)]
5756 fn new_empty() -> Self {
5757 Self {
5758 sme_server: fidl::new_empty!(
5759 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
5760 fidl::encoding::DefaultFuchsiaResourceDialect
5761 ),
5762 }
5763 }
5764
5765 #[inline]
5766 unsafe fn decode(
5767 &mut self,
5768 decoder: &mut fidl::encoding::Decoder<
5769 '_,
5770 fidl::encoding::DefaultFuchsiaResourceDialect,
5771 >,
5772 offset: usize,
5773 _depth: fidl::encoding::Depth,
5774 ) -> fidl::Result<()> {
5775 decoder.debug_check_bounds::<Self>(offset);
5776 fidl::decode!(
5778 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ClientSmeMarker>>,
5779 fidl::encoding::DefaultFuchsiaResourceDialect,
5780 &mut self.sme_server,
5781 decoder,
5782 offset + 0,
5783 _depth
5784 )?;
5785 Ok(())
5786 }
5787 }
5788
5789 impl fidl::encoding::ResourceTypeMarker for GenericSmeGetSmeTelemetryRequest {
5790 type Borrowed<'a> = &'a mut Self;
5791 fn take_or_borrow<'a>(
5792 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5793 ) -> Self::Borrowed<'a> {
5794 value
5795 }
5796 }
5797
5798 unsafe impl fidl::encoding::TypeMarker for GenericSmeGetSmeTelemetryRequest {
5799 type Owned = Self;
5800
5801 #[inline(always)]
5802 fn inline_align(_context: fidl::encoding::Context) -> usize {
5803 4
5804 }
5805
5806 #[inline(always)]
5807 fn inline_size(_context: fidl::encoding::Context) -> usize {
5808 4
5809 }
5810 }
5811
5812 unsafe impl
5813 fidl::encoding::Encode<
5814 GenericSmeGetSmeTelemetryRequest,
5815 fidl::encoding::DefaultFuchsiaResourceDialect,
5816 > for &mut GenericSmeGetSmeTelemetryRequest
5817 {
5818 #[inline]
5819 unsafe fn encode(
5820 self,
5821 encoder: &mut fidl::encoding::Encoder<
5822 '_,
5823 fidl::encoding::DefaultFuchsiaResourceDialect,
5824 >,
5825 offset: usize,
5826 _depth: fidl::encoding::Depth,
5827 ) -> fidl::Result<()> {
5828 encoder.debug_check_bounds::<GenericSmeGetSmeTelemetryRequest>(offset);
5829 fidl::encoding::Encode::<GenericSmeGetSmeTelemetryRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5831 (
5832 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.telemetry_server),
5833 ),
5834 encoder, offset, _depth
5835 )
5836 }
5837 }
5838 unsafe impl<
5839 T0: fidl::encoding::Encode<
5840 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
5841 fidl::encoding::DefaultFuchsiaResourceDialect,
5842 >,
5843 >
5844 fidl::encoding::Encode<
5845 GenericSmeGetSmeTelemetryRequest,
5846 fidl::encoding::DefaultFuchsiaResourceDialect,
5847 > for (T0,)
5848 {
5849 #[inline]
5850 unsafe fn encode(
5851 self,
5852 encoder: &mut fidl::encoding::Encoder<
5853 '_,
5854 fidl::encoding::DefaultFuchsiaResourceDialect,
5855 >,
5856 offset: usize,
5857 depth: fidl::encoding::Depth,
5858 ) -> fidl::Result<()> {
5859 encoder.debug_check_bounds::<GenericSmeGetSmeTelemetryRequest>(offset);
5860 self.0.encode(encoder, offset + 0, depth)?;
5864 Ok(())
5865 }
5866 }
5867
5868 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5869 for GenericSmeGetSmeTelemetryRequest
5870 {
5871 #[inline(always)]
5872 fn new_empty() -> Self {
5873 Self {
5874 telemetry_server: fidl::new_empty!(
5875 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
5876 fidl::encoding::DefaultFuchsiaResourceDialect
5877 ),
5878 }
5879 }
5880
5881 #[inline]
5882 unsafe fn decode(
5883 &mut self,
5884 decoder: &mut fidl::encoding::Decoder<
5885 '_,
5886 fidl::encoding::DefaultFuchsiaResourceDialect,
5887 >,
5888 offset: usize,
5889 _depth: fidl::encoding::Depth,
5890 ) -> fidl::Result<()> {
5891 decoder.debug_check_bounds::<Self>(offset);
5892 fidl::decode!(
5894 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TelemetryMarker>>,
5895 fidl::encoding::DefaultFuchsiaResourceDialect,
5896 &mut self.telemetry_server,
5897 decoder,
5898 offset + 0,
5899 _depth
5900 )?;
5901 Ok(())
5902 }
5903 }
5904
5905 impl fidl::encoding::ResourceTypeMarker for GenericSmeQueryResponse {
5906 type Borrowed<'a> = &'a mut Self;
5907 fn take_or_borrow<'a>(
5908 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5909 ) -> Self::Borrowed<'a> {
5910 value
5911 }
5912 }
5913
5914 unsafe impl fidl::encoding::TypeMarker for GenericSmeQueryResponse {
5915 type Owned = Self;
5916
5917 #[inline(always)]
5918 fn inline_align(_context: fidl::encoding::Context) -> usize {
5919 4
5920 }
5921
5922 #[inline(always)]
5923 fn inline_size(_context: fidl::encoding::Context) -> usize {
5924 12
5925 }
5926 }
5927
5928 unsafe impl
5929 fidl::encoding::Encode<
5930 GenericSmeQueryResponse,
5931 fidl::encoding::DefaultFuchsiaResourceDialect,
5932 > for &mut GenericSmeQueryResponse
5933 {
5934 #[inline]
5935 unsafe fn encode(
5936 self,
5937 encoder: &mut fidl::encoding::Encoder<
5938 '_,
5939 fidl::encoding::DefaultFuchsiaResourceDialect,
5940 >,
5941 offset: usize,
5942 _depth: fidl::encoding::Depth,
5943 ) -> fidl::Result<()> {
5944 encoder.debug_check_bounds::<GenericSmeQueryResponse>(offset);
5945 fidl::encoding::Encode::<
5947 GenericSmeQueryResponse,
5948 fidl::encoding::DefaultFuchsiaResourceDialect,
5949 >::encode(
5950 (<GenericSmeQuery as fidl::encoding::ValueTypeMarker>::borrow(&self.resp),),
5951 encoder,
5952 offset,
5953 _depth,
5954 )
5955 }
5956 }
5957 unsafe impl<
5958 T0: fidl::encoding::Encode<GenericSmeQuery, fidl::encoding::DefaultFuchsiaResourceDialect>,
5959 >
5960 fidl::encoding::Encode<
5961 GenericSmeQueryResponse,
5962 fidl::encoding::DefaultFuchsiaResourceDialect,
5963 > for (T0,)
5964 {
5965 #[inline]
5966 unsafe fn encode(
5967 self,
5968 encoder: &mut fidl::encoding::Encoder<
5969 '_,
5970 fidl::encoding::DefaultFuchsiaResourceDialect,
5971 >,
5972 offset: usize,
5973 depth: fidl::encoding::Depth,
5974 ) -> fidl::Result<()> {
5975 encoder.debug_check_bounds::<GenericSmeQueryResponse>(offset);
5976 self.0.encode(encoder, offset + 0, depth)?;
5980 Ok(())
5981 }
5982 }
5983
5984 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5985 for GenericSmeQueryResponse
5986 {
5987 #[inline(always)]
5988 fn new_empty() -> Self {
5989 Self {
5990 resp: fidl::new_empty!(
5991 GenericSmeQuery,
5992 fidl::encoding::DefaultFuchsiaResourceDialect
5993 ),
5994 }
5995 }
5996
5997 #[inline]
5998 unsafe fn decode(
5999 &mut self,
6000 decoder: &mut fidl::encoding::Decoder<
6001 '_,
6002 fidl::encoding::DefaultFuchsiaResourceDialect,
6003 >,
6004 offset: usize,
6005 _depth: fidl::encoding::Depth,
6006 ) -> fidl::Result<()> {
6007 decoder.debug_check_bounds::<Self>(offset);
6008 fidl::decode!(
6010 GenericSmeQuery,
6011 fidl::encoding::DefaultFuchsiaResourceDialect,
6012 &mut self.resp,
6013 decoder,
6014 offset + 0,
6015 _depth
6016 )?;
6017 Ok(())
6018 }
6019 }
6020
6021 impl fidl::encoding::ResourceTypeMarker for TelemetryCloneInspectVmoResponse {
6022 type Borrowed<'a> = &'a mut Self;
6023 fn take_or_borrow<'a>(
6024 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6025 ) -> Self::Borrowed<'a> {
6026 value
6027 }
6028 }
6029
6030 unsafe impl fidl::encoding::TypeMarker for TelemetryCloneInspectVmoResponse {
6031 type Owned = Self;
6032
6033 #[inline(always)]
6034 fn inline_align(_context: fidl::encoding::Context) -> usize {
6035 4
6036 }
6037
6038 #[inline(always)]
6039 fn inline_size(_context: fidl::encoding::Context) -> usize {
6040 4
6041 }
6042 }
6043
6044 unsafe impl
6045 fidl::encoding::Encode<
6046 TelemetryCloneInspectVmoResponse,
6047 fidl::encoding::DefaultFuchsiaResourceDialect,
6048 > for &mut TelemetryCloneInspectVmoResponse
6049 {
6050 #[inline]
6051 unsafe fn encode(
6052 self,
6053 encoder: &mut fidl::encoding::Encoder<
6054 '_,
6055 fidl::encoding::DefaultFuchsiaResourceDialect,
6056 >,
6057 offset: usize,
6058 _depth: fidl::encoding::Depth,
6059 ) -> fidl::Result<()> {
6060 encoder.debug_check_bounds::<TelemetryCloneInspectVmoResponse>(offset);
6061 fidl::encoding::Encode::<
6063 TelemetryCloneInspectVmoResponse,
6064 fidl::encoding::DefaultFuchsiaResourceDialect,
6065 >::encode(
6066 (<fidl::encoding::HandleType<
6067 fidl::Vmo,
6068 { fidl::ObjectType::VMO.into_raw() },
6069 2147483648,
6070 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6071 &mut self.inspect_vmo
6072 ),),
6073 encoder,
6074 offset,
6075 _depth,
6076 )
6077 }
6078 }
6079 unsafe impl<
6080 T0: fidl::encoding::Encode<
6081 fidl::encoding::HandleType<
6082 fidl::Vmo,
6083 { fidl::ObjectType::VMO.into_raw() },
6084 2147483648,
6085 >,
6086 fidl::encoding::DefaultFuchsiaResourceDialect,
6087 >,
6088 >
6089 fidl::encoding::Encode<
6090 TelemetryCloneInspectVmoResponse,
6091 fidl::encoding::DefaultFuchsiaResourceDialect,
6092 > for (T0,)
6093 {
6094 #[inline]
6095 unsafe fn encode(
6096 self,
6097 encoder: &mut fidl::encoding::Encoder<
6098 '_,
6099 fidl::encoding::DefaultFuchsiaResourceDialect,
6100 >,
6101 offset: usize,
6102 depth: fidl::encoding::Depth,
6103 ) -> fidl::Result<()> {
6104 encoder.debug_check_bounds::<TelemetryCloneInspectVmoResponse>(offset);
6105 self.0.encode(encoder, offset + 0, depth)?;
6109 Ok(())
6110 }
6111 }
6112
6113 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6114 for TelemetryCloneInspectVmoResponse
6115 {
6116 #[inline(always)]
6117 fn new_empty() -> Self {
6118 Self {
6119 inspect_vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6120 }
6121 }
6122
6123 #[inline]
6124 unsafe fn decode(
6125 &mut self,
6126 decoder: &mut fidl::encoding::Decoder<
6127 '_,
6128 fidl::encoding::DefaultFuchsiaResourceDialect,
6129 >,
6130 offset: usize,
6131 _depth: fidl::encoding::Depth,
6132 ) -> fidl::Result<()> {
6133 decoder.debug_check_bounds::<Self>(offset);
6134 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.inspect_vmo, decoder, offset + 0, _depth)?;
6136 Ok(())
6137 }
6138 }
6139
6140 impl fidl::encoding::ResourceTypeMarker for UsmeBootstrapStartRequest {
6141 type Borrowed<'a> = &'a mut Self;
6142 fn take_or_borrow<'a>(
6143 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6144 ) -> Self::Borrowed<'a> {
6145 value
6146 }
6147 }
6148
6149 unsafe impl fidl::encoding::TypeMarker for UsmeBootstrapStartRequest {
6150 type Owned = Self;
6151
6152 #[inline(always)]
6153 fn inline_align(_context: fidl::encoding::Context) -> usize {
6154 4
6155 }
6156
6157 #[inline(always)]
6158 fn inline_size(_context: fidl::encoding::Context) -> usize {
6159 8
6160 }
6161 }
6162
6163 unsafe impl
6164 fidl::encoding::Encode<
6165 UsmeBootstrapStartRequest,
6166 fidl::encoding::DefaultFuchsiaResourceDialect,
6167 > for &mut UsmeBootstrapStartRequest
6168 {
6169 #[inline]
6170 unsafe fn encode(
6171 self,
6172 encoder: &mut fidl::encoding::Encoder<
6173 '_,
6174 fidl::encoding::DefaultFuchsiaResourceDialect,
6175 >,
6176 offset: usize,
6177 _depth: fidl::encoding::Depth,
6178 ) -> fidl::Result<()> {
6179 encoder.debug_check_bounds::<UsmeBootstrapStartRequest>(offset);
6180 fidl::encoding::Encode::<UsmeBootstrapStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6182 (
6183 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.generic_sme_server),
6184 <LegacyPrivacySupport as fidl::encoding::ValueTypeMarker>::borrow(&self.legacy_privacy_support),
6185 ),
6186 encoder, offset, _depth
6187 )
6188 }
6189 }
6190 unsafe impl<
6191 T0: fidl::encoding::Encode<
6192 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
6193 fidl::encoding::DefaultFuchsiaResourceDialect,
6194 >,
6195 T1: fidl::encoding::Encode<LegacyPrivacySupport, fidl::encoding::DefaultFuchsiaResourceDialect>,
6196 >
6197 fidl::encoding::Encode<
6198 UsmeBootstrapStartRequest,
6199 fidl::encoding::DefaultFuchsiaResourceDialect,
6200 > for (T0, T1)
6201 {
6202 #[inline]
6203 unsafe fn encode(
6204 self,
6205 encoder: &mut fidl::encoding::Encoder<
6206 '_,
6207 fidl::encoding::DefaultFuchsiaResourceDialect,
6208 >,
6209 offset: usize,
6210 depth: fidl::encoding::Depth,
6211 ) -> fidl::Result<()> {
6212 encoder.debug_check_bounds::<UsmeBootstrapStartRequest>(offset);
6213 unsafe {
6216 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
6217 (ptr as *mut u32).write_unaligned(0);
6218 }
6219 self.0.encode(encoder, offset + 0, depth)?;
6221 self.1.encode(encoder, offset + 4, depth)?;
6222 Ok(())
6223 }
6224 }
6225
6226 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6227 for UsmeBootstrapStartRequest
6228 {
6229 #[inline(always)]
6230 fn new_empty() -> Self {
6231 Self {
6232 generic_sme_server: fidl::new_empty!(
6233 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
6234 fidl::encoding::DefaultFuchsiaResourceDialect
6235 ),
6236 legacy_privacy_support: fidl::new_empty!(
6237 LegacyPrivacySupport,
6238 fidl::encoding::DefaultFuchsiaResourceDialect
6239 ),
6240 }
6241 }
6242
6243 #[inline]
6244 unsafe fn decode(
6245 &mut self,
6246 decoder: &mut fidl::encoding::Decoder<
6247 '_,
6248 fidl::encoding::DefaultFuchsiaResourceDialect,
6249 >,
6250 offset: usize,
6251 _depth: fidl::encoding::Depth,
6252 ) -> fidl::Result<()> {
6253 decoder.debug_check_bounds::<Self>(offset);
6254 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
6256 let padval = unsafe { (ptr as *const u32).read_unaligned() };
6257 let mask = 0xffff0000u32;
6258 let maskedval = padval & mask;
6259 if maskedval != 0 {
6260 return Err(fidl::Error::NonZeroPadding {
6261 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
6262 });
6263 }
6264 fidl::decode!(
6265 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<GenericSmeMarker>>,
6266 fidl::encoding::DefaultFuchsiaResourceDialect,
6267 &mut self.generic_sme_server,
6268 decoder,
6269 offset + 0,
6270 _depth
6271 )?;
6272 fidl::decode!(
6273 LegacyPrivacySupport,
6274 fidl::encoding::DefaultFuchsiaResourceDialect,
6275 &mut self.legacy_privacy_support,
6276 decoder,
6277 offset + 4,
6278 _depth
6279 )?;
6280 Ok(())
6281 }
6282 }
6283
6284 impl fidl::encoding::ResourceTypeMarker for UsmeBootstrapStartResponse {
6285 type Borrowed<'a> = &'a mut Self;
6286 fn take_or_borrow<'a>(
6287 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6288 ) -> Self::Borrowed<'a> {
6289 value
6290 }
6291 }
6292
6293 unsafe impl fidl::encoding::TypeMarker for UsmeBootstrapStartResponse {
6294 type Owned = Self;
6295
6296 #[inline(always)]
6297 fn inline_align(_context: fidl::encoding::Context) -> usize {
6298 4
6299 }
6300
6301 #[inline(always)]
6302 fn inline_size(_context: fidl::encoding::Context) -> usize {
6303 4
6304 }
6305 }
6306
6307 unsafe impl
6308 fidl::encoding::Encode<
6309 UsmeBootstrapStartResponse,
6310 fidl::encoding::DefaultFuchsiaResourceDialect,
6311 > for &mut UsmeBootstrapStartResponse
6312 {
6313 #[inline]
6314 unsafe fn encode(
6315 self,
6316 encoder: &mut fidl::encoding::Encoder<
6317 '_,
6318 fidl::encoding::DefaultFuchsiaResourceDialect,
6319 >,
6320 offset: usize,
6321 _depth: fidl::encoding::Depth,
6322 ) -> fidl::Result<()> {
6323 encoder.debug_check_bounds::<UsmeBootstrapStartResponse>(offset);
6324 fidl::encoding::Encode::<
6326 UsmeBootstrapStartResponse,
6327 fidl::encoding::DefaultFuchsiaResourceDialect,
6328 >::encode(
6329 (<fidl::encoding::HandleType<
6330 fidl::Vmo,
6331 { fidl::ObjectType::VMO.into_raw() },
6332 2147483648,
6333 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6334 &mut self.inspect_vmo
6335 ),),
6336 encoder,
6337 offset,
6338 _depth,
6339 )
6340 }
6341 }
6342 unsafe impl<
6343 T0: fidl::encoding::Encode<
6344 fidl::encoding::HandleType<
6345 fidl::Vmo,
6346 { fidl::ObjectType::VMO.into_raw() },
6347 2147483648,
6348 >,
6349 fidl::encoding::DefaultFuchsiaResourceDialect,
6350 >,
6351 >
6352 fidl::encoding::Encode<
6353 UsmeBootstrapStartResponse,
6354 fidl::encoding::DefaultFuchsiaResourceDialect,
6355 > for (T0,)
6356 {
6357 #[inline]
6358 unsafe fn encode(
6359 self,
6360 encoder: &mut fidl::encoding::Encoder<
6361 '_,
6362 fidl::encoding::DefaultFuchsiaResourceDialect,
6363 >,
6364 offset: usize,
6365 depth: fidl::encoding::Depth,
6366 ) -> fidl::Result<()> {
6367 encoder.debug_check_bounds::<UsmeBootstrapStartResponse>(offset);
6368 self.0.encode(encoder, offset + 0, depth)?;
6372 Ok(())
6373 }
6374 }
6375
6376 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6377 for UsmeBootstrapStartResponse
6378 {
6379 #[inline(always)]
6380 fn new_empty() -> Self {
6381 Self {
6382 inspect_vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6383 }
6384 }
6385
6386 #[inline]
6387 unsafe fn decode(
6388 &mut self,
6389 decoder: &mut fidl::encoding::Decoder<
6390 '_,
6391 fidl::encoding::DefaultFuchsiaResourceDialect,
6392 >,
6393 offset: usize,
6394 _depth: fidl::encoding::Depth,
6395 ) -> fidl::Result<()> {
6396 decoder.debug_check_bounds::<Self>(offset);
6397 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.inspect_vmo, decoder, offset + 0, _depth)?;
6399 Ok(())
6400 }
6401 }
6402}