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_driver_development_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub struct ManagerGetCompositeInfoRequest {
16 pub iterator: fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>,
17}
18
19impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
20 for ManagerGetCompositeInfoRequest
21{
22}
23
24#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
25pub struct ManagerGetCompositeNodeSpecsRequest {
26 pub name_filter: Option<String>,
27 pub iterator: fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
28}
29
30impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
31 for ManagerGetCompositeNodeSpecsRequest
32{
33}
34
35#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36pub struct ManagerGetDriverHostInfoRequest {
37 pub iterator: fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>,
38}
39
40impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
41 for ManagerGetDriverHostInfoRequest
42{
43}
44
45#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
46pub struct ManagerGetDriverInfoRequest {
47 pub driver_filter: Vec<String>,
48 pub iterator: fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>,
49}
50
51impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
52 for ManagerGetDriverInfoRequest
53{
54}
55
56#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
57pub struct ManagerGetNodeInfoRequest {
58 pub node_filter: Vec<String>,
59 pub iterator: fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>,
60 pub exact_match: bool,
61}
62
63impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ManagerGetNodeInfoRequest {}
64
65#[derive(Debug, PartialEq)]
66pub struct ManagerRestartWithDictionaryRequest {
67 pub moniker: String,
69 pub dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
71}
72
73impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
74 for ManagerRestartWithDictionaryRequest
75{
76}
77
78#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
79pub struct ManagerRestartWithDictionaryResponse {
80 pub release_fence: fidl::EventPair,
83}
84
85impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
86 for ManagerRestartWithDictionaryResponse
87{
88}
89
90#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
91pub struct BootupWatcherMarker;
92
93impl fidl::endpoints::ProtocolMarker for BootupWatcherMarker {
94 type Proxy = BootupWatcherProxy;
95 type RequestStream = BootupWatcherRequestStream;
96 #[cfg(target_os = "fuchsia")]
97 type SynchronousProxy = BootupWatcherSynchronousProxy;
98
99 const DEBUG_NAME: &'static str = "fuchsia.driver.development.BootupWatcher";
100}
101impl fidl::endpoints::DiscoverableProtocolMarker for BootupWatcherMarker {}
102
103pub trait BootupWatcherProxyInterface: Send + Sync {
104 type WaitForBootupResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
105 fn r#wait_for_bootup(&self) -> Self::WaitForBootupResponseFut;
106}
107#[derive(Debug)]
108#[cfg(target_os = "fuchsia")]
109pub struct BootupWatcherSynchronousProxy {
110 client: fidl::client::sync::Client,
111}
112
113#[cfg(target_os = "fuchsia")]
114impl fidl::endpoints::SynchronousProxy for BootupWatcherSynchronousProxy {
115 type Proxy = BootupWatcherProxy;
116 type Protocol = BootupWatcherMarker;
117
118 fn from_channel(inner: fidl::Channel) -> Self {
119 Self::new(inner)
120 }
121
122 fn into_channel(self) -> fidl::Channel {
123 self.client.into_channel()
124 }
125
126 fn as_channel(&self) -> &fidl::Channel {
127 self.client.as_channel()
128 }
129}
130
131#[cfg(target_os = "fuchsia")]
132impl BootupWatcherSynchronousProxy {
133 pub fn new(channel: fidl::Channel) -> Self {
134 let protocol_name = <BootupWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
135 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
136 }
137
138 pub fn into_channel(self) -> fidl::Channel {
139 self.client.into_channel()
140 }
141
142 pub fn wait_for_event(
145 &self,
146 deadline: zx::MonotonicInstant,
147 ) -> Result<BootupWatcherEvent, fidl::Error> {
148 BootupWatcherEvent::decode(self.client.wait_for_event(deadline)?)
149 }
150
151 pub fn r#wait_for_bootup(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
152 let _response =
153 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
154 (),
155 0x3bd1c5fbb14bb179,
156 fidl::encoding::DynamicFlags::empty(),
157 ___deadline,
158 )?;
159 Ok(_response)
160 }
161}
162
163#[cfg(target_os = "fuchsia")]
164impl From<BootupWatcherSynchronousProxy> for zx::Handle {
165 fn from(value: BootupWatcherSynchronousProxy) -> Self {
166 value.into_channel().into()
167 }
168}
169
170#[cfg(target_os = "fuchsia")]
171impl From<fidl::Channel> for BootupWatcherSynchronousProxy {
172 fn from(value: fidl::Channel) -> Self {
173 Self::new(value)
174 }
175}
176
177#[derive(Debug, Clone)]
178pub struct BootupWatcherProxy {
179 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
180}
181
182impl fidl::endpoints::Proxy for BootupWatcherProxy {
183 type Protocol = BootupWatcherMarker;
184
185 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
186 Self::new(inner)
187 }
188
189 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
190 self.client.into_channel().map_err(|client| Self { client })
191 }
192
193 fn as_channel(&self) -> &::fidl::AsyncChannel {
194 self.client.as_channel()
195 }
196}
197
198impl BootupWatcherProxy {
199 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
201 let protocol_name = <BootupWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
202 Self { client: fidl::client::Client::new(channel, protocol_name) }
203 }
204
205 pub fn take_event_stream(&self) -> BootupWatcherEventStream {
211 BootupWatcherEventStream { event_receiver: self.client.take_event_receiver() }
212 }
213
214 pub fn r#wait_for_bootup(
215 &self,
216 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
217 BootupWatcherProxyInterface::r#wait_for_bootup(self)
218 }
219}
220
221impl BootupWatcherProxyInterface for BootupWatcherProxy {
222 type WaitForBootupResponseFut =
223 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
224 fn r#wait_for_bootup(&self) -> Self::WaitForBootupResponseFut {
225 fn _decode(
226 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
227 ) -> Result<(), fidl::Error> {
228 let _response = fidl::client::decode_transaction_body::<
229 fidl::encoding::EmptyPayload,
230 fidl::encoding::DefaultFuchsiaResourceDialect,
231 0x3bd1c5fbb14bb179,
232 >(_buf?)?;
233 Ok(_response)
234 }
235 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
236 (),
237 0x3bd1c5fbb14bb179,
238 fidl::encoding::DynamicFlags::empty(),
239 _decode,
240 )
241 }
242}
243
244pub struct BootupWatcherEventStream {
245 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
246}
247
248impl std::marker::Unpin for BootupWatcherEventStream {}
249
250impl futures::stream::FusedStream for BootupWatcherEventStream {
251 fn is_terminated(&self) -> bool {
252 self.event_receiver.is_terminated()
253 }
254}
255
256impl futures::Stream for BootupWatcherEventStream {
257 type Item = Result<BootupWatcherEvent, fidl::Error>;
258
259 fn poll_next(
260 mut self: std::pin::Pin<&mut Self>,
261 cx: &mut std::task::Context<'_>,
262 ) -> std::task::Poll<Option<Self::Item>> {
263 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
264 &mut self.event_receiver,
265 cx
266 )?) {
267 Some(buf) => std::task::Poll::Ready(Some(BootupWatcherEvent::decode(buf))),
268 None => std::task::Poll::Ready(None),
269 }
270 }
271}
272
273#[derive(Debug)]
274pub enum BootupWatcherEvent {
275 #[non_exhaustive]
276 _UnknownEvent {
277 ordinal: u64,
279 },
280}
281
282impl BootupWatcherEvent {
283 fn decode(
285 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
286 ) -> Result<BootupWatcherEvent, fidl::Error> {
287 let (bytes, _handles) = buf.split_mut();
288 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
289 debug_assert_eq!(tx_header.tx_id, 0);
290 match tx_header.ordinal {
291 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
292 Ok(BootupWatcherEvent::_UnknownEvent { ordinal: tx_header.ordinal })
293 }
294 _ => Err(fidl::Error::UnknownOrdinal {
295 ordinal: tx_header.ordinal,
296 protocol_name: <BootupWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
297 }),
298 }
299 }
300}
301
302pub struct BootupWatcherRequestStream {
304 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
305 is_terminated: bool,
306}
307
308impl std::marker::Unpin for BootupWatcherRequestStream {}
309
310impl futures::stream::FusedStream for BootupWatcherRequestStream {
311 fn is_terminated(&self) -> bool {
312 self.is_terminated
313 }
314}
315
316impl fidl::endpoints::RequestStream for BootupWatcherRequestStream {
317 type Protocol = BootupWatcherMarker;
318 type ControlHandle = BootupWatcherControlHandle;
319
320 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
321 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
322 }
323
324 fn control_handle(&self) -> Self::ControlHandle {
325 BootupWatcherControlHandle { inner: self.inner.clone() }
326 }
327
328 fn into_inner(
329 self,
330 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
331 {
332 (self.inner, self.is_terminated)
333 }
334
335 fn from_inner(
336 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
337 is_terminated: bool,
338 ) -> Self {
339 Self { inner, is_terminated }
340 }
341}
342
343impl futures::Stream for BootupWatcherRequestStream {
344 type Item = Result<BootupWatcherRequest, fidl::Error>;
345
346 fn poll_next(
347 mut self: std::pin::Pin<&mut Self>,
348 cx: &mut std::task::Context<'_>,
349 ) -> std::task::Poll<Option<Self::Item>> {
350 let this = &mut *self;
351 if this.inner.check_shutdown(cx) {
352 this.is_terminated = true;
353 return std::task::Poll::Ready(None);
354 }
355 if this.is_terminated {
356 panic!("polled BootupWatcherRequestStream after completion");
357 }
358 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
359 |bytes, handles| {
360 match this.inner.channel().read_etc(cx, bytes, handles) {
361 std::task::Poll::Ready(Ok(())) => {}
362 std::task::Poll::Pending => return std::task::Poll::Pending,
363 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
364 this.is_terminated = true;
365 return std::task::Poll::Ready(None);
366 }
367 std::task::Poll::Ready(Err(e)) => {
368 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
369 e.into(),
370 ))))
371 }
372 }
373
374 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
376
377 std::task::Poll::Ready(Some(match header.ordinal {
378 0x3bd1c5fbb14bb179 => {
379 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
380 let mut req = fidl::new_empty!(
381 fidl::encoding::EmptyPayload,
382 fidl::encoding::DefaultFuchsiaResourceDialect
383 );
384 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
385 let control_handle =
386 BootupWatcherControlHandle { inner: this.inner.clone() };
387 Ok(BootupWatcherRequest::WaitForBootup {
388 responder: BootupWatcherWaitForBootupResponder {
389 control_handle: std::mem::ManuallyDrop::new(control_handle),
390 tx_id: header.tx_id,
391 },
392 })
393 }
394 _ if header.tx_id == 0
395 && header
396 .dynamic_flags()
397 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
398 {
399 Ok(BootupWatcherRequest::_UnknownMethod {
400 ordinal: header.ordinal,
401 control_handle: BootupWatcherControlHandle {
402 inner: this.inner.clone(),
403 },
404 method_type: fidl::MethodType::OneWay,
405 })
406 }
407 _ if header
408 .dynamic_flags()
409 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
410 {
411 this.inner.send_framework_err(
412 fidl::encoding::FrameworkErr::UnknownMethod,
413 header.tx_id,
414 header.ordinal,
415 header.dynamic_flags(),
416 (bytes, handles),
417 )?;
418 Ok(BootupWatcherRequest::_UnknownMethod {
419 ordinal: header.ordinal,
420 control_handle: BootupWatcherControlHandle {
421 inner: this.inner.clone(),
422 },
423 method_type: fidl::MethodType::TwoWay,
424 })
425 }
426 _ => Err(fidl::Error::UnknownOrdinal {
427 ordinal: header.ordinal,
428 protocol_name:
429 <BootupWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
430 }),
431 }))
432 },
433 )
434 }
435}
436
437#[derive(Debug)]
440pub enum BootupWatcherRequest {
441 WaitForBootup {
442 responder: BootupWatcherWaitForBootupResponder,
443 },
444 #[non_exhaustive]
446 _UnknownMethod {
447 ordinal: u64,
449 control_handle: BootupWatcherControlHandle,
450 method_type: fidl::MethodType,
451 },
452}
453
454impl BootupWatcherRequest {
455 #[allow(irrefutable_let_patterns)]
456 pub fn into_wait_for_bootup(self) -> Option<(BootupWatcherWaitForBootupResponder)> {
457 if let BootupWatcherRequest::WaitForBootup { responder } = self {
458 Some((responder))
459 } else {
460 None
461 }
462 }
463
464 pub fn method_name(&self) -> &'static str {
466 match *self {
467 BootupWatcherRequest::WaitForBootup { .. } => "wait_for_bootup",
468 BootupWatcherRequest::_UnknownMethod {
469 method_type: fidl::MethodType::OneWay, ..
470 } => "unknown one-way method",
471 BootupWatcherRequest::_UnknownMethod {
472 method_type: fidl::MethodType::TwoWay, ..
473 } => "unknown two-way method",
474 }
475 }
476}
477
478#[derive(Debug, Clone)]
479pub struct BootupWatcherControlHandle {
480 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
481}
482
483impl fidl::endpoints::ControlHandle for BootupWatcherControlHandle {
484 fn shutdown(&self) {
485 self.inner.shutdown()
486 }
487 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
488 self.inner.shutdown_with_epitaph(status)
489 }
490
491 fn is_closed(&self) -> bool {
492 self.inner.channel().is_closed()
493 }
494 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
495 self.inner.channel().on_closed()
496 }
497
498 #[cfg(target_os = "fuchsia")]
499 fn signal_peer(
500 &self,
501 clear_mask: zx::Signals,
502 set_mask: zx::Signals,
503 ) -> Result<(), zx_status::Status> {
504 use fidl::Peered;
505 self.inner.channel().signal_peer(clear_mask, set_mask)
506 }
507}
508
509impl BootupWatcherControlHandle {}
510
511#[must_use = "FIDL methods require a response to be sent"]
512#[derive(Debug)]
513pub struct BootupWatcherWaitForBootupResponder {
514 control_handle: std::mem::ManuallyDrop<BootupWatcherControlHandle>,
515 tx_id: u32,
516}
517
518impl std::ops::Drop for BootupWatcherWaitForBootupResponder {
522 fn drop(&mut self) {
523 self.control_handle.shutdown();
524 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
526 }
527}
528
529impl fidl::endpoints::Responder for BootupWatcherWaitForBootupResponder {
530 type ControlHandle = BootupWatcherControlHandle;
531
532 fn control_handle(&self) -> &BootupWatcherControlHandle {
533 &self.control_handle
534 }
535
536 fn drop_without_shutdown(mut self) {
537 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
539 std::mem::forget(self);
541 }
542}
543
544impl BootupWatcherWaitForBootupResponder {
545 pub fn send(self) -> Result<(), fidl::Error> {
549 let _result = self.send_raw();
550 if _result.is_err() {
551 self.control_handle.shutdown();
552 }
553 self.drop_without_shutdown();
554 _result
555 }
556
557 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
559 let _result = self.send_raw();
560 self.drop_without_shutdown();
561 _result
562 }
563
564 fn send_raw(&self) -> Result<(), fidl::Error> {
565 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
566 (),
567 self.tx_id,
568 0x3bd1c5fbb14bb179,
569 fidl::encoding::DynamicFlags::empty(),
570 )
571 }
572}
573
574#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
575pub struct CompositeInfoIteratorMarker;
576
577impl fidl::endpoints::ProtocolMarker for CompositeInfoIteratorMarker {
578 type Proxy = CompositeInfoIteratorProxy;
579 type RequestStream = CompositeInfoIteratorRequestStream;
580 #[cfg(target_os = "fuchsia")]
581 type SynchronousProxy = CompositeInfoIteratorSynchronousProxy;
582
583 const DEBUG_NAME: &'static str = "(anonymous) CompositeInfoIterator";
584}
585
586pub trait CompositeInfoIteratorProxyInterface: Send + Sync {
587 type GetNextResponseFut: std::future::Future<Output = Result<Vec<CompositeNodeInfo>, fidl::Error>>
588 + Send;
589 fn r#get_next(&self) -> Self::GetNextResponseFut;
590}
591#[derive(Debug)]
592#[cfg(target_os = "fuchsia")]
593pub struct CompositeInfoIteratorSynchronousProxy {
594 client: fidl::client::sync::Client,
595}
596
597#[cfg(target_os = "fuchsia")]
598impl fidl::endpoints::SynchronousProxy for CompositeInfoIteratorSynchronousProxy {
599 type Proxy = CompositeInfoIteratorProxy;
600 type Protocol = CompositeInfoIteratorMarker;
601
602 fn from_channel(inner: fidl::Channel) -> Self {
603 Self::new(inner)
604 }
605
606 fn into_channel(self) -> fidl::Channel {
607 self.client.into_channel()
608 }
609
610 fn as_channel(&self) -> &fidl::Channel {
611 self.client.as_channel()
612 }
613}
614
615#[cfg(target_os = "fuchsia")]
616impl CompositeInfoIteratorSynchronousProxy {
617 pub fn new(channel: fidl::Channel) -> Self {
618 let protocol_name =
619 <CompositeInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
620 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
621 }
622
623 pub fn into_channel(self) -> fidl::Channel {
624 self.client.into_channel()
625 }
626
627 pub fn wait_for_event(
630 &self,
631 deadline: zx::MonotonicInstant,
632 ) -> Result<CompositeInfoIteratorEvent, fidl::Error> {
633 CompositeInfoIteratorEvent::decode(self.client.wait_for_event(deadline)?)
634 }
635
636 pub fn r#get_next(
639 &self,
640 ___deadline: zx::MonotonicInstant,
641 ) -> Result<Vec<CompositeNodeInfo>, fidl::Error> {
642 let _response = self
643 .client
644 .send_query::<fidl::encoding::EmptyPayload, CompositeInfoIteratorGetNextResponse>(
645 (),
646 0x50af808a6e34bb96,
647 fidl::encoding::DynamicFlags::empty(),
648 ___deadline,
649 )?;
650 Ok(_response.composites)
651 }
652}
653
654#[cfg(target_os = "fuchsia")]
655impl From<CompositeInfoIteratorSynchronousProxy> for zx::Handle {
656 fn from(value: CompositeInfoIteratorSynchronousProxy) -> Self {
657 value.into_channel().into()
658 }
659}
660
661#[cfg(target_os = "fuchsia")]
662impl From<fidl::Channel> for CompositeInfoIteratorSynchronousProxy {
663 fn from(value: fidl::Channel) -> Self {
664 Self::new(value)
665 }
666}
667
668#[derive(Debug, Clone)]
669pub struct CompositeInfoIteratorProxy {
670 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
671}
672
673impl fidl::endpoints::Proxy for CompositeInfoIteratorProxy {
674 type Protocol = CompositeInfoIteratorMarker;
675
676 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
677 Self::new(inner)
678 }
679
680 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
681 self.client.into_channel().map_err(|client| Self { client })
682 }
683
684 fn as_channel(&self) -> &::fidl::AsyncChannel {
685 self.client.as_channel()
686 }
687}
688
689impl CompositeInfoIteratorProxy {
690 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
692 let protocol_name =
693 <CompositeInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
694 Self { client: fidl::client::Client::new(channel, protocol_name) }
695 }
696
697 pub fn take_event_stream(&self) -> CompositeInfoIteratorEventStream {
703 CompositeInfoIteratorEventStream { event_receiver: self.client.take_event_receiver() }
704 }
705
706 pub fn r#get_next(
709 &self,
710 ) -> fidl::client::QueryResponseFut<
711 Vec<CompositeNodeInfo>,
712 fidl::encoding::DefaultFuchsiaResourceDialect,
713 > {
714 CompositeInfoIteratorProxyInterface::r#get_next(self)
715 }
716}
717
718impl CompositeInfoIteratorProxyInterface for CompositeInfoIteratorProxy {
719 type GetNextResponseFut = fidl::client::QueryResponseFut<
720 Vec<CompositeNodeInfo>,
721 fidl::encoding::DefaultFuchsiaResourceDialect,
722 >;
723 fn r#get_next(&self) -> Self::GetNextResponseFut {
724 fn _decode(
725 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
726 ) -> Result<Vec<CompositeNodeInfo>, fidl::Error> {
727 let _response = fidl::client::decode_transaction_body::<
728 CompositeInfoIteratorGetNextResponse,
729 fidl::encoding::DefaultFuchsiaResourceDialect,
730 0x50af808a6e34bb96,
731 >(_buf?)?;
732 Ok(_response.composites)
733 }
734 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<CompositeNodeInfo>>(
735 (),
736 0x50af808a6e34bb96,
737 fidl::encoding::DynamicFlags::empty(),
738 _decode,
739 )
740 }
741}
742
743pub struct CompositeInfoIteratorEventStream {
744 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
745}
746
747impl std::marker::Unpin for CompositeInfoIteratorEventStream {}
748
749impl futures::stream::FusedStream for CompositeInfoIteratorEventStream {
750 fn is_terminated(&self) -> bool {
751 self.event_receiver.is_terminated()
752 }
753}
754
755impl futures::Stream for CompositeInfoIteratorEventStream {
756 type Item = Result<CompositeInfoIteratorEvent, fidl::Error>;
757
758 fn poll_next(
759 mut self: std::pin::Pin<&mut Self>,
760 cx: &mut std::task::Context<'_>,
761 ) -> std::task::Poll<Option<Self::Item>> {
762 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
763 &mut self.event_receiver,
764 cx
765 )?) {
766 Some(buf) => std::task::Poll::Ready(Some(CompositeInfoIteratorEvent::decode(buf))),
767 None => std::task::Poll::Ready(None),
768 }
769 }
770}
771
772#[derive(Debug)]
773pub enum CompositeInfoIteratorEvent {}
774
775impl CompositeInfoIteratorEvent {
776 fn decode(
778 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
779 ) -> Result<CompositeInfoIteratorEvent, fidl::Error> {
780 let (bytes, _handles) = buf.split_mut();
781 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
782 debug_assert_eq!(tx_header.tx_id, 0);
783 match tx_header.ordinal {
784 _ => Err(fidl::Error::UnknownOrdinal {
785 ordinal: tx_header.ordinal,
786 protocol_name:
787 <CompositeInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
788 }),
789 }
790 }
791}
792
793pub struct CompositeInfoIteratorRequestStream {
795 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
796 is_terminated: bool,
797}
798
799impl std::marker::Unpin for CompositeInfoIteratorRequestStream {}
800
801impl futures::stream::FusedStream for CompositeInfoIteratorRequestStream {
802 fn is_terminated(&self) -> bool {
803 self.is_terminated
804 }
805}
806
807impl fidl::endpoints::RequestStream for CompositeInfoIteratorRequestStream {
808 type Protocol = CompositeInfoIteratorMarker;
809 type ControlHandle = CompositeInfoIteratorControlHandle;
810
811 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
812 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
813 }
814
815 fn control_handle(&self) -> Self::ControlHandle {
816 CompositeInfoIteratorControlHandle { inner: self.inner.clone() }
817 }
818
819 fn into_inner(
820 self,
821 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
822 {
823 (self.inner, self.is_terminated)
824 }
825
826 fn from_inner(
827 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
828 is_terminated: bool,
829 ) -> Self {
830 Self { inner, is_terminated }
831 }
832}
833
834impl futures::Stream for CompositeInfoIteratorRequestStream {
835 type Item = Result<CompositeInfoIteratorRequest, fidl::Error>;
836
837 fn poll_next(
838 mut self: std::pin::Pin<&mut Self>,
839 cx: &mut std::task::Context<'_>,
840 ) -> std::task::Poll<Option<Self::Item>> {
841 let this = &mut *self;
842 if this.inner.check_shutdown(cx) {
843 this.is_terminated = true;
844 return std::task::Poll::Ready(None);
845 }
846 if this.is_terminated {
847 panic!("polled CompositeInfoIteratorRequestStream after completion");
848 }
849 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
850 |bytes, handles| {
851 match this.inner.channel().read_etc(cx, bytes, handles) {
852 std::task::Poll::Ready(Ok(())) => {}
853 std::task::Poll::Pending => return std::task::Poll::Pending,
854 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
855 this.is_terminated = true;
856 return std::task::Poll::Ready(None);
857 }
858 std::task::Poll::Ready(Err(e)) => {
859 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
860 e.into(),
861 ))))
862 }
863 }
864
865 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
867
868 std::task::Poll::Ready(Some(match header.ordinal {
869 0x50af808a6e34bb96 => {
870 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
871 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
872 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
873 let control_handle = CompositeInfoIteratorControlHandle {
874 inner: this.inner.clone(),
875 };
876 Ok(CompositeInfoIteratorRequest::GetNext {
877 responder: CompositeInfoIteratorGetNextResponder {
878 control_handle: std::mem::ManuallyDrop::new(control_handle),
879 tx_id: header.tx_id,
880 },
881 })
882 }
883 _ => Err(fidl::Error::UnknownOrdinal {
884 ordinal: header.ordinal,
885 protocol_name: <CompositeInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
886 }),
887 }))
888 },
889 )
890 }
891}
892
893#[derive(Debug)]
895pub enum CompositeInfoIteratorRequest {
896 GetNext { responder: CompositeInfoIteratorGetNextResponder },
899}
900
901impl CompositeInfoIteratorRequest {
902 #[allow(irrefutable_let_patterns)]
903 pub fn into_get_next(self) -> Option<(CompositeInfoIteratorGetNextResponder)> {
904 if let CompositeInfoIteratorRequest::GetNext { responder } = self {
905 Some((responder))
906 } else {
907 None
908 }
909 }
910
911 pub fn method_name(&self) -> &'static str {
913 match *self {
914 CompositeInfoIteratorRequest::GetNext { .. } => "get_next",
915 }
916 }
917}
918
919#[derive(Debug, Clone)]
920pub struct CompositeInfoIteratorControlHandle {
921 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
922}
923
924impl fidl::endpoints::ControlHandle for CompositeInfoIteratorControlHandle {
925 fn shutdown(&self) {
926 self.inner.shutdown()
927 }
928 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
929 self.inner.shutdown_with_epitaph(status)
930 }
931
932 fn is_closed(&self) -> bool {
933 self.inner.channel().is_closed()
934 }
935 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
936 self.inner.channel().on_closed()
937 }
938
939 #[cfg(target_os = "fuchsia")]
940 fn signal_peer(
941 &self,
942 clear_mask: zx::Signals,
943 set_mask: zx::Signals,
944 ) -> Result<(), zx_status::Status> {
945 use fidl::Peered;
946 self.inner.channel().signal_peer(clear_mask, set_mask)
947 }
948}
949
950impl CompositeInfoIteratorControlHandle {}
951
952#[must_use = "FIDL methods require a response to be sent"]
953#[derive(Debug)]
954pub struct CompositeInfoIteratorGetNextResponder {
955 control_handle: std::mem::ManuallyDrop<CompositeInfoIteratorControlHandle>,
956 tx_id: u32,
957}
958
959impl std::ops::Drop for CompositeInfoIteratorGetNextResponder {
963 fn drop(&mut self) {
964 self.control_handle.shutdown();
965 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
967 }
968}
969
970impl fidl::endpoints::Responder for CompositeInfoIteratorGetNextResponder {
971 type ControlHandle = CompositeInfoIteratorControlHandle;
972
973 fn control_handle(&self) -> &CompositeInfoIteratorControlHandle {
974 &self.control_handle
975 }
976
977 fn drop_without_shutdown(mut self) {
978 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
980 std::mem::forget(self);
982 }
983}
984
985impl CompositeInfoIteratorGetNextResponder {
986 pub fn send(self, mut composites: &[CompositeNodeInfo]) -> Result<(), fidl::Error> {
990 let _result = self.send_raw(composites);
991 if _result.is_err() {
992 self.control_handle.shutdown();
993 }
994 self.drop_without_shutdown();
995 _result
996 }
997
998 pub fn send_no_shutdown_on_err(
1000 self,
1001 mut composites: &[CompositeNodeInfo],
1002 ) -> Result<(), fidl::Error> {
1003 let _result = self.send_raw(composites);
1004 self.drop_without_shutdown();
1005 _result
1006 }
1007
1008 fn send_raw(&self, mut composites: &[CompositeNodeInfo]) -> Result<(), fidl::Error> {
1009 self.control_handle.inner.send::<CompositeInfoIteratorGetNextResponse>(
1010 (composites,),
1011 self.tx_id,
1012 0x50af808a6e34bb96,
1013 fidl::encoding::DynamicFlags::empty(),
1014 )
1015 }
1016}
1017
1018#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1019pub struct CompositeNodeSpecIteratorMarker;
1020
1021impl fidl::endpoints::ProtocolMarker for CompositeNodeSpecIteratorMarker {
1022 type Proxy = CompositeNodeSpecIteratorProxy;
1023 type RequestStream = CompositeNodeSpecIteratorRequestStream;
1024 #[cfg(target_os = "fuchsia")]
1025 type SynchronousProxy = CompositeNodeSpecIteratorSynchronousProxy;
1026
1027 const DEBUG_NAME: &'static str = "(anonymous) CompositeNodeSpecIterator";
1028}
1029
1030pub trait CompositeNodeSpecIteratorProxyInterface: Send + Sync {
1031 type GetNextResponseFut: std::future::Future<
1032 Output = Result<Vec<fidl_fuchsia_driver_framework::CompositeInfo>, fidl::Error>,
1033 > + Send;
1034 fn r#get_next(&self) -> Self::GetNextResponseFut;
1035}
1036#[derive(Debug)]
1037#[cfg(target_os = "fuchsia")]
1038pub struct CompositeNodeSpecIteratorSynchronousProxy {
1039 client: fidl::client::sync::Client,
1040}
1041
1042#[cfg(target_os = "fuchsia")]
1043impl fidl::endpoints::SynchronousProxy for CompositeNodeSpecIteratorSynchronousProxy {
1044 type Proxy = CompositeNodeSpecIteratorProxy;
1045 type Protocol = CompositeNodeSpecIteratorMarker;
1046
1047 fn from_channel(inner: fidl::Channel) -> Self {
1048 Self::new(inner)
1049 }
1050
1051 fn into_channel(self) -> fidl::Channel {
1052 self.client.into_channel()
1053 }
1054
1055 fn as_channel(&self) -> &fidl::Channel {
1056 self.client.as_channel()
1057 }
1058}
1059
1060#[cfg(target_os = "fuchsia")]
1061impl CompositeNodeSpecIteratorSynchronousProxy {
1062 pub fn new(channel: fidl::Channel) -> Self {
1063 let protocol_name =
1064 <CompositeNodeSpecIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1065 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1066 }
1067
1068 pub fn into_channel(self) -> fidl::Channel {
1069 self.client.into_channel()
1070 }
1071
1072 pub fn wait_for_event(
1075 &self,
1076 deadline: zx::MonotonicInstant,
1077 ) -> Result<CompositeNodeSpecIteratorEvent, fidl::Error> {
1078 CompositeNodeSpecIteratorEvent::decode(self.client.wait_for_event(deadline)?)
1079 }
1080
1081 pub fn r#get_next(
1083 &self,
1084 ___deadline: zx::MonotonicInstant,
1085 ) -> Result<Vec<fidl_fuchsia_driver_framework::CompositeInfo>, fidl::Error> {
1086 let _response = self
1087 .client
1088 .send_query::<fidl::encoding::EmptyPayload, CompositeNodeSpecIteratorGetNextResponse>(
1089 (),
1090 0x32fd110355479f71,
1091 fidl::encoding::DynamicFlags::empty(),
1092 ___deadline,
1093 )?;
1094 Ok(_response.specs)
1095 }
1096}
1097
1098#[cfg(target_os = "fuchsia")]
1099impl From<CompositeNodeSpecIteratorSynchronousProxy> for zx::Handle {
1100 fn from(value: CompositeNodeSpecIteratorSynchronousProxy) -> Self {
1101 value.into_channel().into()
1102 }
1103}
1104
1105#[cfg(target_os = "fuchsia")]
1106impl From<fidl::Channel> for CompositeNodeSpecIteratorSynchronousProxy {
1107 fn from(value: fidl::Channel) -> Self {
1108 Self::new(value)
1109 }
1110}
1111
1112#[derive(Debug, Clone)]
1113pub struct CompositeNodeSpecIteratorProxy {
1114 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1115}
1116
1117impl fidl::endpoints::Proxy for CompositeNodeSpecIteratorProxy {
1118 type Protocol = CompositeNodeSpecIteratorMarker;
1119
1120 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1121 Self::new(inner)
1122 }
1123
1124 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1125 self.client.into_channel().map_err(|client| Self { client })
1126 }
1127
1128 fn as_channel(&self) -> &::fidl::AsyncChannel {
1129 self.client.as_channel()
1130 }
1131}
1132
1133impl CompositeNodeSpecIteratorProxy {
1134 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1136 let protocol_name =
1137 <CompositeNodeSpecIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1138 Self { client: fidl::client::Client::new(channel, protocol_name) }
1139 }
1140
1141 pub fn take_event_stream(&self) -> CompositeNodeSpecIteratorEventStream {
1147 CompositeNodeSpecIteratorEventStream { event_receiver: self.client.take_event_receiver() }
1148 }
1149
1150 pub fn r#get_next(
1152 &self,
1153 ) -> fidl::client::QueryResponseFut<
1154 Vec<fidl_fuchsia_driver_framework::CompositeInfo>,
1155 fidl::encoding::DefaultFuchsiaResourceDialect,
1156 > {
1157 CompositeNodeSpecIteratorProxyInterface::r#get_next(self)
1158 }
1159}
1160
1161impl CompositeNodeSpecIteratorProxyInterface for CompositeNodeSpecIteratorProxy {
1162 type GetNextResponseFut = fidl::client::QueryResponseFut<
1163 Vec<fidl_fuchsia_driver_framework::CompositeInfo>,
1164 fidl::encoding::DefaultFuchsiaResourceDialect,
1165 >;
1166 fn r#get_next(&self) -> Self::GetNextResponseFut {
1167 fn _decode(
1168 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1169 ) -> Result<Vec<fidl_fuchsia_driver_framework::CompositeInfo>, fidl::Error> {
1170 let _response = fidl::client::decode_transaction_body::<
1171 CompositeNodeSpecIteratorGetNextResponse,
1172 fidl::encoding::DefaultFuchsiaResourceDialect,
1173 0x32fd110355479f71,
1174 >(_buf?)?;
1175 Ok(_response.specs)
1176 }
1177 self.client.send_query_and_decode::<
1178 fidl::encoding::EmptyPayload,
1179 Vec<fidl_fuchsia_driver_framework::CompositeInfo>,
1180 >(
1181 (),
1182 0x32fd110355479f71,
1183 fidl::encoding::DynamicFlags::empty(),
1184 _decode,
1185 )
1186 }
1187}
1188
1189pub struct CompositeNodeSpecIteratorEventStream {
1190 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1191}
1192
1193impl std::marker::Unpin for CompositeNodeSpecIteratorEventStream {}
1194
1195impl futures::stream::FusedStream for CompositeNodeSpecIteratorEventStream {
1196 fn is_terminated(&self) -> bool {
1197 self.event_receiver.is_terminated()
1198 }
1199}
1200
1201impl futures::Stream for CompositeNodeSpecIteratorEventStream {
1202 type Item = Result<CompositeNodeSpecIteratorEvent, fidl::Error>;
1203
1204 fn poll_next(
1205 mut self: std::pin::Pin<&mut Self>,
1206 cx: &mut std::task::Context<'_>,
1207 ) -> std::task::Poll<Option<Self::Item>> {
1208 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1209 &mut self.event_receiver,
1210 cx
1211 )?) {
1212 Some(buf) => std::task::Poll::Ready(Some(CompositeNodeSpecIteratorEvent::decode(buf))),
1213 None => std::task::Poll::Ready(None),
1214 }
1215 }
1216}
1217
1218#[derive(Debug)]
1219pub enum CompositeNodeSpecIteratorEvent {}
1220
1221impl CompositeNodeSpecIteratorEvent {
1222 fn decode(
1224 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1225 ) -> Result<CompositeNodeSpecIteratorEvent, fidl::Error> {
1226 let (bytes, _handles) = buf.split_mut();
1227 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1228 debug_assert_eq!(tx_header.tx_id, 0);
1229 match tx_header.ordinal {
1230 _ => Err(fidl::Error::UnknownOrdinal {
1231 ordinal: tx_header.ordinal,
1232 protocol_name:
1233 <CompositeNodeSpecIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1234 }),
1235 }
1236 }
1237}
1238
1239pub struct CompositeNodeSpecIteratorRequestStream {
1241 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1242 is_terminated: bool,
1243}
1244
1245impl std::marker::Unpin for CompositeNodeSpecIteratorRequestStream {}
1246
1247impl futures::stream::FusedStream for CompositeNodeSpecIteratorRequestStream {
1248 fn is_terminated(&self) -> bool {
1249 self.is_terminated
1250 }
1251}
1252
1253impl fidl::endpoints::RequestStream for CompositeNodeSpecIteratorRequestStream {
1254 type Protocol = CompositeNodeSpecIteratorMarker;
1255 type ControlHandle = CompositeNodeSpecIteratorControlHandle;
1256
1257 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1258 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1259 }
1260
1261 fn control_handle(&self) -> Self::ControlHandle {
1262 CompositeNodeSpecIteratorControlHandle { inner: self.inner.clone() }
1263 }
1264
1265 fn into_inner(
1266 self,
1267 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1268 {
1269 (self.inner, self.is_terminated)
1270 }
1271
1272 fn from_inner(
1273 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1274 is_terminated: bool,
1275 ) -> Self {
1276 Self { inner, is_terminated }
1277 }
1278}
1279
1280impl futures::Stream for CompositeNodeSpecIteratorRequestStream {
1281 type Item = Result<CompositeNodeSpecIteratorRequest, fidl::Error>;
1282
1283 fn poll_next(
1284 mut self: std::pin::Pin<&mut Self>,
1285 cx: &mut std::task::Context<'_>,
1286 ) -> std::task::Poll<Option<Self::Item>> {
1287 let this = &mut *self;
1288 if this.inner.check_shutdown(cx) {
1289 this.is_terminated = true;
1290 return std::task::Poll::Ready(None);
1291 }
1292 if this.is_terminated {
1293 panic!("polled CompositeNodeSpecIteratorRequestStream after completion");
1294 }
1295 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1296 |bytes, handles| {
1297 match this.inner.channel().read_etc(cx, bytes, handles) {
1298 std::task::Poll::Ready(Ok(())) => {}
1299 std::task::Poll::Pending => return std::task::Poll::Pending,
1300 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1301 this.is_terminated = true;
1302 return std::task::Poll::Ready(None);
1303 }
1304 std::task::Poll::Ready(Err(e)) => {
1305 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1306 e.into(),
1307 ))))
1308 }
1309 }
1310
1311 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1313
1314 std::task::Poll::Ready(Some(match header.ordinal {
1315 0x32fd110355479f71 => {
1316 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1317 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1318 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1319 let control_handle = CompositeNodeSpecIteratorControlHandle {
1320 inner: this.inner.clone(),
1321 };
1322 Ok(CompositeNodeSpecIteratorRequest::GetNext {
1323 responder: CompositeNodeSpecIteratorGetNextResponder {
1324 control_handle: std::mem::ManuallyDrop::new(control_handle),
1325 tx_id: header.tx_id,
1326 },
1327 })
1328 }
1329 _ => Err(fidl::Error::UnknownOrdinal {
1330 ordinal: header.ordinal,
1331 protocol_name: <CompositeNodeSpecIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1332 }),
1333 }))
1334 },
1335 )
1336 }
1337}
1338
1339#[derive(Debug)]
1340pub enum CompositeNodeSpecIteratorRequest {
1341 GetNext { responder: CompositeNodeSpecIteratorGetNextResponder },
1343}
1344
1345impl CompositeNodeSpecIteratorRequest {
1346 #[allow(irrefutable_let_patterns)]
1347 pub fn into_get_next(self) -> Option<(CompositeNodeSpecIteratorGetNextResponder)> {
1348 if let CompositeNodeSpecIteratorRequest::GetNext { responder } = self {
1349 Some((responder))
1350 } else {
1351 None
1352 }
1353 }
1354
1355 pub fn method_name(&self) -> &'static str {
1357 match *self {
1358 CompositeNodeSpecIteratorRequest::GetNext { .. } => "get_next",
1359 }
1360 }
1361}
1362
1363#[derive(Debug, Clone)]
1364pub struct CompositeNodeSpecIteratorControlHandle {
1365 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1366}
1367
1368impl fidl::endpoints::ControlHandle for CompositeNodeSpecIteratorControlHandle {
1369 fn shutdown(&self) {
1370 self.inner.shutdown()
1371 }
1372 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1373 self.inner.shutdown_with_epitaph(status)
1374 }
1375
1376 fn is_closed(&self) -> bool {
1377 self.inner.channel().is_closed()
1378 }
1379 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1380 self.inner.channel().on_closed()
1381 }
1382
1383 #[cfg(target_os = "fuchsia")]
1384 fn signal_peer(
1385 &self,
1386 clear_mask: zx::Signals,
1387 set_mask: zx::Signals,
1388 ) -> Result<(), zx_status::Status> {
1389 use fidl::Peered;
1390 self.inner.channel().signal_peer(clear_mask, set_mask)
1391 }
1392}
1393
1394impl CompositeNodeSpecIteratorControlHandle {}
1395
1396#[must_use = "FIDL methods require a response to be sent"]
1397#[derive(Debug)]
1398pub struct CompositeNodeSpecIteratorGetNextResponder {
1399 control_handle: std::mem::ManuallyDrop<CompositeNodeSpecIteratorControlHandle>,
1400 tx_id: u32,
1401}
1402
1403impl std::ops::Drop for CompositeNodeSpecIteratorGetNextResponder {
1407 fn drop(&mut self) {
1408 self.control_handle.shutdown();
1409 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1411 }
1412}
1413
1414impl fidl::endpoints::Responder for CompositeNodeSpecIteratorGetNextResponder {
1415 type ControlHandle = CompositeNodeSpecIteratorControlHandle;
1416
1417 fn control_handle(&self) -> &CompositeNodeSpecIteratorControlHandle {
1418 &self.control_handle
1419 }
1420
1421 fn drop_without_shutdown(mut self) {
1422 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1424 std::mem::forget(self);
1426 }
1427}
1428
1429impl CompositeNodeSpecIteratorGetNextResponder {
1430 pub fn send(
1434 self,
1435 mut specs: &[fidl_fuchsia_driver_framework::CompositeInfo],
1436 ) -> Result<(), fidl::Error> {
1437 let _result = self.send_raw(specs);
1438 if _result.is_err() {
1439 self.control_handle.shutdown();
1440 }
1441 self.drop_without_shutdown();
1442 _result
1443 }
1444
1445 pub fn send_no_shutdown_on_err(
1447 self,
1448 mut specs: &[fidl_fuchsia_driver_framework::CompositeInfo],
1449 ) -> Result<(), fidl::Error> {
1450 let _result = self.send_raw(specs);
1451 self.drop_without_shutdown();
1452 _result
1453 }
1454
1455 fn send_raw(
1456 &self,
1457 mut specs: &[fidl_fuchsia_driver_framework::CompositeInfo],
1458 ) -> Result<(), fidl::Error> {
1459 self.control_handle.inner.send::<CompositeNodeSpecIteratorGetNextResponse>(
1460 (specs,),
1461 self.tx_id,
1462 0x32fd110355479f71,
1463 fidl::encoding::DynamicFlags::empty(),
1464 )
1465 }
1466}
1467
1468#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1469pub struct DriverHostInfoIteratorMarker;
1470
1471impl fidl::endpoints::ProtocolMarker for DriverHostInfoIteratorMarker {
1472 type Proxy = DriverHostInfoIteratorProxy;
1473 type RequestStream = DriverHostInfoIteratorRequestStream;
1474 #[cfg(target_os = "fuchsia")]
1475 type SynchronousProxy = DriverHostInfoIteratorSynchronousProxy;
1476
1477 const DEBUG_NAME: &'static str = "(anonymous) DriverHostInfoIterator";
1478}
1479
1480pub trait DriverHostInfoIteratorProxyInterface: Send + Sync {
1481 type GetNextResponseFut: std::future::Future<Output = Result<Vec<DriverHostInfo>, fidl::Error>>
1482 + Send;
1483 fn r#get_next(&self) -> Self::GetNextResponseFut;
1484}
1485#[derive(Debug)]
1486#[cfg(target_os = "fuchsia")]
1487pub struct DriverHostInfoIteratorSynchronousProxy {
1488 client: fidl::client::sync::Client,
1489}
1490
1491#[cfg(target_os = "fuchsia")]
1492impl fidl::endpoints::SynchronousProxy for DriverHostInfoIteratorSynchronousProxy {
1493 type Proxy = DriverHostInfoIteratorProxy;
1494 type Protocol = DriverHostInfoIteratorMarker;
1495
1496 fn from_channel(inner: fidl::Channel) -> Self {
1497 Self::new(inner)
1498 }
1499
1500 fn into_channel(self) -> fidl::Channel {
1501 self.client.into_channel()
1502 }
1503
1504 fn as_channel(&self) -> &fidl::Channel {
1505 self.client.as_channel()
1506 }
1507}
1508
1509#[cfg(target_os = "fuchsia")]
1510impl DriverHostInfoIteratorSynchronousProxy {
1511 pub fn new(channel: fidl::Channel) -> Self {
1512 let protocol_name =
1513 <DriverHostInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1514 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1515 }
1516
1517 pub fn into_channel(self) -> fidl::Channel {
1518 self.client.into_channel()
1519 }
1520
1521 pub fn wait_for_event(
1524 &self,
1525 deadline: zx::MonotonicInstant,
1526 ) -> Result<DriverHostInfoIteratorEvent, fidl::Error> {
1527 DriverHostInfoIteratorEvent::decode(self.client.wait_for_event(deadline)?)
1528 }
1529
1530 pub fn r#get_next(
1532 &self,
1533 ___deadline: zx::MonotonicInstant,
1534 ) -> Result<Vec<DriverHostInfo>, fidl::Error> {
1535 let _response = self
1536 .client
1537 .send_query::<fidl::encoding::EmptyPayload, DriverHostInfoIteratorGetNextResponse>(
1538 (),
1539 0xbf58e5cd863a86,
1540 fidl::encoding::DynamicFlags::empty(),
1541 ___deadline,
1542 )?;
1543 Ok(_response.driver_hosts)
1544 }
1545}
1546
1547#[cfg(target_os = "fuchsia")]
1548impl From<DriverHostInfoIteratorSynchronousProxy> for zx::Handle {
1549 fn from(value: DriverHostInfoIteratorSynchronousProxy) -> Self {
1550 value.into_channel().into()
1551 }
1552}
1553
1554#[cfg(target_os = "fuchsia")]
1555impl From<fidl::Channel> for DriverHostInfoIteratorSynchronousProxy {
1556 fn from(value: fidl::Channel) -> Self {
1557 Self::new(value)
1558 }
1559}
1560
1561#[derive(Debug, Clone)]
1562pub struct DriverHostInfoIteratorProxy {
1563 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1564}
1565
1566impl fidl::endpoints::Proxy for DriverHostInfoIteratorProxy {
1567 type Protocol = DriverHostInfoIteratorMarker;
1568
1569 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1570 Self::new(inner)
1571 }
1572
1573 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1574 self.client.into_channel().map_err(|client| Self { client })
1575 }
1576
1577 fn as_channel(&self) -> &::fidl::AsyncChannel {
1578 self.client.as_channel()
1579 }
1580}
1581
1582impl DriverHostInfoIteratorProxy {
1583 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1585 let protocol_name =
1586 <DriverHostInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1587 Self { client: fidl::client::Client::new(channel, protocol_name) }
1588 }
1589
1590 pub fn take_event_stream(&self) -> DriverHostInfoIteratorEventStream {
1596 DriverHostInfoIteratorEventStream { event_receiver: self.client.take_event_receiver() }
1597 }
1598
1599 pub fn r#get_next(
1601 &self,
1602 ) -> fidl::client::QueryResponseFut<
1603 Vec<DriverHostInfo>,
1604 fidl::encoding::DefaultFuchsiaResourceDialect,
1605 > {
1606 DriverHostInfoIteratorProxyInterface::r#get_next(self)
1607 }
1608}
1609
1610impl DriverHostInfoIteratorProxyInterface for DriverHostInfoIteratorProxy {
1611 type GetNextResponseFut = fidl::client::QueryResponseFut<
1612 Vec<DriverHostInfo>,
1613 fidl::encoding::DefaultFuchsiaResourceDialect,
1614 >;
1615 fn r#get_next(&self) -> Self::GetNextResponseFut {
1616 fn _decode(
1617 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1618 ) -> Result<Vec<DriverHostInfo>, fidl::Error> {
1619 let _response = fidl::client::decode_transaction_body::<
1620 DriverHostInfoIteratorGetNextResponse,
1621 fidl::encoding::DefaultFuchsiaResourceDialect,
1622 0xbf58e5cd863a86,
1623 >(_buf?)?;
1624 Ok(_response.driver_hosts)
1625 }
1626 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<DriverHostInfo>>(
1627 (),
1628 0xbf58e5cd863a86,
1629 fidl::encoding::DynamicFlags::empty(),
1630 _decode,
1631 )
1632 }
1633}
1634
1635pub struct DriverHostInfoIteratorEventStream {
1636 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1637}
1638
1639impl std::marker::Unpin for DriverHostInfoIteratorEventStream {}
1640
1641impl futures::stream::FusedStream for DriverHostInfoIteratorEventStream {
1642 fn is_terminated(&self) -> bool {
1643 self.event_receiver.is_terminated()
1644 }
1645}
1646
1647impl futures::Stream for DriverHostInfoIteratorEventStream {
1648 type Item = Result<DriverHostInfoIteratorEvent, fidl::Error>;
1649
1650 fn poll_next(
1651 mut self: std::pin::Pin<&mut Self>,
1652 cx: &mut std::task::Context<'_>,
1653 ) -> std::task::Poll<Option<Self::Item>> {
1654 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1655 &mut self.event_receiver,
1656 cx
1657 )?) {
1658 Some(buf) => std::task::Poll::Ready(Some(DriverHostInfoIteratorEvent::decode(buf))),
1659 None => std::task::Poll::Ready(None),
1660 }
1661 }
1662}
1663
1664#[derive(Debug)]
1665pub enum DriverHostInfoIteratorEvent {}
1666
1667impl DriverHostInfoIteratorEvent {
1668 fn decode(
1670 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1671 ) -> Result<DriverHostInfoIteratorEvent, fidl::Error> {
1672 let (bytes, _handles) = buf.split_mut();
1673 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1674 debug_assert_eq!(tx_header.tx_id, 0);
1675 match tx_header.ordinal {
1676 _ => Err(fidl::Error::UnknownOrdinal {
1677 ordinal: tx_header.ordinal,
1678 protocol_name:
1679 <DriverHostInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1680 }),
1681 }
1682 }
1683}
1684
1685pub struct DriverHostInfoIteratorRequestStream {
1687 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1688 is_terminated: bool,
1689}
1690
1691impl std::marker::Unpin for DriverHostInfoIteratorRequestStream {}
1692
1693impl futures::stream::FusedStream for DriverHostInfoIteratorRequestStream {
1694 fn is_terminated(&self) -> bool {
1695 self.is_terminated
1696 }
1697}
1698
1699impl fidl::endpoints::RequestStream for DriverHostInfoIteratorRequestStream {
1700 type Protocol = DriverHostInfoIteratorMarker;
1701 type ControlHandle = DriverHostInfoIteratorControlHandle;
1702
1703 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1704 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1705 }
1706
1707 fn control_handle(&self) -> Self::ControlHandle {
1708 DriverHostInfoIteratorControlHandle { inner: self.inner.clone() }
1709 }
1710
1711 fn into_inner(
1712 self,
1713 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1714 {
1715 (self.inner, self.is_terminated)
1716 }
1717
1718 fn from_inner(
1719 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1720 is_terminated: bool,
1721 ) -> Self {
1722 Self { inner, is_terminated }
1723 }
1724}
1725
1726impl futures::Stream for DriverHostInfoIteratorRequestStream {
1727 type Item = Result<DriverHostInfoIteratorRequest, fidl::Error>;
1728
1729 fn poll_next(
1730 mut self: std::pin::Pin<&mut Self>,
1731 cx: &mut std::task::Context<'_>,
1732 ) -> std::task::Poll<Option<Self::Item>> {
1733 let this = &mut *self;
1734 if this.inner.check_shutdown(cx) {
1735 this.is_terminated = true;
1736 return std::task::Poll::Ready(None);
1737 }
1738 if this.is_terminated {
1739 panic!("polled DriverHostInfoIteratorRequestStream after completion");
1740 }
1741 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1742 |bytes, handles| {
1743 match this.inner.channel().read_etc(cx, bytes, handles) {
1744 std::task::Poll::Ready(Ok(())) => {}
1745 std::task::Poll::Pending => return std::task::Poll::Pending,
1746 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1747 this.is_terminated = true;
1748 return std::task::Poll::Ready(None);
1749 }
1750 std::task::Poll::Ready(Err(e)) => {
1751 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1752 e.into(),
1753 ))))
1754 }
1755 }
1756
1757 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1759
1760 std::task::Poll::Ready(Some(match header.ordinal {
1761 0xbf58e5cd863a86 => {
1762 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1763 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1764 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1765 let control_handle = DriverHostInfoIteratorControlHandle {
1766 inner: this.inner.clone(),
1767 };
1768 Ok(DriverHostInfoIteratorRequest::GetNext {
1769 responder: DriverHostInfoIteratorGetNextResponder {
1770 control_handle: std::mem::ManuallyDrop::new(control_handle),
1771 tx_id: header.tx_id,
1772 },
1773 })
1774 }
1775 _ => Err(fidl::Error::UnknownOrdinal {
1776 ordinal: header.ordinal,
1777 protocol_name: <DriverHostInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1778 }),
1779 }))
1780 },
1781 )
1782 }
1783}
1784
1785#[derive(Debug)]
1786pub enum DriverHostInfoIteratorRequest {
1787 GetNext { responder: DriverHostInfoIteratorGetNextResponder },
1789}
1790
1791impl DriverHostInfoIteratorRequest {
1792 #[allow(irrefutable_let_patterns)]
1793 pub fn into_get_next(self) -> Option<(DriverHostInfoIteratorGetNextResponder)> {
1794 if let DriverHostInfoIteratorRequest::GetNext { responder } = self {
1795 Some((responder))
1796 } else {
1797 None
1798 }
1799 }
1800
1801 pub fn method_name(&self) -> &'static str {
1803 match *self {
1804 DriverHostInfoIteratorRequest::GetNext { .. } => "get_next",
1805 }
1806 }
1807}
1808
1809#[derive(Debug, Clone)]
1810pub struct DriverHostInfoIteratorControlHandle {
1811 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1812}
1813
1814impl fidl::endpoints::ControlHandle for DriverHostInfoIteratorControlHandle {
1815 fn shutdown(&self) {
1816 self.inner.shutdown()
1817 }
1818 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1819 self.inner.shutdown_with_epitaph(status)
1820 }
1821
1822 fn is_closed(&self) -> bool {
1823 self.inner.channel().is_closed()
1824 }
1825 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1826 self.inner.channel().on_closed()
1827 }
1828
1829 #[cfg(target_os = "fuchsia")]
1830 fn signal_peer(
1831 &self,
1832 clear_mask: zx::Signals,
1833 set_mask: zx::Signals,
1834 ) -> Result<(), zx_status::Status> {
1835 use fidl::Peered;
1836 self.inner.channel().signal_peer(clear_mask, set_mask)
1837 }
1838}
1839
1840impl DriverHostInfoIteratorControlHandle {}
1841
1842#[must_use = "FIDL methods require a response to be sent"]
1843#[derive(Debug)]
1844pub struct DriverHostInfoIteratorGetNextResponder {
1845 control_handle: std::mem::ManuallyDrop<DriverHostInfoIteratorControlHandle>,
1846 tx_id: u32,
1847}
1848
1849impl std::ops::Drop for DriverHostInfoIteratorGetNextResponder {
1853 fn drop(&mut self) {
1854 self.control_handle.shutdown();
1855 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1857 }
1858}
1859
1860impl fidl::endpoints::Responder for DriverHostInfoIteratorGetNextResponder {
1861 type ControlHandle = DriverHostInfoIteratorControlHandle;
1862
1863 fn control_handle(&self) -> &DriverHostInfoIteratorControlHandle {
1864 &self.control_handle
1865 }
1866
1867 fn drop_without_shutdown(mut self) {
1868 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1870 std::mem::forget(self);
1872 }
1873}
1874
1875impl DriverHostInfoIteratorGetNextResponder {
1876 pub fn send(self, mut driver_hosts: &[DriverHostInfo]) -> Result<(), fidl::Error> {
1880 let _result = self.send_raw(driver_hosts);
1881 if _result.is_err() {
1882 self.control_handle.shutdown();
1883 }
1884 self.drop_without_shutdown();
1885 _result
1886 }
1887
1888 pub fn send_no_shutdown_on_err(
1890 self,
1891 mut driver_hosts: &[DriverHostInfo],
1892 ) -> Result<(), fidl::Error> {
1893 let _result = self.send_raw(driver_hosts);
1894 self.drop_without_shutdown();
1895 _result
1896 }
1897
1898 fn send_raw(&self, mut driver_hosts: &[DriverHostInfo]) -> Result<(), fidl::Error> {
1899 self.control_handle.inner.send::<DriverHostInfoIteratorGetNextResponse>(
1900 (driver_hosts,),
1901 self.tx_id,
1902 0xbf58e5cd863a86,
1903 fidl::encoding::DynamicFlags::empty(),
1904 )
1905 }
1906}
1907
1908#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1909pub struct DriverInfoIteratorMarker;
1910
1911impl fidl::endpoints::ProtocolMarker for DriverInfoIteratorMarker {
1912 type Proxy = DriverInfoIteratorProxy;
1913 type RequestStream = DriverInfoIteratorRequestStream;
1914 #[cfg(target_os = "fuchsia")]
1915 type SynchronousProxy = DriverInfoIteratorSynchronousProxy;
1916
1917 const DEBUG_NAME: &'static str = "(anonymous) DriverInfoIterator";
1918}
1919
1920pub trait DriverInfoIteratorProxyInterface: Send + Sync {
1921 type GetNextResponseFut: std::future::Future<
1922 Output = Result<Vec<fidl_fuchsia_driver_framework::DriverInfo>, fidl::Error>,
1923 > + Send;
1924 fn r#get_next(&self) -> Self::GetNextResponseFut;
1925}
1926#[derive(Debug)]
1927#[cfg(target_os = "fuchsia")]
1928pub struct DriverInfoIteratorSynchronousProxy {
1929 client: fidl::client::sync::Client,
1930}
1931
1932#[cfg(target_os = "fuchsia")]
1933impl fidl::endpoints::SynchronousProxy for DriverInfoIteratorSynchronousProxy {
1934 type Proxy = DriverInfoIteratorProxy;
1935 type Protocol = DriverInfoIteratorMarker;
1936
1937 fn from_channel(inner: fidl::Channel) -> Self {
1938 Self::new(inner)
1939 }
1940
1941 fn into_channel(self) -> fidl::Channel {
1942 self.client.into_channel()
1943 }
1944
1945 fn as_channel(&self) -> &fidl::Channel {
1946 self.client.as_channel()
1947 }
1948}
1949
1950#[cfg(target_os = "fuchsia")]
1951impl DriverInfoIteratorSynchronousProxy {
1952 pub fn new(channel: fidl::Channel) -> Self {
1953 let protocol_name =
1954 <DriverInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1955 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1956 }
1957
1958 pub fn into_channel(self) -> fidl::Channel {
1959 self.client.into_channel()
1960 }
1961
1962 pub fn wait_for_event(
1965 &self,
1966 deadline: zx::MonotonicInstant,
1967 ) -> Result<DriverInfoIteratorEvent, fidl::Error> {
1968 DriverInfoIteratorEvent::decode(self.client.wait_for_event(deadline)?)
1969 }
1970
1971 pub fn r#get_next(
1973 &self,
1974 ___deadline: zx::MonotonicInstant,
1975 ) -> Result<Vec<fidl_fuchsia_driver_framework::DriverInfo>, fidl::Error> {
1976 let _response = self
1977 .client
1978 .send_query::<fidl::encoding::EmptyPayload, DriverInfoIteratorGetNextResponse>(
1979 (),
1980 0x2c394711c6784952,
1981 fidl::encoding::DynamicFlags::empty(),
1982 ___deadline,
1983 )?;
1984 Ok(_response.drivers)
1985 }
1986}
1987
1988#[cfg(target_os = "fuchsia")]
1989impl From<DriverInfoIteratorSynchronousProxy> for zx::Handle {
1990 fn from(value: DriverInfoIteratorSynchronousProxy) -> Self {
1991 value.into_channel().into()
1992 }
1993}
1994
1995#[cfg(target_os = "fuchsia")]
1996impl From<fidl::Channel> for DriverInfoIteratorSynchronousProxy {
1997 fn from(value: fidl::Channel) -> Self {
1998 Self::new(value)
1999 }
2000}
2001
2002#[derive(Debug, Clone)]
2003pub struct DriverInfoIteratorProxy {
2004 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2005}
2006
2007impl fidl::endpoints::Proxy for DriverInfoIteratorProxy {
2008 type Protocol = DriverInfoIteratorMarker;
2009
2010 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2011 Self::new(inner)
2012 }
2013
2014 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2015 self.client.into_channel().map_err(|client| Self { client })
2016 }
2017
2018 fn as_channel(&self) -> &::fidl::AsyncChannel {
2019 self.client.as_channel()
2020 }
2021}
2022
2023impl DriverInfoIteratorProxy {
2024 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2026 let protocol_name =
2027 <DriverInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2028 Self { client: fidl::client::Client::new(channel, protocol_name) }
2029 }
2030
2031 pub fn take_event_stream(&self) -> DriverInfoIteratorEventStream {
2037 DriverInfoIteratorEventStream { event_receiver: self.client.take_event_receiver() }
2038 }
2039
2040 pub fn r#get_next(
2042 &self,
2043 ) -> fidl::client::QueryResponseFut<
2044 Vec<fidl_fuchsia_driver_framework::DriverInfo>,
2045 fidl::encoding::DefaultFuchsiaResourceDialect,
2046 > {
2047 DriverInfoIteratorProxyInterface::r#get_next(self)
2048 }
2049}
2050
2051impl DriverInfoIteratorProxyInterface for DriverInfoIteratorProxy {
2052 type GetNextResponseFut = fidl::client::QueryResponseFut<
2053 Vec<fidl_fuchsia_driver_framework::DriverInfo>,
2054 fidl::encoding::DefaultFuchsiaResourceDialect,
2055 >;
2056 fn r#get_next(&self) -> Self::GetNextResponseFut {
2057 fn _decode(
2058 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2059 ) -> Result<Vec<fidl_fuchsia_driver_framework::DriverInfo>, fidl::Error> {
2060 let _response = fidl::client::decode_transaction_body::<
2061 DriverInfoIteratorGetNextResponse,
2062 fidl::encoding::DefaultFuchsiaResourceDialect,
2063 0x2c394711c6784952,
2064 >(_buf?)?;
2065 Ok(_response.drivers)
2066 }
2067 self.client.send_query_and_decode::<
2068 fidl::encoding::EmptyPayload,
2069 Vec<fidl_fuchsia_driver_framework::DriverInfo>,
2070 >(
2071 (),
2072 0x2c394711c6784952,
2073 fidl::encoding::DynamicFlags::empty(),
2074 _decode,
2075 )
2076 }
2077}
2078
2079pub struct DriverInfoIteratorEventStream {
2080 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2081}
2082
2083impl std::marker::Unpin for DriverInfoIteratorEventStream {}
2084
2085impl futures::stream::FusedStream for DriverInfoIteratorEventStream {
2086 fn is_terminated(&self) -> bool {
2087 self.event_receiver.is_terminated()
2088 }
2089}
2090
2091impl futures::Stream for DriverInfoIteratorEventStream {
2092 type Item = Result<DriverInfoIteratorEvent, fidl::Error>;
2093
2094 fn poll_next(
2095 mut self: std::pin::Pin<&mut Self>,
2096 cx: &mut std::task::Context<'_>,
2097 ) -> std::task::Poll<Option<Self::Item>> {
2098 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2099 &mut self.event_receiver,
2100 cx
2101 )?) {
2102 Some(buf) => std::task::Poll::Ready(Some(DriverInfoIteratorEvent::decode(buf))),
2103 None => std::task::Poll::Ready(None),
2104 }
2105 }
2106}
2107
2108#[derive(Debug)]
2109pub enum DriverInfoIteratorEvent {}
2110
2111impl DriverInfoIteratorEvent {
2112 fn decode(
2114 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2115 ) -> Result<DriverInfoIteratorEvent, fidl::Error> {
2116 let (bytes, _handles) = buf.split_mut();
2117 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2118 debug_assert_eq!(tx_header.tx_id, 0);
2119 match tx_header.ordinal {
2120 _ => Err(fidl::Error::UnknownOrdinal {
2121 ordinal: tx_header.ordinal,
2122 protocol_name:
2123 <DriverInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2124 }),
2125 }
2126 }
2127}
2128
2129pub struct DriverInfoIteratorRequestStream {
2131 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2132 is_terminated: bool,
2133}
2134
2135impl std::marker::Unpin for DriverInfoIteratorRequestStream {}
2136
2137impl futures::stream::FusedStream for DriverInfoIteratorRequestStream {
2138 fn is_terminated(&self) -> bool {
2139 self.is_terminated
2140 }
2141}
2142
2143impl fidl::endpoints::RequestStream for DriverInfoIteratorRequestStream {
2144 type Protocol = DriverInfoIteratorMarker;
2145 type ControlHandle = DriverInfoIteratorControlHandle;
2146
2147 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2148 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2149 }
2150
2151 fn control_handle(&self) -> Self::ControlHandle {
2152 DriverInfoIteratorControlHandle { inner: self.inner.clone() }
2153 }
2154
2155 fn into_inner(
2156 self,
2157 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2158 {
2159 (self.inner, self.is_terminated)
2160 }
2161
2162 fn from_inner(
2163 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2164 is_terminated: bool,
2165 ) -> Self {
2166 Self { inner, is_terminated }
2167 }
2168}
2169
2170impl futures::Stream for DriverInfoIteratorRequestStream {
2171 type Item = Result<DriverInfoIteratorRequest, fidl::Error>;
2172
2173 fn poll_next(
2174 mut self: std::pin::Pin<&mut Self>,
2175 cx: &mut std::task::Context<'_>,
2176 ) -> std::task::Poll<Option<Self::Item>> {
2177 let this = &mut *self;
2178 if this.inner.check_shutdown(cx) {
2179 this.is_terminated = true;
2180 return std::task::Poll::Ready(None);
2181 }
2182 if this.is_terminated {
2183 panic!("polled DriverInfoIteratorRequestStream after completion");
2184 }
2185 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2186 |bytes, handles| {
2187 match this.inner.channel().read_etc(cx, bytes, handles) {
2188 std::task::Poll::Ready(Ok(())) => {}
2189 std::task::Poll::Pending => return std::task::Poll::Pending,
2190 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2191 this.is_terminated = true;
2192 return std::task::Poll::Ready(None);
2193 }
2194 std::task::Poll::Ready(Err(e)) => {
2195 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2196 e.into(),
2197 ))))
2198 }
2199 }
2200
2201 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2203
2204 std::task::Poll::Ready(Some(match header.ordinal {
2205 0x2c394711c6784952 => {
2206 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2207 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
2208 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2209 let control_handle = DriverInfoIteratorControlHandle {
2210 inner: this.inner.clone(),
2211 };
2212 Ok(DriverInfoIteratorRequest::GetNext {
2213 responder: DriverInfoIteratorGetNextResponder {
2214 control_handle: std::mem::ManuallyDrop::new(control_handle),
2215 tx_id: header.tx_id,
2216 },
2217 })
2218 }
2219 _ => Err(fidl::Error::UnknownOrdinal {
2220 ordinal: header.ordinal,
2221 protocol_name: <DriverInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2222 }),
2223 }))
2224 },
2225 )
2226 }
2227}
2228
2229#[derive(Debug)]
2230pub enum DriverInfoIteratorRequest {
2231 GetNext { responder: DriverInfoIteratorGetNextResponder },
2233}
2234
2235impl DriverInfoIteratorRequest {
2236 #[allow(irrefutable_let_patterns)]
2237 pub fn into_get_next(self) -> Option<(DriverInfoIteratorGetNextResponder)> {
2238 if let DriverInfoIteratorRequest::GetNext { responder } = self {
2239 Some((responder))
2240 } else {
2241 None
2242 }
2243 }
2244
2245 pub fn method_name(&self) -> &'static str {
2247 match *self {
2248 DriverInfoIteratorRequest::GetNext { .. } => "get_next",
2249 }
2250 }
2251}
2252
2253#[derive(Debug, Clone)]
2254pub struct DriverInfoIteratorControlHandle {
2255 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2256}
2257
2258impl fidl::endpoints::ControlHandle for DriverInfoIteratorControlHandle {
2259 fn shutdown(&self) {
2260 self.inner.shutdown()
2261 }
2262 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2263 self.inner.shutdown_with_epitaph(status)
2264 }
2265
2266 fn is_closed(&self) -> bool {
2267 self.inner.channel().is_closed()
2268 }
2269 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2270 self.inner.channel().on_closed()
2271 }
2272
2273 #[cfg(target_os = "fuchsia")]
2274 fn signal_peer(
2275 &self,
2276 clear_mask: zx::Signals,
2277 set_mask: zx::Signals,
2278 ) -> Result<(), zx_status::Status> {
2279 use fidl::Peered;
2280 self.inner.channel().signal_peer(clear_mask, set_mask)
2281 }
2282}
2283
2284impl DriverInfoIteratorControlHandle {}
2285
2286#[must_use = "FIDL methods require a response to be sent"]
2287#[derive(Debug)]
2288pub struct DriverInfoIteratorGetNextResponder {
2289 control_handle: std::mem::ManuallyDrop<DriverInfoIteratorControlHandle>,
2290 tx_id: u32,
2291}
2292
2293impl std::ops::Drop for DriverInfoIteratorGetNextResponder {
2297 fn drop(&mut self) {
2298 self.control_handle.shutdown();
2299 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2301 }
2302}
2303
2304impl fidl::endpoints::Responder for DriverInfoIteratorGetNextResponder {
2305 type ControlHandle = DriverInfoIteratorControlHandle;
2306
2307 fn control_handle(&self) -> &DriverInfoIteratorControlHandle {
2308 &self.control_handle
2309 }
2310
2311 fn drop_without_shutdown(mut self) {
2312 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2314 std::mem::forget(self);
2316 }
2317}
2318
2319impl DriverInfoIteratorGetNextResponder {
2320 pub fn send(
2324 self,
2325 mut drivers: &[fidl_fuchsia_driver_framework::DriverInfo],
2326 ) -> Result<(), fidl::Error> {
2327 let _result = self.send_raw(drivers);
2328 if _result.is_err() {
2329 self.control_handle.shutdown();
2330 }
2331 self.drop_without_shutdown();
2332 _result
2333 }
2334
2335 pub fn send_no_shutdown_on_err(
2337 self,
2338 mut drivers: &[fidl_fuchsia_driver_framework::DriverInfo],
2339 ) -> Result<(), fidl::Error> {
2340 let _result = self.send_raw(drivers);
2341 self.drop_without_shutdown();
2342 _result
2343 }
2344
2345 fn send_raw(
2346 &self,
2347 mut drivers: &[fidl_fuchsia_driver_framework::DriverInfo],
2348 ) -> Result<(), fidl::Error> {
2349 self.control_handle.inner.send::<DriverInfoIteratorGetNextResponse>(
2350 (drivers,),
2351 self.tx_id,
2352 0x2c394711c6784952,
2353 fidl::encoding::DynamicFlags::empty(),
2354 )
2355 }
2356}
2357
2358#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2359pub struct ManagerMarker;
2360
2361impl fidl::endpoints::ProtocolMarker for ManagerMarker {
2362 type Proxy = ManagerProxy;
2363 type RequestStream = ManagerRequestStream;
2364 #[cfg(target_os = "fuchsia")]
2365 type SynchronousProxy = ManagerSynchronousProxy;
2366
2367 const DEBUG_NAME: &'static str = "fuchsia.driver.development.Manager";
2368}
2369impl fidl::endpoints::DiscoverableProtocolMarker for ManagerMarker {}
2370pub type ManagerRestartDriverHostsResult = Result<u32, i32>;
2371pub type ManagerDisableDriverResult = Result<(), i32>;
2372pub type ManagerEnableDriverResult = Result<(), i32>;
2373pub type ManagerBindAllUnboundNodesResult = Result<Vec<NodeBindingInfo>, i32>;
2374pub type ManagerAddTestNodeResult = Result<(), fidl_fuchsia_driver_framework::NodeError>;
2375pub type ManagerRemoveTestNodeResult = Result<(), i32>;
2376pub type ManagerRestartWithDictionaryResult = Result<fidl::EventPair, i32>;
2377pub type ManagerRebindCompositesWithDriverResult = Result<u32, i32>;
2378
2379pub trait ManagerProxyInterface: Send + Sync {
2380 fn r#get_driver_info(
2381 &self,
2382 driver_filter: &[String],
2383 iterator: fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>,
2384 ) -> Result<(), fidl::Error>;
2385 fn r#get_composite_node_specs(
2386 &self,
2387 name_filter: Option<&str>,
2388 iterator: fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
2389 ) -> Result<(), fidl::Error>;
2390 fn r#get_node_info(
2391 &self,
2392 node_filter: &[String],
2393 iterator: fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>,
2394 exact_match: bool,
2395 ) -> Result<(), fidl::Error>;
2396 fn r#get_composite_info(
2397 &self,
2398 iterator: fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>,
2399 ) -> Result<(), fidl::Error>;
2400 fn r#get_driver_host_info(
2401 &self,
2402 iterator: fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>,
2403 ) -> Result<(), fidl::Error>;
2404 type RestartDriverHostsResponseFut: std::future::Future<Output = Result<ManagerRestartDriverHostsResult, fidl::Error>>
2405 + Send;
2406 fn r#restart_driver_hosts(
2407 &self,
2408 driver_url: &str,
2409 rematch_flags: RestartRematchFlags,
2410 ) -> Self::RestartDriverHostsResponseFut;
2411 type DisableDriverResponseFut: std::future::Future<Output = Result<ManagerDisableDriverResult, fidl::Error>>
2412 + Send;
2413 fn r#disable_driver(
2414 &self,
2415 driver_url: &str,
2416 package_hash: Option<&str>,
2417 ) -> Self::DisableDriverResponseFut;
2418 type EnableDriverResponseFut: std::future::Future<Output = Result<ManagerEnableDriverResult, fidl::Error>>
2419 + Send;
2420 fn r#enable_driver(
2421 &self,
2422 driver_url: &str,
2423 package_hash: Option<&str>,
2424 ) -> Self::EnableDriverResponseFut;
2425 type BindAllUnboundNodesResponseFut: std::future::Future<Output = Result<ManagerBindAllUnboundNodesResult, fidl::Error>>
2426 + Send;
2427 fn r#bind_all_unbound_nodes(&self) -> Self::BindAllUnboundNodesResponseFut;
2428 type AddTestNodeResponseFut: std::future::Future<Output = Result<ManagerAddTestNodeResult, fidl::Error>>
2429 + Send;
2430 fn r#add_test_node(&self, args: &TestNodeAddArgs) -> Self::AddTestNodeResponseFut;
2431 type RemoveTestNodeResponseFut: std::future::Future<Output = Result<ManagerRemoveTestNodeResult, fidl::Error>>
2432 + Send;
2433 fn r#remove_test_node(&self, name: &str) -> Self::RemoveTestNodeResponseFut;
2434 type WaitForBootupResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
2435 fn r#wait_for_bootup(&self) -> Self::WaitForBootupResponseFut;
2436 type RestartWithDictionaryResponseFut: std::future::Future<Output = Result<ManagerRestartWithDictionaryResult, fidl::Error>>
2437 + Send;
2438 fn r#restart_with_dictionary(
2439 &self,
2440 moniker: &str,
2441 dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
2442 ) -> Self::RestartWithDictionaryResponseFut;
2443 type RebindCompositesWithDriverResponseFut: std::future::Future<Output = Result<ManagerRebindCompositesWithDriverResult, fidl::Error>>
2444 + Send;
2445 fn r#rebind_composites_with_driver(
2446 &self,
2447 driver_url: &str,
2448 ) -> Self::RebindCompositesWithDriverResponseFut;
2449}
2450#[derive(Debug)]
2451#[cfg(target_os = "fuchsia")]
2452pub struct ManagerSynchronousProxy {
2453 client: fidl::client::sync::Client,
2454}
2455
2456#[cfg(target_os = "fuchsia")]
2457impl fidl::endpoints::SynchronousProxy for ManagerSynchronousProxy {
2458 type Proxy = ManagerProxy;
2459 type Protocol = ManagerMarker;
2460
2461 fn from_channel(inner: fidl::Channel) -> Self {
2462 Self::new(inner)
2463 }
2464
2465 fn into_channel(self) -> fidl::Channel {
2466 self.client.into_channel()
2467 }
2468
2469 fn as_channel(&self) -> &fidl::Channel {
2470 self.client.as_channel()
2471 }
2472}
2473
2474#[cfg(target_os = "fuchsia")]
2475impl ManagerSynchronousProxy {
2476 pub fn new(channel: fidl::Channel) -> Self {
2477 let protocol_name = <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2478 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2479 }
2480
2481 pub fn into_channel(self) -> fidl::Channel {
2482 self.client.into_channel()
2483 }
2484
2485 pub fn wait_for_event(
2488 &self,
2489 deadline: zx::MonotonicInstant,
2490 ) -> Result<ManagerEvent, fidl::Error> {
2491 ManagerEvent::decode(self.client.wait_for_event(deadline)?)
2492 }
2493
2494 pub fn r#get_driver_info(
2504 &self,
2505 mut driver_filter: &[String],
2506 mut iterator: fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>,
2507 ) -> Result<(), fidl::Error> {
2508 self.client.send::<ManagerGetDriverInfoRequest>(
2509 (driver_filter, iterator),
2510 0x34b1541e24e5d587,
2511 fidl::encoding::DynamicFlags::FLEXIBLE,
2512 )
2513 }
2514
2515 pub fn r#get_composite_node_specs(
2523 &self,
2524 mut name_filter: Option<&str>,
2525 mut iterator: fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
2526 ) -> Result<(), fidl::Error> {
2527 self.client.send::<ManagerGetCompositeNodeSpecsRequest>(
2528 (name_filter, iterator),
2529 0x258540c7ff37328f,
2530 fidl::encoding::DynamicFlags::FLEXIBLE,
2531 )
2532 }
2533
2534 pub fn r#get_node_info(
2547 &self,
2548 mut node_filter: &[String],
2549 mut iterator: fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>,
2550 mut exact_match: bool,
2551 ) -> Result<(), fidl::Error> {
2552 self.client.send::<ManagerGetNodeInfoRequest>(
2553 (node_filter, iterator, exact_match),
2554 0x7c272c6b7bcb4f9e,
2555 fidl::encoding::DynamicFlags::FLEXIBLE,
2556 )
2557 }
2558
2559 pub fn r#get_composite_info(
2562 &self,
2563 mut iterator: fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>,
2564 ) -> Result<(), fidl::Error> {
2565 self.client.send::<ManagerGetCompositeInfoRequest>(
2566 (iterator,),
2567 0x4456da4372a49a36,
2568 fidl::encoding::DynamicFlags::FLEXIBLE,
2569 )
2570 }
2571
2572 pub fn r#get_driver_host_info(
2574 &self,
2575 mut iterator: fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>,
2576 ) -> Result<(), fidl::Error> {
2577 self.client.send::<ManagerGetDriverHostInfoRequest>(
2578 (iterator,),
2579 0x366b2c4429d44155,
2580 fidl::encoding::DynamicFlags::FLEXIBLE,
2581 )
2582 }
2583
2584 pub fn r#restart_driver_hosts(
2589 &self,
2590 mut driver_url: &str,
2591 mut rematch_flags: RestartRematchFlags,
2592 ___deadline: zx::MonotonicInstant,
2593 ) -> Result<ManagerRestartDriverHostsResult, fidl::Error> {
2594 let _response = self.client.send_query::<
2595 ManagerRestartDriverHostsRequest,
2596 fidl::encoding::FlexibleResultType<ManagerRestartDriverHostsResponse, i32>,
2597 >(
2598 (driver_url, rematch_flags,),
2599 0x64fb09a17a4dd8c7,
2600 fidl::encoding::DynamicFlags::FLEXIBLE,
2601 ___deadline,
2602 )?
2603 .into_result::<ManagerMarker>("restart_driver_hosts")?;
2604 Ok(_response.map(|x| x.count))
2605 }
2606
2607 pub fn r#disable_driver(
2614 &self,
2615 mut driver_url: &str,
2616 mut package_hash: Option<&str>,
2617 ___deadline: zx::MonotonicInstant,
2618 ) -> Result<ManagerDisableDriverResult, fidl::Error> {
2619 let _response = self.client.send_query::<
2620 ManagerDisableDriverRequest,
2621 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2622 >(
2623 (driver_url, package_hash,),
2624 0x3cabde92ba1ac967,
2625 fidl::encoding::DynamicFlags::FLEXIBLE,
2626 ___deadline,
2627 )?
2628 .into_result::<ManagerMarker>("disable_driver")?;
2629 Ok(_response.map(|x| x))
2630 }
2631
2632 pub fn r#enable_driver(
2636 &self,
2637 mut driver_url: &str,
2638 mut package_hash: Option<&str>,
2639 ___deadline: zx::MonotonicInstant,
2640 ) -> Result<ManagerEnableDriverResult, fidl::Error> {
2641 let _response = self.client.send_query::<
2642 ManagerEnableDriverRequest,
2643 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2644 >(
2645 (driver_url, package_hash,),
2646 0x76a7518712965faf,
2647 fidl::encoding::DynamicFlags::FLEXIBLE,
2648 ___deadline,
2649 )?
2650 .into_result::<ManagerMarker>("enable_driver")?;
2651 Ok(_response.map(|x| x))
2652 }
2653
2654 pub fn r#bind_all_unbound_nodes(
2657 &self,
2658 ___deadline: zx::MonotonicInstant,
2659 ) -> Result<ManagerBindAllUnboundNodesResult, fidl::Error> {
2660 let _response = self.client.send_query::<
2661 fidl::encoding::EmptyPayload,
2662 fidl::encoding::FlexibleResultType<ManagerBindAllUnboundNodesResponse, i32>,
2663 >(
2664 (),
2665 0x2b4343fe1cfb9f21,
2666 fidl::encoding::DynamicFlags::FLEXIBLE,
2667 ___deadline,
2668 )?
2669 .into_result::<ManagerMarker>("bind_all_unbound_nodes")?;
2670 Ok(_response.map(|x| x.binding_result))
2671 }
2672
2673 pub fn r#add_test_node(
2675 &self,
2676 mut args: &TestNodeAddArgs,
2677 ___deadline: zx::MonotonicInstant,
2678 ) -> Result<ManagerAddTestNodeResult, fidl::Error> {
2679 let _response = self
2680 .client
2681 .send_query::<ManagerAddTestNodeRequest, fidl::encoding::FlexibleResultType<
2682 fidl::encoding::EmptyStruct,
2683 fidl_fuchsia_driver_framework::NodeError,
2684 >>(
2685 (args,), 0x774836bbb7fbc5b9, fidl::encoding::DynamicFlags::FLEXIBLE, ___deadline
2686 )?
2687 .into_result::<ManagerMarker>("add_test_node")?;
2688 Ok(_response.map(|x| x))
2689 }
2690
2691 pub fn r#remove_test_node(
2694 &self,
2695 mut name: &str,
2696 ___deadline: zx::MonotonicInstant,
2697 ) -> Result<ManagerRemoveTestNodeResult, fidl::Error> {
2698 let _response = self.client.send_query::<
2699 ManagerRemoveTestNodeRequest,
2700 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2701 >(
2702 (name,),
2703 0x1618ec4e5fc4010e,
2704 fidl::encoding::DynamicFlags::FLEXIBLE,
2705 ___deadline,
2706 )?
2707 .into_result::<ManagerMarker>("remove_test_node")?;
2708 Ok(_response.map(|x| x))
2709 }
2710
2711 pub fn r#wait_for_bootup(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
2713 let _response =
2714 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
2715 (),
2716 0x52077de068225cdc,
2717 fidl::encoding::DynamicFlags::empty(),
2718 ___deadline,
2719 )?;
2720 Ok(_response)
2721 }
2722
2723 pub fn r#restart_with_dictionary(
2728 &self,
2729 mut moniker: &str,
2730 mut dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
2731 ___deadline: zx::MonotonicInstant,
2732 ) -> Result<ManagerRestartWithDictionaryResult, fidl::Error> {
2733 let _response = self.client.send_query::<
2734 ManagerRestartWithDictionaryRequest,
2735 fidl::encoding::ResultType<ManagerRestartWithDictionaryResponse, i32>,
2736 >(
2737 (moniker, &mut dictionary,),
2738 0x5eb620a85359a10e,
2739 fidl::encoding::DynamicFlags::empty(),
2740 ___deadline,
2741 )?;
2742 Ok(_response.map(|x| x.release_fence))
2743 }
2744
2745 pub fn r#rebind_composites_with_driver(
2751 &self,
2752 mut driver_url: &str,
2753 ___deadline: zx::MonotonicInstant,
2754 ) -> Result<ManagerRebindCompositesWithDriverResult, fidl::Error> {
2755 let _response = self.client.send_query::<
2756 ManagerRebindCompositesWithDriverRequest,
2757 fidl::encoding::ResultType<ManagerRebindCompositesWithDriverResponse, i32>,
2758 >(
2759 (driver_url,),
2760 0x175d492045f61f28,
2761 fidl::encoding::DynamicFlags::empty(),
2762 ___deadline,
2763 )?;
2764 Ok(_response.map(|x| x.count))
2765 }
2766}
2767
2768#[cfg(target_os = "fuchsia")]
2769impl From<ManagerSynchronousProxy> for zx::Handle {
2770 fn from(value: ManagerSynchronousProxy) -> Self {
2771 value.into_channel().into()
2772 }
2773}
2774
2775#[cfg(target_os = "fuchsia")]
2776impl From<fidl::Channel> for ManagerSynchronousProxy {
2777 fn from(value: fidl::Channel) -> Self {
2778 Self::new(value)
2779 }
2780}
2781
2782#[derive(Debug, Clone)]
2783pub struct ManagerProxy {
2784 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2785}
2786
2787impl fidl::endpoints::Proxy for ManagerProxy {
2788 type Protocol = ManagerMarker;
2789
2790 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2791 Self::new(inner)
2792 }
2793
2794 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2795 self.client.into_channel().map_err(|client| Self { client })
2796 }
2797
2798 fn as_channel(&self) -> &::fidl::AsyncChannel {
2799 self.client.as_channel()
2800 }
2801}
2802
2803impl ManagerProxy {
2804 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2806 let protocol_name = <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2807 Self { client: fidl::client::Client::new(channel, protocol_name) }
2808 }
2809
2810 pub fn take_event_stream(&self) -> ManagerEventStream {
2816 ManagerEventStream { event_receiver: self.client.take_event_receiver() }
2817 }
2818
2819 pub fn r#get_driver_info(
2829 &self,
2830 mut driver_filter: &[String],
2831 mut iterator: fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>,
2832 ) -> Result<(), fidl::Error> {
2833 ManagerProxyInterface::r#get_driver_info(self, driver_filter, iterator)
2834 }
2835
2836 pub fn r#get_composite_node_specs(
2844 &self,
2845 mut name_filter: Option<&str>,
2846 mut iterator: fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
2847 ) -> Result<(), fidl::Error> {
2848 ManagerProxyInterface::r#get_composite_node_specs(self, name_filter, iterator)
2849 }
2850
2851 pub fn r#get_node_info(
2864 &self,
2865 mut node_filter: &[String],
2866 mut iterator: fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>,
2867 mut exact_match: bool,
2868 ) -> Result<(), fidl::Error> {
2869 ManagerProxyInterface::r#get_node_info(self, node_filter, iterator, exact_match)
2870 }
2871
2872 pub fn r#get_composite_info(
2875 &self,
2876 mut iterator: fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>,
2877 ) -> Result<(), fidl::Error> {
2878 ManagerProxyInterface::r#get_composite_info(self, iterator)
2879 }
2880
2881 pub fn r#get_driver_host_info(
2883 &self,
2884 mut iterator: fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>,
2885 ) -> Result<(), fidl::Error> {
2886 ManagerProxyInterface::r#get_driver_host_info(self, iterator)
2887 }
2888
2889 pub fn r#restart_driver_hosts(
2894 &self,
2895 mut driver_url: &str,
2896 mut rematch_flags: RestartRematchFlags,
2897 ) -> fidl::client::QueryResponseFut<
2898 ManagerRestartDriverHostsResult,
2899 fidl::encoding::DefaultFuchsiaResourceDialect,
2900 > {
2901 ManagerProxyInterface::r#restart_driver_hosts(self, driver_url, rematch_flags)
2902 }
2903
2904 pub fn r#disable_driver(
2911 &self,
2912 mut driver_url: &str,
2913 mut package_hash: Option<&str>,
2914 ) -> fidl::client::QueryResponseFut<
2915 ManagerDisableDriverResult,
2916 fidl::encoding::DefaultFuchsiaResourceDialect,
2917 > {
2918 ManagerProxyInterface::r#disable_driver(self, driver_url, package_hash)
2919 }
2920
2921 pub fn r#enable_driver(
2925 &self,
2926 mut driver_url: &str,
2927 mut package_hash: Option<&str>,
2928 ) -> fidl::client::QueryResponseFut<
2929 ManagerEnableDriverResult,
2930 fidl::encoding::DefaultFuchsiaResourceDialect,
2931 > {
2932 ManagerProxyInterface::r#enable_driver(self, driver_url, package_hash)
2933 }
2934
2935 pub fn r#bind_all_unbound_nodes(
2938 &self,
2939 ) -> fidl::client::QueryResponseFut<
2940 ManagerBindAllUnboundNodesResult,
2941 fidl::encoding::DefaultFuchsiaResourceDialect,
2942 > {
2943 ManagerProxyInterface::r#bind_all_unbound_nodes(self)
2944 }
2945
2946 pub fn r#add_test_node(
2948 &self,
2949 mut args: &TestNodeAddArgs,
2950 ) -> fidl::client::QueryResponseFut<
2951 ManagerAddTestNodeResult,
2952 fidl::encoding::DefaultFuchsiaResourceDialect,
2953 > {
2954 ManagerProxyInterface::r#add_test_node(self, args)
2955 }
2956
2957 pub fn r#remove_test_node(
2960 &self,
2961 mut name: &str,
2962 ) -> fidl::client::QueryResponseFut<
2963 ManagerRemoveTestNodeResult,
2964 fidl::encoding::DefaultFuchsiaResourceDialect,
2965 > {
2966 ManagerProxyInterface::r#remove_test_node(self, name)
2967 }
2968
2969 pub fn r#wait_for_bootup(
2971 &self,
2972 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
2973 ManagerProxyInterface::r#wait_for_bootup(self)
2974 }
2975
2976 pub fn r#restart_with_dictionary(
2981 &self,
2982 mut moniker: &str,
2983 mut dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
2984 ) -> fidl::client::QueryResponseFut<
2985 ManagerRestartWithDictionaryResult,
2986 fidl::encoding::DefaultFuchsiaResourceDialect,
2987 > {
2988 ManagerProxyInterface::r#restart_with_dictionary(self, moniker, dictionary)
2989 }
2990
2991 pub fn r#rebind_composites_with_driver(
2997 &self,
2998 mut driver_url: &str,
2999 ) -> fidl::client::QueryResponseFut<
3000 ManagerRebindCompositesWithDriverResult,
3001 fidl::encoding::DefaultFuchsiaResourceDialect,
3002 > {
3003 ManagerProxyInterface::r#rebind_composites_with_driver(self, driver_url)
3004 }
3005}
3006
3007impl ManagerProxyInterface for ManagerProxy {
3008 fn r#get_driver_info(
3009 &self,
3010 mut driver_filter: &[String],
3011 mut iterator: fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>,
3012 ) -> Result<(), fidl::Error> {
3013 self.client.send::<ManagerGetDriverInfoRequest>(
3014 (driver_filter, iterator),
3015 0x34b1541e24e5d587,
3016 fidl::encoding::DynamicFlags::FLEXIBLE,
3017 )
3018 }
3019
3020 fn r#get_composite_node_specs(
3021 &self,
3022 mut name_filter: Option<&str>,
3023 mut iterator: fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
3024 ) -> Result<(), fidl::Error> {
3025 self.client.send::<ManagerGetCompositeNodeSpecsRequest>(
3026 (name_filter, iterator),
3027 0x258540c7ff37328f,
3028 fidl::encoding::DynamicFlags::FLEXIBLE,
3029 )
3030 }
3031
3032 fn r#get_node_info(
3033 &self,
3034 mut node_filter: &[String],
3035 mut iterator: fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>,
3036 mut exact_match: bool,
3037 ) -> Result<(), fidl::Error> {
3038 self.client.send::<ManagerGetNodeInfoRequest>(
3039 (node_filter, iterator, exact_match),
3040 0x7c272c6b7bcb4f9e,
3041 fidl::encoding::DynamicFlags::FLEXIBLE,
3042 )
3043 }
3044
3045 fn r#get_composite_info(
3046 &self,
3047 mut iterator: fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>,
3048 ) -> Result<(), fidl::Error> {
3049 self.client.send::<ManagerGetCompositeInfoRequest>(
3050 (iterator,),
3051 0x4456da4372a49a36,
3052 fidl::encoding::DynamicFlags::FLEXIBLE,
3053 )
3054 }
3055
3056 fn r#get_driver_host_info(
3057 &self,
3058 mut iterator: fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>,
3059 ) -> Result<(), fidl::Error> {
3060 self.client.send::<ManagerGetDriverHostInfoRequest>(
3061 (iterator,),
3062 0x366b2c4429d44155,
3063 fidl::encoding::DynamicFlags::FLEXIBLE,
3064 )
3065 }
3066
3067 type RestartDriverHostsResponseFut = fidl::client::QueryResponseFut<
3068 ManagerRestartDriverHostsResult,
3069 fidl::encoding::DefaultFuchsiaResourceDialect,
3070 >;
3071 fn r#restart_driver_hosts(
3072 &self,
3073 mut driver_url: &str,
3074 mut rematch_flags: RestartRematchFlags,
3075 ) -> Self::RestartDriverHostsResponseFut {
3076 fn _decode(
3077 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3078 ) -> Result<ManagerRestartDriverHostsResult, fidl::Error> {
3079 let _response = fidl::client::decode_transaction_body::<
3080 fidl::encoding::FlexibleResultType<ManagerRestartDriverHostsResponse, i32>,
3081 fidl::encoding::DefaultFuchsiaResourceDialect,
3082 0x64fb09a17a4dd8c7,
3083 >(_buf?)?
3084 .into_result::<ManagerMarker>("restart_driver_hosts")?;
3085 Ok(_response.map(|x| x.count))
3086 }
3087 self.client.send_query_and_decode::<
3088 ManagerRestartDriverHostsRequest,
3089 ManagerRestartDriverHostsResult,
3090 >(
3091 (driver_url, rematch_flags,),
3092 0x64fb09a17a4dd8c7,
3093 fidl::encoding::DynamicFlags::FLEXIBLE,
3094 _decode,
3095 )
3096 }
3097
3098 type DisableDriverResponseFut = fidl::client::QueryResponseFut<
3099 ManagerDisableDriverResult,
3100 fidl::encoding::DefaultFuchsiaResourceDialect,
3101 >;
3102 fn r#disable_driver(
3103 &self,
3104 mut driver_url: &str,
3105 mut package_hash: Option<&str>,
3106 ) -> Self::DisableDriverResponseFut {
3107 fn _decode(
3108 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3109 ) -> Result<ManagerDisableDriverResult, fidl::Error> {
3110 let _response = fidl::client::decode_transaction_body::<
3111 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
3112 fidl::encoding::DefaultFuchsiaResourceDialect,
3113 0x3cabde92ba1ac967,
3114 >(_buf?)?
3115 .into_result::<ManagerMarker>("disable_driver")?;
3116 Ok(_response.map(|x| x))
3117 }
3118 self.client
3119 .send_query_and_decode::<ManagerDisableDriverRequest, ManagerDisableDriverResult>(
3120 (driver_url, package_hash),
3121 0x3cabde92ba1ac967,
3122 fidl::encoding::DynamicFlags::FLEXIBLE,
3123 _decode,
3124 )
3125 }
3126
3127 type EnableDriverResponseFut = fidl::client::QueryResponseFut<
3128 ManagerEnableDriverResult,
3129 fidl::encoding::DefaultFuchsiaResourceDialect,
3130 >;
3131 fn r#enable_driver(
3132 &self,
3133 mut driver_url: &str,
3134 mut package_hash: Option<&str>,
3135 ) -> Self::EnableDriverResponseFut {
3136 fn _decode(
3137 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3138 ) -> Result<ManagerEnableDriverResult, fidl::Error> {
3139 let _response = fidl::client::decode_transaction_body::<
3140 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
3141 fidl::encoding::DefaultFuchsiaResourceDialect,
3142 0x76a7518712965faf,
3143 >(_buf?)?
3144 .into_result::<ManagerMarker>("enable_driver")?;
3145 Ok(_response.map(|x| x))
3146 }
3147 self.client.send_query_and_decode::<ManagerEnableDriverRequest, ManagerEnableDriverResult>(
3148 (driver_url, package_hash),
3149 0x76a7518712965faf,
3150 fidl::encoding::DynamicFlags::FLEXIBLE,
3151 _decode,
3152 )
3153 }
3154
3155 type BindAllUnboundNodesResponseFut = fidl::client::QueryResponseFut<
3156 ManagerBindAllUnboundNodesResult,
3157 fidl::encoding::DefaultFuchsiaResourceDialect,
3158 >;
3159 fn r#bind_all_unbound_nodes(&self) -> Self::BindAllUnboundNodesResponseFut {
3160 fn _decode(
3161 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3162 ) -> Result<ManagerBindAllUnboundNodesResult, fidl::Error> {
3163 let _response = fidl::client::decode_transaction_body::<
3164 fidl::encoding::FlexibleResultType<ManagerBindAllUnboundNodesResponse, i32>,
3165 fidl::encoding::DefaultFuchsiaResourceDialect,
3166 0x2b4343fe1cfb9f21,
3167 >(_buf?)?
3168 .into_result::<ManagerMarker>("bind_all_unbound_nodes")?;
3169 Ok(_response.map(|x| x.binding_result))
3170 }
3171 self.client.send_query_and_decode::<
3172 fidl::encoding::EmptyPayload,
3173 ManagerBindAllUnboundNodesResult,
3174 >(
3175 (),
3176 0x2b4343fe1cfb9f21,
3177 fidl::encoding::DynamicFlags::FLEXIBLE,
3178 _decode,
3179 )
3180 }
3181
3182 type AddTestNodeResponseFut = fidl::client::QueryResponseFut<
3183 ManagerAddTestNodeResult,
3184 fidl::encoding::DefaultFuchsiaResourceDialect,
3185 >;
3186 fn r#add_test_node(&self, mut args: &TestNodeAddArgs) -> Self::AddTestNodeResponseFut {
3187 fn _decode(
3188 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3189 ) -> Result<ManagerAddTestNodeResult, fidl::Error> {
3190 let _response = fidl::client::decode_transaction_body::<
3191 fidl::encoding::FlexibleResultType<
3192 fidl::encoding::EmptyStruct,
3193 fidl_fuchsia_driver_framework::NodeError,
3194 >,
3195 fidl::encoding::DefaultFuchsiaResourceDialect,
3196 0x774836bbb7fbc5b9,
3197 >(_buf?)?
3198 .into_result::<ManagerMarker>("add_test_node")?;
3199 Ok(_response.map(|x| x))
3200 }
3201 self.client.send_query_and_decode::<ManagerAddTestNodeRequest, ManagerAddTestNodeResult>(
3202 (args,),
3203 0x774836bbb7fbc5b9,
3204 fidl::encoding::DynamicFlags::FLEXIBLE,
3205 _decode,
3206 )
3207 }
3208
3209 type RemoveTestNodeResponseFut = fidl::client::QueryResponseFut<
3210 ManagerRemoveTestNodeResult,
3211 fidl::encoding::DefaultFuchsiaResourceDialect,
3212 >;
3213 fn r#remove_test_node(&self, mut name: &str) -> Self::RemoveTestNodeResponseFut {
3214 fn _decode(
3215 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3216 ) -> Result<ManagerRemoveTestNodeResult, fidl::Error> {
3217 let _response = fidl::client::decode_transaction_body::<
3218 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
3219 fidl::encoding::DefaultFuchsiaResourceDialect,
3220 0x1618ec4e5fc4010e,
3221 >(_buf?)?
3222 .into_result::<ManagerMarker>("remove_test_node")?;
3223 Ok(_response.map(|x| x))
3224 }
3225 self.client
3226 .send_query_and_decode::<ManagerRemoveTestNodeRequest, ManagerRemoveTestNodeResult>(
3227 (name,),
3228 0x1618ec4e5fc4010e,
3229 fidl::encoding::DynamicFlags::FLEXIBLE,
3230 _decode,
3231 )
3232 }
3233
3234 type WaitForBootupResponseFut =
3235 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
3236 fn r#wait_for_bootup(&self) -> Self::WaitForBootupResponseFut {
3237 fn _decode(
3238 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3239 ) -> Result<(), fidl::Error> {
3240 let _response = fidl::client::decode_transaction_body::<
3241 fidl::encoding::EmptyPayload,
3242 fidl::encoding::DefaultFuchsiaResourceDialect,
3243 0x52077de068225cdc,
3244 >(_buf?)?;
3245 Ok(_response)
3246 }
3247 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
3248 (),
3249 0x52077de068225cdc,
3250 fidl::encoding::DynamicFlags::empty(),
3251 _decode,
3252 )
3253 }
3254
3255 type RestartWithDictionaryResponseFut = fidl::client::QueryResponseFut<
3256 ManagerRestartWithDictionaryResult,
3257 fidl::encoding::DefaultFuchsiaResourceDialect,
3258 >;
3259 fn r#restart_with_dictionary(
3260 &self,
3261 mut moniker: &str,
3262 mut dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
3263 ) -> Self::RestartWithDictionaryResponseFut {
3264 fn _decode(
3265 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3266 ) -> Result<ManagerRestartWithDictionaryResult, fidl::Error> {
3267 let _response = fidl::client::decode_transaction_body::<
3268 fidl::encoding::ResultType<ManagerRestartWithDictionaryResponse, i32>,
3269 fidl::encoding::DefaultFuchsiaResourceDialect,
3270 0x5eb620a85359a10e,
3271 >(_buf?)?;
3272 Ok(_response.map(|x| x.release_fence))
3273 }
3274 self.client.send_query_and_decode::<
3275 ManagerRestartWithDictionaryRequest,
3276 ManagerRestartWithDictionaryResult,
3277 >(
3278 (moniker, &mut dictionary,),
3279 0x5eb620a85359a10e,
3280 fidl::encoding::DynamicFlags::empty(),
3281 _decode,
3282 )
3283 }
3284
3285 type RebindCompositesWithDriverResponseFut = fidl::client::QueryResponseFut<
3286 ManagerRebindCompositesWithDriverResult,
3287 fidl::encoding::DefaultFuchsiaResourceDialect,
3288 >;
3289 fn r#rebind_composites_with_driver(
3290 &self,
3291 mut driver_url: &str,
3292 ) -> Self::RebindCompositesWithDriverResponseFut {
3293 fn _decode(
3294 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3295 ) -> Result<ManagerRebindCompositesWithDriverResult, fidl::Error> {
3296 let _response = fidl::client::decode_transaction_body::<
3297 fidl::encoding::ResultType<ManagerRebindCompositesWithDriverResponse, i32>,
3298 fidl::encoding::DefaultFuchsiaResourceDialect,
3299 0x175d492045f61f28,
3300 >(_buf?)?;
3301 Ok(_response.map(|x| x.count))
3302 }
3303 self.client.send_query_and_decode::<
3304 ManagerRebindCompositesWithDriverRequest,
3305 ManagerRebindCompositesWithDriverResult,
3306 >(
3307 (driver_url,),
3308 0x175d492045f61f28,
3309 fidl::encoding::DynamicFlags::empty(),
3310 _decode,
3311 )
3312 }
3313}
3314
3315pub struct ManagerEventStream {
3316 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3317}
3318
3319impl std::marker::Unpin for ManagerEventStream {}
3320
3321impl futures::stream::FusedStream for ManagerEventStream {
3322 fn is_terminated(&self) -> bool {
3323 self.event_receiver.is_terminated()
3324 }
3325}
3326
3327impl futures::Stream for ManagerEventStream {
3328 type Item = Result<ManagerEvent, fidl::Error>;
3329
3330 fn poll_next(
3331 mut self: std::pin::Pin<&mut Self>,
3332 cx: &mut std::task::Context<'_>,
3333 ) -> std::task::Poll<Option<Self::Item>> {
3334 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3335 &mut self.event_receiver,
3336 cx
3337 )?) {
3338 Some(buf) => std::task::Poll::Ready(Some(ManagerEvent::decode(buf))),
3339 None => std::task::Poll::Ready(None),
3340 }
3341 }
3342}
3343
3344#[derive(Debug)]
3345pub enum ManagerEvent {
3346 #[non_exhaustive]
3347 _UnknownEvent {
3348 ordinal: u64,
3350 },
3351}
3352
3353impl ManagerEvent {
3354 fn decode(
3356 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3357 ) -> Result<ManagerEvent, fidl::Error> {
3358 let (bytes, _handles) = buf.split_mut();
3359 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3360 debug_assert_eq!(tx_header.tx_id, 0);
3361 match tx_header.ordinal {
3362 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3363 Ok(ManagerEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3364 }
3365 _ => Err(fidl::Error::UnknownOrdinal {
3366 ordinal: tx_header.ordinal,
3367 protocol_name: <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3368 }),
3369 }
3370 }
3371}
3372
3373pub struct ManagerRequestStream {
3375 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3376 is_terminated: bool,
3377}
3378
3379impl std::marker::Unpin for ManagerRequestStream {}
3380
3381impl futures::stream::FusedStream for ManagerRequestStream {
3382 fn is_terminated(&self) -> bool {
3383 self.is_terminated
3384 }
3385}
3386
3387impl fidl::endpoints::RequestStream for ManagerRequestStream {
3388 type Protocol = ManagerMarker;
3389 type ControlHandle = ManagerControlHandle;
3390
3391 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3392 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3393 }
3394
3395 fn control_handle(&self) -> Self::ControlHandle {
3396 ManagerControlHandle { inner: self.inner.clone() }
3397 }
3398
3399 fn into_inner(
3400 self,
3401 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3402 {
3403 (self.inner, self.is_terminated)
3404 }
3405
3406 fn from_inner(
3407 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3408 is_terminated: bool,
3409 ) -> Self {
3410 Self { inner, is_terminated }
3411 }
3412}
3413
3414impl futures::Stream for ManagerRequestStream {
3415 type Item = Result<ManagerRequest, fidl::Error>;
3416
3417 fn poll_next(
3418 mut self: std::pin::Pin<&mut Self>,
3419 cx: &mut std::task::Context<'_>,
3420 ) -> std::task::Poll<Option<Self::Item>> {
3421 let this = &mut *self;
3422 if this.inner.check_shutdown(cx) {
3423 this.is_terminated = true;
3424 return std::task::Poll::Ready(None);
3425 }
3426 if this.is_terminated {
3427 panic!("polled ManagerRequestStream after completion");
3428 }
3429 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3430 |bytes, handles| {
3431 match this.inner.channel().read_etc(cx, bytes, handles) {
3432 std::task::Poll::Ready(Ok(())) => {}
3433 std::task::Poll::Pending => return std::task::Poll::Pending,
3434 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3435 this.is_terminated = true;
3436 return std::task::Poll::Ready(None);
3437 }
3438 std::task::Poll::Ready(Err(e)) => {
3439 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3440 e.into(),
3441 ))))
3442 }
3443 }
3444
3445 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3447
3448 std::task::Poll::Ready(Some(match header.ordinal {
3449 0x34b1541e24e5d587 => {
3450 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3451 let mut req = fidl::new_empty!(
3452 ManagerGetDriverInfoRequest,
3453 fidl::encoding::DefaultFuchsiaResourceDialect
3454 );
3455 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerGetDriverInfoRequest>(&header, _body_bytes, handles, &mut req)?;
3456 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3457 Ok(ManagerRequest::GetDriverInfo {
3458 driver_filter: req.driver_filter,
3459 iterator: req.iterator,
3460
3461 control_handle,
3462 })
3463 }
3464 0x258540c7ff37328f => {
3465 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3466 let mut req = fidl::new_empty!(
3467 ManagerGetCompositeNodeSpecsRequest,
3468 fidl::encoding::DefaultFuchsiaResourceDialect
3469 );
3470 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerGetCompositeNodeSpecsRequest>(&header, _body_bytes, handles, &mut req)?;
3471 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3472 Ok(ManagerRequest::GetCompositeNodeSpecs {
3473 name_filter: req.name_filter,
3474 iterator: req.iterator,
3475
3476 control_handle,
3477 })
3478 }
3479 0x7c272c6b7bcb4f9e => {
3480 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3481 let mut req = fidl::new_empty!(
3482 ManagerGetNodeInfoRequest,
3483 fidl::encoding::DefaultFuchsiaResourceDialect
3484 );
3485 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerGetNodeInfoRequest>(&header, _body_bytes, handles, &mut req)?;
3486 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3487 Ok(ManagerRequest::GetNodeInfo {
3488 node_filter: req.node_filter,
3489 iterator: req.iterator,
3490 exact_match: req.exact_match,
3491
3492 control_handle,
3493 })
3494 }
3495 0x4456da4372a49a36 => {
3496 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3497 let mut req = fidl::new_empty!(
3498 ManagerGetCompositeInfoRequest,
3499 fidl::encoding::DefaultFuchsiaResourceDialect
3500 );
3501 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerGetCompositeInfoRequest>(&header, _body_bytes, handles, &mut req)?;
3502 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3503 Ok(ManagerRequest::GetCompositeInfo {
3504 iterator: req.iterator,
3505
3506 control_handle,
3507 })
3508 }
3509 0x366b2c4429d44155 => {
3510 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3511 let mut req = fidl::new_empty!(
3512 ManagerGetDriverHostInfoRequest,
3513 fidl::encoding::DefaultFuchsiaResourceDialect
3514 );
3515 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerGetDriverHostInfoRequest>(&header, _body_bytes, handles, &mut req)?;
3516 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3517 Ok(ManagerRequest::GetDriverHostInfo {
3518 iterator: req.iterator,
3519
3520 control_handle,
3521 })
3522 }
3523 0x64fb09a17a4dd8c7 => {
3524 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3525 let mut req = fidl::new_empty!(
3526 ManagerRestartDriverHostsRequest,
3527 fidl::encoding::DefaultFuchsiaResourceDialect
3528 );
3529 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerRestartDriverHostsRequest>(&header, _body_bytes, handles, &mut req)?;
3530 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3531 Ok(ManagerRequest::RestartDriverHosts {
3532 driver_url: req.driver_url,
3533 rematch_flags: req.rematch_flags,
3534
3535 responder: ManagerRestartDriverHostsResponder {
3536 control_handle: std::mem::ManuallyDrop::new(control_handle),
3537 tx_id: header.tx_id,
3538 },
3539 })
3540 }
3541 0x3cabde92ba1ac967 => {
3542 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3543 let mut req = fidl::new_empty!(
3544 ManagerDisableDriverRequest,
3545 fidl::encoding::DefaultFuchsiaResourceDialect
3546 );
3547 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerDisableDriverRequest>(&header, _body_bytes, handles, &mut req)?;
3548 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3549 Ok(ManagerRequest::DisableDriver {
3550 driver_url: req.driver_url,
3551 package_hash: req.package_hash,
3552
3553 responder: ManagerDisableDriverResponder {
3554 control_handle: std::mem::ManuallyDrop::new(control_handle),
3555 tx_id: header.tx_id,
3556 },
3557 })
3558 }
3559 0x76a7518712965faf => {
3560 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3561 let mut req = fidl::new_empty!(
3562 ManagerEnableDriverRequest,
3563 fidl::encoding::DefaultFuchsiaResourceDialect
3564 );
3565 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerEnableDriverRequest>(&header, _body_bytes, handles, &mut req)?;
3566 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3567 Ok(ManagerRequest::EnableDriver {
3568 driver_url: req.driver_url,
3569 package_hash: req.package_hash,
3570
3571 responder: ManagerEnableDriverResponder {
3572 control_handle: std::mem::ManuallyDrop::new(control_handle),
3573 tx_id: header.tx_id,
3574 },
3575 })
3576 }
3577 0x2b4343fe1cfb9f21 => {
3578 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3579 let mut req = fidl::new_empty!(
3580 fidl::encoding::EmptyPayload,
3581 fidl::encoding::DefaultFuchsiaResourceDialect
3582 );
3583 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3584 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3585 Ok(ManagerRequest::BindAllUnboundNodes {
3586 responder: ManagerBindAllUnboundNodesResponder {
3587 control_handle: std::mem::ManuallyDrop::new(control_handle),
3588 tx_id: header.tx_id,
3589 },
3590 })
3591 }
3592 0x774836bbb7fbc5b9 => {
3593 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3594 let mut req = fidl::new_empty!(
3595 ManagerAddTestNodeRequest,
3596 fidl::encoding::DefaultFuchsiaResourceDialect
3597 );
3598 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerAddTestNodeRequest>(&header, _body_bytes, handles, &mut req)?;
3599 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3600 Ok(ManagerRequest::AddTestNode {
3601 args: req.args,
3602
3603 responder: ManagerAddTestNodeResponder {
3604 control_handle: std::mem::ManuallyDrop::new(control_handle),
3605 tx_id: header.tx_id,
3606 },
3607 })
3608 }
3609 0x1618ec4e5fc4010e => {
3610 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3611 let mut req = fidl::new_empty!(
3612 ManagerRemoveTestNodeRequest,
3613 fidl::encoding::DefaultFuchsiaResourceDialect
3614 );
3615 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerRemoveTestNodeRequest>(&header, _body_bytes, handles, &mut req)?;
3616 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3617 Ok(ManagerRequest::RemoveTestNode {
3618 name: req.name,
3619
3620 responder: ManagerRemoveTestNodeResponder {
3621 control_handle: std::mem::ManuallyDrop::new(control_handle),
3622 tx_id: header.tx_id,
3623 },
3624 })
3625 }
3626 0x52077de068225cdc => {
3627 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3628 let mut req = fidl::new_empty!(
3629 fidl::encoding::EmptyPayload,
3630 fidl::encoding::DefaultFuchsiaResourceDialect
3631 );
3632 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3633 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3634 Ok(ManagerRequest::WaitForBootup {
3635 responder: ManagerWaitForBootupResponder {
3636 control_handle: std::mem::ManuallyDrop::new(control_handle),
3637 tx_id: header.tx_id,
3638 },
3639 })
3640 }
3641 0x5eb620a85359a10e => {
3642 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3643 let mut req = fidl::new_empty!(
3644 ManagerRestartWithDictionaryRequest,
3645 fidl::encoding::DefaultFuchsiaResourceDialect
3646 );
3647 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerRestartWithDictionaryRequest>(&header, _body_bytes, handles, &mut req)?;
3648 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3649 Ok(ManagerRequest::RestartWithDictionary {
3650 moniker: req.moniker,
3651 dictionary: req.dictionary,
3652
3653 responder: ManagerRestartWithDictionaryResponder {
3654 control_handle: std::mem::ManuallyDrop::new(control_handle),
3655 tx_id: header.tx_id,
3656 },
3657 })
3658 }
3659 0x175d492045f61f28 => {
3660 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3661 let mut req = fidl::new_empty!(
3662 ManagerRebindCompositesWithDriverRequest,
3663 fidl::encoding::DefaultFuchsiaResourceDialect
3664 );
3665 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerRebindCompositesWithDriverRequest>(&header, _body_bytes, handles, &mut req)?;
3666 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3667 Ok(ManagerRequest::RebindCompositesWithDriver {
3668 driver_url: req.driver_url,
3669
3670 responder: ManagerRebindCompositesWithDriverResponder {
3671 control_handle: std::mem::ManuallyDrop::new(control_handle),
3672 tx_id: header.tx_id,
3673 },
3674 })
3675 }
3676 _ if header.tx_id == 0
3677 && header
3678 .dynamic_flags()
3679 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3680 {
3681 Ok(ManagerRequest::_UnknownMethod {
3682 ordinal: header.ordinal,
3683 control_handle: ManagerControlHandle { inner: this.inner.clone() },
3684 method_type: fidl::MethodType::OneWay,
3685 })
3686 }
3687 _ if header
3688 .dynamic_flags()
3689 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3690 {
3691 this.inner.send_framework_err(
3692 fidl::encoding::FrameworkErr::UnknownMethod,
3693 header.tx_id,
3694 header.ordinal,
3695 header.dynamic_flags(),
3696 (bytes, handles),
3697 )?;
3698 Ok(ManagerRequest::_UnknownMethod {
3699 ordinal: header.ordinal,
3700 control_handle: ManagerControlHandle { inner: this.inner.clone() },
3701 method_type: fidl::MethodType::TwoWay,
3702 })
3703 }
3704 _ => Err(fidl::Error::UnknownOrdinal {
3705 ordinal: header.ordinal,
3706 protocol_name:
3707 <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3708 }),
3709 }))
3710 },
3711 )
3712 }
3713}
3714
3715#[derive(Debug)]
3718pub enum ManagerRequest {
3719 GetDriverInfo {
3729 driver_filter: Vec<String>,
3730 iterator: fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>,
3731 control_handle: ManagerControlHandle,
3732 },
3733 GetCompositeNodeSpecs {
3741 name_filter: Option<String>,
3742 iterator: fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
3743 control_handle: ManagerControlHandle,
3744 },
3745 GetNodeInfo {
3758 node_filter: Vec<String>,
3759 iterator: fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>,
3760 exact_match: bool,
3761 control_handle: ManagerControlHandle,
3762 },
3763 GetCompositeInfo {
3766 iterator: fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>,
3767 control_handle: ManagerControlHandle,
3768 },
3769 GetDriverHostInfo {
3771 iterator: fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>,
3772 control_handle: ManagerControlHandle,
3773 },
3774 RestartDriverHosts {
3779 driver_url: String,
3780 rematch_flags: RestartRematchFlags,
3781 responder: ManagerRestartDriverHostsResponder,
3782 },
3783 DisableDriver {
3790 driver_url: String,
3791 package_hash: Option<String>,
3792 responder: ManagerDisableDriverResponder,
3793 },
3794 EnableDriver {
3798 driver_url: String,
3799 package_hash: Option<String>,
3800 responder: ManagerEnableDriverResponder,
3801 },
3802 BindAllUnboundNodes { responder: ManagerBindAllUnboundNodesResponder },
3805 AddTestNode { args: TestNodeAddArgs, responder: ManagerAddTestNodeResponder },
3807 RemoveTestNode { name: String, responder: ManagerRemoveTestNodeResponder },
3810 WaitForBootup { responder: ManagerWaitForBootupResponder },
3812 RestartWithDictionary {
3817 moniker: String,
3818 dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
3819 responder: ManagerRestartWithDictionaryResponder,
3820 },
3821 RebindCompositesWithDriver {
3827 driver_url: String,
3828 responder: ManagerRebindCompositesWithDriverResponder,
3829 },
3830 #[non_exhaustive]
3832 _UnknownMethod {
3833 ordinal: u64,
3835 control_handle: ManagerControlHandle,
3836 method_type: fidl::MethodType,
3837 },
3838}
3839
3840impl ManagerRequest {
3841 #[allow(irrefutable_let_patterns)]
3842 pub fn into_get_driver_info(
3843 self,
3844 ) -> Option<(
3845 Vec<String>,
3846 fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>,
3847 ManagerControlHandle,
3848 )> {
3849 if let ManagerRequest::GetDriverInfo { driver_filter, iterator, control_handle } = self {
3850 Some((driver_filter, iterator, control_handle))
3851 } else {
3852 None
3853 }
3854 }
3855
3856 #[allow(irrefutable_let_patterns)]
3857 pub fn into_get_composite_node_specs(
3858 self,
3859 ) -> Option<(
3860 Option<String>,
3861 fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
3862 ManagerControlHandle,
3863 )> {
3864 if let ManagerRequest::GetCompositeNodeSpecs { name_filter, iterator, control_handle } =
3865 self
3866 {
3867 Some((name_filter, iterator, control_handle))
3868 } else {
3869 None
3870 }
3871 }
3872
3873 #[allow(irrefutable_let_patterns)]
3874 pub fn into_get_node_info(
3875 self,
3876 ) -> Option<(
3877 Vec<String>,
3878 fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>,
3879 bool,
3880 ManagerControlHandle,
3881 )> {
3882 if let ManagerRequest::GetNodeInfo { node_filter, iterator, exact_match, control_handle } =
3883 self
3884 {
3885 Some((node_filter, iterator, exact_match, control_handle))
3886 } else {
3887 None
3888 }
3889 }
3890
3891 #[allow(irrefutable_let_patterns)]
3892 pub fn into_get_composite_info(
3893 self,
3894 ) -> Option<(fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>, ManagerControlHandle)>
3895 {
3896 if let ManagerRequest::GetCompositeInfo { iterator, control_handle } = self {
3897 Some((iterator, control_handle))
3898 } else {
3899 None
3900 }
3901 }
3902
3903 #[allow(irrefutable_let_patterns)]
3904 pub fn into_get_driver_host_info(
3905 self,
3906 ) -> Option<(fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>, ManagerControlHandle)>
3907 {
3908 if let ManagerRequest::GetDriverHostInfo { iterator, control_handle } = self {
3909 Some((iterator, control_handle))
3910 } else {
3911 None
3912 }
3913 }
3914
3915 #[allow(irrefutable_let_patterns)]
3916 pub fn into_restart_driver_hosts(
3917 self,
3918 ) -> Option<(String, RestartRematchFlags, ManagerRestartDriverHostsResponder)> {
3919 if let ManagerRequest::RestartDriverHosts { driver_url, rematch_flags, responder } = self {
3920 Some((driver_url, rematch_flags, responder))
3921 } else {
3922 None
3923 }
3924 }
3925
3926 #[allow(irrefutable_let_patterns)]
3927 pub fn into_disable_driver(
3928 self,
3929 ) -> Option<(String, Option<String>, ManagerDisableDriverResponder)> {
3930 if let ManagerRequest::DisableDriver { driver_url, package_hash, responder } = self {
3931 Some((driver_url, package_hash, responder))
3932 } else {
3933 None
3934 }
3935 }
3936
3937 #[allow(irrefutable_let_patterns)]
3938 pub fn into_enable_driver(
3939 self,
3940 ) -> Option<(String, Option<String>, ManagerEnableDriverResponder)> {
3941 if let ManagerRequest::EnableDriver { driver_url, package_hash, responder } = self {
3942 Some((driver_url, package_hash, responder))
3943 } else {
3944 None
3945 }
3946 }
3947
3948 #[allow(irrefutable_let_patterns)]
3949 pub fn into_bind_all_unbound_nodes(self) -> Option<(ManagerBindAllUnboundNodesResponder)> {
3950 if let ManagerRequest::BindAllUnboundNodes { responder } = self {
3951 Some((responder))
3952 } else {
3953 None
3954 }
3955 }
3956
3957 #[allow(irrefutable_let_patterns)]
3958 pub fn into_add_test_node(self) -> Option<(TestNodeAddArgs, ManagerAddTestNodeResponder)> {
3959 if let ManagerRequest::AddTestNode { args, responder } = self {
3960 Some((args, responder))
3961 } else {
3962 None
3963 }
3964 }
3965
3966 #[allow(irrefutable_let_patterns)]
3967 pub fn into_remove_test_node(self) -> Option<(String, ManagerRemoveTestNodeResponder)> {
3968 if let ManagerRequest::RemoveTestNode { name, responder } = self {
3969 Some((name, responder))
3970 } else {
3971 None
3972 }
3973 }
3974
3975 #[allow(irrefutable_let_patterns)]
3976 pub fn into_wait_for_bootup(self) -> Option<(ManagerWaitForBootupResponder)> {
3977 if let ManagerRequest::WaitForBootup { responder } = self {
3978 Some((responder))
3979 } else {
3980 None
3981 }
3982 }
3983
3984 #[allow(irrefutable_let_patterns)]
3985 pub fn into_restart_with_dictionary(
3986 self,
3987 ) -> Option<(
3988 String,
3989 fidl_fuchsia_component_sandbox::DictionaryRef,
3990 ManagerRestartWithDictionaryResponder,
3991 )> {
3992 if let ManagerRequest::RestartWithDictionary { moniker, dictionary, responder } = self {
3993 Some((moniker, dictionary, responder))
3994 } else {
3995 None
3996 }
3997 }
3998
3999 #[allow(irrefutable_let_patterns)]
4000 pub fn into_rebind_composites_with_driver(
4001 self,
4002 ) -> Option<(String, ManagerRebindCompositesWithDriverResponder)> {
4003 if let ManagerRequest::RebindCompositesWithDriver { driver_url, responder } = self {
4004 Some((driver_url, responder))
4005 } else {
4006 None
4007 }
4008 }
4009
4010 pub fn method_name(&self) -> &'static str {
4012 match *self {
4013 ManagerRequest::GetDriverInfo { .. } => "get_driver_info",
4014 ManagerRequest::GetCompositeNodeSpecs { .. } => "get_composite_node_specs",
4015 ManagerRequest::GetNodeInfo { .. } => "get_node_info",
4016 ManagerRequest::GetCompositeInfo { .. } => "get_composite_info",
4017 ManagerRequest::GetDriverHostInfo { .. } => "get_driver_host_info",
4018 ManagerRequest::RestartDriverHosts { .. } => "restart_driver_hosts",
4019 ManagerRequest::DisableDriver { .. } => "disable_driver",
4020 ManagerRequest::EnableDriver { .. } => "enable_driver",
4021 ManagerRequest::BindAllUnboundNodes { .. } => "bind_all_unbound_nodes",
4022 ManagerRequest::AddTestNode { .. } => "add_test_node",
4023 ManagerRequest::RemoveTestNode { .. } => "remove_test_node",
4024 ManagerRequest::WaitForBootup { .. } => "wait_for_bootup",
4025 ManagerRequest::RestartWithDictionary { .. } => "restart_with_dictionary",
4026 ManagerRequest::RebindCompositesWithDriver { .. } => "rebind_composites_with_driver",
4027 ManagerRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
4028 "unknown one-way method"
4029 }
4030 ManagerRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
4031 "unknown two-way method"
4032 }
4033 }
4034 }
4035}
4036
4037#[derive(Debug, Clone)]
4038pub struct ManagerControlHandle {
4039 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4040}
4041
4042impl fidl::endpoints::ControlHandle for ManagerControlHandle {
4043 fn shutdown(&self) {
4044 self.inner.shutdown()
4045 }
4046 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4047 self.inner.shutdown_with_epitaph(status)
4048 }
4049
4050 fn is_closed(&self) -> bool {
4051 self.inner.channel().is_closed()
4052 }
4053 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4054 self.inner.channel().on_closed()
4055 }
4056
4057 #[cfg(target_os = "fuchsia")]
4058 fn signal_peer(
4059 &self,
4060 clear_mask: zx::Signals,
4061 set_mask: zx::Signals,
4062 ) -> Result<(), zx_status::Status> {
4063 use fidl::Peered;
4064 self.inner.channel().signal_peer(clear_mask, set_mask)
4065 }
4066}
4067
4068impl ManagerControlHandle {}
4069
4070#[must_use = "FIDL methods require a response to be sent"]
4071#[derive(Debug)]
4072pub struct ManagerRestartDriverHostsResponder {
4073 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4074 tx_id: u32,
4075}
4076
4077impl std::ops::Drop for ManagerRestartDriverHostsResponder {
4081 fn drop(&mut self) {
4082 self.control_handle.shutdown();
4083 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4085 }
4086}
4087
4088impl fidl::endpoints::Responder for ManagerRestartDriverHostsResponder {
4089 type ControlHandle = ManagerControlHandle;
4090
4091 fn control_handle(&self) -> &ManagerControlHandle {
4092 &self.control_handle
4093 }
4094
4095 fn drop_without_shutdown(mut self) {
4096 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4098 std::mem::forget(self);
4100 }
4101}
4102
4103impl ManagerRestartDriverHostsResponder {
4104 pub fn send(self, mut result: Result<u32, i32>) -> Result<(), fidl::Error> {
4108 let _result = self.send_raw(result);
4109 if _result.is_err() {
4110 self.control_handle.shutdown();
4111 }
4112 self.drop_without_shutdown();
4113 _result
4114 }
4115
4116 pub fn send_no_shutdown_on_err(self, mut result: Result<u32, i32>) -> Result<(), fidl::Error> {
4118 let _result = self.send_raw(result);
4119 self.drop_without_shutdown();
4120 _result
4121 }
4122
4123 fn send_raw(&self, mut result: Result<u32, i32>) -> Result<(), fidl::Error> {
4124 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4125 ManagerRestartDriverHostsResponse,
4126 i32,
4127 >>(
4128 fidl::encoding::FlexibleResult::new(result.map(|count| (count,))),
4129 self.tx_id,
4130 0x64fb09a17a4dd8c7,
4131 fidl::encoding::DynamicFlags::FLEXIBLE,
4132 )
4133 }
4134}
4135
4136#[must_use = "FIDL methods require a response to be sent"]
4137#[derive(Debug)]
4138pub struct ManagerDisableDriverResponder {
4139 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4140 tx_id: u32,
4141}
4142
4143impl std::ops::Drop for ManagerDisableDriverResponder {
4147 fn drop(&mut self) {
4148 self.control_handle.shutdown();
4149 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4151 }
4152}
4153
4154impl fidl::endpoints::Responder for ManagerDisableDriverResponder {
4155 type ControlHandle = ManagerControlHandle;
4156
4157 fn control_handle(&self) -> &ManagerControlHandle {
4158 &self.control_handle
4159 }
4160
4161 fn drop_without_shutdown(mut self) {
4162 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4164 std::mem::forget(self);
4166 }
4167}
4168
4169impl ManagerDisableDriverResponder {
4170 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4174 let _result = self.send_raw(result);
4175 if _result.is_err() {
4176 self.control_handle.shutdown();
4177 }
4178 self.drop_without_shutdown();
4179 _result
4180 }
4181
4182 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4184 let _result = self.send_raw(result);
4185 self.drop_without_shutdown();
4186 _result
4187 }
4188
4189 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4190 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4191 fidl::encoding::EmptyStruct,
4192 i32,
4193 >>(
4194 fidl::encoding::FlexibleResult::new(result),
4195 self.tx_id,
4196 0x3cabde92ba1ac967,
4197 fidl::encoding::DynamicFlags::FLEXIBLE,
4198 )
4199 }
4200}
4201
4202#[must_use = "FIDL methods require a response to be sent"]
4203#[derive(Debug)]
4204pub struct ManagerEnableDriverResponder {
4205 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4206 tx_id: u32,
4207}
4208
4209impl std::ops::Drop for ManagerEnableDriverResponder {
4213 fn drop(&mut self) {
4214 self.control_handle.shutdown();
4215 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4217 }
4218}
4219
4220impl fidl::endpoints::Responder for ManagerEnableDriverResponder {
4221 type ControlHandle = ManagerControlHandle;
4222
4223 fn control_handle(&self) -> &ManagerControlHandle {
4224 &self.control_handle
4225 }
4226
4227 fn drop_without_shutdown(mut self) {
4228 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4230 std::mem::forget(self);
4232 }
4233}
4234
4235impl ManagerEnableDriverResponder {
4236 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4240 let _result = self.send_raw(result);
4241 if _result.is_err() {
4242 self.control_handle.shutdown();
4243 }
4244 self.drop_without_shutdown();
4245 _result
4246 }
4247
4248 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4250 let _result = self.send_raw(result);
4251 self.drop_without_shutdown();
4252 _result
4253 }
4254
4255 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4256 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4257 fidl::encoding::EmptyStruct,
4258 i32,
4259 >>(
4260 fidl::encoding::FlexibleResult::new(result),
4261 self.tx_id,
4262 0x76a7518712965faf,
4263 fidl::encoding::DynamicFlags::FLEXIBLE,
4264 )
4265 }
4266}
4267
4268#[must_use = "FIDL methods require a response to be sent"]
4269#[derive(Debug)]
4270pub struct ManagerBindAllUnboundNodesResponder {
4271 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4272 tx_id: u32,
4273}
4274
4275impl std::ops::Drop for ManagerBindAllUnboundNodesResponder {
4279 fn drop(&mut self) {
4280 self.control_handle.shutdown();
4281 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4283 }
4284}
4285
4286impl fidl::endpoints::Responder for ManagerBindAllUnboundNodesResponder {
4287 type ControlHandle = ManagerControlHandle;
4288
4289 fn control_handle(&self) -> &ManagerControlHandle {
4290 &self.control_handle
4291 }
4292
4293 fn drop_without_shutdown(mut self) {
4294 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4296 std::mem::forget(self);
4298 }
4299}
4300
4301impl ManagerBindAllUnboundNodesResponder {
4302 pub fn send(self, mut result: Result<&[NodeBindingInfo], i32>) -> Result<(), fidl::Error> {
4306 let _result = self.send_raw(result);
4307 if _result.is_err() {
4308 self.control_handle.shutdown();
4309 }
4310 self.drop_without_shutdown();
4311 _result
4312 }
4313
4314 pub fn send_no_shutdown_on_err(
4316 self,
4317 mut result: Result<&[NodeBindingInfo], i32>,
4318 ) -> Result<(), fidl::Error> {
4319 let _result = self.send_raw(result);
4320 self.drop_without_shutdown();
4321 _result
4322 }
4323
4324 fn send_raw(&self, mut result: Result<&[NodeBindingInfo], i32>) -> Result<(), fidl::Error> {
4325 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4326 ManagerBindAllUnboundNodesResponse,
4327 i32,
4328 >>(
4329 fidl::encoding::FlexibleResult::new(result.map(|binding_result| (binding_result,))),
4330 self.tx_id,
4331 0x2b4343fe1cfb9f21,
4332 fidl::encoding::DynamicFlags::FLEXIBLE,
4333 )
4334 }
4335}
4336
4337#[must_use = "FIDL methods require a response to be sent"]
4338#[derive(Debug)]
4339pub struct ManagerAddTestNodeResponder {
4340 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4341 tx_id: u32,
4342}
4343
4344impl std::ops::Drop for ManagerAddTestNodeResponder {
4348 fn drop(&mut self) {
4349 self.control_handle.shutdown();
4350 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4352 }
4353}
4354
4355impl fidl::endpoints::Responder for ManagerAddTestNodeResponder {
4356 type ControlHandle = ManagerControlHandle;
4357
4358 fn control_handle(&self) -> &ManagerControlHandle {
4359 &self.control_handle
4360 }
4361
4362 fn drop_without_shutdown(mut self) {
4363 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4365 std::mem::forget(self);
4367 }
4368}
4369
4370impl ManagerAddTestNodeResponder {
4371 pub fn send(
4375 self,
4376 mut result: Result<(), fidl_fuchsia_driver_framework::NodeError>,
4377 ) -> Result<(), fidl::Error> {
4378 let _result = self.send_raw(result);
4379 if _result.is_err() {
4380 self.control_handle.shutdown();
4381 }
4382 self.drop_without_shutdown();
4383 _result
4384 }
4385
4386 pub fn send_no_shutdown_on_err(
4388 self,
4389 mut result: Result<(), fidl_fuchsia_driver_framework::NodeError>,
4390 ) -> Result<(), fidl::Error> {
4391 let _result = self.send_raw(result);
4392 self.drop_without_shutdown();
4393 _result
4394 }
4395
4396 fn send_raw(
4397 &self,
4398 mut result: Result<(), fidl_fuchsia_driver_framework::NodeError>,
4399 ) -> Result<(), fidl::Error> {
4400 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4401 fidl::encoding::EmptyStruct,
4402 fidl_fuchsia_driver_framework::NodeError,
4403 >>(
4404 fidl::encoding::FlexibleResult::new(result),
4405 self.tx_id,
4406 0x774836bbb7fbc5b9,
4407 fidl::encoding::DynamicFlags::FLEXIBLE,
4408 )
4409 }
4410}
4411
4412#[must_use = "FIDL methods require a response to be sent"]
4413#[derive(Debug)]
4414pub struct ManagerRemoveTestNodeResponder {
4415 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4416 tx_id: u32,
4417}
4418
4419impl std::ops::Drop for ManagerRemoveTestNodeResponder {
4423 fn drop(&mut self) {
4424 self.control_handle.shutdown();
4425 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4427 }
4428}
4429
4430impl fidl::endpoints::Responder for ManagerRemoveTestNodeResponder {
4431 type ControlHandle = ManagerControlHandle;
4432
4433 fn control_handle(&self) -> &ManagerControlHandle {
4434 &self.control_handle
4435 }
4436
4437 fn drop_without_shutdown(mut self) {
4438 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4440 std::mem::forget(self);
4442 }
4443}
4444
4445impl ManagerRemoveTestNodeResponder {
4446 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4450 let _result = self.send_raw(result);
4451 if _result.is_err() {
4452 self.control_handle.shutdown();
4453 }
4454 self.drop_without_shutdown();
4455 _result
4456 }
4457
4458 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4460 let _result = self.send_raw(result);
4461 self.drop_without_shutdown();
4462 _result
4463 }
4464
4465 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4466 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4467 fidl::encoding::EmptyStruct,
4468 i32,
4469 >>(
4470 fidl::encoding::FlexibleResult::new(result),
4471 self.tx_id,
4472 0x1618ec4e5fc4010e,
4473 fidl::encoding::DynamicFlags::FLEXIBLE,
4474 )
4475 }
4476}
4477
4478#[must_use = "FIDL methods require a response to be sent"]
4479#[derive(Debug)]
4480pub struct ManagerWaitForBootupResponder {
4481 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4482 tx_id: u32,
4483}
4484
4485impl std::ops::Drop for ManagerWaitForBootupResponder {
4489 fn drop(&mut self) {
4490 self.control_handle.shutdown();
4491 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4493 }
4494}
4495
4496impl fidl::endpoints::Responder for ManagerWaitForBootupResponder {
4497 type ControlHandle = ManagerControlHandle;
4498
4499 fn control_handle(&self) -> &ManagerControlHandle {
4500 &self.control_handle
4501 }
4502
4503 fn drop_without_shutdown(mut self) {
4504 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4506 std::mem::forget(self);
4508 }
4509}
4510
4511impl ManagerWaitForBootupResponder {
4512 pub fn send(self) -> Result<(), fidl::Error> {
4516 let _result = self.send_raw();
4517 if _result.is_err() {
4518 self.control_handle.shutdown();
4519 }
4520 self.drop_without_shutdown();
4521 _result
4522 }
4523
4524 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
4526 let _result = self.send_raw();
4527 self.drop_without_shutdown();
4528 _result
4529 }
4530
4531 fn send_raw(&self) -> Result<(), fidl::Error> {
4532 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
4533 (),
4534 self.tx_id,
4535 0x52077de068225cdc,
4536 fidl::encoding::DynamicFlags::empty(),
4537 )
4538 }
4539}
4540
4541#[must_use = "FIDL methods require a response to be sent"]
4542#[derive(Debug)]
4543pub struct ManagerRestartWithDictionaryResponder {
4544 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4545 tx_id: u32,
4546}
4547
4548impl std::ops::Drop for ManagerRestartWithDictionaryResponder {
4552 fn drop(&mut self) {
4553 self.control_handle.shutdown();
4554 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4556 }
4557}
4558
4559impl fidl::endpoints::Responder for ManagerRestartWithDictionaryResponder {
4560 type ControlHandle = ManagerControlHandle;
4561
4562 fn control_handle(&self) -> &ManagerControlHandle {
4563 &self.control_handle
4564 }
4565
4566 fn drop_without_shutdown(mut self) {
4567 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4569 std::mem::forget(self);
4571 }
4572}
4573
4574impl ManagerRestartWithDictionaryResponder {
4575 pub fn send(self, mut result: Result<fidl::EventPair, i32>) -> Result<(), fidl::Error> {
4579 let _result = self.send_raw(result);
4580 if _result.is_err() {
4581 self.control_handle.shutdown();
4582 }
4583 self.drop_without_shutdown();
4584 _result
4585 }
4586
4587 pub fn send_no_shutdown_on_err(
4589 self,
4590 mut result: Result<fidl::EventPair, i32>,
4591 ) -> Result<(), fidl::Error> {
4592 let _result = self.send_raw(result);
4593 self.drop_without_shutdown();
4594 _result
4595 }
4596
4597 fn send_raw(&self, mut result: Result<fidl::EventPair, i32>) -> Result<(), fidl::Error> {
4598 self.control_handle.inner.send::<fidl::encoding::ResultType<
4599 ManagerRestartWithDictionaryResponse,
4600 i32,
4601 >>(
4602 result.map(|release_fence| (release_fence,)),
4603 self.tx_id,
4604 0x5eb620a85359a10e,
4605 fidl::encoding::DynamicFlags::empty(),
4606 )
4607 }
4608}
4609
4610#[must_use = "FIDL methods require a response to be sent"]
4611#[derive(Debug)]
4612pub struct ManagerRebindCompositesWithDriverResponder {
4613 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4614 tx_id: u32,
4615}
4616
4617impl std::ops::Drop for ManagerRebindCompositesWithDriverResponder {
4621 fn drop(&mut self) {
4622 self.control_handle.shutdown();
4623 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4625 }
4626}
4627
4628impl fidl::endpoints::Responder for ManagerRebindCompositesWithDriverResponder {
4629 type ControlHandle = ManagerControlHandle;
4630
4631 fn control_handle(&self) -> &ManagerControlHandle {
4632 &self.control_handle
4633 }
4634
4635 fn drop_without_shutdown(mut self) {
4636 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4638 std::mem::forget(self);
4640 }
4641}
4642
4643impl ManagerRebindCompositesWithDriverResponder {
4644 pub fn send(self, mut result: Result<u32, i32>) -> Result<(), fidl::Error> {
4648 let _result = self.send_raw(result);
4649 if _result.is_err() {
4650 self.control_handle.shutdown();
4651 }
4652 self.drop_without_shutdown();
4653 _result
4654 }
4655
4656 pub fn send_no_shutdown_on_err(self, mut result: Result<u32, i32>) -> Result<(), fidl::Error> {
4658 let _result = self.send_raw(result);
4659 self.drop_without_shutdown();
4660 _result
4661 }
4662
4663 fn send_raw(&self, mut result: Result<u32, i32>) -> Result<(), fidl::Error> {
4664 self.control_handle.inner.send::<fidl::encoding::ResultType<
4665 ManagerRebindCompositesWithDriverResponse,
4666 i32,
4667 >>(
4668 result.map(|count| (count,)),
4669 self.tx_id,
4670 0x175d492045f61f28,
4671 fidl::encoding::DynamicFlags::empty(),
4672 )
4673 }
4674}
4675
4676#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4677pub struct NodeInfoIteratorMarker;
4678
4679impl fidl::endpoints::ProtocolMarker for NodeInfoIteratorMarker {
4680 type Proxy = NodeInfoIteratorProxy;
4681 type RequestStream = NodeInfoIteratorRequestStream;
4682 #[cfg(target_os = "fuchsia")]
4683 type SynchronousProxy = NodeInfoIteratorSynchronousProxy;
4684
4685 const DEBUG_NAME: &'static str = "(anonymous) NodeInfoIterator";
4686}
4687
4688pub trait NodeInfoIteratorProxyInterface: Send + Sync {
4689 type GetNextResponseFut: std::future::Future<Output = Result<Vec<NodeInfo>, fidl::Error>> + Send;
4690 fn r#get_next(&self) -> Self::GetNextResponseFut;
4691}
4692#[derive(Debug)]
4693#[cfg(target_os = "fuchsia")]
4694pub struct NodeInfoIteratorSynchronousProxy {
4695 client: fidl::client::sync::Client,
4696}
4697
4698#[cfg(target_os = "fuchsia")]
4699impl fidl::endpoints::SynchronousProxy for NodeInfoIteratorSynchronousProxy {
4700 type Proxy = NodeInfoIteratorProxy;
4701 type Protocol = NodeInfoIteratorMarker;
4702
4703 fn from_channel(inner: fidl::Channel) -> Self {
4704 Self::new(inner)
4705 }
4706
4707 fn into_channel(self) -> fidl::Channel {
4708 self.client.into_channel()
4709 }
4710
4711 fn as_channel(&self) -> &fidl::Channel {
4712 self.client.as_channel()
4713 }
4714}
4715
4716#[cfg(target_os = "fuchsia")]
4717impl NodeInfoIteratorSynchronousProxy {
4718 pub fn new(channel: fidl::Channel) -> Self {
4719 let protocol_name = <NodeInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4720 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4721 }
4722
4723 pub fn into_channel(self) -> fidl::Channel {
4724 self.client.into_channel()
4725 }
4726
4727 pub fn wait_for_event(
4730 &self,
4731 deadline: zx::MonotonicInstant,
4732 ) -> Result<NodeInfoIteratorEvent, fidl::Error> {
4733 NodeInfoIteratorEvent::decode(self.client.wait_for_event(deadline)?)
4734 }
4735
4736 pub fn r#get_next(
4738 &self,
4739 ___deadline: zx::MonotonicInstant,
4740 ) -> Result<Vec<NodeInfo>, fidl::Error> {
4741 let _response = self
4742 .client
4743 .send_query::<fidl::encoding::EmptyPayload, NodeInfoIteratorGetNextResponse>(
4744 (),
4745 0x33c7c070412f889f,
4746 fidl::encoding::DynamicFlags::empty(),
4747 ___deadline,
4748 )?;
4749 Ok(_response.nodes)
4750 }
4751}
4752
4753#[cfg(target_os = "fuchsia")]
4754impl From<NodeInfoIteratorSynchronousProxy> for zx::Handle {
4755 fn from(value: NodeInfoIteratorSynchronousProxy) -> Self {
4756 value.into_channel().into()
4757 }
4758}
4759
4760#[cfg(target_os = "fuchsia")]
4761impl From<fidl::Channel> for NodeInfoIteratorSynchronousProxy {
4762 fn from(value: fidl::Channel) -> Self {
4763 Self::new(value)
4764 }
4765}
4766
4767#[derive(Debug, Clone)]
4768pub struct NodeInfoIteratorProxy {
4769 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4770}
4771
4772impl fidl::endpoints::Proxy for NodeInfoIteratorProxy {
4773 type Protocol = NodeInfoIteratorMarker;
4774
4775 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4776 Self::new(inner)
4777 }
4778
4779 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4780 self.client.into_channel().map_err(|client| Self { client })
4781 }
4782
4783 fn as_channel(&self) -> &::fidl::AsyncChannel {
4784 self.client.as_channel()
4785 }
4786}
4787
4788impl NodeInfoIteratorProxy {
4789 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4791 let protocol_name = <NodeInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4792 Self { client: fidl::client::Client::new(channel, protocol_name) }
4793 }
4794
4795 pub fn take_event_stream(&self) -> NodeInfoIteratorEventStream {
4801 NodeInfoIteratorEventStream { event_receiver: self.client.take_event_receiver() }
4802 }
4803
4804 pub fn r#get_next(
4806 &self,
4807 ) -> fidl::client::QueryResponseFut<Vec<NodeInfo>, fidl::encoding::DefaultFuchsiaResourceDialect>
4808 {
4809 NodeInfoIteratorProxyInterface::r#get_next(self)
4810 }
4811}
4812
4813impl NodeInfoIteratorProxyInterface for NodeInfoIteratorProxy {
4814 type GetNextResponseFut = fidl::client::QueryResponseFut<
4815 Vec<NodeInfo>,
4816 fidl::encoding::DefaultFuchsiaResourceDialect,
4817 >;
4818 fn r#get_next(&self) -> Self::GetNextResponseFut {
4819 fn _decode(
4820 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4821 ) -> Result<Vec<NodeInfo>, fidl::Error> {
4822 let _response = fidl::client::decode_transaction_body::<
4823 NodeInfoIteratorGetNextResponse,
4824 fidl::encoding::DefaultFuchsiaResourceDialect,
4825 0x33c7c070412f889f,
4826 >(_buf?)?;
4827 Ok(_response.nodes)
4828 }
4829 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<NodeInfo>>(
4830 (),
4831 0x33c7c070412f889f,
4832 fidl::encoding::DynamicFlags::empty(),
4833 _decode,
4834 )
4835 }
4836}
4837
4838pub struct NodeInfoIteratorEventStream {
4839 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4840}
4841
4842impl std::marker::Unpin for NodeInfoIteratorEventStream {}
4843
4844impl futures::stream::FusedStream for NodeInfoIteratorEventStream {
4845 fn is_terminated(&self) -> bool {
4846 self.event_receiver.is_terminated()
4847 }
4848}
4849
4850impl futures::Stream for NodeInfoIteratorEventStream {
4851 type Item = Result<NodeInfoIteratorEvent, fidl::Error>;
4852
4853 fn poll_next(
4854 mut self: std::pin::Pin<&mut Self>,
4855 cx: &mut std::task::Context<'_>,
4856 ) -> std::task::Poll<Option<Self::Item>> {
4857 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4858 &mut self.event_receiver,
4859 cx
4860 )?) {
4861 Some(buf) => std::task::Poll::Ready(Some(NodeInfoIteratorEvent::decode(buf))),
4862 None => std::task::Poll::Ready(None),
4863 }
4864 }
4865}
4866
4867#[derive(Debug)]
4868pub enum NodeInfoIteratorEvent {}
4869
4870impl NodeInfoIteratorEvent {
4871 fn decode(
4873 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4874 ) -> Result<NodeInfoIteratorEvent, fidl::Error> {
4875 let (bytes, _handles) = buf.split_mut();
4876 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4877 debug_assert_eq!(tx_header.tx_id, 0);
4878 match tx_header.ordinal {
4879 _ => Err(fidl::Error::UnknownOrdinal {
4880 ordinal: tx_header.ordinal,
4881 protocol_name:
4882 <NodeInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4883 }),
4884 }
4885 }
4886}
4887
4888pub struct NodeInfoIteratorRequestStream {
4890 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4891 is_terminated: bool,
4892}
4893
4894impl std::marker::Unpin for NodeInfoIteratorRequestStream {}
4895
4896impl futures::stream::FusedStream for NodeInfoIteratorRequestStream {
4897 fn is_terminated(&self) -> bool {
4898 self.is_terminated
4899 }
4900}
4901
4902impl fidl::endpoints::RequestStream for NodeInfoIteratorRequestStream {
4903 type Protocol = NodeInfoIteratorMarker;
4904 type ControlHandle = NodeInfoIteratorControlHandle;
4905
4906 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4907 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4908 }
4909
4910 fn control_handle(&self) -> Self::ControlHandle {
4911 NodeInfoIteratorControlHandle { inner: self.inner.clone() }
4912 }
4913
4914 fn into_inner(
4915 self,
4916 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4917 {
4918 (self.inner, self.is_terminated)
4919 }
4920
4921 fn from_inner(
4922 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4923 is_terminated: bool,
4924 ) -> Self {
4925 Self { inner, is_terminated }
4926 }
4927}
4928
4929impl futures::Stream for NodeInfoIteratorRequestStream {
4930 type Item = Result<NodeInfoIteratorRequest, fidl::Error>;
4931
4932 fn poll_next(
4933 mut self: std::pin::Pin<&mut Self>,
4934 cx: &mut std::task::Context<'_>,
4935 ) -> std::task::Poll<Option<Self::Item>> {
4936 let this = &mut *self;
4937 if this.inner.check_shutdown(cx) {
4938 this.is_terminated = true;
4939 return std::task::Poll::Ready(None);
4940 }
4941 if this.is_terminated {
4942 panic!("polled NodeInfoIteratorRequestStream after completion");
4943 }
4944 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4945 |bytes, handles| {
4946 match this.inner.channel().read_etc(cx, bytes, handles) {
4947 std::task::Poll::Ready(Ok(())) => {}
4948 std::task::Poll::Pending => return std::task::Poll::Pending,
4949 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4950 this.is_terminated = true;
4951 return std::task::Poll::Ready(None);
4952 }
4953 std::task::Poll::Ready(Err(e)) => {
4954 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4955 e.into(),
4956 ))))
4957 }
4958 }
4959
4960 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4962
4963 std::task::Poll::Ready(Some(match header.ordinal {
4964 0x33c7c070412f889f => {
4965 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4966 let mut req = fidl::new_empty!(
4967 fidl::encoding::EmptyPayload,
4968 fidl::encoding::DefaultFuchsiaResourceDialect
4969 );
4970 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4971 let control_handle =
4972 NodeInfoIteratorControlHandle { inner: this.inner.clone() };
4973 Ok(NodeInfoIteratorRequest::GetNext {
4974 responder: NodeInfoIteratorGetNextResponder {
4975 control_handle: std::mem::ManuallyDrop::new(control_handle),
4976 tx_id: header.tx_id,
4977 },
4978 })
4979 }
4980 _ => Err(fidl::Error::UnknownOrdinal {
4981 ordinal: header.ordinal,
4982 protocol_name:
4983 <NodeInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4984 }),
4985 }))
4986 },
4987 )
4988 }
4989}
4990
4991#[derive(Debug)]
4992pub enum NodeInfoIteratorRequest {
4993 GetNext { responder: NodeInfoIteratorGetNextResponder },
4995}
4996
4997impl NodeInfoIteratorRequest {
4998 #[allow(irrefutable_let_patterns)]
4999 pub fn into_get_next(self) -> Option<(NodeInfoIteratorGetNextResponder)> {
5000 if let NodeInfoIteratorRequest::GetNext { responder } = self {
5001 Some((responder))
5002 } else {
5003 None
5004 }
5005 }
5006
5007 pub fn method_name(&self) -> &'static str {
5009 match *self {
5010 NodeInfoIteratorRequest::GetNext { .. } => "get_next",
5011 }
5012 }
5013}
5014
5015#[derive(Debug, Clone)]
5016pub struct NodeInfoIteratorControlHandle {
5017 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5018}
5019
5020impl fidl::endpoints::ControlHandle for NodeInfoIteratorControlHandle {
5021 fn shutdown(&self) {
5022 self.inner.shutdown()
5023 }
5024 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5025 self.inner.shutdown_with_epitaph(status)
5026 }
5027
5028 fn is_closed(&self) -> bool {
5029 self.inner.channel().is_closed()
5030 }
5031 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5032 self.inner.channel().on_closed()
5033 }
5034
5035 #[cfg(target_os = "fuchsia")]
5036 fn signal_peer(
5037 &self,
5038 clear_mask: zx::Signals,
5039 set_mask: zx::Signals,
5040 ) -> Result<(), zx_status::Status> {
5041 use fidl::Peered;
5042 self.inner.channel().signal_peer(clear_mask, set_mask)
5043 }
5044}
5045
5046impl NodeInfoIteratorControlHandle {}
5047
5048#[must_use = "FIDL methods require a response to be sent"]
5049#[derive(Debug)]
5050pub struct NodeInfoIteratorGetNextResponder {
5051 control_handle: std::mem::ManuallyDrop<NodeInfoIteratorControlHandle>,
5052 tx_id: u32,
5053}
5054
5055impl std::ops::Drop for NodeInfoIteratorGetNextResponder {
5059 fn drop(&mut self) {
5060 self.control_handle.shutdown();
5061 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5063 }
5064}
5065
5066impl fidl::endpoints::Responder for NodeInfoIteratorGetNextResponder {
5067 type ControlHandle = NodeInfoIteratorControlHandle;
5068
5069 fn control_handle(&self) -> &NodeInfoIteratorControlHandle {
5070 &self.control_handle
5071 }
5072
5073 fn drop_without_shutdown(mut self) {
5074 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5076 std::mem::forget(self);
5078 }
5079}
5080
5081impl NodeInfoIteratorGetNextResponder {
5082 pub fn send(self, mut nodes: &[NodeInfo]) -> Result<(), fidl::Error> {
5086 let _result = self.send_raw(nodes);
5087 if _result.is_err() {
5088 self.control_handle.shutdown();
5089 }
5090 self.drop_without_shutdown();
5091 _result
5092 }
5093
5094 pub fn send_no_shutdown_on_err(self, mut nodes: &[NodeInfo]) -> Result<(), fidl::Error> {
5096 let _result = self.send_raw(nodes);
5097 self.drop_without_shutdown();
5098 _result
5099 }
5100
5101 fn send_raw(&self, mut nodes: &[NodeInfo]) -> Result<(), fidl::Error> {
5102 self.control_handle.inner.send::<NodeInfoIteratorGetNextResponse>(
5103 (nodes,),
5104 self.tx_id,
5105 0x33c7c070412f889f,
5106 fidl::encoding::DynamicFlags::empty(),
5107 )
5108 }
5109}
5110
5111mod internal {
5112 use super::*;
5113
5114 impl fidl::encoding::ResourceTypeMarker for ManagerGetCompositeInfoRequest {
5115 type Borrowed<'a> = &'a mut Self;
5116 fn take_or_borrow<'a>(
5117 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5118 ) -> Self::Borrowed<'a> {
5119 value
5120 }
5121 }
5122
5123 unsafe impl fidl::encoding::TypeMarker for ManagerGetCompositeInfoRequest {
5124 type Owned = Self;
5125
5126 #[inline(always)]
5127 fn inline_align(_context: fidl::encoding::Context) -> usize {
5128 4
5129 }
5130
5131 #[inline(always)]
5132 fn inline_size(_context: fidl::encoding::Context) -> usize {
5133 4
5134 }
5135 }
5136
5137 unsafe impl
5138 fidl::encoding::Encode<
5139 ManagerGetCompositeInfoRequest,
5140 fidl::encoding::DefaultFuchsiaResourceDialect,
5141 > for &mut ManagerGetCompositeInfoRequest
5142 {
5143 #[inline]
5144 unsafe fn encode(
5145 self,
5146 encoder: &mut fidl::encoding::Encoder<
5147 '_,
5148 fidl::encoding::DefaultFuchsiaResourceDialect,
5149 >,
5150 offset: usize,
5151 _depth: fidl::encoding::Depth,
5152 ) -> fidl::Result<()> {
5153 encoder.debug_check_bounds::<ManagerGetCompositeInfoRequest>(offset);
5154 fidl::encoding::Encode::<
5156 ManagerGetCompositeInfoRequest,
5157 fidl::encoding::DefaultFuchsiaResourceDialect,
5158 >::encode(
5159 (
5160 <fidl::encoding::Endpoint<
5161 fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>,
5162 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5163 &mut self.iterator
5164 ),
5165 ),
5166 encoder,
5167 offset,
5168 _depth,
5169 )
5170 }
5171 }
5172 unsafe impl<
5173 T0: fidl::encoding::Encode<
5174 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>>,
5175 fidl::encoding::DefaultFuchsiaResourceDialect,
5176 >,
5177 >
5178 fidl::encoding::Encode<
5179 ManagerGetCompositeInfoRequest,
5180 fidl::encoding::DefaultFuchsiaResourceDialect,
5181 > for (T0,)
5182 {
5183 #[inline]
5184 unsafe fn encode(
5185 self,
5186 encoder: &mut fidl::encoding::Encoder<
5187 '_,
5188 fidl::encoding::DefaultFuchsiaResourceDialect,
5189 >,
5190 offset: usize,
5191 depth: fidl::encoding::Depth,
5192 ) -> fidl::Result<()> {
5193 encoder.debug_check_bounds::<ManagerGetCompositeInfoRequest>(offset);
5194 self.0.encode(encoder, offset + 0, depth)?;
5198 Ok(())
5199 }
5200 }
5201
5202 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5203 for ManagerGetCompositeInfoRequest
5204 {
5205 #[inline(always)]
5206 fn new_empty() -> Self {
5207 Self {
5208 iterator: fidl::new_empty!(
5209 fidl::encoding::Endpoint<
5210 fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>,
5211 >,
5212 fidl::encoding::DefaultFuchsiaResourceDialect
5213 ),
5214 }
5215 }
5216
5217 #[inline]
5218 unsafe fn decode(
5219 &mut self,
5220 decoder: &mut fidl::encoding::Decoder<
5221 '_,
5222 fidl::encoding::DefaultFuchsiaResourceDialect,
5223 >,
5224 offset: usize,
5225 _depth: fidl::encoding::Depth,
5226 ) -> fidl::Result<()> {
5227 decoder.debug_check_bounds::<Self>(offset);
5228 fidl::decode!(
5230 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>>,
5231 fidl::encoding::DefaultFuchsiaResourceDialect,
5232 &mut self.iterator,
5233 decoder,
5234 offset + 0,
5235 _depth
5236 )?;
5237 Ok(())
5238 }
5239 }
5240
5241 impl fidl::encoding::ResourceTypeMarker for ManagerGetCompositeNodeSpecsRequest {
5242 type Borrowed<'a> = &'a mut Self;
5243 fn take_or_borrow<'a>(
5244 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5245 ) -> Self::Borrowed<'a> {
5246 value
5247 }
5248 }
5249
5250 unsafe impl fidl::encoding::TypeMarker for ManagerGetCompositeNodeSpecsRequest {
5251 type Owned = Self;
5252
5253 #[inline(always)]
5254 fn inline_align(_context: fidl::encoding::Context) -> usize {
5255 8
5256 }
5257
5258 #[inline(always)]
5259 fn inline_size(_context: fidl::encoding::Context) -> usize {
5260 24
5261 }
5262 }
5263
5264 unsafe impl
5265 fidl::encoding::Encode<
5266 ManagerGetCompositeNodeSpecsRequest,
5267 fidl::encoding::DefaultFuchsiaResourceDialect,
5268 > for &mut ManagerGetCompositeNodeSpecsRequest
5269 {
5270 #[inline]
5271 unsafe fn encode(
5272 self,
5273 encoder: &mut fidl::encoding::Encoder<
5274 '_,
5275 fidl::encoding::DefaultFuchsiaResourceDialect,
5276 >,
5277 offset: usize,
5278 _depth: fidl::encoding::Depth,
5279 ) -> fidl::Result<()> {
5280 encoder.debug_check_bounds::<ManagerGetCompositeNodeSpecsRequest>(offset);
5281 fidl::encoding::Encode::<ManagerGetCompositeNodeSpecsRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5283 (
5284 <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.name_filter),
5285 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
5286 ),
5287 encoder, offset, _depth
5288 )
5289 }
5290 }
5291 unsafe impl<
5292 T0: fidl::encoding::Encode<
5293 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
5294 fidl::encoding::DefaultFuchsiaResourceDialect,
5295 >,
5296 T1: fidl::encoding::Encode<
5297 fidl::encoding::Endpoint<
5298 fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
5299 >,
5300 fidl::encoding::DefaultFuchsiaResourceDialect,
5301 >,
5302 >
5303 fidl::encoding::Encode<
5304 ManagerGetCompositeNodeSpecsRequest,
5305 fidl::encoding::DefaultFuchsiaResourceDialect,
5306 > for (T0, T1)
5307 {
5308 #[inline]
5309 unsafe fn encode(
5310 self,
5311 encoder: &mut fidl::encoding::Encoder<
5312 '_,
5313 fidl::encoding::DefaultFuchsiaResourceDialect,
5314 >,
5315 offset: usize,
5316 depth: fidl::encoding::Depth,
5317 ) -> fidl::Result<()> {
5318 encoder.debug_check_bounds::<ManagerGetCompositeNodeSpecsRequest>(offset);
5319 unsafe {
5322 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
5323 (ptr as *mut u64).write_unaligned(0);
5324 }
5325 self.0.encode(encoder, offset + 0, depth)?;
5327 self.1.encode(encoder, offset + 16, depth)?;
5328 Ok(())
5329 }
5330 }
5331
5332 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5333 for ManagerGetCompositeNodeSpecsRequest
5334 {
5335 #[inline(always)]
5336 fn new_empty() -> Self {
5337 Self {
5338 name_filter: fidl::new_empty!(
5339 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
5340 fidl::encoding::DefaultFuchsiaResourceDialect
5341 ),
5342 iterator: fidl::new_empty!(
5343 fidl::encoding::Endpoint<
5344 fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
5345 >,
5346 fidl::encoding::DefaultFuchsiaResourceDialect
5347 ),
5348 }
5349 }
5350
5351 #[inline]
5352 unsafe fn decode(
5353 &mut self,
5354 decoder: &mut fidl::encoding::Decoder<
5355 '_,
5356 fidl::encoding::DefaultFuchsiaResourceDialect,
5357 >,
5358 offset: usize,
5359 _depth: fidl::encoding::Depth,
5360 ) -> fidl::Result<()> {
5361 decoder.debug_check_bounds::<Self>(offset);
5362 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
5364 let padval = unsafe { (ptr as *const u64).read_unaligned() };
5365 let mask = 0xffffffff00000000u64;
5366 let maskedval = padval & mask;
5367 if maskedval != 0 {
5368 return Err(fidl::Error::NonZeroPadding {
5369 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
5370 });
5371 }
5372 fidl::decode!(
5373 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
5374 fidl::encoding::DefaultFuchsiaResourceDialect,
5375 &mut self.name_filter,
5376 decoder,
5377 offset + 0,
5378 _depth
5379 )?;
5380 fidl::decode!(
5381 fidl::encoding::Endpoint<
5382 fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
5383 >,
5384 fidl::encoding::DefaultFuchsiaResourceDialect,
5385 &mut self.iterator,
5386 decoder,
5387 offset + 16,
5388 _depth
5389 )?;
5390 Ok(())
5391 }
5392 }
5393
5394 impl fidl::encoding::ResourceTypeMarker for ManagerGetDriverHostInfoRequest {
5395 type Borrowed<'a> = &'a mut Self;
5396 fn take_or_borrow<'a>(
5397 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5398 ) -> Self::Borrowed<'a> {
5399 value
5400 }
5401 }
5402
5403 unsafe impl fidl::encoding::TypeMarker for ManagerGetDriverHostInfoRequest {
5404 type Owned = Self;
5405
5406 #[inline(always)]
5407 fn inline_align(_context: fidl::encoding::Context) -> usize {
5408 4
5409 }
5410
5411 #[inline(always)]
5412 fn inline_size(_context: fidl::encoding::Context) -> usize {
5413 4
5414 }
5415 }
5416
5417 unsafe impl
5418 fidl::encoding::Encode<
5419 ManagerGetDriverHostInfoRequest,
5420 fidl::encoding::DefaultFuchsiaResourceDialect,
5421 > for &mut ManagerGetDriverHostInfoRequest
5422 {
5423 #[inline]
5424 unsafe fn encode(
5425 self,
5426 encoder: &mut fidl::encoding::Encoder<
5427 '_,
5428 fidl::encoding::DefaultFuchsiaResourceDialect,
5429 >,
5430 offset: usize,
5431 _depth: fidl::encoding::Depth,
5432 ) -> fidl::Result<()> {
5433 encoder.debug_check_bounds::<ManagerGetDriverHostInfoRequest>(offset);
5434 fidl::encoding::Encode::<
5436 ManagerGetDriverHostInfoRequest,
5437 fidl::encoding::DefaultFuchsiaResourceDialect,
5438 >::encode(
5439 (<fidl::encoding::Endpoint<
5440 fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>,
5441 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5442 &mut self.iterator
5443 ),),
5444 encoder,
5445 offset,
5446 _depth,
5447 )
5448 }
5449 }
5450 unsafe impl<
5451 T0: fidl::encoding::Encode<
5452 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>>,
5453 fidl::encoding::DefaultFuchsiaResourceDialect,
5454 >,
5455 >
5456 fidl::encoding::Encode<
5457 ManagerGetDriverHostInfoRequest,
5458 fidl::encoding::DefaultFuchsiaResourceDialect,
5459 > for (T0,)
5460 {
5461 #[inline]
5462 unsafe fn encode(
5463 self,
5464 encoder: &mut fidl::encoding::Encoder<
5465 '_,
5466 fidl::encoding::DefaultFuchsiaResourceDialect,
5467 >,
5468 offset: usize,
5469 depth: fidl::encoding::Depth,
5470 ) -> fidl::Result<()> {
5471 encoder.debug_check_bounds::<ManagerGetDriverHostInfoRequest>(offset);
5472 self.0.encode(encoder, offset + 0, depth)?;
5476 Ok(())
5477 }
5478 }
5479
5480 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5481 for ManagerGetDriverHostInfoRequest
5482 {
5483 #[inline(always)]
5484 fn new_empty() -> Self {
5485 Self {
5486 iterator: fidl::new_empty!(
5487 fidl::encoding::Endpoint<
5488 fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>,
5489 >,
5490 fidl::encoding::DefaultFuchsiaResourceDialect
5491 ),
5492 }
5493 }
5494
5495 #[inline]
5496 unsafe fn decode(
5497 &mut self,
5498 decoder: &mut fidl::encoding::Decoder<
5499 '_,
5500 fidl::encoding::DefaultFuchsiaResourceDialect,
5501 >,
5502 offset: usize,
5503 _depth: fidl::encoding::Depth,
5504 ) -> fidl::Result<()> {
5505 decoder.debug_check_bounds::<Self>(offset);
5506 fidl::decode!(
5508 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>>,
5509 fidl::encoding::DefaultFuchsiaResourceDialect,
5510 &mut self.iterator,
5511 decoder,
5512 offset + 0,
5513 _depth
5514 )?;
5515 Ok(())
5516 }
5517 }
5518
5519 impl fidl::encoding::ResourceTypeMarker for ManagerGetDriverInfoRequest {
5520 type Borrowed<'a> = &'a mut Self;
5521 fn take_or_borrow<'a>(
5522 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5523 ) -> Self::Borrowed<'a> {
5524 value
5525 }
5526 }
5527
5528 unsafe impl fidl::encoding::TypeMarker for ManagerGetDriverInfoRequest {
5529 type Owned = Self;
5530
5531 #[inline(always)]
5532 fn inline_align(_context: fidl::encoding::Context) -> usize {
5533 8
5534 }
5535
5536 #[inline(always)]
5537 fn inline_size(_context: fidl::encoding::Context) -> usize {
5538 24
5539 }
5540 }
5541
5542 unsafe impl
5543 fidl::encoding::Encode<
5544 ManagerGetDriverInfoRequest,
5545 fidl::encoding::DefaultFuchsiaResourceDialect,
5546 > for &mut ManagerGetDriverInfoRequest
5547 {
5548 #[inline]
5549 unsafe fn encode(
5550 self,
5551 encoder: &mut fidl::encoding::Encoder<
5552 '_,
5553 fidl::encoding::DefaultFuchsiaResourceDialect,
5554 >,
5555 offset: usize,
5556 _depth: fidl::encoding::Depth,
5557 ) -> fidl::Result<()> {
5558 encoder.debug_check_bounds::<ManagerGetDriverInfoRequest>(offset);
5559 fidl::encoding::Encode::<ManagerGetDriverInfoRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5561 (
5562 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.driver_filter),
5563 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
5564 ),
5565 encoder, offset, _depth
5566 )
5567 }
5568 }
5569 unsafe impl<
5570 T0: fidl::encoding::Encode<
5571 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5572 fidl::encoding::DefaultFuchsiaResourceDialect,
5573 >,
5574 T1: fidl::encoding::Encode<
5575 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>>,
5576 fidl::encoding::DefaultFuchsiaResourceDialect,
5577 >,
5578 >
5579 fidl::encoding::Encode<
5580 ManagerGetDriverInfoRequest,
5581 fidl::encoding::DefaultFuchsiaResourceDialect,
5582 > for (T0, T1)
5583 {
5584 #[inline]
5585 unsafe fn encode(
5586 self,
5587 encoder: &mut fidl::encoding::Encoder<
5588 '_,
5589 fidl::encoding::DefaultFuchsiaResourceDialect,
5590 >,
5591 offset: usize,
5592 depth: fidl::encoding::Depth,
5593 ) -> fidl::Result<()> {
5594 encoder.debug_check_bounds::<ManagerGetDriverInfoRequest>(offset);
5595 unsafe {
5598 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
5599 (ptr as *mut u64).write_unaligned(0);
5600 }
5601 self.0.encode(encoder, offset + 0, depth)?;
5603 self.1.encode(encoder, offset + 16, depth)?;
5604 Ok(())
5605 }
5606 }
5607
5608 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5609 for ManagerGetDriverInfoRequest
5610 {
5611 #[inline(always)]
5612 fn new_empty() -> Self {
5613 Self {
5614 driver_filter: fidl::new_empty!(
5615 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5616 fidl::encoding::DefaultFuchsiaResourceDialect
5617 ),
5618 iterator: fidl::new_empty!(
5619 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>>,
5620 fidl::encoding::DefaultFuchsiaResourceDialect
5621 ),
5622 }
5623 }
5624
5625 #[inline]
5626 unsafe fn decode(
5627 &mut self,
5628 decoder: &mut fidl::encoding::Decoder<
5629 '_,
5630 fidl::encoding::DefaultFuchsiaResourceDialect,
5631 >,
5632 offset: usize,
5633 _depth: fidl::encoding::Depth,
5634 ) -> fidl::Result<()> {
5635 decoder.debug_check_bounds::<Self>(offset);
5636 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
5638 let padval = unsafe { (ptr as *const u64).read_unaligned() };
5639 let mask = 0xffffffff00000000u64;
5640 let maskedval = padval & mask;
5641 if maskedval != 0 {
5642 return Err(fidl::Error::NonZeroPadding {
5643 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
5644 });
5645 }
5646 fidl::decode!(
5647 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5648 fidl::encoding::DefaultFuchsiaResourceDialect,
5649 &mut self.driver_filter,
5650 decoder,
5651 offset + 0,
5652 _depth
5653 )?;
5654 fidl::decode!(
5655 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>>,
5656 fidl::encoding::DefaultFuchsiaResourceDialect,
5657 &mut self.iterator,
5658 decoder,
5659 offset + 16,
5660 _depth
5661 )?;
5662 Ok(())
5663 }
5664 }
5665
5666 impl fidl::encoding::ResourceTypeMarker for ManagerGetNodeInfoRequest {
5667 type Borrowed<'a> = &'a mut Self;
5668 fn take_or_borrow<'a>(
5669 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5670 ) -> Self::Borrowed<'a> {
5671 value
5672 }
5673 }
5674
5675 unsafe impl fidl::encoding::TypeMarker for ManagerGetNodeInfoRequest {
5676 type Owned = Self;
5677
5678 #[inline(always)]
5679 fn inline_align(_context: fidl::encoding::Context) -> usize {
5680 8
5681 }
5682
5683 #[inline(always)]
5684 fn inline_size(_context: fidl::encoding::Context) -> usize {
5685 24
5686 }
5687 }
5688
5689 unsafe impl
5690 fidl::encoding::Encode<
5691 ManagerGetNodeInfoRequest,
5692 fidl::encoding::DefaultFuchsiaResourceDialect,
5693 > for &mut ManagerGetNodeInfoRequest
5694 {
5695 #[inline]
5696 unsafe fn encode(
5697 self,
5698 encoder: &mut fidl::encoding::Encoder<
5699 '_,
5700 fidl::encoding::DefaultFuchsiaResourceDialect,
5701 >,
5702 offset: usize,
5703 _depth: fidl::encoding::Depth,
5704 ) -> fidl::Result<()> {
5705 encoder.debug_check_bounds::<ManagerGetNodeInfoRequest>(offset);
5706 fidl::encoding::Encode::<ManagerGetNodeInfoRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5708 (
5709 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.node_filter),
5710 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
5711 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.exact_match),
5712 ),
5713 encoder, offset, _depth
5714 )
5715 }
5716 }
5717 unsafe impl<
5718 T0: fidl::encoding::Encode<
5719 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5720 fidl::encoding::DefaultFuchsiaResourceDialect,
5721 >,
5722 T1: fidl::encoding::Encode<
5723 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>>,
5724 fidl::encoding::DefaultFuchsiaResourceDialect,
5725 >,
5726 T2: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
5727 >
5728 fidl::encoding::Encode<
5729 ManagerGetNodeInfoRequest,
5730 fidl::encoding::DefaultFuchsiaResourceDialect,
5731 > for (T0, T1, T2)
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::<ManagerGetNodeInfoRequest>(offset);
5744 unsafe {
5747 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
5748 (ptr as *mut u64).write_unaligned(0);
5749 }
5750 self.0.encode(encoder, offset + 0, depth)?;
5752 self.1.encode(encoder, offset + 16, depth)?;
5753 self.2.encode(encoder, offset + 20, depth)?;
5754 Ok(())
5755 }
5756 }
5757
5758 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5759 for ManagerGetNodeInfoRequest
5760 {
5761 #[inline(always)]
5762 fn new_empty() -> Self {
5763 Self {
5764 node_filter: fidl::new_empty!(
5765 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5766 fidl::encoding::DefaultFuchsiaResourceDialect
5767 ),
5768 iterator: fidl::new_empty!(
5769 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>>,
5770 fidl::encoding::DefaultFuchsiaResourceDialect
5771 ),
5772 exact_match: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
5773 }
5774 }
5775
5776 #[inline]
5777 unsafe fn decode(
5778 &mut self,
5779 decoder: &mut fidl::encoding::Decoder<
5780 '_,
5781 fidl::encoding::DefaultFuchsiaResourceDialect,
5782 >,
5783 offset: usize,
5784 _depth: fidl::encoding::Depth,
5785 ) -> fidl::Result<()> {
5786 decoder.debug_check_bounds::<Self>(offset);
5787 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
5789 let padval = unsafe { (ptr as *const u64).read_unaligned() };
5790 let mask = 0xffffff0000000000u64;
5791 let maskedval = padval & mask;
5792 if maskedval != 0 {
5793 return Err(fidl::Error::NonZeroPadding {
5794 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
5795 });
5796 }
5797 fidl::decode!(
5798 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5799 fidl::encoding::DefaultFuchsiaResourceDialect,
5800 &mut self.node_filter,
5801 decoder,
5802 offset + 0,
5803 _depth
5804 )?;
5805 fidl::decode!(
5806 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>>,
5807 fidl::encoding::DefaultFuchsiaResourceDialect,
5808 &mut self.iterator,
5809 decoder,
5810 offset + 16,
5811 _depth
5812 )?;
5813 fidl::decode!(
5814 bool,
5815 fidl::encoding::DefaultFuchsiaResourceDialect,
5816 &mut self.exact_match,
5817 decoder,
5818 offset + 20,
5819 _depth
5820 )?;
5821 Ok(())
5822 }
5823 }
5824
5825 impl fidl::encoding::ResourceTypeMarker for ManagerRestartWithDictionaryRequest {
5826 type Borrowed<'a> = &'a mut Self;
5827 fn take_or_borrow<'a>(
5828 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5829 ) -> Self::Borrowed<'a> {
5830 value
5831 }
5832 }
5833
5834 unsafe impl fidl::encoding::TypeMarker for ManagerRestartWithDictionaryRequest {
5835 type Owned = Self;
5836
5837 #[inline(always)]
5838 fn inline_align(_context: fidl::encoding::Context) -> usize {
5839 8
5840 }
5841
5842 #[inline(always)]
5843 fn inline_size(_context: fidl::encoding::Context) -> usize {
5844 24
5845 }
5846 }
5847
5848 unsafe impl
5849 fidl::encoding::Encode<
5850 ManagerRestartWithDictionaryRequest,
5851 fidl::encoding::DefaultFuchsiaResourceDialect,
5852 > for &mut ManagerRestartWithDictionaryRequest
5853 {
5854 #[inline]
5855 unsafe fn encode(
5856 self,
5857 encoder: &mut fidl::encoding::Encoder<
5858 '_,
5859 fidl::encoding::DefaultFuchsiaResourceDialect,
5860 >,
5861 offset: usize,
5862 _depth: fidl::encoding::Depth,
5863 ) -> fidl::Result<()> {
5864 encoder.debug_check_bounds::<ManagerRestartWithDictionaryRequest>(offset);
5865 fidl::encoding::Encode::<ManagerRestartWithDictionaryRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5867 (
5868 <fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
5869 <fidl_fuchsia_component_sandbox::DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.dictionary),
5870 ),
5871 encoder, offset, _depth
5872 )
5873 }
5874 }
5875 unsafe impl<
5876 T0: fidl::encoding::Encode<
5877 fidl::encoding::BoundedString<1024>,
5878 fidl::encoding::DefaultFuchsiaResourceDialect,
5879 >,
5880 T1: fidl::encoding::Encode<
5881 fidl_fuchsia_component_sandbox::DictionaryRef,
5882 fidl::encoding::DefaultFuchsiaResourceDialect,
5883 >,
5884 >
5885 fidl::encoding::Encode<
5886 ManagerRestartWithDictionaryRequest,
5887 fidl::encoding::DefaultFuchsiaResourceDialect,
5888 > for (T0, T1)
5889 {
5890 #[inline]
5891 unsafe fn encode(
5892 self,
5893 encoder: &mut fidl::encoding::Encoder<
5894 '_,
5895 fidl::encoding::DefaultFuchsiaResourceDialect,
5896 >,
5897 offset: usize,
5898 depth: fidl::encoding::Depth,
5899 ) -> fidl::Result<()> {
5900 encoder.debug_check_bounds::<ManagerRestartWithDictionaryRequest>(offset);
5901 unsafe {
5904 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
5905 (ptr as *mut u64).write_unaligned(0);
5906 }
5907 self.0.encode(encoder, offset + 0, depth)?;
5909 self.1.encode(encoder, offset + 16, depth)?;
5910 Ok(())
5911 }
5912 }
5913
5914 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5915 for ManagerRestartWithDictionaryRequest
5916 {
5917 #[inline(always)]
5918 fn new_empty() -> Self {
5919 Self {
5920 moniker: fidl::new_empty!(
5921 fidl::encoding::BoundedString<1024>,
5922 fidl::encoding::DefaultFuchsiaResourceDialect
5923 ),
5924 dictionary: fidl::new_empty!(
5925 fidl_fuchsia_component_sandbox::DictionaryRef,
5926 fidl::encoding::DefaultFuchsiaResourceDialect
5927 ),
5928 }
5929 }
5930
5931 #[inline]
5932 unsafe fn decode(
5933 &mut self,
5934 decoder: &mut fidl::encoding::Decoder<
5935 '_,
5936 fidl::encoding::DefaultFuchsiaResourceDialect,
5937 >,
5938 offset: usize,
5939 _depth: fidl::encoding::Depth,
5940 ) -> fidl::Result<()> {
5941 decoder.debug_check_bounds::<Self>(offset);
5942 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
5944 let padval = unsafe { (ptr as *const u64).read_unaligned() };
5945 let mask = 0xffffffff00000000u64;
5946 let maskedval = padval & mask;
5947 if maskedval != 0 {
5948 return Err(fidl::Error::NonZeroPadding {
5949 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
5950 });
5951 }
5952 fidl::decode!(
5953 fidl::encoding::BoundedString<1024>,
5954 fidl::encoding::DefaultFuchsiaResourceDialect,
5955 &mut self.moniker,
5956 decoder,
5957 offset + 0,
5958 _depth
5959 )?;
5960 fidl::decode!(
5961 fidl_fuchsia_component_sandbox::DictionaryRef,
5962 fidl::encoding::DefaultFuchsiaResourceDialect,
5963 &mut self.dictionary,
5964 decoder,
5965 offset + 16,
5966 _depth
5967 )?;
5968 Ok(())
5969 }
5970 }
5971
5972 impl fidl::encoding::ResourceTypeMarker for ManagerRestartWithDictionaryResponse {
5973 type Borrowed<'a> = &'a mut Self;
5974 fn take_or_borrow<'a>(
5975 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5976 ) -> Self::Borrowed<'a> {
5977 value
5978 }
5979 }
5980
5981 unsafe impl fidl::encoding::TypeMarker for ManagerRestartWithDictionaryResponse {
5982 type Owned = Self;
5983
5984 #[inline(always)]
5985 fn inline_align(_context: fidl::encoding::Context) -> usize {
5986 4
5987 }
5988
5989 #[inline(always)]
5990 fn inline_size(_context: fidl::encoding::Context) -> usize {
5991 4
5992 }
5993 }
5994
5995 unsafe impl
5996 fidl::encoding::Encode<
5997 ManagerRestartWithDictionaryResponse,
5998 fidl::encoding::DefaultFuchsiaResourceDialect,
5999 > for &mut ManagerRestartWithDictionaryResponse
6000 {
6001 #[inline]
6002 unsafe fn encode(
6003 self,
6004 encoder: &mut fidl::encoding::Encoder<
6005 '_,
6006 fidl::encoding::DefaultFuchsiaResourceDialect,
6007 >,
6008 offset: usize,
6009 _depth: fidl::encoding::Depth,
6010 ) -> fidl::Result<()> {
6011 encoder.debug_check_bounds::<ManagerRestartWithDictionaryResponse>(offset);
6012 fidl::encoding::Encode::<
6014 ManagerRestartWithDictionaryResponse,
6015 fidl::encoding::DefaultFuchsiaResourceDialect,
6016 >::encode(
6017 (<fidl::encoding::HandleType<
6018 fidl::EventPair,
6019 { fidl::ObjectType::EVENTPAIR.into_raw() },
6020 2147483648,
6021 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6022 &mut self.release_fence
6023 ),),
6024 encoder,
6025 offset,
6026 _depth,
6027 )
6028 }
6029 }
6030 unsafe impl<
6031 T0: fidl::encoding::Encode<
6032 fidl::encoding::HandleType<
6033 fidl::EventPair,
6034 { fidl::ObjectType::EVENTPAIR.into_raw() },
6035 2147483648,
6036 >,
6037 fidl::encoding::DefaultFuchsiaResourceDialect,
6038 >,
6039 >
6040 fidl::encoding::Encode<
6041 ManagerRestartWithDictionaryResponse,
6042 fidl::encoding::DefaultFuchsiaResourceDialect,
6043 > for (T0,)
6044 {
6045 #[inline]
6046 unsafe fn encode(
6047 self,
6048 encoder: &mut fidl::encoding::Encoder<
6049 '_,
6050 fidl::encoding::DefaultFuchsiaResourceDialect,
6051 >,
6052 offset: usize,
6053 depth: fidl::encoding::Depth,
6054 ) -> fidl::Result<()> {
6055 encoder.debug_check_bounds::<ManagerRestartWithDictionaryResponse>(offset);
6056 self.0.encode(encoder, offset + 0, depth)?;
6060 Ok(())
6061 }
6062 }
6063
6064 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6065 for ManagerRestartWithDictionaryResponse
6066 {
6067 #[inline(always)]
6068 fn new_empty() -> Self {
6069 Self {
6070 release_fence: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6071 }
6072 }
6073
6074 #[inline]
6075 unsafe fn decode(
6076 &mut self,
6077 decoder: &mut fidl::encoding::Decoder<
6078 '_,
6079 fidl::encoding::DefaultFuchsiaResourceDialect,
6080 >,
6081 offset: usize,
6082 _depth: fidl::encoding::Depth,
6083 ) -> fidl::Result<()> {
6084 decoder.debug_check_bounds::<Self>(offset);
6085 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.release_fence, decoder, offset + 0, _depth)?;
6087 Ok(())
6088 }
6089 }
6090}