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_developer_remotecontrol_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub struct RemoteControlConnectCapabilityRequest {
16 pub moniker: String,
17 pub capability_set: fidl_fuchsia_sys2::OpenDirType,
18 pub capability_name: String,
19 pub server_channel: fidl::Channel,
20}
21
22impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
23 for RemoteControlConnectCapabilityRequest
24{
25}
26
27#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
28pub struct RemoteControlDeprecatedOpenCapabilityRequest {
29 pub moniker: String,
30 pub capability_set: fidl_fuchsia_sys2::OpenDirType,
31 pub capability_name: String,
32 pub server_channel: fidl::Channel,
33 pub flags: fidl_fuchsia_io::OpenFlags,
34}
35
36impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
37 for RemoteControlDeprecatedOpenCapabilityRequest
38{
39}
40
41#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
42pub struct RemoteControlMarker;
43
44impl fidl::endpoints::ProtocolMarker for RemoteControlMarker {
45 type Proxy = RemoteControlProxy;
46 type RequestStream = RemoteControlRequestStream;
47 #[cfg(target_os = "fuchsia")]
48 type SynchronousProxy = RemoteControlSynchronousProxy;
49
50 const DEBUG_NAME: &'static str = "fuchsia.developer.remotecontrol.RemoteControl";
51}
52impl fidl::endpoints::DiscoverableProtocolMarker for RemoteControlMarker {}
53pub type RemoteControlIdentifyHostResult = Result<IdentifyHostResponse, IdentifyHostError>;
54pub type RemoteControlConnectCapabilityResult = Result<(), ConnectCapabilityError>;
55pub type RemoteControlDeprecatedOpenCapabilityResult = Result<(), ConnectCapabilityError>;
56
57pub trait RemoteControlProxyInterface: Send + Sync {
58 type EchoStringResponseFut: std::future::Future<Output = Result<String, fidl::Error>> + Send;
59 fn r#echo_string(&self, value: &str) -> Self::EchoStringResponseFut;
60 type LogMessageResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
61 fn r#log_message(
62 &self,
63 tag: &str,
64 message: &str,
65 severity: fidl_fuchsia_diagnostics_types::Severity,
66 ) -> Self::LogMessageResponseFut;
67 type IdentifyHostResponseFut: std::future::Future<Output = Result<RemoteControlIdentifyHostResult, fidl::Error>>
68 + Send;
69 fn r#identify_host(&self) -> Self::IdentifyHostResponseFut;
70 type ConnectCapabilityResponseFut: std::future::Future<Output = Result<RemoteControlConnectCapabilityResult, fidl::Error>>
71 + Send;
72 fn r#connect_capability(
73 &self,
74 moniker: &str,
75 capability_set: fidl_fuchsia_sys2::OpenDirType,
76 capability_name: &str,
77 server_channel: fidl::Channel,
78 ) -> Self::ConnectCapabilityResponseFut;
79 type GetTimeResponseFut: std::future::Future<Output = Result<fidl::MonotonicInstant, fidl::Error>>
80 + Send;
81 fn r#get_time(&self) -> Self::GetTimeResponseFut;
82 type GetBootTimeResponseFut: std::future::Future<Output = Result<fidl::BootInstant, fidl::Error>>
83 + Send;
84 fn r#get_boot_time(&self) -> Self::GetBootTimeResponseFut;
85 type DeprecatedOpenCapabilityResponseFut: std::future::Future<
86 Output = Result<RemoteControlDeprecatedOpenCapabilityResult, fidl::Error>,
87 > + Send;
88 fn r#deprecated_open_capability(
89 &self,
90 moniker: &str,
91 capability_set: fidl_fuchsia_sys2::OpenDirType,
92 capability_name: &str,
93 server_channel: fidl::Channel,
94 flags: fidl_fuchsia_io::OpenFlags,
95 ) -> Self::DeprecatedOpenCapabilityResponseFut;
96}
97#[derive(Debug)]
98#[cfg(target_os = "fuchsia")]
99pub struct RemoteControlSynchronousProxy {
100 client: fidl::client::sync::Client,
101}
102
103#[cfg(target_os = "fuchsia")]
104impl fidl::endpoints::SynchronousProxy for RemoteControlSynchronousProxy {
105 type Proxy = RemoteControlProxy;
106 type Protocol = RemoteControlMarker;
107
108 fn from_channel(inner: fidl::Channel) -> Self {
109 Self::new(inner)
110 }
111
112 fn into_channel(self) -> fidl::Channel {
113 self.client.into_channel()
114 }
115
116 fn as_channel(&self) -> &fidl::Channel {
117 self.client.as_channel()
118 }
119}
120
121#[cfg(target_os = "fuchsia")]
122impl RemoteControlSynchronousProxy {
123 pub fn new(channel: fidl::Channel) -> Self {
124 let protocol_name = <RemoteControlMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
125 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
126 }
127
128 pub fn into_channel(self) -> fidl::Channel {
129 self.client.into_channel()
130 }
131
132 pub fn wait_for_event(
135 &self,
136 deadline: zx::MonotonicInstant,
137 ) -> Result<RemoteControlEvent, fidl::Error> {
138 RemoteControlEvent::decode(self.client.wait_for_event(deadline)?)
139 }
140
141 pub fn r#echo_string(
143 &self,
144 mut value: &str,
145 ___deadline: zx::MonotonicInstant,
146 ) -> Result<String, fidl::Error> {
147 let _response = self
148 .client
149 .send_query::<RemoteControlEchoStringRequest, RemoteControlEchoStringResponse>(
150 (value,),
151 0x2bbec7ca8a72e82b,
152 fidl::encoding::DynamicFlags::empty(),
153 ___deadline,
154 )?;
155 Ok(_response.response)
156 }
157
158 pub fn r#log_message(
160 &self,
161 mut tag: &str,
162 mut message: &str,
163 mut severity: fidl_fuchsia_diagnostics_types::Severity,
164 ___deadline: zx::MonotonicInstant,
165 ) -> Result<(), fidl::Error> {
166 let _response = self
167 .client
168 .send_query::<RemoteControlLogMessageRequest, fidl::encoding::EmptyPayload>(
169 (tag, message, severity),
170 0x3da84acd5bbf3926,
171 fidl::encoding::DynamicFlags::empty(),
172 ___deadline,
173 )?;
174 Ok(_response)
175 }
176
177 pub fn r#identify_host(
178 &self,
179 ___deadline: zx::MonotonicInstant,
180 ) -> Result<RemoteControlIdentifyHostResult, fidl::Error> {
181 let _response = self
182 .client
183 .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::FlexibleResultType<
184 RemoteControlIdentifyHostResponse,
185 IdentifyHostError,
186 >>(
187 (), 0x6035e1ab368deee1, fidl::encoding::DynamicFlags::FLEXIBLE, ___deadline
188 )?
189 .into_result::<RemoteControlMarker>("identify_host")?;
190 Ok(_response.map(|x| x.response))
191 }
192
193 pub fn r#connect_capability(
196 &self,
197 mut moniker: &str,
198 mut capability_set: fidl_fuchsia_sys2::OpenDirType,
199 mut capability_name: &str,
200 mut server_channel: fidl::Channel,
201 ___deadline: zx::MonotonicInstant,
202 ) -> Result<RemoteControlConnectCapabilityResult, fidl::Error> {
203 let _response = self.client.send_query::<
204 RemoteControlConnectCapabilityRequest,
205 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, ConnectCapabilityError>,
206 >(
207 (moniker, capability_set, capability_name, server_channel,),
208 0x3ae7a7c874dceceb,
209 fidl::encoding::DynamicFlags::FLEXIBLE,
210 ___deadline,
211 )?
212 .into_result::<RemoteControlMarker>("connect_capability")?;
213 Ok(_response.map(|x| x))
214 }
215
216 pub fn r#get_time(
217 &self,
218 ___deadline: zx::MonotonicInstant,
219 ) -> Result<fidl::MonotonicInstant, fidl::Error> {
220 let _response =
221 self.client.send_query::<fidl::encoding::EmptyPayload, RemoteControlGetTimeResponse>(
222 (),
223 0x3588f31e9067748d,
224 fidl::encoding::DynamicFlags::empty(),
225 ___deadline,
226 )?;
227 Ok(_response.time)
228 }
229
230 pub fn r#get_boot_time(
231 &self,
232 ___deadline: zx::MonotonicInstant,
233 ) -> Result<fidl::BootInstant, fidl::Error> {
234 let _response = self
235 .client
236 .send_query::<fidl::encoding::EmptyPayload, RemoteControlGetBootTimeResponse>(
237 (),
238 0x55706f013cd79ebd,
239 fidl::encoding::DynamicFlags::empty(),
240 ___deadline,
241 )?;
242 Ok(_response.time)
243 }
244
245 pub fn r#deprecated_open_capability(
250 &self,
251 mut moniker: &str,
252 mut capability_set: fidl_fuchsia_sys2::OpenDirType,
253 mut capability_name: &str,
254 mut server_channel: fidl::Channel,
255 mut flags: fidl_fuchsia_io::OpenFlags,
256 ___deadline: zx::MonotonicInstant,
257 ) -> Result<RemoteControlDeprecatedOpenCapabilityResult, fidl::Error> {
258 let _response = self.client.send_query::<
259 RemoteControlDeprecatedOpenCapabilityRequest,
260 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, ConnectCapabilityError>,
261 >(
262 (moniker, capability_set, capability_name, server_channel, flags,),
263 0x51b5801f3e27e431,
264 fidl::encoding::DynamicFlags::FLEXIBLE,
265 ___deadline,
266 )?
267 .into_result::<RemoteControlMarker>("deprecated_open_capability")?;
268 Ok(_response.map(|x| x))
269 }
270}
271
272#[cfg(target_os = "fuchsia")]
273impl From<RemoteControlSynchronousProxy> for zx::Handle {
274 fn from(value: RemoteControlSynchronousProxy) -> Self {
275 value.into_channel().into()
276 }
277}
278
279#[cfg(target_os = "fuchsia")]
280impl From<fidl::Channel> for RemoteControlSynchronousProxy {
281 fn from(value: fidl::Channel) -> Self {
282 Self::new(value)
283 }
284}
285
286#[derive(Debug, Clone)]
287pub struct RemoteControlProxy {
288 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
289}
290
291impl fidl::endpoints::Proxy for RemoteControlProxy {
292 type Protocol = RemoteControlMarker;
293
294 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
295 Self::new(inner)
296 }
297
298 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
299 self.client.into_channel().map_err(|client| Self { client })
300 }
301
302 fn as_channel(&self) -> &::fidl::AsyncChannel {
303 self.client.as_channel()
304 }
305}
306
307impl RemoteControlProxy {
308 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
310 let protocol_name = <RemoteControlMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
311 Self { client: fidl::client::Client::new(channel, protocol_name) }
312 }
313
314 pub fn take_event_stream(&self) -> RemoteControlEventStream {
320 RemoteControlEventStream { event_receiver: self.client.take_event_receiver() }
321 }
322
323 pub fn r#echo_string(
325 &self,
326 mut value: &str,
327 ) -> fidl::client::QueryResponseFut<String, fidl::encoding::DefaultFuchsiaResourceDialect> {
328 RemoteControlProxyInterface::r#echo_string(self, value)
329 }
330
331 pub fn r#log_message(
333 &self,
334 mut tag: &str,
335 mut message: &str,
336 mut severity: fidl_fuchsia_diagnostics_types::Severity,
337 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
338 RemoteControlProxyInterface::r#log_message(self, tag, message, severity)
339 }
340
341 pub fn r#identify_host(
342 &self,
343 ) -> fidl::client::QueryResponseFut<
344 RemoteControlIdentifyHostResult,
345 fidl::encoding::DefaultFuchsiaResourceDialect,
346 > {
347 RemoteControlProxyInterface::r#identify_host(self)
348 }
349
350 pub fn r#connect_capability(
353 &self,
354 mut moniker: &str,
355 mut capability_set: fidl_fuchsia_sys2::OpenDirType,
356 mut capability_name: &str,
357 mut server_channel: fidl::Channel,
358 ) -> fidl::client::QueryResponseFut<
359 RemoteControlConnectCapabilityResult,
360 fidl::encoding::DefaultFuchsiaResourceDialect,
361 > {
362 RemoteControlProxyInterface::r#connect_capability(
363 self,
364 moniker,
365 capability_set,
366 capability_name,
367 server_channel,
368 )
369 }
370
371 pub fn r#get_time(
372 &self,
373 ) -> fidl::client::QueryResponseFut<
374 fidl::MonotonicInstant,
375 fidl::encoding::DefaultFuchsiaResourceDialect,
376 > {
377 RemoteControlProxyInterface::r#get_time(self)
378 }
379
380 pub fn r#get_boot_time(
381 &self,
382 ) -> fidl::client::QueryResponseFut<
383 fidl::BootInstant,
384 fidl::encoding::DefaultFuchsiaResourceDialect,
385 > {
386 RemoteControlProxyInterface::r#get_boot_time(self)
387 }
388
389 pub fn r#deprecated_open_capability(
394 &self,
395 mut moniker: &str,
396 mut capability_set: fidl_fuchsia_sys2::OpenDirType,
397 mut capability_name: &str,
398 mut server_channel: fidl::Channel,
399 mut flags: fidl_fuchsia_io::OpenFlags,
400 ) -> fidl::client::QueryResponseFut<
401 RemoteControlDeprecatedOpenCapabilityResult,
402 fidl::encoding::DefaultFuchsiaResourceDialect,
403 > {
404 RemoteControlProxyInterface::r#deprecated_open_capability(
405 self,
406 moniker,
407 capability_set,
408 capability_name,
409 server_channel,
410 flags,
411 )
412 }
413}
414
415impl RemoteControlProxyInterface for RemoteControlProxy {
416 type EchoStringResponseFut =
417 fidl::client::QueryResponseFut<String, fidl::encoding::DefaultFuchsiaResourceDialect>;
418 fn r#echo_string(&self, mut value: &str) -> Self::EchoStringResponseFut {
419 fn _decode(
420 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
421 ) -> Result<String, fidl::Error> {
422 let _response = fidl::client::decode_transaction_body::<
423 RemoteControlEchoStringResponse,
424 fidl::encoding::DefaultFuchsiaResourceDialect,
425 0x2bbec7ca8a72e82b,
426 >(_buf?)?;
427 Ok(_response.response)
428 }
429 self.client.send_query_and_decode::<RemoteControlEchoStringRequest, String>(
430 (value,),
431 0x2bbec7ca8a72e82b,
432 fidl::encoding::DynamicFlags::empty(),
433 _decode,
434 )
435 }
436
437 type LogMessageResponseFut =
438 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
439 fn r#log_message(
440 &self,
441 mut tag: &str,
442 mut message: &str,
443 mut severity: fidl_fuchsia_diagnostics_types::Severity,
444 ) -> Self::LogMessageResponseFut {
445 fn _decode(
446 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
447 ) -> Result<(), fidl::Error> {
448 let _response = fidl::client::decode_transaction_body::<
449 fidl::encoding::EmptyPayload,
450 fidl::encoding::DefaultFuchsiaResourceDialect,
451 0x3da84acd5bbf3926,
452 >(_buf?)?;
453 Ok(_response)
454 }
455 self.client.send_query_and_decode::<RemoteControlLogMessageRequest, ()>(
456 (tag, message, severity),
457 0x3da84acd5bbf3926,
458 fidl::encoding::DynamicFlags::empty(),
459 _decode,
460 )
461 }
462
463 type IdentifyHostResponseFut = fidl::client::QueryResponseFut<
464 RemoteControlIdentifyHostResult,
465 fidl::encoding::DefaultFuchsiaResourceDialect,
466 >;
467 fn r#identify_host(&self) -> Self::IdentifyHostResponseFut {
468 fn _decode(
469 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
470 ) -> Result<RemoteControlIdentifyHostResult, fidl::Error> {
471 let _response = fidl::client::decode_transaction_body::<
472 fidl::encoding::FlexibleResultType<
473 RemoteControlIdentifyHostResponse,
474 IdentifyHostError,
475 >,
476 fidl::encoding::DefaultFuchsiaResourceDialect,
477 0x6035e1ab368deee1,
478 >(_buf?)?
479 .into_result::<RemoteControlMarker>("identify_host")?;
480 Ok(_response.map(|x| x.response))
481 }
482 self.client
483 .send_query_and_decode::<fidl::encoding::EmptyPayload, RemoteControlIdentifyHostResult>(
484 (),
485 0x6035e1ab368deee1,
486 fidl::encoding::DynamicFlags::FLEXIBLE,
487 _decode,
488 )
489 }
490
491 type ConnectCapabilityResponseFut = fidl::client::QueryResponseFut<
492 RemoteControlConnectCapabilityResult,
493 fidl::encoding::DefaultFuchsiaResourceDialect,
494 >;
495 fn r#connect_capability(
496 &self,
497 mut moniker: &str,
498 mut capability_set: fidl_fuchsia_sys2::OpenDirType,
499 mut capability_name: &str,
500 mut server_channel: fidl::Channel,
501 ) -> Self::ConnectCapabilityResponseFut {
502 fn _decode(
503 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
504 ) -> Result<RemoteControlConnectCapabilityResult, fidl::Error> {
505 let _response = fidl::client::decode_transaction_body::<
506 fidl::encoding::FlexibleResultType<
507 fidl::encoding::EmptyStruct,
508 ConnectCapabilityError,
509 >,
510 fidl::encoding::DefaultFuchsiaResourceDialect,
511 0x3ae7a7c874dceceb,
512 >(_buf?)?
513 .into_result::<RemoteControlMarker>("connect_capability")?;
514 Ok(_response.map(|x| x))
515 }
516 self.client.send_query_and_decode::<
517 RemoteControlConnectCapabilityRequest,
518 RemoteControlConnectCapabilityResult,
519 >(
520 (moniker, capability_set, capability_name, server_channel,),
521 0x3ae7a7c874dceceb,
522 fidl::encoding::DynamicFlags::FLEXIBLE,
523 _decode,
524 )
525 }
526
527 type GetTimeResponseFut = fidl::client::QueryResponseFut<
528 fidl::MonotonicInstant,
529 fidl::encoding::DefaultFuchsiaResourceDialect,
530 >;
531 fn r#get_time(&self) -> Self::GetTimeResponseFut {
532 fn _decode(
533 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
534 ) -> Result<fidl::MonotonicInstant, fidl::Error> {
535 let _response = fidl::client::decode_transaction_body::<
536 RemoteControlGetTimeResponse,
537 fidl::encoding::DefaultFuchsiaResourceDialect,
538 0x3588f31e9067748d,
539 >(_buf?)?;
540 Ok(_response.time)
541 }
542 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, fidl::MonotonicInstant>(
543 (),
544 0x3588f31e9067748d,
545 fidl::encoding::DynamicFlags::empty(),
546 _decode,
547 )
548 }
549
550 type GetBootTimeResponseFut = fidl::client::QueryResponseFut<
551 fidl::BootInstant,
552 fidl::encoding::DefaultFuchsiaResourceDialect,
553 >;
554 fn r#get_boot_time(&self) -> Self::GetBootTimeResponseFut {
555 fn _decode(
556 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
557 ) -> Result<fidl::BootInstant, fidl::Error> {
558 let _response = fidl::client::decode_transaction_body::<
559 RemoteControlGetBootTimeResponse,
560 fidl::encoding::DefaultFuchsiaResourceDialect,
561 0x55706f013cd79ebd,
562 >(_buf?)?;
563 Ok(_response.time)
564 }
565 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, fidl::BootInstant>(
566 (),
567 0x55706f013cd79ebd,
568 fidl::encoding::DynamicFlags::empty(),
569 _decode,
570 )
571 }
572
573 type DeprecatedOpenCapabilityResponseFut = fidl::client::QueryResponseFut<
574 RemoteControlDeprecatedOpenCapabilityResult,
575 fidl::encoding::DefaultFuchsiaResourceDialect,
576 >;
577 fn r#deprecated_open_capability(
578 &self,
579 mut moniker: &str,
580 mut capability_set: fidl_fuchsia_sys2::OpenDirType,
581 mut capability_name: &str,
582 mut server_channel: fidl::Channel,
583 mut flags: fidl_fuchsia_io::OpenFlags,
584 ) -> Self::DeprecatedOpenCapabilityResponseFut {
585 fn _decode(
586 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
587 ) -> Result<RemoteControlDeprecatedOpenCapabilityResult, fidl::Error> {
588 let _response = fidl::client::decode_transaction_body::<
589 fidl::encoding::FlexibleResultType<
590 fidl::encoding::EmptyStruct,
591 ConnectCapabilityError,
592 >,
593 fidl::encoding::DefaultFuchsiaResourceDialect,
594 0x51b5801f3e27e431,
595 >(_buf?)?
596 .into_result::<RemoteControlMarker>("deprecated_open_capability")?;
597 Ok(_response.map(|x| x))
598 }
599 self.client.send_query_and_decode::<
600 RemoteControlDeprecatedOpenCapabilityRequest,
601 RemoteControlDeprecatedOpenCapabilityResult,
602 >(
603 (moniker, capability_set, capability_name, server_channel, flags,),
604 0x51b5801f3e27e431,
605 fidl::encoding::DynamicFlags::FLEXIBLE,
606 _decode,
607 )
608 }
609}
610
611pub struct RemoteControlEventStream {
612 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
613}
614
615impl std::marker::Unpin for RemoteControlEventStream {}
616
617impl futures::stream::FusedStream for RemoteControlEventStream {
618 fn is_terminated(&self) -> bool {
619 self.event_receiver.is_terminated()
620 }
621}
622
623impl futures::Stream for RemoteControlEventStream {
624 type Item = Result<RemoteControlEvent, fidl::Error>;
625
626 fn poll_next(
627 mut self: std::pin::Pin<&mut Self>,
628 cx: &mut std::task::Context<'_>,
629 ) -> std::task::Poll<Option<Self::Item>> {
630 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
631 &mut self.event_receiver,
632 cx
633 )?) {
634 Some(buf) => std::task::Poll::Ready(Some(RemoteControlEvent::decode(buf))),
635 None => std::task::Poll::Ready(None),
636 }
637 }
638}
639
640#[derive(Debug)]
641pub enum RemoteControlEvent {
642 #[non_exhaustive]
643 _UnknownEvent {
644 ordinal: u64,
646 },
647}
648
649impl RemoteControlEvent {
650 fn decode(
652 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
653 ) -> Result<RemoteControlEvent, fidl::Error> {
654 let (bytes, _handles) = buf.split_mut();
655 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
656 debug_assert_eq!(tx_header.tx_id, 0);
657 match tx_header.ordinal {
658 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
659 Ok(RemoteControlEvent::_UnknownEvent { ordinal: tx_header.ordinal })
660 }
661 _ => Err(fidl::Error::UnknownOrdinal {
662 ordinal: tx_header.ordinal,
663 protocol_name: <RemoteControlMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
664 }),
665 }
666 }
667}
668
669pub struct RemoteControlRequestStream {
671 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
672 is_terminated: bool,
673}
674
675impl std::marker::Unpin for RemoteControlRequestStream {}
676
677impl futures::stream::FusedStream for RemoteControlRequestStream {
678 fn is_terminated(&self) -> bool {
679 self.is_terminated
680 }
681}
682
683impl fidl::endpoints::RequestStream for RemoteControlRequestStream {
684 type Protocol = RemoteControlMarker;
685 type ControlHandle = RemoteControlControlHandle;
686
687 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
688 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
689 }
690
691 fn control_handle(&self) -> Self::ControlHandle {
692 RemoteControlControlHandle { inner: self.inner.clone() }
693 }
694
695 fn into_inner(
696 self,
697 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
698 {
699 (self.inner, self.is_terminated)
700 }
701
702 fn from_inner(
703 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
704 is_terminated: bool,
705 ) -> Self {
706 Self { inner, is_terminated }
707 }
708}
709
710impl futures::Stream for RemoteControlRequestStream {
711 type Item = Result<RemoteControlRequest, fidl::Error>;
712
713 fn poll_next(
714 mut self: std::pin::Pin<&mut Self>,
715 cx: &mut std::task::Context<'_>,
716 ) -> std::task::Poll<Option<Self::Item>> {
717 let this = &mut *self;
718 if this.inner.check_shutdown(cx) {
719 this.is_terminated = true;
720 return std::task::Poll::Ready(None);
721 }
722 if this.is_terminated {
723 panic!("polled RemoteControlRequestStream after completion");
724 }
725 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
726 |bytes, handles| {
727 match this.inner.channel().read_etc(cx, bytes, handles) {
728 std::task::Poll::Ready(Ok(())) => {}
729 std::task::Poll::Pending => return std::task::Poll::Pending,
730 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
731 this.is_terminated = true;
732 return std::task::Poll::Ready(None);
733 }
734 std::task::Poll::Ready(Err(e)) => {
735 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
736 e.into(),
737 ))))
738 }
739 }
740
741 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
743
744 std::task::Poll::Ready(Some(match header.ordinal {
745 0x2bbec7ca8a72e82b => {
746 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
747 let mut req = fidl::new_empty!(
748 RemoteControlEchoStringRequest,
749 fidl::encoding::DefaultFuchsiaResourceDialect
750 );
751 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RemoteControlEchoStringRequest>(&header, _body_bytes, handles, &mut req)?;
752 let control_handle =
753 RemoteControlControlHandle { inner: this.inner.clone() };
754 Ok(RemoteControlRequest::EchoString {
755 value: req.value,
756
757 responder: RemoteControlEchoStringResponder {
758 control_handle: std::mem::ManuallyDrop::new(control_handle),
759 tx_id: header.tx_id,
760 },
761 })
762 }
763 0x3da84acd5bbf3926 => {
764 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
765 let mut req = fidl::new_empty!(
766 RemoteControlLogMessageRequest,
767 fidl::encoding::DefaultFuchsiaResourceDialect
768 );
769 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RemoteControlLogMessageRequest>(&header, _body_bytes, handles, &mut req)?;
770 let control_handle =
771 RemoteControlControlHandle { inner: this.inner.clone() };
772 Ok(RemoteControlRequest::LogMessage {
773 tag: req.tag,
774 message: req.message,
775 severity: req.severity,
776
777 responder: RemoteControlLogMessageResponder {
778 control_handle: std::mem::ManuallyDrop::new(control_handle),
779 tx_id: header.tx_id,
780 },
781 })
782 }
783 0x6035e1ab368deee1 => {
784 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
785 let mut req = fidl::new_empty!(
786 fidl::encoding::EmptyPayload,
787 fidl::encoding::DefaultFuchsiaResourceDialect
788 );
789 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
790 let control_handle =
791 RemoteControlControlHandle { inner: this.inner.clone() };
792 Ok(RemoteControlRequest::IdentifyHost {
793 responder: RemoteControlIdentifyHostResponder {
794 control_handle: std::mem::ManuallyDrop::new(control_handle),
795 tx_id: header.tx_id,
796 },
797 })
798 }
799 0x3ae7a7c874dceceb => {
800 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
801 let mut req = fidl::new_empty!(
802 RemoteControlConnectCapabilityRequest,
803 fidl::encoding::DefaultFuchsiaResourceDialect
804 );
805 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RemoteControlConnectCapabilityRequest>(&header, _body_bytes, handles, &mut req)?;
806 let control_handle =
807 RemoteControlControlHandle { inner: this.inner.clone() };
808 Ok(RemoteControlRequest::ConnectCapability {
809 moniker: req.moniker,
810 capability_set: req.capability_set,
811 capability_name: req.capability_name,
812 server_channel: req.server_channel,
813
814 responder: RemoteControlConnectCapabilityResponder {
815 control_handle: std::mem::ManuallyDrop::new(control_handle),
816 tx_id: header.tx_id,
817 },
818 })
819 }
820 0x3588f31e9067748d => {
821 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
822 let mut req = fidl::new_empty!(
823 fidl::encoding::EmptyPayload,
824 fidl::encoding::DefaultFuchsiaResourceDialect
825 );
826 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
827 let control_handle =
828 RemoteControlControlHandle { inner: this.inner.clone() };
829 Ok(RemoteControlRequest::GetTime {
830 responder: RemoteControlGetTimeResponder {
831 control_handle: std::mem::ManuallyDrop::new(control_handle),
832 tx_id: header.tx_id,
833 },
834 })
835 }
836 0x55706f013cd79ebd => {
837 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
838 let mut req = fidl::new_empty!(
839 fidl::encoding::EmptyPayload,
840 fidl::encoding::DefaultFuchsiaResourceDialect
841 );
842 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
843 let control_handle =
844 RemoteControlControlHandle { inner: this.inner.clone() };
845 Ok(RemoteControlRequest::GetBootTime {
846 responder: RemoteControlGetBootTimeResponder {
847 control_handle: std::mem::ManuallyDrop::new(control_handle),
848 tx_id: header.tx_id,
849 },
850 })
851 }
852 0x51b5801f3e27e431 => {
853 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
854 let mut req = fidl::new_empty!(
855 RemoteControlDeprecatedOpenCapabilityRequest,
856 fidl::encoding::DefaultFuchsiaResourceDialect
857 );
858 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RemoteControlDeprecatedOpenCapabilityRequest>(&header, _body_bytes, handles, &mut req)?;
859 let control_handle =
860 RemoteControlControlHandle { inner: this.inner.clone() };
861 Ok(RemoteControlRequest::DeprecatedOpenCapability {
862 moniker: req.moniker,
863 capability_set: req.capability_set,
864 capability_name: req.capability_name,
865 server_channel: req.server_channel,
866 flags: req.flags,
867
868 responder: RemoteControlDeprecatedOpenCapabilityResponder {
869 control_handle: std::mem::ManuallyDrop::new(control_handle),
870 tx_id: header.tx_id,
871 },
872 })
873 }
874 _ if header.tx_id == 0
875 && header
876 .dynamic_flags()
877 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
878 {
879 Ok(RemoteControlRequest::_UnknownMethod {
880 ordinal: header.ordinal,
881 control_handle: RemoteControlControlHandle {
882 inner: this.inner.clone(),
883 },
884 method_type: fidl::MethodType::OneWay,
885 })
886 }
887 _ if header
888 .dynamic_flags()
889 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
890 {
891 this.inner.send_framework_err(
892 fidl::encoding::FrameworkErr::UnknownMethod,
893 header.tx_id,
894 header.ordinal,
895 header.dynamic_flags(),
896 (bytes, handles),
897 )?;
898 Ok(RemoteControlRequest::_UnknownMethod {
899 ordinal: header.ordinal,
900 control_handle: RemoteControlControlHandle {
901 inner: this.inner.clone(),
902 },
903 method_type: fidl::MethodType::TwoWay,
904 })
905 }
906 _ => Err(fidl::Error::UnknownOrdinal {
907 ordinal: header.ordinal,
908 protocol_name:
909 <RemoteControlMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
910 }),
911 }))
912 },
913 )
914 }
915}
916
917#[derive(Debug)]
918pub enum RemoteControlRequest {
919 EchoString {
921 value: String,
922 responder: RemoteControlEchoStringResponder,
923 },
924 LogMessage {
926 tag: String,
927 message: String,
928 severity: fidl_fuchsia_diagnostics_types::Severity,
929 responder: RemoteControlLogMessageResponder,
930 },
931 IdentifyHost {
932 responder: RemoteControlIdentifyHostResponder,
933 },
934 ConnectCapability {
937 moniker: String,
938 capability_set: fidl_fuchsia_sys2::OpenDirType,
939 capability_name: String,
940 server_channel: fidl::Channel,
941 responder: RemoteControlConnectCapabilityResponder,
942 },
943 GetTime {
944 responder: RemoteControlGetTimeResponder,
945 },
946 GetBootTime {
947 responder: RemoteControlGetBootTimeResponder,
948 },
949 DeprecatedOpenCapability {
954 moniker: String,
955 capability_set: fidl_fuchsia_sys2::OpenDirType,
956 capability_name: String,
957 server_channel: fidl::Channel,
958 flags: fidl_fuchsia_io::OpenFlags,
959 responder: RemoteControlDeprecatedOpenCapabilityResponder,
960 },
961 #[non_exhaustive]
963 _UnknownMethod {
964 ordinal: u64,
966 control_handle: RemoteControlControlHandle,
967 method_type: fidl::MethodType,
968 },
969}
970
971impl RemoteControlRequest {
972 #[allow(irrefutable_let_patterns)]
973 pub fn into_echo_string(self) -> Option<(String, RemoteControlEchoStringResponder)> {
974 if let RemoteControlRequest::EchoString { value, responder } = self {
975 Some((value, responder))
976 } else {
977 None
978 }
979 }
980
981 #[allow(irrefutable_let_patterns)]
982 pub fn into_log_message(
983 self,
984 ) -> Option<(
985 String,
986 String,
987 fidl_fuchsia_diagnostics_types::Severity,
988 RemoteControlLogMessageResponder,
989 )> {
990 if let RemoteControlRequest::LogMessage { tag, message, severity, responder } = self {
991 Some((tag, message, severity, responder))
992 } else {
993 None
994 }
995 }
996
997 #[allow(irrefutable_let_patterns)]
998 pub fn into_identify_host(self) -> Option<(RemoteControlIdentifyHostResponder)> {
999 if let RemoteControlRequest::IdentifyHost { responder } = self {
1000 Some((responder))
1001 } else {
1002 None
1003 }
1004 }
1005
1006 #[allow(irrefutable_let_patterns)]
1007 pub fn into_connect_capability(
1008 self,
1009 ) -> Option<(
1010 String,
1011 fidl_fuchsia_sys2::OpenDirType,
1012 String,
1013 fidl::Channel,
1014 RemoteControlConnectCapabilityResponder,
1015 )> {
1016 if let RemoteControlRequest::ConnectCapability {
1017 moniker,
1018 capability_set,
1019 capability_name,
1020 server_channel,
1021 responder,
1022 } = self
1023 {
1024 Some((moniker, capability_set, capability_name, server_channel, responder))
1025 } else {
1026 None
1027 }
1028 }
1029
1030 #[allow(irrefutable_let_patterns)]
1031 pub fn into_get_time(self) -> Option<(RemoteControlGetTimeResponder)> {
1032 if let RemoteControlRequest::GetTime { responder } = self {
1033 Some((responder))
1034 } else {
1035 None
1036 }
1037 }
1038
1039 #[allow(irrefutable_let_patterns)]
1040 pub fn into_get_boot_time(self) -> Option<(RemoteControlGetBootTimeResponder)> {
1041 if let RemoteControlRequest::GetBootTime { responder } = self {
1042 Some((responder))
1043 } else {
1044 None
1045 }
1046 }
1047
1048 #[allow(irrefutable_let_patterns)]
1049 pub fn into_deprecated_open_capability(
1050 self,
1051 ) -> Option<(
1052 String,
1053 fidl_fuchsia_sys2::OpenDirType,
1054 String,
1055 fidl::Channel,
1056 fidl_fuchsia_io::OpenFlags,
1057 RemoteControlDeprecatedOpenCapabilityResponder,
1058 )> {
1059 if let RemoteControlRequest::DeprecatedOpenCapability {
1060 moniker,
1061 capability_set,
1062 capability_name,
1063 server_channel,
1064 flags,
1065 responder,
1066 } = self
1067 {
1068 Some((moniker, capability_set, capability_name, server_channel, flags, responder))
1069 } else {
1070 None
1071 }
1072 }
1073
1074 pub fn method_name(&self) -> &'static str {
1076 match *self {
1077 RemoteControlRequest::EchoString { .. } => "echo_string",
1078 RemoteControlRequest::LogMessage { .. } => "log_message",
1079 RemoteControlRequest::IdentifyHost { .. } => "identify_host",
1080 RemoteControlRequest::ConnectCapability { .. } => "connect_capability",
1081 RemoteControlRequest::GetTime { .. } => "get_time",
1082 RemoteControlRequest::GetBootTime { .. } => "get_boot_time",
1083 RemoteControlRequest::DeprecatedOpenCapability { .. } => "deprecated_open_capability",
1084 RemoteControlRequest::_UnknownMethod {
1085 method_type: fidl::MethodType::OneWay, ..
1086 } => "unknown one-way method",
1087 RemoteControlRequest::_UnknownMethod {
1088 method_type: fidl::MethodType::TwoWay, ..
1089 } => "unknown two-way method",
1090 }
1091 }
1092}
1093
1094#[derive(Debug, Clone)]
1095pub struct RemoteControlControlHandle {
1096 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1097}
1098
1099impl fidl::endpoints::ControlHandle for RemoteControlControlHandle {
1100 fn shutdown(&self) {
1101 self.inner.shutdown()
1102 }
1103 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1104 self.inner.shutdown_with_epitaph(status)
1105 }
1106
1107 fn is_closed(&self) -> bool {
1108 self.inner.channel().is_closed()
1109 }
1110 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1111 self.inner.channel().on_closed()
1112 }
1113
1114 #[cfg(target_os = "fuchsia")]
1115 fn signal_peer(
1116 &self,
1117 clear_mask: zx::Signals,
1118 set_mask: zx::Signals,
1119 ) -> Result<(), zx_status::Status> {
1120 use fidl::Peered;
1121 self.inner.channel().signal_peer(clear_mask, set_mask)
1122 }
1123}
1124
1125impl RemoteControlControlHandle {}
1126
1127#[must_use = "FIDL methods require a response to be sent"]
1128#[derive(Debug)]
1129pub struct RemoteControlEchoStringResponder {
1130 control_handle: std::mem::ManuallyDrop<RemoteControlControlHandle>,
1131 tx_id: u32,
1132}
1133
1134impl std::ops::Drop for RemoteControlEchoStringResponder {
1138 fn drop(&mut self) {
1139 self.control_handle.shutdown();
1140 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1142 }
1143}
1144
1145impl fidl::endpoints::Responder for RemoteControlEchoStringResponder {
1146 type ControlHandle = RemoteControlControlHandle;
1147
1148 fn control_handle(&self) -> &RemoteControlControlHandle {
1149 &self.control_handle
1150 }
1151
1152 fn drop_without_shutdown(mut self) {
1153 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1155 std::mem::forget(self);
1157 }
1158}
1159
1160impl RemoteControlEchoStringResponder {
1161 pub fn send(self, mut response: &str) -> Result<(), fidl::Error> {
1165 let _result = self.send_raw(response);
1166 if _result.is_err() {
1167 self.control_handle.shutdown();
1168 }
1169 self.drop_without_shutdown();
1170 _result
1171 }
1172
1173 pub fn send_no_shutdown_on_err(self, mut response: &str) -> Result<(), fidl::Error> {
1175 let _result = self.send_raw(response);
1176 self.drop_without_shutdown();
1177 _result
1178 }
1179
1180 fn send_raw(&self, mut response: &str) -> Result<(), fidl::Error> {
1181 self.control_handle.inner.send::<RemoteControlEchoStringResponse>(
1182 (response,),
1183 self.tx_id,
1184 0x2bbec7ca8a72e82b,
1185 fidl::encoding::DynamicFlags::empty(),
1186 )
1187 }
1188}
1189
1190#[must_use = "FIDL methods require a response to be sent"]
1191#[derive(Debug)]
1192pub struct RemoteControlLogMessageResponder {
1193 control_handle: std::mem::ManuallyDrop<RemoteControlControlHandle>,
1194 tx_id: u32,
1195}
1196
1197impl std::ops::Drop for RemoteControlLogMessageResponder {
1201 fn drop(&mut self) {
1202 self.control_handle.shutdown();
1203 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1205 }
1206}
1207
1208impl fidl::endpoints::Responder for RemoteControlLogMessageResponder {
1209 type ControlHandle = RemoteControlControlHandle;
1210
1211 fn control_handle(&self) -> &RemoteControlControlHandle {
1212 &self.control_handle
1213 }
1214
1215 fn drop_without_shutdown(mut self) {
1216 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1218 std::mem::forget(self);
1220 }
1221}
1222
1223impl RemoteControlLogMessageResponder {
1224 pub fn send(self) -> Result<(), fidl::Error> {
1228 let _result = self.send_raw();
1229 if _result.is_err() {
1230 self.control_handle.shutdown();
1231 }
1232 self.drop_without_shutdown();
1233 _result
1234 }
1235
1236 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
1238 let _result = self.send_raw();
1239 self.drop_without_shutdown();
1240 _result
1241 }
1242
1243 fn send_raw(&self) -> Result<(), fidl::Error> {
1244 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
1245 (),
1246 self.tx_id,
1247 0x3da84acd5bbf3926,
1248 fidl::encoding::DynamicFlags::empty(),
1249 )
1250 }
1251}
1252
1253#[must_use = "FIDL methods require a response to be sent"]
1254#[derive(Debug)]
1255pub struct RemoteControlIdentifyHostResponder {
1256 control_handle: std::mem::ManuallyDrop<RemoteControlControlHandle>,
1257 tx_id: u32,
1258}
1259
1260impl std::ops::Drop for RemoteControlIdentifyHostResponder {
1264 fn drop(&mut self) {
1265 self.control_handle.shutdown();
1266 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1268 }
1269}
1270
1271impl fidl::endpoints::Responder for RemoteControlIdentifyHostResponder {
1272 type ControlHandle = RemoteControlControlHandle;
1273
1274 fn control_handle(&self) -> &RemoteControlControlHandle {
1275 &self.control_handle
1276 }
1277
1278 fn drop_without_shutdown(mut self) {
1279 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1281 std::mem::forget(self);
1283 }
1284}
1285
1286impl RemoteControlIdentifyHostResponder {
1287 pub fn send(
1291 self,
1292 mut result: Result<&IdentifyHostResponse, IdentifyHostError>,
1293 ) -> Result<(), fidl::Error> {
1294 let _result = self.send_raw(result);
1295 if _result.is_err() {
1296 self.control_handle.shutdown();
1297 }
1298 self.drop_without_shutdown();
1299 _result
1300 }
1301
1302 pub fn send_no_shutdown_on_err(
1304 self,
1305 mut result: Result<&IdentifyHostResponse, IdentifyHostError>,
1306 ) -> Result<(), fidl::Error> {
1307 let _result = self.send_raw(result);
1308 self.drop_without_shutdown();
1309 _result
1310 }
1311
1312 fn send_raw(
1313 &self,
1314 mut result: Result<&IdentifyHostResponse, IdentifyHostError>,
1315 ) -> Result<(), fidl::Error> {
1316 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
1317 RemoteControlIdentifyHostResponse,
1318 IdentifyHostError,
1319 >>(
1320 fidl::encoding::FlexibleResult::new(result.map(|response| (response,))),
1321 self.tx_id,
1322 0x6035e1ab368deee1,
1323 fidl::encoding::DynamicFlags::FLEXIBLE,
1324 )
1325 }
1326}
1327
1328#[must_use = "FIDL methods require a response to be sent"]
1329#[derive(Debug)]
1330pub struct RemoteControlConnectCapabilityResponder {
1331 control_handle: std::mem::ManuallyDrop<RemoteControlControlHandle>,
1332 tx_id: u32,
1333}
1334
1335impl std::ops::Drop for RemoteControlConnectCapabilityResponder {
1339 fn drop(&mut self) {
1340 self.control_handle.shutdown();
1341 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1343 }
1344}
1345
1346impl fidl::endpoints::Responder for RemoteControlConnectCapabilityResponder {
1347 type ControlHandle = RemoteControlControlHandle;
1348
1349 fn control_handle(&self) -> &RemoteControlControlHandle {
1350 &self.control_handle
1351 }
1352
1353 fn drop_without_shutdown(mut self) {
1354 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1356 std::mem::forget(self);
1358 }
1359}
1360
1361impl RemoteControlConnectCapabilityResponder {
1362 pub fn send(self, mut result: Result<(), ConnectCapabilityError>) -> Result<(), fidl::Error> {
1366 let _result = self.send_raw(result);
1367 if _result.is_err() {
1368 self.control_handle.shutdown();
1369 }
1370 self.drop_without_shutdown();
1371 _result
1372 }
1373
1374 pub fn send_no_shutdown_on_err(
1376 self,
1377 mut result: Result<(), ConnectCapabilityError>,
1378 ) -> Result<(), fidl::Error> {
1379 let _result = self.send_raw(result);
1380 self.drop_without_shutdown();
1381 _result
1382 }
1383
1384 fn send_raw(&self, mut result: Result<(), ConnectCapabilityError>) -> Result<(), fidl::Error> {
1385 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
1386 fidl::encoding::EmptyStruct,
1387 ConnectCapabilityError,
1388 >>(
1389 fidl::encoding::FlexibleResult::new(result),
1390 self.tx_id,
1391 0x3ae7a7c874dceceb,
1392 fidl::encoding::DynamicFlags::FLEXIBLE,
1393 )
1394 }
1395}
1396
1397#[must_use = "FIDL methods require a response to be sent"]
1398#[derive(Debug)]
1399pub struct RemoteControlGetTimeResponder {
1400 control_handle: std::mem::ManuallyDrop<RemoteControlControlHandle>,
1401 tx_id: u32,
1402}
1403
1404impl std::ops::Drop for RemoteControlGetTimeResponder {
1408 fn drop(&mut self) {
1409 self.control_handle.shutdown();
1410 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1412 }
1413}
1414
1415impl fidl::endpoints::Responder for RemoteControlGetTimeResponder {
1416 type ControlHandle = RemoteControlControlHandle;
1417
1418 fn control_handle(&self) -> &RemoteControlControlHandle {
1419 &self.control_handle
1420 }
1421
1422 fn drop_without_shutdown(mut self) {
1423 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1425 std::mem::forget(self);
1427 }
1428}
1429
1430impl RemoteControlGetTimeResponder {
1431 pub fn send(self, mut time: fidl::MonotonicInstant) -> Result<(), fidl::Error> {
1435 let _result = self.send_raw(time);
1436 if _result.is_err() {
1437 self.control_handle.shutdown();
1438 }
1439 self.drop_without_shutdown();
1440 _result
1441 }
1442
1443 pub fn send_no_shutdown_on_err(
1445 self,
1446 mut time: fidl::MonotonicInstant,
1447 ) -> Result<(), fidl::Error> {
1448 let _result = self.send_raw(time);
1449 self.drop_without_shutdown();
1450 _result
1451 }
1452
1453 fn send_raw(&self, mut time: fidl::MonotonicInstant) -> Result<(), fidl::Error> {
1454 self.control_handle.inner.send::<RemoteControlGetTimeResponse>(
1455 (time,),
1456 self.tx_id,
1457 0x3588f31e9067748d,
1458 fidl::encoding::DynamicFlags::empty(),
1459 )
1460 }
1461}
1462
1463#[must_use = "FIDL methods require a response to be sent"]
1464#[derive(Debug)]
1465pub struct RemoteControlGetBootTimeResponder {
1466 control_handle: std::mem::ManuallyDrop<RemoteControlControlHandle>,
1467 tx_id: u32,
1468}
1469
1470impl std::ops::Drop for RemoteControlGetBootTimeResponder {
1474 fn drop(&mut self) {
1475 self.control_handle.shutdown();
1476 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1478 }
1479}
1480
1481impl fidl::endpoints::Responder for RemoteControlGetBootTimeResponder {
1482 type ControlHandle = RemoteControlControlHandle;
1483
1484 fn control_handle(&self) -> &RemoteControlControlHandle {
1485 &self.control_handle
1486 }
1487
1488 fn drop_without_shutdown(mut self) {
1489 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1491 std::mem::forget(self);
1493 }
1494}
1495
1496impl RemoteControlGetBootTimeResponder {
1497 pub fn send(self, mut time: fidl::BootInstant) -> Result<(), fidl::Error> {
1501 let _result = self.send_raw(time);
1502 if _result.is_err() {
1503 self.control_handle.shutdown();
1504 }
1505 self.drop_without_shutdown();
1506 _result
1507 }
1508
1509 pub fn send_no_shutdown_on_err(self, mut time: fidl::BootInstant) -> Result<(), fidl::Error> {
1511 let _result = self.send_raw(time);
1512 self.drop_without_shutdown();
1513 _result
1514 }
1515
1516 fn send_raw(&self, mut time: fidl::BootInstant) -> Result<(), fidl::Error> {
1517 self.control_handle.inner.send::<RemoteControlGetBootTimeResponse>(
1518 (time,),
1519 self.tx_id,
1520 0x55706f013cd79ebd,
1521 fidl::encoding::DynamicFlags::empty(),
1522 )
1523 }
1524}
1525
1526#[must_use = "FIDL methods require a response to be sent"]
1527#[derive(Debug)]
1528pub struct RemoteControlDeprecatedOpenCapabilityResponder {
1529 control_handle: std::mem::ManuallyDrop<RemoteControlControlHandle>,
1530 tx_id: u32,
1531}
1532
1533impl std::ops::Drop for RemoteControlDeprecatedOpenCapabilityResponder {
1537 fn drop(&mut self) {
1538 self.control_handle.shutdown();
1539 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1541 }
1542}
1543
1544impl fidl::endpoints::Responder for RemoteControlDeprecatedOpenCapabilityResponder {
1545 type ControlHandle = RemoteControlControlHandle;
1546
1547 fn control_handle(&self) -> &RemoteControlControlHandle {
1548 &self.control_handle
1549 }
1550
1551 fn drop_without_shutdown(mut self) {
1552 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1554 std::mem::forget(self);
1556 }
1557}
1558
1559impl RemoteControlDeprecatedOpenCapabilityResponder {
1560 pub fn send(self, mut result: Result<(), ConnectCapabilityError>) -> Result<(), fidl::Error> {
1564 let _result = self.send_raw(result);
1565 if _result.is_err() {
1566 self.control_handle.shutdown();
1567 }
1568 self.drop_without_shutdown();
1569 _result
1570 }
1571
1572 pub fn send_no_shutdown_on_err(
1574 self,
1575 mut result: Result<(), ConnectCapabilityError>,
1576 ) -> Result<(), fidl::Error> {
1577 let _result = self.send_raw(result);
1578 self.drop_without_shutdown();
1579 _result
1580 }
1581
1582 fn send_raw(&self, mut result: Result<(), ConnectCapabilityError>) -> Result<(), fidl::Error> {
1583 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
1584 fidl::encoding::EmptyStruct,
1585 ConnectCapabilityError,
1586 >>(
1587 fidl::encoding::FlexibleResult::new(result),
1588 self.tx_id,
1589 0x51b5801f3e27e431,
1590 fidl::encoding::DynamicFlags::FLEXIBLE,
1591 )
1592 }
1593}
1594
1595mod internal {
1596 use super::*;
1597
1598 impl fidl::encoding::ResourceTypeMarker for RemoteControlConnectCapabilityRequest {
1599 type Borrowed<'a> = &'a mut Self;
1600 fn take_or_borrow<'a>(
1601 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1602 ) -> Self::Borrowed<'a> {
1603 value
1604 }
1605 }
1606
1607 unsafe impl fidl::encoding::TypeMarker for RemoteControlConnectCapabilityRequest {
1608 type Owned = Self;
1609
1610 #[inline(always)]
1611 fn inline_align(_context: fidl::encoding::Context) -> usize {
1612 8
1613 }
1614
1615 #[inline(always)]
1616 fn inline_size(_context: fidl::encoding::Context) -> usize {
1617 48
1618 }
1619 }
1620
1621 unsafe impl
1622 fidl::encoding::Encode<
1623 RemoteControlConnectCapabilityRequest,
1624 fidl::encoding::DefaultFuchsiaResourceDialect,
1625 > for &mut RemoteControlConnectCapabilityRequest
1626 {
1627 #[inline]
1628 unsafe fn encode(
1629 self,
1630 encoder: &mut fidl::encoding::Encoder<
1631 '_,
1632 fidl::encoding::DefaultFuchsiaResourceDialect,
1633 >,
1634 offset: usize,
1635 _depth: fidl::encoding::Depth,
1636 ) -> fidl::Result<()> {
1637 encoder.debug_check_bounds::<RemoteControlConnectCapabilityRequest>(offset);
1638 fidl::encoding::Encode::<RemoteControlConnectCapabilityRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
1640 (
1641 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
1642 <fidl_fuchsia_sys2::OpenDirType as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_set),
1643 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_name),
1644 <fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.server_channel),
1645 ),
1646 encoder, offset, _depth
1647 )
1648 }
1649 }
1650 unsafe impl<
1651 T0: fidl::encoding::Encode<
1652 fidl::encoding::BoundedString<4096>,
1653 fidl::encoding::DefaultFuchsiaResourceDialect,
1654 >,
1655 T1: fidl::encoding::Encode<
1656 fidl_fuchsia_sys2::OpenDirType,
1657 fidl::encoding::DefaultFuchsiaResourceDialect,
1658 >,
1659 T2: fidl::encoding::Encode<
1660 fidl::encoding::BoundedString<255>,
1661 fidl::encoding::DefaultFuchsiaResourceDialect,
1662 >,
1663 T3: fidl::encoding::Encode<
1664 fidl::encoding::HandleType<
1665 fidl::Channel,
1666 { fidl::ObjectType::CHANNEL.into_raw() },
1667 2147483648,
1668 >,
1669 fidl::encoding::DefaultFuchsiaResourceDialect,
1670 >,
1671 >
1672 fidl::encoding::Encode<
1673 RemoteControlConnectCapabilityRequest,
1674 fidl::encoding::DefaultFuchsiaResourceDialect,
1675 > for (T0, T1, T2, T3)
1676 {
1677 #[inline]
1678 unsafe fn encode(
1679 self,
1680 encoder: &mut fidl::encoding::Encoder<
1681 '_,
1682 fidl::encoding::DefaultFuchsiaResourceDialect,
1683 >,
1684 offset: usize,
1685 depth: fidl::encoding::Depth,
1686 ) -> fidl::Result<()> {
1687 encoder.debug_check_bounds::<RemoteControlConnectCapabilityRequest>(offset);
1688 unsafe {
1691 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
1692 (ptr as *mut u64).write_unaligned(0);
1693 }
1694 unsafe {
1695 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
1696 (ptr as *mut u64).write_unaligned(0);
1697 }
1698 self.0.encode(encoder, offset + 0, depth)?;
1700 self.1.encode(encoder, offset + 16, depth)?;
1701 self.2.encode(encoder, offset + 24, depth)?;
1702 self.3.encode(encoder, offset + 40, depth)?;
1703 Ok(())
1704 }
1705 }
1706
1707 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1708 for RemoteControlConnectCapabilityRequest
1709 {
1710 #[inline(always)]
1711 fn new_empty() -> Self {
1712 Self {
1713 moniker: fidl::new_empty!(
1714 fidl::encoding::BoundedString<4096>,
1715 fidl::encoding::DefaultFuchsiaResourceDialect
1716 ),
1717 capability_set: fidl::new_empty!(
1718 fidl_fuchsia_sys2::OpenDirType,
1719 fidl::encoding::DefaultFuchsiaResourceDialect
1720 ),
1721 capability_name: fidl::new_empty!(
1722 fidl::encoding::BoundedString<255>,
1723 fidl::encoding::DefaultFuchsiaResourceDialect
1724 ),
1725 server_channel: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1726 }
1727 }
1728
1729 #[inline]
1730 unsafe fn decode(
1731 &mut self,
1732 decoder: &mut fidl::encoding::Decoder<
1733 '_,
1734 fidl::encoding::DefaultFuchsiaResourceDialect,
1735 >,
1736 offset: usize,
1737 _depth: fidl::encoding::Depth,
1738 ) -> fidl::Result<()> {
1739 decoder.debug_check_bounds::<Self>(offset);
1740 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
1742 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1743 let mask = 0xffffffff00000000u64;
1744 let maskedval = padval & mask;
1745 if maskedval != 0 {
1746 return Err(fidl::Error::NonZeroPadding {
1747 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
1748 });
1749 }
1750 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
1751 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1752 let mask = 0xffffffff00000000u64;
1753 let maskedval = padval & mask;
1754 if maskedval != 0 {
1755 return Err(fidl::Error::NonZeroPadding {
1756 padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
1757 });
1758 }
1759 fidl::decode!(
1760 fidl::encoding::BoundedString<4096>,
1761 fidl::encoding::DefaultFuchsiaResourceDialect,
1762 &mut self.moniker,
1763 decoder,
1764 offset + 0,
1765 _depth
1766 )?;
1767 fidl::decode!(
1768 fidl_fuchsia_sys2::OpenDirType,
1769 fidl::encoding::DefaultFuchsiaResourceDialect,
1770 &mut self.capability_set,
1771 decoder,
1772 offset + 16,
1773 _depth
1774 )?;
1775 fidl::decode!(
1776 fidl::encoding::BoundedString<255>,
1777 fidl::encoding::DefaultFuchsiaResourceDialect,
1778 &mut self.capability_name,
1779 decoder,
1780 offset + 24,
1781 _depth
1782 )?;
1783 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.server_channel, decoder, offset + 40, _depth)?;
1784 Ok(())
1785 }
1786 }
1787
1788 impl fidl::encoding::ResourceTypeMarker for RemoteControlDeprecatedOpenCapabilityRequest {
1789 type Borrowed<'a> = &'a mut Self;
1790 fn take_or_borrow<'a>(
1791 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1792 ) -> Self::Borrowed<'a> {
1793 value
1794 }
1795 }
1796
1797 unsafe impl fidl::encoding::TypeMarker for RemoteControlDeprecatedOpenCapabilityRequest {
1798 type Owned = Self;
1799
1800 #[inline(always)]
1801 fn inline_align(_context: fidl::encoding::Context) -> usize {
1802 8
1803 }
1804
1805 #[inline(always)]
1806 fn inline_size(_context: fidl::encoding::Context) -> usize {
1807 48
1808 }
1809 }
1810
1811 unsafe impl
1812 fidl::encoding::Encode<
1813 RemoteControlDeprecatedOpenCapabilityRequest,
1814 fidl::encoding::DefaultFuchsiaResourceDialect,
1815 > for &mut RemoteControlDeprecatedOpenCapabilityRequest
1816 {
1817 #[inline]
1818 unsafe fn encode(
1819 self,
1820 encoder: &mut fidl::encoding::Encoder<
1821 '_,
1822 fidl::encoding::DefaultFuchsiaResourceDialect,
1823 >,
1824 offset: usize,
1825 _depth: fidl::encoding::Depth,
1826 ) -> fidl::Result<()> {
1827 encoder.debug_check_bounds::<RemoteControlDeprecatedOpenCapabilityRequest>(offset);
1828 fidl::encoding::Encode::<RemoteControlDeprecatedOpenCapabilityRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
1830 (
1831 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
1832 <fidl_fuchsia_sys2::OpenDirType as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_set),
1833 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(&self.capability_name),
1834 <fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.server_channel),
1835 <fidl_fuchsia_io::OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
1836 ),
1837 encoder, offset, _depth
1838 )
1839 }
1840 }
1841 unsafe impl<
1842 T0: fidl::encoding::Encode<
1843 fidl::encoding::BoundedString<4096>,
1844 fidl::encoding::DefaultFuchsiaResourceDialect,
1845 >,
1846 T1: fidl::encoding::Encode<
1847 fidl_fuchsia_sys2::OpenDirType,
1848 fidl::encoding::DefaultFuchsiaResourceDialect,
1849 >,
1850 T2: fidl::encoding::Encode<
1851 fidl::encoding::BoundedString<255>,
1852 fidl::encoding::DefaultFuchsiaResourceDialect,
1853 >,
1854 T3: fidl::encoding::Encode<
1855 fidl::encoding::HandleType<
1856 fidl::Channel,
1857 { fidl::ObjectType::CHANNEL.into_raw() },
1858 2147483648,
1859 >,
1860 fidl::encoding::DefaultFuchsiaResourceDialect,
1861 >,
1862 T4: fidl::encoding::Encode<
1863 fidl_fuchsia_io::OpenFlags,
1864 fidl::encoding::DefaultFuchsiaResourceDialect,
1865 >,
1866 >
1867 fidl::encoding::Encode<
1868 RemoteControlDeprecatedOpenCapabilityRequest,
1869 fidl::encoding::DefaultFuchsiaResourceDialect,
1870 > for (T0, T1, T2, T3, T4)
1871 {
1872 #[inline]
1873 unsafe fn encode(
1874 self,
1875 encoder: &mut fidl::encoding::Encoder<
1876 '_,
1877 fidl::encoding::DefaultFuchsiaResourceDialect,
1878 >,
1879 offset: usize,
1880 depth: fidl::encoding::Depth,
1881 ) -> fidl::Result<()> {
1882 encoder.debug_check_bounds::<RemoteControlDeprecatedOpenCapabilityRequest>(offset);
1883 unsafe {
1886 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
1887 (ptr as *mut u64).write_unaligned(0);
1888 }
1889 self.0.encode(encoder, offset + 0, depth)?;
1891 self.1.encode(encoder, offset + 16, depth)?;
1892 self.2.encode(encoder, offset + 24, depth)?;
1893 self.3.encode(encoder, offset + 40, depth)?;
1894 self.4.encode(encoder, offset + 44, depth)?;
1895 Ok(())
1896 }
1897 }
1898
1899 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1900 for RemoteControlDeprecatedOpenCapabilityRequest
1901 {
1902 #[inline(always)]
1903 fn new_empty() -> Self {
1904 Self {
1905 moniker: fidl::new_empty!(
1906 fidl::encoding::BoundedString<4096>,
1907 fidl::encoding::DefaultFuchsiaResourceDialect
1908 ),
1909 capability_set: fidl::new_empty!(
1910 fidl_fuchsia_sys2::OpenDirType,
1911 fidl::encoding::DefaultFuchsiaResourceDialect
1912 ),
1913 capability_name: fidl::new_empty!(
1914 fidl::encoding::BoundedString<255>,
1915 fidl::encoding::DefaultFuchsiaResourceDialect
1916 ),
1917 server_channel: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1918 flags: fidl::new_empty!(
1919 fidl_fuchsia_io::OpenFlags,
1920 fidl::encoding::DefaultFuchsiaResourceDialect
1921 ),
1922 }
1923 }
1924
1925 #[inline]
1926 unsafe fn decode(
1927 &mut self,
1928 decoder: &mut fidl::encoding::Decoder<
1929 '_,
1930 fidl::encoding::DefaultFuchsiaResourceDialect,
1931 >,
1932 offset: usize,
1933 _depth: fidl::encoding::Depth,
1934 ) -> fidl::Result<()> {
1935 decoder.debug_check_bounds::<Self>(offset);
1936 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
1938 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1939 let mask = 0xffffffff00000000u64;
1940 let maskedval = padval & mask;
1941 if maskedval != 0 {
1942 return Err(fidl::Error::NonZeroPadding {
1943 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
1944 });
1945 }
1946 fidl::decode!(
1947 fidl::encoding::BoundedString<4096>,
1948 fidl::encoding::DefaultFuchsiaResourceDialect,
1949 &mut self.moniker,
1950 decoder,
1951 offset + 0,
1952 _depth
1953 )?;
1954 fidl::decode!(
1955 fidl_fuchsia_sys2::OpenDirType,
1956 fidl::encoding::DefaultFuchsiaResourceDialect,
1957 &mut self.capability_set,
1958 decoder,
1959 offset + 16,
1960 _depth
1961 )?;
1962 fidl::decode!(
1963 fidl::encoding::BoundedString<255>,
1964 fidl::encoding::DefaultFuchsiaResourceDialect,
1965 &mut self.capability_name,
1966 decoder,
1967 offset + 24,
1968 _depth
1969 )?;
1970 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.server_channel, decoder, offset + 40, _depth)?;
1971 fidl::decode!(
1972 fidl_fuchsia_io::OpenFlags,
1973 fidl::encoding::DefaultFuchsiaResourceDialect,
1974 &mut self.flags,
1975 decoder,
1976 offset + 44,
1977 _depth
1978 )?;
1979 Ok(())
1980 }
1981 }
1982}