Skip to main content

fidl_fuchsia_driver_development/
fidl_fuchsia_driver_development.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![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 ManagerRestartWithDictionaryAndPowerDependenciesRequest {
67    /// Moniker of the node to restart with the dictionary and power dependencies.
68    pub moniker: String,
69    /// Dictionary to give to the drivers on and under the nodes.
70    pub dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
71    /// Custom power dependencies to give to the restarted node.
72    pub power_dependencies: Vec<fidl_fuchsia_power_broker::LevelDependency>,
73    /// Custom cpu token to give to the restarted node.
74    pub cpu_token_override: Option<fidl::Event>,
75    /// Overrides for power element tokens of specific child/composite target nodes.
76    pub node_power_token_overrides: Vec<NodePowerTokenOverride>,
77}
78
79impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
80    for ManagerRestartWithDictionaryAndPowerDependenciesRequest
81{
82}
83
84#[derive(Debug, PartialEq)]
85pub struct ManagerRestartWithDictionaryRequest {
86    /// Moniker of the node to restart with the dictionary.
87    pub moniker: String,
88    /// Dictionary to give to the drivers on and under the nodes.
89    pub dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
90}
91
92impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
93    for ManagerRestartWithDictionaryRequest
94{
95}
96
97#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
98pub struct ManagerRestartWithDictionaryAndPowerDependenciesResponse {
99    /// The caller should keep this handle alive while the modified drivers are needed.
100    /// Releasing this will reset the operation.
101    pub release_fence: fidl::EventPair,
102}
103
104impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
105    for ManagerRestartWithDictionaryAndPowerDependenciesResponse
106{
107}
108
109#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
110pub struct ManagerRestartWithDictionaryResponse {
111    /// The caller should keep this handle alive while the modified drivers are needed.
112    /// Releasing this will reset the operation.
113    pub release_fence: fidl::EventPair,
114}
115
116impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
117    for ManagerRestartWithDictionaryResponse
118{
119}
120
121/// Specifies a custom power token override for a targeted child or composite node.
122/// Used during driver restart operations to replace default power topology tokens
123/// with mock or test power tokens.
124#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
125pub struct NodePowerTokenOverride {
126    /// Moniker or name of the target node whose power token should be overridden.
127    pub target_node: String,
128    /// Custom power element token event handle to associate with the target node.
129    pub token: fidl::Event,
130}
131
132impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NodePowerTokenOverride {}
133
134#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
135pub struct CompositeInfoIteratorMarker;
136
137impl fidl::endpoints::ProtocolMarker for CompositeInfoIteratorMarker {
138    type Proxy = CompositeInfoIteratorProxy;
139    type RequestStream = CompositeInfoIteratorRequestStream;
140    #[cfg(target_os = "fuchsia")]
141    type SynchronousProxy = CompositeInfoIteratorSynchronousProxy;
142
143    const DEBUG_NAME: &'static str = "(anonymous) CompositeInfoIterator";
144}
145
146pub trait CompositeInfoIteratorProxyInterface: Send + Sync {
147    type GetNextResponseFut: std::future::Future<Output = Result<Vec<CompositeNodeInfo>, fidl::Error>>
148        + Send;
149    fn r#get_next(&self) -> Self::GetNextResponseFut;
150}
151#[derive(Debug)]
152#[cfg(target_os = "fuchsia")]
153pub struct CompositeInfoIteratorSynchronousProxy {
154    client: fidl::client::sync::Client,
155}
156
157#[cfg(target_os = "fuchsia")]
158impl fidl::endpoints::SynchronousProxy for CompositeInfoIteratorSynchronousProxy {
159    type Proxy = CompositeInfoIteratorProxy;
160    type Protocol = CompositeInfoIteratorMarker;
161
162    fn from_channel(inner: fidl::Channel) -> Self {
163        Self::new(inner)
164    }
165
166    fn into_channel(self) -> fidl::Channel {
167        self.client.into_channel()
168    }
169
170    fn as_channel(&self) -> &fidl::Channel {
171        self.client.as_channel()
172    }
173}
174
175#[cfg(target_os = "fuchsia")]
176impl CompositeInfoIteratorSynchronousProxy {
177    pub fn new(channel: fidl::Channel) -> Self {
178        Self { client: fidl::client::sync::Client::new(channel) }
179    }
180
181    pub fn into_channel(self) -> fidl::Channel {
182        self.client.into_channel()
183    }
184
185    /// Waits until an event arrives and returns it. It is safe for other
186    /// threads to make concurrent requests while waiting for an event.
187    pub fn wait_for_event(
188        &self,
189        deadline: zx::MonotonicInstant,
190    ) -> Result<CompositeInfoIteratorEvent, fidl::Error> {
191        CompositeInfoIteratorEvent::decode(
192            self.client.wait_for_event::<CompositeInfoIteratorMarker>(deadline)?,
193        )
194    }
195
196    /// Returns up to 100 entries at a time. Returns empty when no more
197    /// composites are left.
198    pub fn r#get_next(
199        &self,
200        ___deadline: zx::MonotonicInstant,
201    ) -> Result<Vec<CompositeNodeInfo>, fidl::Error> {
202        let _response = self.client.send_query::<
203            fidl::encoding::EmptyPayload,
204            CompositeInfoIteratorGetNextResponse,
205            CompositeInfoIteratorMarker,
206        >(
207            (),
208            0x50af808a6e34bb96,
209            fidl::encoding::DynamicFlags::empty(),
210            ___deadline,
211        )?;
212        Ok(_response.composites)
213    }
214}
215
216#[cfg(target_os = "fuchsia")]
217impl From<CompositeInfoIteratorSynchronousProxy> for zx::NullableHandle {
218    fn from(value: CompositeInfoIteratorSynchronousProxy) -> Self {
219        value.into_channel().into()
220    }
221}
222
223#[cfg(target_os = "fuchsia")]
224impl From<fidl::Channel> for CompositeInfoIteratorSynchronousProxy {
225    fn from(value: fidl::Channel) -> Self {
226        Self::new(value)
227    }
228}
229
230#[cfg(target_os = "fuchsia")]
231impl fidl::endpoints::FromClient for CompositeInfoIteratorSynchronousProxy {
232    type Protocol = CompositeInfoIteratorMarker;
233
234    fn from_client(value: fidl::endpoints::ClientEnd<CompositeInfoIteratorMarker>) -> Self {
235        Self::new(value.into_channel())
236    }
237}
238
239#[derive(Debug, Clone)]
240pub struct CompositeInfoIteratorProxy {
241    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
242}
243
244impl fidl::endpoints::Proxy for CompositeInfoIteratorProxy {
245    type Protocol = CompositeInfoIteratorMarker;
246
247    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
248        Self::new(inner)
249    }
250
251    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
252        self.client.into_channel().map_err(|client| Self { client })
253    }
254
255    fn as_channel(&self) -> &::fidl::AsyncChannel {
256        self.client.as_channel()
257    }
258}
259
260impl CompositeInfoIteratorProxy {
261    /// Create a new Proxy for fuchsia.driver.development/CompositeInfoIterator.
262    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
263        let protocol_name =
264            <CompositeInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
265        Self { client: fidl::client::Client::new(channel, protocol_name) }
266    }
267
268    /// Get a Stream of events from the remote end of the protocol.
269    ///
270    /// # Panics
271    ///
272    /// Panics if the event stream was already taken.
273    pub fn take_event_stream(&self) -> CompositeInfoIteratorEventStream {
274        CompositeInfoIteratorEventStream { event_receiver: self.client.take_event_receiver() }
275    }
276
277    /// Returns up to 100 entries at a time. Returns empty when no more
278    /// composites are left.
279    pub fn r#get_next(
280        &self,
281    ) -> fidl::client::QueryResponseFut<
282        Vec<CompositeNodeInfo>,
283        fidl::encoding::DefaultFuchsiaResourceDialect,
284    > {
285        CompositeInfoIteratorProxyInterface::r#get_next(self)
286    }
287}
288
289impl CompositeInfoIteratorProxyInterface for CompositeInfoIteratorProxy {
290    type GetNextResponseFut = fidl::client::QueryResponseFut<
291        Vec<CompositeNodeInfo>,
292        fidl::encoding::DefaultFuchsiaResourceDialect,
293    >;
294    fn r#get_next(&self) -> Self::GetNextResponseFut {
295        fn _decode(
296            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
297        ) -> Result<Vec<CompositeNodeInfo>, fidl::Error> {
298            let _response = fidl::client::decode_transaction_body::<
299                CompositeInfoIteratorGetNextResponse,
300                fidl::encoding::DefaultFuchsiaResourceDialect,
301                0x50af808a6e34bb96,
302            >(_buf?)?;
303            Ok(_response.composites)
304        }
305        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<CompositeNodeInfo>>(
306            (),
307            0x50af808a6e34bb96,
308            fidl::encoding::DynamicFlags::empty(),
309            _decode,
310        )
311    }
312}
313
314pub struct CompositeInfoIteratorEventStream {
315    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
316}
317
318impl std::marker::Unpin for CompositeInfoIteratorEventStream {}
319
320impl futures::stream::FusedStream for CompositeInfoIteratorEventStream {
321    fn is_terminated(&self) -> bool {
322        self.event_receiver.is_terminated()
323    }
324}
325
326impl futures::Stream for CompositeInfoIteratorEventStream {
327    type Item = Result<CompositeInfoIteratorEvent, fidl::Error>;
328
329    fn poll_next(
330        mut self: std::pin::Pin<&mut Self>,
331        cx: &mut std::task::Context<'_>,
332    ) -> std::task::Poll<Option<Self::Item>> {
333        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
334            &mut self.event_receiver,
335            cx
336        )?) {
337            Some(buf) => std::task::Poll::Ready(Some(CompositeInfoIteratorEvent::decode(buf))),
338            None => std::task::Poll::Ready(None),
339        }
340    }
341}
342
343#[derive(Debug)]
344pub enum CompositeInfoIteratorEvent {}
345
346impl CompositeInfoIteratorEvent {
347    /// Decodes a message buffer as a [`CompositeInfoIteratorEvent`].
348    fn decode(
349        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
350    ) -> Result<CompositeInfoIteratorEvent, fidl::Error> {
351        let (bytes, _handles) = buf.split_mut();
352        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
353        debug_assert_eq!(tx_header.tx_id, 0);
354        match tx_header.ordinal {
355            _ => Err(fidl::Error::UnknownOrdinal {
356                ordinal: tx_header.ordinal,
357                protocol_name:
358                    <CompositeInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
359            }),
360        }
361    }
362}
363
364/// A Stream of incoming requests for fuchsia.driver.development/CompositeInfoIterator.
365pub struct CompositeInfoIteratorRequestStream {
366    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
367    is_terminated: bool,
368}
369
370impl std::marker::Unpin for CompositeInfoIteratorRequestStream {}
371
372impl futures::stream::FusedStream for CompositeInfoIteratorRequestStream {
373    fn is_terminated(&self) -> bool {
374        self.is_terminated
375    }
376}
377
378impl fidl::endpoints::RequestStream for CompositeInfoIteratorRequestStream {
379    type Protocol = CompositeInfoIteratorMarker;
380    type ControlHandle = CompositeInfoIteratorControlHandle;
381
382    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
383        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
384    }
385
386    fn control_handle(&self) -> Self::ControlHandle {
387        CompositeInfoIteratorControlHandle { inner: self.inner.clone() }
388    }
389
390    fn into_inner(
391        self,
392    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
393    {
394        (self.inner, self.is_terminated)
395    }
396
397    fn from_inner(
398        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
399        is_terminated: bool,
400    ) -> Self {
401        Self { inner, is_terminated }
402    }
403}
404
405impl futures::Stream for CompositeInfoIteratorRequestStream {
406    type Item = Result<CompositeInfoIteratorRequest, fidl::Error>;
407
408    fn poll_next(
409        mut self: std::pin::Pin<&mut Self>,
410        cx: &mut std::task::Context<'_>,
411    ) -> std::task::Poll<Option<Self::Item>> {
412        let this = &mut *self;
413        if this.inner.check_shutdown(cx) {
414            this.is_terminated = true;
415            return std::task::Poll::Ready(None);
416        }
417        if this.is_terminated {
418            panic!("polled CompositeInfoIteratorRequestStream after completion");
419        }
420        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
421            |bytes, handles| {
422                match this.inner.channel().read_etc(cx, bytes, handles) {
423                    std::task::Poll::Ready(Ok(())) => {}
424                    std::task::Poll::Pending => return std::task::Poll::Pending,
425                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
426                        this.is_terminated = true;
427                        return std::task::Poll::Ready(None);
428                    }
429                    std::task::Poll::Ready(Err(e)) => {
430                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
431                            e.into(),
432                        ))));
433                    }
434                }
435
436                // A message has been received from the channel
437                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
438
439                std::task::Poll::Ready(Some(match header.ordinal {
440                0x50af808a6e34bb96 => {
441                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
442                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
443                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
444                    let control_handle = CompositeInfoIteratorControlHandle {
445                        inner: this.inner.clone(),
446                    };
447                    Ok(CompositeInfoIteratorRequest::GetNext {
448                        responder: CompositeInfoIteratorGetNextResponder {
449                            control_handle: std::mem::ManuallyDrop::new(control_handle),
450                            tx_id: header.tx_id,
451                        },
452                    })
453                }
454                _ => Err(fidl::Error::UnknownOrdinal {
455                    ordinal: header.ordinal,
456                    protocol_name: <CompositeInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
457                }),
458            }))
459            },
460        )
461    }
462}
463
464/// Used to page through a CompositeList.
465#[derive(Debug)]
466pub enum CompositeInfoIteratorRequest {
467    /// Returns up to 100 entries at a time. Returns empty when no more
468    /// composites are left.
469    GetNext { responder: CompositeInfoIteratorGetNextResponder },
470}
471
472impl CompositeInfoIteratorRequest {
473    #[allow(irrefutable_let_patterns)]
474    pub fn into_get_next(self) -> Option<(CompositeInfoIteratorGetNextResponder)> {
475        if let CompositeInfoIteratorRequest::GetNext { responder } = self {
476            Some((responder))
477        } else {
478            None
479        }
480    }
481
482    /// Name of the method defined in FIDL
483    pub fn method_name(&self) -> &'static str {
484        match *self {
485            CompositeInfoIteratorRequest::GetNext { .. } => "get_next",
486        }
487    }
488}
489
490#[derive(Debug, Clone)]
491pub struct CompositeInfoIteratorControlHandle {
492    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
493}
494
495impl CompositeInfoIteratorControlHandle {
496    pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
497        self.inner.shutdown_with_epitaph(status.into())
498    }
499}
500
501impl fidl::endpoints::ControlHandle for CompositeInfoIteratorControlHandle {
502    fn shutdown(&self) {
503        self.inner.shutdown()
504    }
505
506    fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
507        self.inner.shutdown_with_epitaph(status)
508    }
509
510    fn is_closed(&self) -> bool {
511        self.inner.channel().is_closed()
512    }
513    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
514        self.inner.channel().on_closed()
515    }
516
517    #[cfg(target_os = "fuchsia")]
518    fn signal_peer(
519        &self,
520        clear_mask: zx::Signals,
521        set_mask: zx::Signals,
522    ) -> Result<(), zx_status::Status> {
523        use fidl::Peered;
524        self.inner.channel().signal_peer(clear_mask, set_mask)
525    }
526}
527
528impl CompositeInfoIteratorControlHandle {}
529
530#[must_use = "FIDL methods require a response to be sent"]
531#[derive(Debug)]
532pub struct CompositeInfoIteratorGetNextResponder {
533    control_handle: std::mem::ManuallyDrop<CompositeInfoIteratorControlHandle>,
534    tx_id: u32,
535}
536
537/// Set the the channel to be shutdown (see [`CompositeInfoIteratorControlHandle::shutdown`])
538/// if the responder is dropped without sending a response, so that the client
539/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
540impl std::ops::Drop for CompositeInfoIteratorGetNextResponder {
541    fn drop(&mut self) {
542        self.control_handle.shutdown();
543        // Safety: drops once, never accessed again
544        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
545    }
546}
547
548impl fidl::endpoints::Responder for CompositeInfoIteratorGetNextResponder {
549    type ControlHandle = CompositeInfoIteratorControlHandle;
550
551    fn control_handle(&self) -> &CompositeInfoIteratorControlHandle {
552        &self.control_handle
553    }
554
555    fn drop_without_shutdown(mut self) {
556        // Safety: drops once, never accessed again due to mem::forget
557        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
558        // Prevent Drop from running (which would shut down the channel)
559        std::mem::forget(self);
560    }
561}
562
563impl CompositeInfoIteratorGetNextResponder {
564    /// Sends a response to the FIDL transaction.
565    ///
566    /// Sets the channel to shutdown if an error occurs.
567    pub fn send(self, mut composites: &[CompositeNodeInfo]) -> Result<(), fidl::Error> {
568        let _result = self.send_raw(composites);
569        if _result.is_err() {
570            self.control_handle.shutdown();
571        }
572        self.drop_without_shutdown();
573        _result
574    }
575
576    /// Similar to "send" but does not shutdown the channel if an error occurs.
577    pub fn send_no_shutdown_on_err(
578        self,
579        mut composites: &[CompositeNodeInfo],
580    ) -> Result<(), fidl::Error> {
581        let _result = self.send_raw(composites);
582        self.drop_without_shutdown();
583        _result
584    }
585
586    fn send_raw(&self, mut composites: &[CompositeNodeInfo]) -> Result<(), fidl::Error> {
587        self.control_handle.inner.send::<CompositeInfoIteratorGetNextResponse>(
588            (composites,),
589            self.tx_id,
590            0x50af808a6e34bb96,
591            fidl::encoding::DynamicFlags::empty(),
592        )
593    }
594}
595
596#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
597pub struct CompositeNodeSpecIteratorMarker;
598
599impl fidl::endpoints::ProtocolMarker for CompositeNodeSpecIteratorMarker {
600    type Proxy = CompositeNodeSpecIteratorProxy;
601    type RequestStream = CompositeNodeSpecIteratorRequestStream;
602    #[cfg(target_os = "fuchsia")]
603    type SynchronousProxy = CompositeNodeSpecIteratorSynchronousProxy;
604
605    const DEBUG_NAME: &'static str = "(anonymous) CompositeNodeSpecIterator";
606}
607
608pub trait CompositeNodeSpecIteratorProxyInterface: Send + Sync {
609    type GetNextResponseFut: std::future::Future<
610            Output = Result<Vec<fidl_fuchsia_driver_framework::CompositeInfo>, fidl::Error>,
611        > + Send;
612    fn r#get_next(&self) -> Self::GetNextResponseFut;
613}
614#[derive(Debug)]
615#[cfg(target_os = "fuchsia")]
616pub struct CompositeNodeSpecIteratorSynchronousProxy {
617    client: fidl::client::sync::Client,
618}
619
620#[cfg(target_os = "fuchsia")]
621impl fidl::endpoints::SynchronousProxy for CompositeNodeSpecIteratorSynchronousProxy {
622    type Proxy = CompositeNodeSpecIteratorProxy;
623    type Protocol = CompositeNodeSpecIteratorMarker;
624
625    fn from_channel(inner: fidl::Channel) -> Self {
626        Self::new(inner)
627    }
628
629    fn into_channel(self) -> fidl::Channel {
630        self.client.into_channel()
631    }
632
633    fn as_channel(&self) -> &fidl::Channel {
634        self.client.as_channel()
635    }
636}
637
638#[cfg(target_os = "fuchsia")]
639impl CompositeNodeSpecIteratorSynchronousProxy {
640    pub fn new(channel: fidl::Channel) -> Self {
641        Self { client: fidl::client::sync::Client::new(channel) }
642    }
643
644    pub fn into_channel(self) -> fidl::Channel {
645        self.client.into_channel()
646    }
647
648    /// Waits until an event arrives and returns it. It is safe for other
649    /// threads to make concurrent requests while waiting for an event.
650    pub fn wait_for_event(
651        &self,
652        deadline: zx::MonotonicInstant,
653    ) -> Result<CompositeNodeSpecIteratorEvent, fidl::Error> {
654        CompositeNodeSpecIteratorEvent::decode(
655            self.client.wait_for_event::<CompositeNodeSpecIteratorMarker>(deadline)?,
656        )
657    }
658
659    /// Returns empty when no more node groups are left.
660    pub fn r#get_next(
661        &self,
662        ___deadline: zx::MonotonicInstant,
663    ) -> Result<Vec<fidl_fuchsia_driver_framework::CompositeInfo>, fidl::Error> {
664        let _response = self.client.send_query::<
665            fidl::encoding::EmptyPayload,
666            CompositeNodeSpecIteratorGetNextResponse,
667            CompositeNodeSpecIteratorMarker,
668        >(
669            (),
670            0x32fd110355479f71,
671            fidl::encoding::DynamicFlags::empty(),
672            ___deadline,
673        )?;
674        Ok(_response.specs)
675    }
676}
677
678#[cfg(target_os = "fuchsia")]
679impl From<CompositeNodeSpecIteratorSynchronousProxy> for zx::NullableHandle {
680    fn from(value: CompositeNodeSpecIteratorSynchronousProxy) -> Self {
681        value.into_channel().into()
682    }
683}
684
685#[cfg(target_os = "fuchsia")]
686impl From<fidl::Channel> for CompositeNodeSpecIteratorSynchronousProxy {
687    fn from(value: fidl::Channel) -> Self {
688        Self::new(value)
689    }
690}
691
692#[cfg(target_os = "fuchsia")]
693impl fidl::endpoints::FromClient for CompositeNodeSpecIteratorSynchronousProxy {
694    type Protocol = CompositeNodeSpecIteratorMarker;
695
696    fn from_client(value: fidl::endpoints::ClientEnd<CompositeNodeSpecIteratorMarker>) -> Self {
697        Self::new(value.into_channel())
698    }
699}
700
701#[derive(Debug, Clone)]
702pub struct CompositeNodeSpecIteratorProxy {
703    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
704}
705
706impl fidl::endpoints::Proxy for CompositeNodeSpecIteratorProxy {
707    type Protocol = CompositeNodeSpecIteratorMarker;
708
709    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
710        Self::new(inner)
711    }
712
713    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
714        self.client.into_channel().map_err(|client| Self { client })
715    }
716
717    fn as_channel(&self) -> &::fidl::AsyncChannel {
718        self.client.as_channel()
719    }
720}
721
722impl CompositeNodeSpecIteratorProxy {
723    /// Create a new Proxy for fuchsia.driver.development/CompositeNodeSpecIterator.
724    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
725        let protocol_name =
726            <CompositeNodeSpecIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
727        Self { client: fidl::client::Client::new(channel, protocol_name) }
728    }
729
730    /// Get a Stream of events from the remote end of the protocol.
731    ///
732    /// # Panics
733    ///
734    /// Panics if the event stream was already taken.
735    pub fn take_event_stream(&self) -> CompositeNodeSpecIteratorEventStream {
736        CompositeNodeSpecIteratorEventStream { event_receiver: self.client.take_event_receiver() }
737    }
738
739    /// Returns empty when no more node groups are left.
740    pub fn r#get_next(
741        &self,
742    ) -> fidl::client::QueryResponseFut<
743        Vec<fidl_fuchsia_driver_framework::CompositeInfo>,
744        fidl::encoding::DefaultFuchsiaResourceDialect,
745    > {
746        CompositeNodeSpecIteratorProxyInterface::r#get_next(self)
747    }
748}
749
750impl CompositeNodeSpecIteratorProxyInterface for CompositeNodeSpecIteratorProxy {
751    type GetNextResponseFut = fidl::client::QueryResponseFut<
752        Vec<fidl_fuchsia_driver_framework::CompositeInfo>,
753        fidl::encoding::DefaultFuchsiaResourceDialect,
754    >;
755    fn r#get_next(&self) -> Self::GetNextResponseFut {
756        fn _decode(
757            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
758        ) -> Result<Vec<fidl_fuchsia_driver_framework::CompositeInfo>, fidl::Error> {
759            let _response = fidl::client::decode_transaction_body::<
760                CompositeNodeSpecIteratorGetNextResponse,
761                fidl::encoding::DefaultFuchsiaResourceDialect,
762                0x32fd110355479f71,
763            >(_buf?)?;
764            Ok(_response.specs)
765        }
766        self.client.send_query_and_decode::<
767            fidl::encoding::EmptyPayload,
768            Vec<fidl_fuchsia_driver_framework::CompositeInfo>,
769        >(
770            (),
771            0x32fd110355479f71,
772            fidl::encoding::DynamicFlags::empty(),
773            _decode,
774        )
775    }
776}
777
778pub struct CompositeNodeSpecIteratorEventStream {
779    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
780}
781
782impl std::marker::Unpin for CompositeNodeSpecIteratorEventStream {}
783
784impl futures::stream::FusedStream for CompositeNodeSpecIteratorEventStream {
785    fn is_terminated(&self) -> bool {
786        self.event_receiver.is_terminated()
787    }
788}
789
790impl futures::Stream for CompositeNodeSpecIteratorEventStream {
791    type Item = Result<CompositeNodeSpecIteratorEvent, fidl::Error>;
792
793    fn poll_next(
794        mut self: std::pin::Pin<&mut Self>,
795        cx: &mut std::task::Context<'_>,
796    ) -> std::task::Poll<Option<Self::Item>> {
797        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
798            &mut self.event_receiver,
799            cx
800        )?) {
801            Some(buf) => std::task::Poll::Ready(Some(CompositeNodeSpecIteratorEvent::decode(buf))),
802            None => std::task::Poll::Ready(None),
803        }
804    }
805}
806
807#[derive(Debug)]
808pub enum CompositeNodeSpecIteratorEvent {}
809
810impl CompositeNodeSpecIteratorEvent {
811    /// Decodes a message buffer as a [`CompositeNodeSpecIteratorEvent`].
812    fn decode(
813        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
814    ) -> Result<CompositeNodeSpecIteratorEvent, fidl::Error> {
815        let (bytes, _handles) = buf.split_mut();
816        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
817        debug_assert_eq!(tx_header.tx_id, 0);
818        match tx_header.ordinal {
819            _ => Err(fidl::Error::UnknownOrdinal {
820                ordinal: tx_header.ordinal,
821                protocol_name:
822                    <CompositeNodeSpecIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
823            }),
824        }
825    }
826}
827
828/// A Stream of incoming requests for fuchsia.driver.development/CompositeNodeSpecIterator.
829pub struct CompositeNodeSpecIteratorRequestStream {
830    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
831    is_terminated: bool,
832}
833
834impl std::marker::Unpin for CompositeNodeSpecIteratorRequestStream {}
835
836impl futures::stream::FusedStream for CompositeNodeSpecIteratorRequestStream {
837    fn is_terminated(&self) -> bool {
838        self.is_terminated
839    }
840}
841
842impl fidl::endpoints::RequestStream for CompositeNodeSpecIteratorRequestStream {
843    type Protocol = CompositeNodeSpecIteratorMarker;
844    type ControlHandle = CompositeNodeSpecIteratorControlHandle;
845
846    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
847        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
848    }
849
850    fn control_handle(&self) -> Self::ControlHandle {
851        CompositeNodeSpecIteratorControlHandle { inner: self.inner.clone() }
852    }
853
854    fn into_inner(
855        self,
856    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
857    {
858        (self.inner, self.is_terminated)
859    }
860
861    fn from_inner(
862        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
863        is_terminated: bool,
864    ) -> Self {
865        Self { inner, is_terminated }
866    }
867}
868
869impl futures::Stream for CompositeNodeSpecIteratorRequestStream {
870    type Item = Result<CompositeNodeSpecIteratorRequest, fidl::Error>;
871
872    fn poll_next(
873        mut self: std::pin::Pin<&mut Self>,
874        cx: &mut std::task::Context<'_>,
875    ) -> std::task::Poll<Option<Self::Item>> {
876        let this = &mut *self;
877        if this.inner.check_shutdown(cx) {
878            this.is_terminated = true;
879            return std::task::Poll::Ready(None);
880        }
881        if this.is_terminated {
882            panic!("polled CompositeNodeSpecIteratorRequestStream after completion");
883        }
884        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
885            |bytes, handles| {
886                match this.inner.channel().read_etc(cx, bytes, handles) {
887                    std::task::Poll::Ready(Ok(())) => {}
888                    std::task::Poll::Pending => return std::task::Poll::Pending,
889                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
890                        this.is_terminated = true;
891                        return std::task::Poll::Ready(None);
892                    }
893                    std::task::Poll::Ready(Err(e)) => {
894                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
895                            e.into(),
896                        ))));
897                    }
898                }
899
900                // A message has been received from the channel
901                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
902
903                std::task::Poll::Ready(Some(match header.ordinal {
904                0x32fd110355479f71 => {
905                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
906                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
907                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
908                    let control_handle = CompositeNodeSpecIteratorControlHandle {
909                        inner: this.inner.clone(),
910                    };
911                    Ok(CompositeNodeSpecIteratorRequest::GetNext {
912                        responder: CompositeNodeSpecIteratorGetNextResponder {
913                            control_handle: std::mem::ManuallyDrop::new(control_handle),
914                            tx_id: header.tx_id,
915                        },
916                    })
917                }
918                _ => Err(fidl::Error::UnknownOrdinal {
919                    ordinal: header.ordinal,
920                    protocol_name: <CompositeNodeSpecIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
921                }),
922            }))
923            },
924        )
925    }
926}
927
928#[derive(Debug)]
929pub enum CompositeNodeSpecIteratorRequest {
930    /// Returns empty when no more node groups are left.
931    GetNext { responder: CompositeNodeSpecIteratorGetNextResponder },
932}
933
934impl CompositeNodeSpecIteratorRequest {
935    #[allow(irrefutable_let_patterns)]
936    pub fn into_get_next(self) -> Option<(CompositeNodeSpecIteratorGetNextResponder)> {
937        if let CompositeNodeSpecIteratorRequest::GetNext { responder } = self {
938            Some((responder))
939        } else {
940            None
941        }
942    }
943
944    /// Name of the method defined in FIDL
945    pub fn method_name(&self) -> &'static str {
946        match *self {
947            CompositeNodeSpecIteratorRequest::GetNext { .. } => "get_next",
948        }
949    }
950}
951
952#[derive(Debug, Clone)]
953pub struct CompositeNodeSpecIteratorControlHandle {
954    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
955}
956
957impl CompositeNodeSpecIteratorControlHandle {
958    pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
959        self.inner.shutdown_with_epitaph(status.into())
960    }
961}
962
963impl fidl::endpoints::ControlHandle for CompositeNodeSpecIteratorControlHandle {
964    fn shutdown(&self) {
965        self.inner.shutdown()
966    }
967
968    fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
969        self.inner.shutdown_with_epitaph(status)
970    }
971
972    fn is_closed(&self) -> bool {
973        self.inner.channel().is_closed()
974    }
975    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
976        self.inner.channel().on_closed()
977    }
978
979    #[cfg(target_os = "fuchsia")]
980    fn signal_peer(
981        &self,
982        clear_mask: zx::Signals,
983        set_mask: zx::Signals,
984    ) -> Result<(), zx_status::Status> {
985        use fidl::Peered;
986        self.inner.channel().signal_peer(clear_mask, set_mask)
987    }
988}
989
990impl CompositeNodeSpecIteratorControlHandle {}
991
992#[must_use = "FIDL methods require a response to be sent"]
993#[derive(Debug)]
994pub struct CompositeNodeSpecIteratorGetNextResponder {
995    control_handle: std::mem::ManuallyDrop<CompositeNodeSpecIteratorControlHandle>,
996    tx_id: u32,
997}
998
999/// Set the the channel to be shutdown (see [`CompositeNodeSpecIteratorControlHandle::shutdown`])
1000/// if the responder is dropped without sending a response, so that the client
1001/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1002impl std::ops::Drop for CompositeNodeSpecIteratorGetNextResponder {
1003    fn drop(&mut self) {
1004        self.control_handle.shutdown();
1005        // Safety: drops once, never accessed again
1006        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1007    }
1008}
1009
1010impl fidl::endpoints::Responder for CompositeNodeSpecIteratorGetNextResponder {
1011    type ControlHandle = CompositeNodeSpecIteratorControlHandle;
1012
1013    fn control_handle(&self) -> &CompositeNodeSpecIteratorControlHandle {
1014        &self.control_handle
1015    }
1016
1017    fn drop_without_shutdown(mut self) {
1018        // Safety: drops once, never accessed again due to mem::forget
1019        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1020        // Prevent Drop from running (which would shut down the channel)
1021        std::mem::forget(self);
1022    }
1023}
1024
1025impl CompositeNodeSpecIteratorGetNextResponder {
1026    /// Sends a response to the FIDL transaction.
1027    ///
1028    /// Sets the channel to shutdown if an error occurs.
1029    pub fn send(
1030        self,
1031        mut specs: &[fidl_fuchsia_driver_framework::CompositeInfo],
1032    ) -> Result<(), fidl::Error> {
1033        let _result = self.send_raw(specs);
1034        if _result.is_err() {
1035            self.control_handle.shutdown();
1036        }
1037        self.drop_without_shutdown();
1038        _result
1039    }
1040
1041    /// Similar to "send" but does not shutdown the channel if an error occurs.
1042    pub fn send_no_shutdown_on_err(
1043        self,
1044        mut specs: &[fidl_fuchsia_driver_framework::CompositeInfo],
1045    ) -> Result<(), fidl::Error> {
1046        let _result = self.send_raw(specs);
1047        self.drop_without_shutdown();
1048        _result
1049    }
1050
1051    fn send_raw(
1052        &self,
1053        mut specs: &[fidl_fuchsia_driver_framework::CompositeInfo],
1054    ) -> Result<(), fidl::Error> {
1055        self.control_handle.inner.send::<CompositeNodeSpecIteratorGetNextResponse>(
1056            (specs,),
1057            self.tx_id,
1058            0x32fd110355479f71,
1059            fidl::encoding::DynamicFlags::empty(),
1060        )
1061    }
1062}
1063
1064#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1065pub struct DriverHostInfoIteratorMarker;
1066
1067impl fidl::endpoints::ProtocolMarker for DriverHostInfoIteratorMarker {
1068    type Proxy = DriverHostInfoIteratorProxy;
1069    type RequestStream = DriverHostInfoIteratorRequestStream;
1070    #[cfg(target_os = "fuchsia")]
1071    type SynchronousProxy = DriverHostInfoIteratorSynchronousProxy;
1072
1073    const DEBUG_NAME: &'static str = "(anonymous) DriverHostInfoIterator";
1074}
1075
1076pub trait DriverHostInfoIteratorProxyInterface: Send + Sync {
1077    type GetNextResponseFut: std::future::Future<Output = Result<Vec<DriverHostInfo>, fidl::Error>>
1078        + Send;
1079    fn r#get_next(&self) -> Self::GetNextResponseFut;
1080}
1081#[derive(Debug)]
1082#[cfg(target_os = "fuchsia")]
1083pub struct DriverHostInfoIteratorSynchronousProxy {
1084    client: fidl::client::sync::Client,
1085}
1086
1087#[cfg(target_os = "fuchsia")]
1088impl fidl::endpoints::SynchronousProxy for DriverHostInfoIteratorSynchronousProxy {
1089    type Proxy = DriverHostInfoIteratorProxy;
1090    type Protocol = DriverHostInfoIteratorMarker;
1091
1092    fn from_channel(inner: fidl::Channel) -> Self {
1093        Self::new(inner)
1094    }
1095
1096    fn into_channel(self) -> fidl::Channel {
1097        self.client.into_channel()
1098    }
1099
1100    fn as_channel(&self) -> &fidl::Channel {
1101        self.client.as_channel()
1102    }
1103}
1104
1105#[cfg(target_os = "fuchsia")]
1106impl DriverHostInfoIteratorSynchronousProxy {
1107    pub fn new(channel: fidl::Channel) -> Self {
1108        Self { client: fidl::client::sync::Client::new(channel) }
1109    }
1110
1111    pub fn into_channel(self) -> fidl::Channel {
1112        self.client.into_channel()
1113    }
1114
1115    /// Waits until an event arrives and returns it. It is safe for other
1116    /// threads to make concurrent requests while waiting for an event.
1117    pub fn wait_for_event(
1118        &self,
1119        deadline: zx::MonotonicInstant,
1120    ) -> Result<DriverHostInfoIteratorEvent, fidl::Error> {
1121        DriverHostInfoIteratorEvent::decode(
1122            self.client.wait_for_event::<DriverHostInfoIteratorMarker>(deadline)?,
1123        )
1124    }
1125
1126    /// Returns empty when no more entries left.
1127    pub fn r#get_next(
1128        &self,
1129        ___deadline: zx::MonotonicInstant,
1130    ) -> Result<Vec<DriverHostInfo>, fidl::Error> {
1131        let _response = self.client.send_query::<
1132            fidl::encoding::EmptyPayload,
1133            DriverHostInfoIteratorGetNextResponse,
1134            DriverHostInfoIteratorMarker,
1135        >(
1136            (),
1137            0xbf58e5cd863a86,
1138            fidl::encoding::DynamicFlags::empty(),
1139            ___deadline,
1140        )?;
1141        Ok(_response.driver_hosts)
1142    }
1143}
1144
1145#[cfg(target_os = "fuchsia")]
1146impl From<DriverHostInfoIteratorSynchronousProxy> for zx::NullableHandle {
1147    fn from(value: DriverHostInfoIteratorSynchronousProxy) -> Self {
1148        value.into_channel().into()
1149    }
1150}
1151
1152#[cfg(target_os = "fuchsia")]
1153impl From<fidl::Channel> for DriverHostInfoIteratorSynchronousProxy {
1154    fn from(value: fidl::Channel) -> Self {
1155        Self::new(value)
1156    }
1157}
1158
1159#[cfg(target_os = "fuchsia")]
1160impl fidl::endpoints::FromClient for DriverHostInfoIteratorSynchronousProxy {
1161    type Protocol = DriverHostInfoIteratorMarker;
1162
1163    fn from_client(value: fidl::endpoints::ClientEnd<DriverHostInfoIteratorMarker>) -> Self {
1164        Self::new(value.into_channel())
1165    }
1166}
1167
1168#[derive(Debug, Clone)]
1169pub struct DriverHostInfoIteratorProxy {
1170    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1171}
1172
1173impl fidl::endpoints::Proxy for DriverHostInfoIteratorProxy {
1174    type Protocol = DriverHostInfoIteratorMarker;
1175
1176    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1177        Self::new(inner)
1178    }
1179
1180    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1181        self.client.into_channel().map_err(|client| Self { client })
1182    }
1183
1184    fn as_channel(&self) -> &::fidl::AsyncChannel {
1185        self.client.as_channel()
1186    }
1187}
1188
1189impl DriverHostInfoIteratorProxy {
1190    /// Create a new Proxy for fuchsia.driver.development/DriverHostInfoIterator.
1191    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1192        let protocol_name =
1193            <DriverHostInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1194        Self { client: fidl::client::Client::new(channel, protocol_name) }
1195    }
1196
1197    /// Get a Stream of events from the remote end of the protocol.
1198    ///
1199    /// # Panics
1200    ///
1201    /// Panics if the event stream was already taken.
1202    pub fn take_event_stream(&self) -> DriverHostInfoIteratorEventStream {
1203        DriverHostInfoIteratorEventStream { event_receiver: self.client.take_event_receiver() }
1204    }
1205
1206    /// Returns empty when no more entries left.
1207    pub fn r#get_next(
1208        &self,
1209    ) -> fidl::client::QueryResponseFut<
1210        Vec<DriverHostInfo>,
1211        fidl::encoding::DefaultFuchsiaResourceDialect,
1212    > {
1213        DriverHostInfoIteratorProxyInterface::r#get_next(self)
1214    }
1215}
1216
1217impl DriverHostInfoIteratorProxyInterface for DriverHostInfoIteratorProxy {
1218    type GetNextResponseFut = fidl::client::QueryResponseFut<
1219        Vec<DriverHostInfo>,
1220        fidl::encoding::DefaultFuchsiaResourceDialect,
1221    >;
1222    fn r#get_next(&self) -> Self::GetNextResponseFut {
1223        fn _decode(
1224            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1225        ) -> Result<Vec<DriverHostInfo>, fidl::Error> {
1226            let _response = fidl::client::decode_transaction_body::<
1227                DriverHostInfoIteratorGetNextResponse,
1228                fidl::encoding::DefaultFuchsiaResourceDialect,
1229                0xbf58e5cd863a86,
1230            >(_buf?)?;
1231            Ok(_response.driver_hosts)
1232        }
1233        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<DriverHostInfo>>(
1234            (),
1235            0xbf58e5cd863a86,
1236            fidl::encoding::DynamicFlags::empty(),
1237            _decode,
1238        )
1239    }
1240}
1241
1242pub struct DriverHostInfoIteratorEventStream {
1243    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1244}
1245
1246impl std::marker::Unpin for DriverHostInfoIteratorEventStream {}
1247
1248impl futures::stream::FusedStream for DriverHostInfoIteratorEventStream {
1249    fn is_terminated(&self) -> bool {
1250        self.event_receiver.is_terminated()
1251    }
1252}
1253
1254impl futures::Stream for DriverHostInfoIteratorEventStream {
1255    type Item = Result<DriverHostInfoIteratorEvent, fidl::Error>;
1256
1257    fn poll_next(
1258        mut self: std::pin::Pin<&mut Self>,
1259        cx: &mut std::task::Context<'_>,
1260    ) -> std::task::Poll<Option<Self::Item>> {
1261        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1262            &mut self.event_receiver,
1263            cx
1264        )?) {
1265            Some(buf) => std::task::Poll::Ready(Some(DriverHostInfoIteratorEvent::decode(buf))),
1266            None => std::task::Poll::Ready(None),
1267        }
1268    }
1269}
1270
1271#[derive(Debug)]
1272pub enum DriverHostInfoIteratorEvent {}
1273
1274impl DriverHostInfoIteratorEvent {
1275    /// Decodes a message buffer as a [`DriverHostInfoIteratorEvent`].
1276    fn decode(
1277        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1278    ) -> Result<DriverHostInfoIteratorEvent, fidl::Error> {
1279        let (bytes, _handles) = buf.split_mut();
1280        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1281        debug_assert_eq!(tx_header.tx_id, 0);
1282        match tx_header.ordinal {
1283            _ => Err(fidl::Error::UnknownOrdinal {
1284                ordinal: tx_header.ordinal,
1285                protocol_name:
1286                    <DriverHostInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1287            }),
1288        }
1289    }
1290}
1291
1292/// A Stream of incoming requests for fuchsia.driver.development/DriverHostInfoIterator.
1293pub struct DriverHostInfoIteratorRequestStream {
1294    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1295    is_terminated: bool,
1296}
1297
1298impl std::marker::Unpin for DriverHostInfoIteratorRequestStream {}
1299
1300impl futures::stream::FusedStream for DriverHostInfoIteratorRequestStream {
1301    fn is_terminated(&self) -> bool {
1302        self.is_terminated
1303    }
1304}
1305
1306impl fidl::endpoints::RequestStream for DriverHostInfoIteratorRequestStream {
1307    type Protocol = DriverHostInfoIteratorMarker;
1308    type ControlHandle = DriverHostInfoIteratorControlHandle;
1309
1310    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1311        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1312    }
1313
1314    fn control_handle(&self) -> Self::ControlHandle {
1315        DriverHostInfoIteratorControlHandle { inner: self.inner.clone() }
1316    }
1317
1318    fn into_inner(
1319        self,
1320    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1321    {
1322        (self.inner, self.is_terminated)
1323    }
1324
1325    fn from_inner(
1326        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1327        is_terminated: bool,
1328    ) -> Self {
1329        Self { inner, is_terminated }
1330    }
1331}
1332
1333impl futures::Stream for DriverHostInfoIteratorRequestStream {
1334    type Item = Result<DriverHostInfoIteratorRequest, fidl::Error>;
1335
1336    fn poll_next(
1337        mut self: std::pin::Pin<&mut Self>,
1338        cx: &mut std::task::Context<'_>,
1339    ) -> std::task::Poll<Option<Self::Item>> {
1340        let this = &mut *self;
1341        if this.inner.check_shutdown(cx) {
1342            this.is_terminated = true;
1343            return std::task::Poll::Ready(None);
1344        }
1345        if this.is_terminated {
1346            panic!("polled DriverHostInfoIteratorRequestStream after completion");
1347        }
1348        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1349            |bytes, handles| {
1350                match this.inner.channel().read_etc(cx, bytes, handles) {
1351                    std::task::Poll::Ready(Ok(())) => {}
1352                    std::task::Poll::Pending => return std::task::Poll::Pending,
1353                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1354                        this.is_terminated = true;
1355                        return std::task::Poll::Ready(None);
1356                    }
1357                    std::task::Poll::Ready(Err(e)) => {
1358                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1359                            e.into(),
1360                        ))));
1361                    }
1362                }
1363
1364                // A message has been received from the channel
1365                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1366
1367                std::task::Poll::Ready(Some(match header.ordinal {
1368                0xbf58e5cd863a86 => {
1369                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1370                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1371                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1372                    let control_handle = DriverHostInfoIteratorControlHandle {
1373                        inner: this.inner.clone(),
1374                    };
1375                    Ok(DriverHostInfoIteratorRequest::GetNext {
1376                        responder: DriverHostInfoIteratorGetNextResponder {
1377                            control_handle: std::mem::ManuallyDrop::new(control_handle),
1378                            tx_id: header.tx_id,
1379                        },
1380                    })
1381                }
1382                _ => Err(fidl::Error::UnknownOrdinal {
1383                    ordinal: header.ordinal,
1384                    protocol_name: <DriverHostInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1385                }),
1386            }))
1387            },
1388        )
1389    }
1390}
1391
1392#[derive(Debug)]
1393pub enum DriverHostInfoIteratorRequest {
1394    /// Returns empty when no more entries left.
1395    GetNext { responder: DriverHostInfoIteratorGetNextResponder },
1396}
1397
1398impl DriverHostInfoIteratorRequest {
1399    #[allow(irrefutable_let_patterns)]
1400    pub fn into_get_next(self) -> Option<(DriverHostInfoIteratorGetNextResponder)> {
1401        if let DriverHostInfoIteratorRequest::GetNext { responder } = self {
1402            Some((responder))
1403        } else {
1404            None
1405        }
1406    }
1407
1408    /// Name of the method defined in FIDL
1409    pub fn method_name(&self) -> &'static str {
1410        match *self {
1411            DriverHostInfoIteratorRequest::GetNext { .. } => "get_next",
1412        }
1413    }
1414}
1415
1416#[derive(Debug, Clone)]
1417pub struct DriverHostInfoIteratorControlHandle {
1418    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1419}
1420
1421impl DriverHostInfoIteratorControlHandle {
1422    pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
1423        self.inner.shutdown_with_epitaph(status.into())
1424    }
1425}
1426
1427impl fidl::endpoints::ControlHandle for DriverHostInfoIteratorControlHandle {
1428    fn shutdown(&self) {
1429        self.inner.shutdown()
1430    }
1431
1432    fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
1433        self.inner.shutdown_with_epitaph(status)
1434    }
1435
1436    fn is_closed(&self) -> bool {
1437        self.inner.channel().is_closed()
1438    }
1439    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1440        self.inner.channel().on_closed()
1441    }
1442
1443    #[cfg(target_os = "fuchsia")]
1444    fn signal_peer(
1445        &self,
1446        clear_mask: zx::Signals,
1447        set_mask: zx::Signals,
1448    ) -> Result<(), zx_status::Status> {
1449        use fidl::Peered;
1450        self.inner.channel().signal_peer(clear_mask, set_mask)
1451    }
1452}
1453
1454impl DriverHostInfoIteratorControlHandle {}
1455
1456#[must_use = "FIDL methods require a response to be sent"]
1457#[derive(Debug)]
1458pub struct DriverHostInfoIteratorGetNextResponder {
1459    control_handle: std::mem::ManuallyDrop<DriverHostInfoIteratorControlHandle>,
1460    tx_id: u32,
1461}
1462
1463/// Set the the channel to be shutdown (see [`DriverHostInfoIteratorControlHandle::shutdown`])
1464/// if the responder is dropped without sending a response, so that the client
1465/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1466impl std::ops::Drop for DriverHostInfoIteratorGetNextResponder {
1467    fn drop(&mut self) {
1468        self.control_handle.shutdown();
1469        // Safety: drops once, never accessed again
1470        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1471    }
1472}
1473
1474impl fidl::endpoints::Responder for DriverHostInfoIteratorGetNextResponder {
1475    type ControlHandle = DriverHostInfoIteratorControlHandle;
1476
1477    fn control_handle(&self) -> &DriverHostInfoIteratorControlHandle {
1478        &self.control_handle
1479    }
1480
1481    fn drop_without_shutdown(mut self) {
1482        // Safety: drops once, never accessed again due to mem::forget
1483        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1484        // Prevent Drop from running (which would shut down the channel)
1485        std::mem::forget(self);
1486    }
1487}
1488
1489impl DriverHostInfoIteratorGetNextResponder {
1490    /// Sends a response to the FIDL transaction.
1491    ///
1492    /// Sets the channel to shutdown if an error occurs.
1493    pub fn send(self, mut driver_hosts: &[DriverHostInfo]) -> Result<(), fidl::Error> {
1494        let _result = self.send_raw(driver_hosts);
1495        if _result.is_err() {
1496            self.control_handle.shutdown();
1497        }
1498        self.drop_without_shutdown();
1499        _result
1500    }
1501
1502    /// Similar to "send" but does not shutdown the channel if an error occurs.
1503    pub fn send_no_shutdown_on_err(
1504        self,
1505        mut driver_hosts: &[DriverHostInfo],
1506    ) -> Result<(), fidl::Error> {
1507        let _result = self.send_raw(driver_hosts);
1508        self.drop_without_shutdown();
1509        _result
1510    }
1511
1512    fn send_raw(&self, mut driver_hosts: &[DriverHostInfo]) -> Result<(), fidl::Error> {
1513        self.control_handle.inner.send::<DriverHostInfoIteratorGetNextResponse>(
1514            (driver_hosts,),
1515            self.tx_id,
1516            0xbf58e5cd863a86,
1517            fidl::encoding::DynamicFlags::empty(),
1518        )
1519    }
1520}
1521
1522#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1523pub struct DriverInfoIteratorMarker;
1524
1525impl fidl::endpoints::ProtocolMarker for DriverInfoIteratorMarker {
1526    type Proxy = DriverInfoIteratorProxy;
1527    type RequestStream = DriverInfoIteratorRequestStream;
1528    #[cfg(target_os = "fuchsia")]
1529    type SynchronousProxy = DriverInfoIteratorSynchronousProxy;
1530
1531    const DEBUG_NAME: &'static str = "(anonymous) DriverInfoIterator";
1532}
1533
1534pub trait DriverInfoIteratorProxyInterface: Send + Sync {
1535    type GetNextResponseFut: std::future::Future<
1536            Output = Result<Vec<fidl_fuchsia_driver_framework::DriverInfo>, fidl::Error>,
1537        > + Send;
1538    fn r#get_next(&self) -> Self::GetNextResponseFut;
1539}
1540#[derive(Debug)]
1541#[cfg(target_os = "fuchsia")]
1542pub struct DriverInfoIteratorSynchronousProxy {
1543    client: fidl::client::sync::Client,
1544}
1545
1546#[cfg(target_os = "fuchsia")]
1547impl fidl::endpoints::SynchronousProxy for DriverInfoIteratorSynchronousProxy {
1548    type Proxy = DriverInfoIteratorProxy;
1549    type Protocol = DriverInfoIteratorMarker;
1550
1551    fn from_channel(inner: fidl::Channel) -> Self {
1552        Self::new(inner)
1553    }
1554
1555    fn into_channel(self) -> fidl::Channel {
1556        self.client.into_channel()
1557    }
1558
1559    fn as_channel(&self) -> &fidl::Channel {
1560        self.client.as_channel()
1561    }
1562}
1563
1564#[cfg(target_os = "fuchsia")]
1565impl DriverInfoIteratorSynchronousProxy {
1566    pub fn new(channel: fidl::Channel) -> Self {
1567        Self { client: fidl::client::sync::Client::new(channel) }
1568    }
1569
1570    pub fn into_channel(self) -> fidl::Channel {
1571        self.client.into_channel()
1572    }
1573
1574    /// Waits until an event arrives and returns it. It is safe for other
1575    /// threads to make concurrent requests while waiting for an event.
1576    pub fn wait_for_event(
1577        &self,
1578        deadline: zx::MonotonicInstant,
1579    ) -> Result<DriverInfoIteratorEvent, fidl::Error> {
1580        DriverInfoIteratorEvent::decode(
1581            self.client.wait_for_event::<DriverInfoIteratorMarker>(deadline)?,
1582        )
1583    }
1584
1585    /// Returns empty when no more entries left.
1586    pub fn r#get_next(
1587        &self,
1588        ___deadline: zx::MonotonicInstant,
1589    ) -> Result<Vec<fidl_fuchsia_driver_framework::DriverInfo>, fidl::Error> {
1590        let _response = self.client.send_query::<
1591            fidl::encoding::EmptyPayload,
1592            DriverInfoIteratorGetNextResponse,
1593            DriverInfoIteratorMarker,
1594        >(
1595            (),
1596            0x2c394711c6784952,
1597            fidl::encoding::DynamicFlags::empty(),
1598            ___deadline,
1599        )?;
1600        Ok(_response.drivers)
1601    }
1602}
1603
1604#[cfg(target_os = "fuchsia")]
1605impl From<DriverInfoIteratorSynchronousProxy> for zx::NullableHandle {
1606    fn from(value: DriverInfoIteratorSynchronousProxy) -> Self {
1607        value.into_channel().into()
1608    }
1609}
1610
1611#[cfg(target_os = "fuchsia")]
1612impl From<fidl::Channel> for DriverInfoIteratorSynchronousProxy {
1613    fn from(value: fidl::Channel) -> Self {
1614        Self::new(value)
1615    }
1616}
1617
1618#[cfg(target_os = "fuchsia")]
1619impl fidl::endpoints::FromClient for DriverInfoIteratorSynchronousProxy {
1620    type Protocol = DriverInfoIteratorMarker;
1621
1622    fn from_client(value: fidl::endpoints::ClientEnd<DriverInfoIteratorMarker>) -> Self {
1623        Self::new(value.into_channel())
1624    }
1625}
1626
1627#[derive(Debug, Clone)]
1628pub struct DriverInfoIteratorProxy {
1629    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1630}
1631
1632impl fidl::endpoints::Proxy for DriverInfoIteratorProxy {
1633    type Protocol = DriverInfoIteratorMarker;
1634
1635    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1636        Self::new(inner)
1637    }
1638
1639    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1640        self.client.into_channel().map_err(|client| Self { client })
1641    }
1642
1643    fn as_channel(&self) -> &::fidl::AsyncChannel {
1644        self.client.as_channel()
1645    }
1646}
1647
1648impl DriverInfoIteratorProxy {
1649    /// Create a new Proxy for fuchsia.driver.development/DriverInfoIterator.
1650    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1651        let protocol_name =
1652            <DriverInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1653        Self { client: fidl::client::Client::new(channel, protocol_name) }
1654    }
1655
1656    /// Get a Stream of events from the remote end of the protocol.
1657    ///
1658    /// # Panics
1659    ///
1660    /// Panics if the event stream was already taken.
1661    pub fn take_event_stream(&self) -> DriverInfoIteratorEventStream {
1662        DriverInfoIteratorEventStream { event_receiver: self.client.take_event_receiver() }
1663    }
1664
1665    /// Returns empty when no more entries left.
1666    pub fn r#get_next(
1667        &self,
1668    ) -> fidl::client::QueryResponseFut<
1669        Vec<fidl_fuchsia_driver_framework::DriverInfo>,
1670        fidl::encoding::DefaultFuchsiaResourceDialect,
1671    > {
1672        DriverInfoIteratorProxyInterface::r#get_next(self)
1673    }
1674}
1675
1676impl DriverInfoIteratorProxyInterface for DriverInfoIteratorProxy {
1677    type GetNextResponseFut = fidl::client::QueryResponseFut<
1678        Vec<fidl_fuchsia_driver_framework::DriverInfo>,
1679        fidl::encoding::DefaultFuchsiaResourceDialect,
1680    >;
1681    fn r#get_next(&self) -> Self::GetNextResponseFut {
1682        fn _decode(
1683            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1684        ) -> Result<Vec<fidl_fuchsia_driver_framework::DriverInfo>, fidl::Error> {
1685            let _response = fidl::client::decode_transaction_body::<
1686                DriverInfoIteratorGetNextResponse,
1687                fidl::encoding::DefaultFuchsiaResourceDialect,
1688                0x2c394711c6784952,
1689            >(_buf?)?;
1690            Ok(_response.drivers)
1691        }
1692        self.client.send_query_and_decode::<
1693            fidl::encoding::EmptyPayload,
1694            Vec<fidl_fuchsia_driver_framework::DriverInfo>,
1695        >(
1696            (),
1697            0x2c394711c6784952,
1698            fidl::encoding::DynamicFlags::empty(),
1699            _decode,
1700        )
1701    }
1702}
1703
1704pub struct DriverInfoIteratorEventStream {
1705    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1706}
1707
1708impl std::marker::Unpin for DriverInfoIteratorEventStream {}
1709
1710impl futures::stream::FusedStream for DriverInfoIteratorEventStream {
1711    fn is_terminated(&self) -> bool {
1712        self.event_receiver.is_terminated()
1713    }
1714}
1715
1716impl futures::Stream for DriverInfoIteratorEventStream {
1717    type Item = Result<DriverInfoIteratorEvent, fidl::Error>;
1718
1719    fn poll_next(
1720        mut self: std::pin::Pin<&mut Self>,
1721        cx: &mut std::task::Context<'_>,
1722    ) -> std::task::Poll<Option<Self::Item>> {
1723        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1724            &mut self.event_receiver,
1725            cx
1726        )?) {
1727            Some(buf) => std::task::Poll::Ready(Some(DriverInfoIteratorEvent::decode(buf))),
1728            None => std::task::Poll::Ready(None),
1729        }
1730    }
1731}
1732
1733#[derive(Debug)]
1734pub enum DriverInfoIteratorEvent {}
1735
1736impl DriverInfoIteratorEvent {
1737    /// Decodes a message buffer as a [`DriverInfoIteratorEvent`].
1738    fn decode(
1739        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1740    ) -> Result<DriverInfoIteratorEvent, fidl::Error> {
1741        let (bytes, _handles) = buf.split_mut();
1742        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1743        debug_assert_eq!(tx_header.tx_id, 0);
1744        match tx_header.ordinal {
1745            _ => Err(fidl::Error::UnknownOrdinal {
1746                ordinal: tx_header.ordinal,
1747                protocol_name:
1748                    <DriverInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1749            }),
1750        }
1751    }
1752}
1753
1754/// A Stream of incoming requests for fuchsia.driver.development/DriverInfoIterator.
1755pub struct DriverInfoIteratorRequestStream {
1756    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1757    is_terminated: bool,
1758}
1759
1760impl std::marker::Unpin for DriverInfoIteratorRequestStream {}
1761
1762impl futures::stream::FusedStream for DriverInfoIteratorRequestStream {
1763    fn is_terminated(&self) -> bool {
1764        self.is_terminated
1765    }
1766}
1767
1768impl fidl::endpoints::RequestStream for DriverInfoIteratorRequestStream {
1769    type Protocol = DriverInfoIteratorMarker;
1770    type ControlHandle = DriverInfoIteratorControlHandle;
1771
1772    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1773        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1774    }
1775
1776    fn control_handle(&self) -> Self::ControlHandle {
1777        DriverInfoIteratorControlHandle { inner: self.inner.clone() }
1778    }
1779
1780    fn into_inner(
1781        self,
1782    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1783    {
1784        (self.inner, self.is_terminated)
1785    }
1786
1787    fn from_inner(
1788        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1789        is_terminated: bool,
1790    ) -> Self {
1791        Self { inner, is_terminated }
1792    }
1793}
1794
1795impl futures::Stream for DriverInfoIteratorRequestStream {
1796    type Item = Result<DriverInfoIteratorRequest, fidl::Error>;
1797
1798    fn poll_next(
1799        mut self: std::pin::Pin<&mut Self>,
1800        cx: &mut std::task::Context<'_>,
1801    ) -> std::task::Poll<Option<Self::Item>> {
1802        let this = &mut *self;
1803        if this.inner.check_shutdown(cx) {
1804            this.is_terminated = true;
1805            return std::task::Poll::Ready(None);
1806        }
1807        if this.is_terminated {
1808            panic!("polled DriverInfoIteratorRequestStream after completion");
1809        }
1810        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1811            |bytes, handles| {
1812                match this.inner.channel().read_etc(cx, bytes, handles) {
1813                    std::task::Poll::Ready(Ok(())) => {}
1814                    std::task::Poll::Pending => return std::task::Poll::Pending,
1815                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1816                        this.is_terminated = true;
1817                        return std::task::Poll::Ready(None);
1818                    }
1819                    std::task::Poll::Ready(Err(e)) => {
1820                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1821                            e.into(),
1822                        ))));
1823                    }
1824                }
1825
1826                // A message has been received from the channel
1827                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1828
1829                std::task::Poll::Ready(Some(match header.ordinal {
1830                0x2c394711c6784952 => {
1831                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1832                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
1833                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1834                    let control_handle = DriverInfoIteratorControlHandle {
1835                        inner: this.inner.clone(),
1836                    };
1837                    Ok(DriverInfoIteratorRequest::GetNext {
1838                        responder: DriverInfoIteratorGetNextResponder {
1839                            control_handle: std::mem::ManuallyDrop::new(control_handle),
1840                            tx_id: header.tx_id,
1841                        },
1842                    })
1843                }
1844                _ => Err(fidl::Error::UnknownOrdinal {
1845                    ordinal: header.ordinal,
1846                    protocol_name: <DriverInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1847                }),
1848            }))
1849            },
1850        )
1851    }
1852}
1853
1854#[derive(Debug)]
1855pub enum DriverInfoIteratorRequest {
1856    /// Returns empty when no more entries left.
1857    GetNext { responder: DriverInfoIteratorGetNextResponder },
1858}
1859
1860impl DriverInfoIteratorRequest {
1861    #[allow(irrefutable_let_patterns)]
1862    pub fn into_get_next(self) -> Option<(DriverInfoIteratorGetNextResponder)> {
1863        if let DriverInfoIteratorRequest::GetNext { responder } = self {
1864            Some((responder))
1865        } else {
1866            None
1867        }
1868    }
1869
1870    /// Name of the method defined in FIDL
1871    pub fn method_name(&self) -> &'static str {
1872        match *self {
1873            DriverInfoIteratorRequest::GetNext { .. } => "get_next",
1874        }
1875    }
1876}
1877
1878#[derive(Debug, Clone)]
1879pub struct DriverInfoIteratorControlHandle {
1880    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1881}
1882
1883impl DriverInfoIteratorControlHandle {
1884    pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
1885        self.inner.shutdown_with_epitaph(status.into())
1886    }
1887}
1888
1889impl fidl::endpoints::ControlHandle for DriverInfoIteratorControlHandle {
1890    fn shutdown(&self) {
1891        self.inner.shutdown()
1892    }
1893
1894    fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
1895        self.inner.shutdown_with_epitaph(status)
1896    }
1897
1898    fn is_closed(&self) -> bool {
1899        self.inner.channel().is_closed()
1900    }
1901    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1902        self.inner.channel().on_closed()
1903    }
1904
1905    #[cfg(target_os = "fuchsia")]
1906    fn signal_peer(
1907        &self,
1908        clear_mask: zx::Signals,
1909        set_mask: zx::Signals,
1910    ) -> Result<(), zx_status::Status> {
1911        use fidl::Peered;
1912        self.inner.channel().signal_peer(clear_mask, set_mask)
1913    }
1914}
1915
1916impl DriverInfoIteratorControlHandle {}
1917
1918#[must_use = "FIDL methods require a response to be sent"]
1919#[derive(Debug)]
1920pub struct DriverInfoIteratorGetNextResponder {
1921    control_handle: std::mem::ManuallyDrop<DriverInfoIteratorControlHandle>,
1922    tx_id: u32,
1923}
1924
1925/// Set the the channel to be shutdown (see [`DriverInfoIteratorControlHandle::shutdown`])
1926/// if the responder is dropped without sending a response, so that the client
1927/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1928impl std::ops::Drop for DriverInfoIteratorGetNextResponder {
1929    fn drop(&mut self) {
1930        self.control_handle.shutdown();
1931        // Safety: drops once, never accessed again
1932        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1933    }
1934}
1935
1936impl fidl::endpoints::Responder for DriverInfoIteratorGetNextResponder {
1937    type ControlHandle = DriverInfoIteratorControlHandle;
1938
1939    fn control_handle(&self) -> &DriverInfoIteratorControlHandle {
1940        &self.control_handle
1941    }
1942
1943    fn drop_without_shutdown(mut self) {
1944        // Safety: drops once, never accessed again due to mem::forget
1945        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1946        // Prevent Drop from running (which would shut down the channel)
1947        std::mem::forget(self);
1948    }
1949}
1950
1951impl DriverInfoIteratorGetNextResponder {
1952    /// Sends a response to the FIDL transaction.
1953    ///
1954    /// Sets the channel to shutdown if an error occurs.
1955    pub fn send(
1956        self,
1957        mut drivers: &[fidl_fuchsia_driver_framework::DriverInfo],
1958    ) -> Result<(), fidl::Error> {
1959        let _result = self.send_raw(drivers);
1960        if _result.is_err() {
1961            self.control_handle.shutdown();
1962        }
1963        self.drop_without_shutdown();
1964        _result
1965    }
1966
1967    /// Similar to "send" but does not shutdown the channel if an error occurs.
1968    pub fn send_no_shutdown_on_err(
1969        self,
1970        mut drivers: &[fidl_fuchsia_driver_framework::DriverInfo],
1971    ) -> Result<(), fidl::Error> {
1972        let _result = self.send_raw(drivers);
1973        self.drop_without_shutdown();
1974        _result
1975    }
1976
1977    fn send_raw(
1978        &self,
1979        mut drivers: &[fidl_fuchsia_driver_framework::DriverInfo],
1980    ) -> Result<(), fidl::Error> {
1981        self.control_handle.inner.send::<DriverInfoIteratorGetNextResponse>(
1982            (drivers,),
1983            self.tx_id,
1984            0x2c394711c6784952,
1985            fidl::encoding::DynamicFlags::empty(),
1986        )
1987    }
1988}
1989
1990#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1991pub struct ManagerMarker;
1992
1993impl fidl::endpoints::ProtocolMarker for ManagerMarker {
1994    type Proxy = ManagerProxy;
1995    type RequestStream = ManagerRequestStream;
1996    #[cfg(target_os = "fuchsia")]
1997    type SynchronousProxy = ManagerSynchronousProxy;
1998
1999    const DEBUG_NAME: &'static str = "fuchsia.driver.development.Manager";
2000}
2001impl fidl::endpoints::DiscoverableProtocolMarker for ManagerMarker {}
2002pub type ManagerRestartDriverHostsResult = Result<u32, i32>;
2003pub type ManagerDisableDriverResult = Result<(), i32>;
2004pub type ManagerEnableDriverResult = Result<(), i32>;
2005pub type ManagerBindAllUnboundNodesResult = Result<Vec<NodeBindingInfo>, i32>;
2006pub type ManagerBindAllUnboundNodes2Result = Result<Vec<NodeBindingInfo>, i32>;
2007pub type ManagerAddTestNodeResult = Result<(), fidl_fuchsia_driver_framework::NodeError>;
2008pub type ManagerRemoveTestNodeResult = Result<(), i32>;
2009pub type ManagerRestartWithDictionaryResult = Result<fidl::EventPair, i32>;
2010pub type ManagerRestartWithDictionaryAndPowerDependenciesResult = Result<fidl::EventPair, i32>;
2011pub type ManagerRebindCompositesWithDriverResult = Result<u32, i32>;
2012pub type ManagerRunHealthCheckResult = Result<
2013    fidl_fuchsia_driver_framework::HealthCheckResponse,
2014    fidl_fuchsia_driver_framework::HealthCheckError,
2015>;
2016
2017pub trait ManagerProxyInterface: Send + Sync {
2018    fn r#get_driver_info(
2019        &self,
2020        driver_filter: &[String],
2021        iterator: fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>,
2022    ) -> Result<(), fidl::Error>;
2023    fn r#get_composite_node_specs(
2024        &self,
2025        name_filter: Option<&str>,
2026        iterator: fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
2027    ) -> Result<(), fidl::Error>;
2028    fn r#get_node_info(
2029        &self,
2030        node_filter: &[String],
2031        iterator: fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>,
2032        exact_match: bool,
2033    ) -> Result<(), fidl::Error>;
2034    fn r#get_composite_info(
2035        &self,
2036        iterator: fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>,
2037    ) -> Result<(), fidl::Error>;
2038    fn r#get_driver_host_info(
2039        &self,
2040        iterator: fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>,
2041    ) -> Result<(), fidl::Error>;
2042    type RestartDriverHostsResponseFut: std::future::Future<Output = Result<ManagerRestartDriverHostsResult, fidl::Error>>
2043        + Send;
2044    fn r#restart_driver_hosts(
2045        &self,
2046        driver_url: &str,
2047        rematch_flags: RestartRematchFlags,
2048    ) -> Self::RestartDriverHostsResponseFut;
2049    type DisableDriverResponseFut: std::future::Future<Output = Result<ManagerDisableDriverResult, fidl::Error>>
2050        + Send;
2051    fn r#disable_driver(
2052        &self,
2053        driver_url: &str,
2054        package_hash: Option<&str>,
2055    ) -> Self::DisableDriverResponseFut;
2056    type EnableDriverResponseFut: std::future::Future<Output = Result<ManagerEnableDriverResult, fidl::Error>>
2057        + Send;
2058    fn r#enable_driver(
2059        &self,
2060        driver_url: &str,
2061        package_hash: Option<&str>,
2062    ) -> Self::EnableDriverResponseFut;
2063    type BindAllUnboundNodesResponseFut: std::future::Future<Output = Result<ManagerBindAllUnboundNodesResult, fidl::Error>>
2064        + Send;
2065    fn r#bind_all_unbound_nodes(&self) -> Self::BindAllUnboundNodesResponseFut;
2066    type BindAllUnboundNodes2ResponseFut: std::future::Future<Output = Result<ManagerBindAllUnboundNodes2Result, fidl::Error>>
2067        + Send;
2068    fn r#bind_all_unbound_nodes2(&self) -> Self::BindAllUnboundNodes2ResponseFut;
2069    type AddTestNodeResponseFut: std::future::Future<Output = Result<ManagerAddTestNodeResult, fidl::Error>>
2070        + Send;
2071    fn r#add_test_node(&self, args: &TestNodeAddArgs) -> Self::AddTestNodeResponseFut;
2072    type RemoveTestNodeResponseFut: std::future::Future<Output = Result<ManagerRemoveTestNodeResult, fidl::Error>>
2073        + Send;
2074    fn r#remove_test_node(&self, name: &str) -> Self::RemoveTestNodeResponseFut;
2075    type WaitForBootupResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
2076    fn r#wait_for_bootup(&self) -> Self::WaitForBootupResponseFut;
2077    type RestartWithDictionaryResponseFut: std::future::Future<Output = Result<ManagerRestartWithDictionaryResult, fidl::Error>>
2078        + Send;
2079    fn r#restart_with_dictionary(
2080        &self,
2081        moniker: &str,
2082        dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
2083    ) -> Self::RestartWithDictionaryResponseFut;
2084    type RestartWithDictionaryAndPowerDependenciesResponseFut: std::future::Future<
2085            Output = Result<ManagerRestartWithDictionaryAndPowerDependenciesResult, fidl::Error>,
2086        > + Send;
2087    fn r#restart_with_dictionary_and_power_dependencies(
2088        &self,
2089        moniker: &str,
2090        dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
2091        power_dependencies: Vec<fidl_fuchsia_power_broker::LevelDependency>,
2092        cpu_token_override: Option<fidl::Event>,
2093        node_power_token_overrides: Vec<NodePowerTokenOverride>,
2094    ) -> Self::RestartWithDictionaryAndPowerDependenciesResponseFut;
2095    type RebindCompositesWithDriverResponseFut: std::future::Future<Output = Result<ManagerRebindCompositesWithDriverResult, fidl::Error>>
2096        + Send;
2097    fn r#rebind_composites_with_driver(
2098        &self,
2099        driver_url: &str,
2100    ) -> Self::RebindCompositesWithDriverResponseFut;
2101    type RunHealthCheckResponseFut: std::future::Future<Output = Result<ManagerRunHealthCheckResult, fidl::Error>>
2102        + Send;
2103    fn r#run_health_check(
2104        &self,
2105        moniker: &str,
2106        request: fidl_fuchsia_driver_framework::HealthCheckRequest,
2107    ) -> Self::RunHealthCheckResponseFut;
2108}
2109#[derive(Debug)]
2110#[cfg(target_os = "fuchsia")]
2111pub struct ManagerSynchronousProxy {
2112    client: fidl::client::sync::Client,
2113}
2114
2115#[cfg(target_os = "fuchsia")]
2116impl fidl::endpoints::SynchronousProxy for ManagerSynchronousProxy {
2117    type Proxy = ManagerProxy;
2118    type Protocol = ManagerMarker;
2119
2120    fn from_channel(inner: fidl::Channel) -> Self {
2121        Self::new(inner)
2122    }
2123
2124    fn into_channel(self) -> fidl::Channel {
2125        self.client.into_channel()
2126    }
2127
2128    fn as_channel(&self) -> &fidl::Channel {
2129        self.client.as_channel()
2130    }
2131}
2132
2133#[cfg(target_os = "fuchsia")]
2134impl ManagerSynchronousProxy {
2135    pub fn new(channel: fidl::Channel) -> Self {
2136        Self { client: fidl::client::sync::Client::new(channel) }
2137    }
2138
2139    pub fn into_channel(self) -> fidl::Channel {
2140        self.client.into_channel()
2141    }
2142
2143    /// Waits until an event arrives and returns it. It is safe for other
2144    /// threads to make concurrent requests while waiting for an event.
2145    pub fn wait_for_event(
2146        &self,
2147        deadline: zx::MonotonicInstant,
2148    ) -> Result<ManagerEvent, fidl::Error> {
2149        ManagerEvent::decode(self.client.wait_for_event::<ManagerMarker>(deadline)?)
2150    }
2151
2152    /// Returns a list of all drivers that are known to the system.
2153    /// If a |driver_filter| is provided, the returned list will be filtered to
2154    /// only include drivers specified in the filter.
2155    ///
2156    /// |iterator| is closed with following epitaphs on error:
2157    /// ZX_ERR_NOT_FOUND indicates that there is no driver matching the given path for at least
2158    /// one driver in |driver_filter|.
2159    /// ZX_ERR_BUFFER_TOO_SMALL indicates that the driver's bind program is longer than the
2160    /// maximum number of instructions (BIND_PROGRAM_INSTRUCTIONS_MAX).
2161    pub fn r#get_driver_info(
2162        &self,
2163        mut driver_filter: &[String],
2164        mut iterator: fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>,
2165    ) -> Result<(), fidl::Error> {
2166        self.client.send::<ManagerGetDriverInfoRequest>(
2167            (driver_filter, iterator),
2168            0x34b1541e24e5d587,
2169            fidl::encoding::DynamicFlags::FLEXIBLE,
2170        )
2171    }
2172
2173    /// Returns a list of all composite node specs that are known to the system.
2174    /// If a |name_filter| is provided, the returned list will only include 1 spec,
2175    /// the one with that exact name.
2176    ///
2177    /// |iterator| is closed with following epitaphs on error:
2178    /// ZX_ERR_NOT_FOUND indicates that there are no specs or if a |name_filter| is provided,
2179    /// that there are no specs with that name.
2180    pub fn r#get_composite_node_specs(
2181        &self,
2182        mut name_filter: Option<&str>,
2183        mut iterator: fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
2184    ) -> Result<(), fidl::Error> {
2185        self.client.send::<ManagerGetCompositeNodeSpecsRequest>(
2186            (name_filter, iterator),
2187            0x258540c7ff37328f,
2188            fidl::encoding::DynamicFlags::FLEXIBLE,
2189        )
2190    }
2191
2192    /// Returns the list of nodes that are running on the system.
2193    ///
2194    /// If a |node_filter| is provided, the returned list will be filtered to
2195    /// only include nodes specified in the filter. If |exact_match| is true,
2196    /// then the filter must exactly match a node's topological path;
2197    /// otherwise, it performs a substring match. The list will be empty if no
2198    /// nodes match the filter.
2199    ///
2200    /// |iterator| is closed with following epitaphs on error:
2201    /// ZX_ERR_BAD_PATH indicates that the given path is not valid.
2202    /// ZX_ERR_BUFFER_TOO_SMALL indicates either that the given path is too long,
2203    /// or that the node has more than the maximum number of properties (PROPERTIES_MAX).
2204    pub fn r#get_node_info(
2205        &self,
2206        mut node_filter: &[String],
2207        mut iterator: fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>,
2208        mut exact_match: bool,
2209    ) -> Result<(), fidl::Error> {
2210        self.client.send::<ManagerGetNodeInfoRequest>(
2211            (node_filter, iterator, exact_match),
2212            0x7c272c6b7bcb4f9e,
2213            fidl::encoding::DynamicFlags::FLEXIBLE,
2214        )
2215    }
2216
2217    /// Returns the list of composites in the system. This includes composites
2218    /// that are not yet assembled and added into the node topology.
2219    pub fn r#get_composite_info(
2220        &self,
2221        mut iterator: fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>,
2222    ) -> Result<(), fidl::Error> {
2223        self.client.send::<ManagerGetCompositeInfoRequest>(
2224            (iterator,),
2225            0x4456da4372a49a36,
2226            fidl::encoding::DynamicFlags::FLEXIBLE,
2227        )
2228    }
2229
2230    /// Returns a list of all driver hosts that are known to the system.
2231    pub fn r#get_driver_host_info(
2232        &self,
2233        mut iterator: fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>,
2234    ) -> Result<(), fidl::Error> {
2235        self.client.send::<ManagerGetDriverHostInfoRequest>(
2236            (iterator,),
2237            0x366b2c4429d44155,
2238            fidl::encoding::DynamicFlags::FLEXIBLE,
2239        )
2240    }
2241
2242    /// Restarts all driver hosts containing the driver specified by the `driver_url`,
2243    /// and returns the number of driver hosts that were restarted.
2244    /// The |rematch_flags| will be used to decide for which restarting nodes the existing driver
2245    /// should be bound vs. for which ones the matching process should be performed again.
2246    pub fn r#restart_driver_hosts(
2247        &self,
2248        mut driver_url: &str,
2249        mut rematch_flags: RestartRematchFlags,
2250        ___deadline: zx::MonotonicInstant,
2251    ) -> Result<ManagerRestartDriverHostsResult, fidl::Error> {
2252        let _response = self.client.send_query::<
2253            ManagerRestartDriverHostsRequest,
2254            fidl::encoding::FlexibleResultType<ManagerRestartDriverHostsResponse, i32>,
2255            ManagerMarker,
2256        >(
2257            (driver_url, rematch_flags,),
2258            0x64fb09a17a4dd8c7,
2259            fidl::encoding::DynamicFlags::FLEXIBLE,
2260            ___deadline,
2261        )?
2262        .into_result::<ManagerMarker>("restart_driver_hosts")?;
2263        Ok(_response.map(|x| x.count))
2264    }
2265
2266    /// Disables the driver with the given driver component url.
2267    /// Disabled drivers will not be considered for matching to nodes.
2268    /// If a |package_hash| is provided, only that specific version of the driver
2269    /// package will be disabled. Otherwise this applies to all existing versions
2270    /// of a driver with the given url.
2271    /// Returns an error ZX_ERR_NOT_FOUND if no drivers were affected.
2272    pub fn r#disable_driver(
2273        &self,
2274        mut driver_url: &str,
2275        mut package_hash: Option<&str>,
2276        ___deadline: zx::MonotonicInstant,
2277    ) -> Result<ManagerDisableDriverResult, fidl::Error> {
2278        let _response = self.client.send_query::<
2279            ManagerDisableDriverRequest,
2280            fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2281            ManagerMarker,
2282        >(
2283            (driver_url, package_hash,),
2284            0x3cabde92ba1ac967,
2285            fidl::encoding::DynamicFlags::FLEXIBLE,
2286            ___deadline,
2287        )?
2288        .into_result::<ManagerMarker>("disable_driver")?;
2289        Ok(_response.map(|x| x))
2290    }
2291
2292    /// Enables the driver with the given driver component url.
2293    /// This is only meant to revert a |DisableDriver| action.
2294    /// Returns an error ZX_ERR_NOT_FOUND if no drivers were affected.
2295    pub fn r#enable_driver(
2296        &self,
2297        mut driver_url: &str,
2298        mut package_hash: Option<&str>,
2299        ___deadline: zx::MonotonicInstant,
2300    ) -> Result<ManagerEnableDriverResult, fidl::Error> {
2301        let _response = self.client.send_query::<
2302            ManagerEnableDriverRequest,
2303            fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2304            ManagerMarker,
2305        >(
2306            (driver_url, package_hash,),
2307            0x76a7518712965faf,
2308            fidl::encoding::DynamicFlags::FLEXIBLE,
2309            ___deadline,
2310        )?
2311        .into_result::<ManagerMarker>("enable_driver")?;
2312        Ok(_response.map(|x| x))
2313    }
2314
2315    /// Attempts to bind all unbound nodes in the topology.
2316    /// Returns new successful binds.
2317    pub fn r#bind_all_unbound_nodes(
2318        &self,
2319        ___deadline: zx::MonotonicInstant,
2320    ) -> Result<ManagerBindAllUnboundNodesResult, fidl::Error> {
2321        let _response = self.client.send_query::<
2322            fidl::encoding::EmptyPayload,
2323            fidl::encoding::FlexibleResultType<ManagerBindAllUnboundNodesResponse, i32>,
2324            ManagerMarker,
2325        >(
2326            (),
2327            0x2b4343fe1cfb9f21,
2328            fidl::encoding::DynamicFlags::FLEXIBLE,
2329            ___deadline,
2330        )?
2331        .into_result::<ManagerMarker>("bind_all_unbound_nodes")?;
2332        Ok(_response.map(|x| x.binding_result))
2333    }
2334
2335    /// Attempts to bind all unbound nodes in the topology.
2336    /// Returns new successful binds.
2337    pub fn r#bind_all_unbound_nodes2(
2338        &self,
2339        ___deadline: zx::MonotonicInstant,
2340    ) -> Result<ManagerBindAllUnboundNodes2Result, fidl::Error> {
2341        let _response = self.client.send_query::<
2342            fidl::encoding::EmptyPayload,
2343            fidl::encoding::FlexibleResultType<ManagerBindAllUnboundNodes2Response, i32>,
2344            ManagerMarker,
2345        >(
2346            (),
2347            0x3e82ce2d6fc998d7,
2348            fidl::encoding::DynamicFlags::FLEXIBLE,
2349            ___deadline,
2350        )?
2351        .into_result::<ManagerMarker>("bind_all_unbound_nodes2")?;
2352        Ok(_response.map(|x| x.binding_result))
2353    }
2354
2355    /// Adds test node under the root node.
2356    pub fn r#add_test_node(
2357        &self,
2358        mut args: &TestNodeAddArgs,
2359        ___deadline: zx::MonotonicInstant,
2360    ) -> Result<ManagerAddTestNodeResult, fidl::Error> {
2361        let _response = self
2362            .client
2363            .send_query::<ManagerAddTestNodeRequest, fidl::encoding::FlexibleResultType<
2364                fidl::encoding::EmptyStruct,
2365                fidl_fuchsia_driver_framework::NodeError,
2366            >, ManagerMarker>(
2367                (args,),
2368                0x774836bbb7fbc5b9,
2369                fidl::encoding::DynamicFlags::FLEXIBLE,
2370                ___deadline,
2371            )?
2372            .into_result::<ManagerMarker>("add_test_node")?;
2373        Ok(_response.map(|x| x))
2374    }
2375
2376    /// Removes the test node. The node is removed asynchronously and is
2377    /// not guaranteed to be removed by the time this returns.
2378    pub fn r#remove_test_node(
2379        &self,
2380        mut name: &str,
2381        ___deadline: zx::MonotonicInstant,
2382    ) -> Result<ManagerRemoveTestNodeResult, fidl::Error> {
2383        let _response = self.client.send_query::<
2384            ManagerRemoveTestNodeRequest,
2385            fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2386            ManagerMarker,
2387        >(
2388            (name,),
2389            0x1618ec4e5fc4010e,
2390            fidl::encoding::DynamicFlags::FLEXIBLE,
2391            ___deadline,
2392        )?
2393        .into_result::<ManagerMarker>("remove_test_node")?;
2394        Ok(_response.map(|x| x))
2395    }
2396
2397    /// Waits for bootup to complete.
2398    pub fn r#wait_for_bootup(&self, ___deadline: zx::MonotonicInstant) -> Result<(), fidl::Error> {
2399        let _response = self.client.send_query::<
2400            fidl::encoding::EmptyPayload,
2401            fidl::encoding::EmptyPayload,
2402            ManagerMarker,
2403        >(
2404            (),
2405            0x52077de068225cdc,
2406            fidl::encoding::DynamicFlags::empty(),
2407            ___deadline,
2408        )?;
2409        Ok(_response)
2410    }
2411
2412    /// Restarts the driver components bound to the nodes identified in |node_ids|,
2413    /// providing them with the given dictionary. All child nodes are also restarted
2414    /// and provided with this dictionary. This operation is temporary and
2415    /// is reversed by releasing the |release_fence| that is returned.
2416    pub fn r#restart_with_dictionary(
2417        &self,
2418        mut moniker: &str,
2419        mut dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
2420        ___deadline: zx::MonotonicInstant,
2421    ) -> Result<ManagerRestartWithDictionaryResult, fidl::Error> {
2422        let _response = self.client.send_query::<
2423            ManagerRestartWithDictionaryRequest,
2424            fidl::encoding::ResultType<ManagerRestartWithDictionaryResponse, i32>,
2425            ManagerMarker,
2426        >(
2427            (moniker, &mut dictionary,),
2428            0x5eb620a85359a10e,
2429            fidl::encoding::DynamicFlags::empty(),
2430            ___deadline,
2431        )?;
2432        Ok(_response.map(|x| x.release_fence))
2433    }
2434
2435    /// Restarts the driver components bound to the node identified by |moniker|,
2436    /// providing it with the given dictionary and power dependencies.
2437    /// All child nodes are also restarted and provided with the dictionary,
2438    /// but only the node identified by |moniker| will be provided with the
2439    /// power dependencies. An empty vector of power dependencies results in
2440    /// the driver's power element having no dependencies other than a
2441    /// dependency on CPU. The |cpu_token_override| will be used as the token
2442    /// for making dependencies on the CPU power element. This override remains
2443    /// in place for all restarted drivers until the fence is released.
2444    ///
2445    /// The effects of this call are temporary and are reversed by releasing
2446    /// the |release_fence| that is returned.
2447    /// TODO(https://fxbug.dev/494673577) Consolidate this API with
2448    /// `RestartWithDictionary`.
2449    pub fn r#restart_with_dictionary_and_power_dependencies(
2450        &self,
2451        mut moniker: &str,
2452        mut dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
2453        mut power_dependencies: Vec<fidl_fuchsia_power_broker::LevelDependency>,
2454        mut cpu_token_override: Option<fidl::Event>,
2455        mut node_power_token_overrides: Vec<NodePowerTokenOverride>,
2456        ___deadline: zx::MonotonicInstant,
2457    ) -> Result<ManagerRestartWithDictionaryAndPowerDependenciesResult, fidl::Error> {
2458        let _response = self.client.send_query::<
2459            ManagerRestartWithDictionaryAndPowerDependenciesRequest,
2460            fidl::encoding::ResultType<ManagerRestartWithDictionaryAndPowerDependenciesResponse, i32>,
2461            ManagerMarker,
2462        >(
2463            (moniker, &mut dictionary, power_dependencies.as_mut(), cpu_token_override, node_power_token_overrides.as_mut(),),
2464            0x42914549590210,
2465            fidl::encoding::DynamicFlags::empty(),
2466            ___deadline,
2467        )?;
2468        Ok(_response.map(|x| x.release_fence))
2469    }
2470
2471    /// Rebinds any composites and composite specs that have the given driver_url. This means the
2472    /// spec is rematched with possibly another driver, or none if the only matching driver is
2473    /// disabled, and any active nodes created from this spec are removed and re-bound.
2474    ///
2475    /// Returns the number of affected composite nodes.
2476    pub fn r#rebind_composites_with_driver(
2477        &self,
2478        mut driver_url: &str,
2479        ___deadline: zx::MonotonicInstant,
2480    ) -> Result<ManagerRebindCompositesWithDriverResult, fidl::Error> {
2481        let _response = self.client.send_query::<
2482            ManagerRebindCompositesWithDriverRequest,
2483            fidl::encoding::ResultType<ManagerRebindCompositesWithDriverResponse, i32>,
2484            ManagerMarker,
2485        >(
2486            (driver_url,),
2487            0x175d492045f61f28,
2488            fidl::encoding::DynamicFlags::empty(),
2489            ___deadline,
2490        )?;
2491        Ok(_response.map(|x| x.count))
2492    }
2493
2494    /// Requests the driver bound to the node identified by |moniker| to perform a self-diagnostic
2495    /// check.
2496    ///
2497    /// |moniker| must exactly match either the node's component moniker (as reported in
2498    /// `NodeInfo.moniker`) or its topological path. If no node matches, the call fails with
2499    /// `NOT_FOUND`; if the matching node does not have a running driver, it fails with
2500    /// `INVALID_STATE`.
2501    pub fn r#run_health_check(
2502        &self,
2503        mut moniker: &str,
2504        mut request: fidl_fuchsia_driver_framework::HealthCheckRequest,
2505        ___deadline: zx::MonotonicInstant,
2506    ) -> Result<ManagerRunHealthCheckResult, fidl::Error> {
2507        let _response = self
2508            .client
2509            .send_query::<ManagerRunHealthCheckRequest, fidl::encoding::FlexibleResultType<
2510                fidl_fuchsia_driver_framework::HealthCheckResponse,
2511                fidl_fuchsia_driver_framework::HealthCheckError,
2512            >, ManagerMarker>(
2513                (moniker, request),
2514                0x40c5975519795d82,
2515                fidl::encoding::DynamicFlags::FLEXIBLE,
2516                ___deadline,
2517            )?
2518            .into_result::<ManagerMarker>("run_health_check")?;
2519        Ok(_response.map(|x| x))
2520    }
2521}
2522
2523#[cfg(target_os = "fuchsia")]
2524impl From<ManagerSynchronousProxy> for zx::NullableHandle {
2525    fn from(value: ManagerSynchronousProxy) -> Self {
2526        value.into_channel().into()
2527    }
2528}
2529
2530#[cfg(target_os = "fuchsia")]
2531impl From<fidl::Channel> for ManagerSynchronousProxy {
2532    fn from(value: fidl::Channel) -> Self {
2533        Self::new(value)
2534    }
2535}
2536
2537#[cfg(target_os = "fuchsia")]
2538impl fidl::endpoints::FromClient for ManagerSynchronousProxy {
2539    type Protocol = ManagerMarker;
2540
2541    fn from_client(value: fidl::endpoints::ClientEnd<ManagerMarker>) -> Self {
2542        Self::new(value.into_channel())
2543    }
2544}
2545
2546#[derive(Debug, Clone)]
2547pub struct ManagerProxy {
2548    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2549}
2550
2551impl fidl::endpoints::Proxy for ManagerProxy {
2552    type Protocol = ManagerMarker;
2553
2554    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2555        Self::new(inner)
2556    }
2557
2558    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2559        self.client.into_channel().map_err(|client| Self { client })
2560    }
2561
2562    fn as_channel(&self) -> &::fidl::AsyncChannel {
2563        self.client.as_channel()
2564    }
2565}
2566
2567impl ManagerProxy {
2568    /// Create a new Proxy for fuchsia.driver.development/Manager.
2569    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2570        let protocol_name = <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2571        Self { client: fidl::client::Client::new(channel, protocol_name) }
2572    }
2573
2574    /// Get a Stream of events from the remote end of the protocol.
2575    ///
2576    /// # Panics
2577    ///
2578    /// Panics if the event stream was already taken.
2579    pub fn take_event_stream(&self) -> ManagerEventStream {
2580        ManagerEventStream { event_receiver: self.client.take_event_receiver() }
2581    }
2582
2583    /// Returns a list of all drivers that are known to the system.
2584    /// If a |driver_filter| is provided, the returned list will be filtered to
2585    /// only include drivers specified in the filter.
2586    ///
2587    /// |iterator| is closed with following epitaphs on error:
2588    /// ZX_ERR_NOT_FOUND indicates that there is no driver matching the given path for at least
2589    /// one driver in |driver_filter|.
2590    /// ZX_ERR_BUFFER_TOO_SMALL indicates that the driver's bind program is longer than the
2591    /// maximum number of instructions (BIND_PROGRAM_INSTRUCTIONS_MAX).
2592    pub fn r#get_driver_info(
2593        &self,
2594        mut driver_filter: &[String],
2595        mut iterator: fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>,
2596    ) -> Result<(), fidl::Error> {
2597        ManagerProxyInterface::r#get_driver_info(self, driver_filter, iterator)
2598    }
2599
2600    /// Returns a list of all composite node specs that are known to the system.
2601    /// If a |name_filter| is provided, the returned list will only include 1 spec,
2602    /// the one with that exact name.
2603    ///
2604    /// |iterator| is closed with following epitaphs on error:
2605    /// ZX_ERR_NOT_FOUND indicates that there are no specs or if a |name_filter| is provided,
2606    /// that there are no specs with that name.
2607    pub fn r#get_composite_node_specs(
2608        &self,
2609        mut name_filter: Option<&str>,
2610        mut iterator: fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
2611    ) -> Result<(), fidl::Error> {
2612        ManagerProxyInterface::r#get_composite_node_specs(self, name_filter, iterator)
2613    }
2614
2615    /// Returns the list of nodes that are running on the system.
2616    ///
2617    /// If a |node_filter| is provided, the returned list will be filtered to
2618    /// only include nodes specified in the filter. If |exact_match| is true,
2619    /// then the filter must exactly match a node's topological path;
2620    /// otherwise, it performs a substring match. The list will be empty if no
2621    /// nodes match the filter.
2622    ///
2623    /// |iterator| is closed with following epitaphs on error:
2624    /// ZX_ERR_BAD_PATH indicates that the given path is not valid.
2625    /// ZX_ERR_BUFFER_TOO_SMALL indicates either that the given path is too long,
2626    /// or that the node has more than the maximum number of properties (PROPERTIES_MAX).
2627    pub fn r#get_node_info(
2628        &self,
2629        mut node_filter: &[String],
2630        mut iterator: fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>,
2631        mut exact_match: bool,
2632    ) -> Result<(), fidl::Error> {
2633        ManagerProxyInterface::r#get_node_info(self, node_filter, iterator, exact_match)
2634    }
2635
2636    /// Returns the list of composites in the system. This includes composites
2637    /// that are not yet assembled and added into the node topology.
2638    pub fn r#get_composite_info(
2639        &self,
2640        mut iterator: fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>,
2641    ) -> Result<(), fidl::Error> {
2642        ManagerProxyInterface::r#get_composite_info(self, iterator)
2643    }
2644
2645    /// Returns a list of all driver hosts that are known to the system.
2646    pub fn r#get_driver_host_info(
2647        &self,
2648        mut iterator: fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>,
2649    ) -> Result<(), fidl::Error> {
2650        ManagerProxyInterface::r#get_driver_host_info(self, iterator)
2651    }
2652
2653    /// Restarts all driver hosts containing the driver specified by the `driver_url`,
2654    /// and returns the number of driver hosts that were restarted.
2655    /// The |rematch_flags| will be used to decide for which restarting nodes the existing driver
2656    /// should be bound vs. for which ones the matching process should be performed again.
2657    pub fn r#restart_driver_hosts(
2658        &self,
2659        mut driver_url: &str,
2660        mut rematch_flags: RestartRematchFlags,
2661    ) -> fidl::client::QueryResponseFut<
2662        ManagerRestartDriverHostsResult,
2663        fidl::encoding::DefaultFuchsiaResourceDialect,
2664    > {
2665        ManagerProxyInterface::r#restart_driver_hosts(self, driver_url, rematch_flags)
2666    }
2667
2668    /// Disables the driver with the given driver component url.
2669    /// Disabled drivers will not be considered for matching to nodes.
2670    /// If a |package_hash| is provided, only that specific version of the driver
2671    /// package will be disabled. Otherwise this applies to all existing versions
2672    /// of a driver with the given url.
2673    /// Returns an error ZX_ERR_NOT_FOUND if no drivers were affected.
2674    pub fn r#disable_driver(
2675        &self,
2676        mut driver_url: &str,
2677        mut package_hash: Option<&str>,
2678    ) -> fidl::client::QueryResponseFut<
2679        ManagerDisableDriverResult,
2680        fidl::encoding::DefaultFuchsiaResourceDialect,
2681    > {
2682        ManagerProxyInterface::r#disable_driver(self, driver_url, package_hash)
2683    }
2684
2685    /// Enables the driver with the given driver component url.
2686    /// This is only meant to revert a |DisableDriver| action.
2687    /// Returns an error ZX_ERR_NOT_FOUND if no drivers were affected.
2688    pub fn r#enable_driver(
2689        &self,
2690        mut driver_url: &str,
2691        mut package_hash: Option<&str>,
2692    ) -> fidl::client::QueryResponseFut<
2693        ManagerEnableDriverResult,
2694        fidl::encoding::DefaultFuchsiaResourceDialect,
2695    > {
2696        ManagerProxyInterface::r#enable_driver(self, driver_url, package_hash)
2697    }
2698
2699    /// Attempts to bind all unbound nodes in the topology.
2700    /// Returns new successful binds.
2701    pub fn r#bind_all_unbound_nodes(
2702        &self,
2703    ) -> fidl::client::QueryResponseFut<
2704        ManagerBindAllUnboundNodesResult,
2705        fidl::encoding::DefaultFuchsiaResourceDialect,
2706    > {
2707        ManagerProxyInterface::r#bind_all_unbound_nodes(self)
2708    }
2709
2710    /// Attempts to bind all unbound nodes in the topology.
2711    /// Returns new successful binds.
2712    pub fn r#bind_all_unbound_nodes2(
2713        &self,
2714    ) -> fidl::client::QueryResponseFut<
2715        ManagerBindAllUnboundNodes2Result,
2716        fidl::encoding::DefaultFuchsiaResourceDialect,
2717    > {
2718        ManagerProxyInterface::r#bind_all_unbound_nodes2(self)
2719    }
2720
2721    /// Adds test node under the root node.
2722    pub fn r#add_test_node(
2723        &self,
2724        mut args: &TestNodeAddArgs,
2725    ) -> fidl::client::QueryResponseFut<
2726        ManagerAddTestNodeResult,
2727        fidl::encoding::DefaultFuchsiaResourceDialect,
2728    > {
2729        ManagerProxyInterface::r#add_test_node(self, args)
2730    }
2731
2732    /// Removes the test node. The node is removed asynchronously and is
2733    /// not guaranteed to be removed by the time this returns.
2734    pub fn r#remove_test_node(
2735        &self,
2736        mut name: &str,
2737    ) -> fidl::client::QueryResponseFut<
2738        ManagerRemoveTestNodeResult,
2739        fidl::encoding::DefaultFuchsiaResourceDialect,
2740    > {
2741        ManagerProxyInterface::r#remove_test_node(self, name)
2742    }
2743
2744    /// Waits for bootup to complete.
2745    pub fn r#wait_for_bootup(
2746        &self,
2747    ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
2748        ManagerProxyInterface::r#wait_for_bootup(self)
2749    }
2750
2751    /// Restarts the driver components bound to the nodes identified in |node_ids|,
2752    /// providing them with the given dictionary. All child nodes are also restarted
2753    /// and provided with this dictionary. This operation is temporary and
2754    /// is reversed by releasing the |release_fence| that is returned.
2755    pub fn r#restart_with_dictionary(
2756        &self,
2757        mut moniker: &str,
2758        mut dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
2759    ) -> fidl::client::QueryResponseFut<
2760        ManagerRestartWithDictionaryResult,
2761        fidl::encoding::DefaultFuchsiaResourceDialect,
2762    > {
2763        ManagerProxyInterface::r#restart_with_dictionary(self, moniker, dictionary)
2764    }
2765
2766    /// Restarts the driver components bound to the node identified by |moniker|,
2767    /// providing it with the given dictionary and power dependencies.
2768    /// All child nodes are also restarted and provided with the dictionary,
2769    /// but only the node identified by |moniker| will be provided with the
2770    /// power dependencies. An empty vector of power dependencies results in
2771    /// the driver's power element having no dependencies other than a
2772    /// dependency on CPU. The |cpu_token_override| will be used as the token
2773    /// for making dependencies on the CPU power element. This override remains
2774    /// in place for all restarted drivers until the fence is released.
2775    ///
2776    /// The effects of this call are temporary and are reversed by releasing
2777    /// the |release_fence| that is returned.
2778    /// TODO(https://fxbug.dev/494673577) Consolidate this API with
2779    /// `RestartWithDictionary`.
2780    pub fn r#restart_with_dictionary_and_power_dependencies(
2781        &self,
2782        mut moniker: &str,
2783        mut dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
2784        mut power_dependencies: Vec<fidl_fuchsia_power_broker::LevelDependency>,
2785        mut cpu_token_override: Option<fidl::Event>,
2786        mut node_power_token_overrides: Vec<NodePowerTokenOverride>,
2787    ) -> fidl::client::QueryResponseFut<
2788        ManagerRestartWithDictionaryAndPowerDependenciesResult,
2789        fidl::encoding::DefaultFuchsiaResourceDialect,
2790    > {
2791        ManagerProxyInterface::r#restart_with_dictionary_and_power_dependencies(
2792            self,
2793            moniker,
2794            dictionary,
2795            power_dependencies,
2796            cpu_token_override,
2797            node_power_token_overrides,
2798        )
2799    }
2800
2801    /// Rebinds any composites and composite specs that have the given driver_url. This means the
2802    /// spec is rematched with possibly another driver, or none if the only matching driver is
2803    /// disabled, and any active nodes created from this spec are removed and re-bound.
2804    ///
2805    /// Returns the number of affected composite nodes.
2806    pub fn r#rebind_composites_with_driver(
2807        &self,
2808        mut driver_url: &str,
2809    ) -> fidl::client::QueryResponseFut<
2810        ManagerRebindCompositesWithDriverResult,
2811        fidl::encoding::DefaultFuchsiaResourceDialect,
2812    > {
2813        ManagerProxyInterface::r#rebind_composites_with_driver(self, driver_url)
2814    }
2815
2816    /// Requests the driver bound to the node identified by |moniker| to perform a self-diagnostic
2817    /// check.
2818    ///
2819    /// |moniker| must exactly match either the node's component moniker (as reported in
2820    /// `NodeInfo.moniker`) or its topological path. If no node matches, the call fails with
2821    /// `NOT_FOUND`; if the matching node does not have a running driver, it fails with
2822    /// `INVALID_STATE`.
2823    pub fn r#run_health_check(
2824        &self,
2825        mut moniker: &str,
2826        mut request: fidl_fuchsia_driver_framework::HealthCheckRequest,
2827    ) -> fidl::client::QueryResponseFut<
2828        ManagerRunHealthCheckResult,
2829        fidl::encoding::DefaultFuchsiaResourceDialect,
2830    > {
2831        ManagerProxyInterface::r#run_health_check(self, moniker, request)
2832    }
2833}
2834
2835impl ManagerProxyInterface for ManagerProxy {
2836    fn r#get_driver_info(
2837        &self,
2838        mut driver_filter: &[String],
2839        mut iterator: fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>,
2840    ) -> Result<(), fidl::Error> {
2841        self.client.send::<ManagerGetDriverInfoRequest>(
2842            (driver_filter, iterator),
2843            0x34b1541e24e5d587,
2844            fidl::encoding::DynamicFlags::FLEXIBLE,
2845        )
2846    }
2847
2848    fn r#get_composite_node_specs(
2849        &self,
2850        mut name_filter: Option<&str>,
2851        mut iterator: fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
2852    ) -> Result<(), fidl::Error> {
2853        self.client.send::<ManagerGetCompositeNodeSpecsRequest>(
2854            (name_filter, iterator),
2855            0x258540c7ff37328f,
2856            fidl::encoding::DynamicFlags::FLEXIBLE,
2857        )
2858    }
2859
2860    fn r#get_node_info(
2861        &self,
2862        mut node_filter: &[String],
2863        mut iterator: fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>,
2864        mut exact_match: bool,
2865    ) -> Result<(), fidl::Error> {
2866        self.client.send::<ManagerGetNodeInfoRequest>(
2867            (node_filter, iterator, exact_match),
2868            0x7c272c6b7bcb4f9e,
2869            fidl::encoding::DynamicFlags::FLEXIBLE,
2870        )
2871    }
2872
2873    fn r#get_composite_info(
2874        &self,
2875        mut iterator: fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>,
2876    ) -> Result<(), fidl::Error> {
2877        self.client.send::<ManagerGetCompositeInfoRequest>(
2878            (iterator,),
2879            0x4456da4372a49a36,
2880            fidl::encoding::DynamicFlags::FLEXIBLE,
2881        )
2882    }
2883
2884    fn r#get_driver_host_info(
2885        &self,
2886        mut iterator: fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>,
2887    ) -> Result<(), fidl::Error> {
2888        self.client.send::<ManagerGetDriverHostInfoRequest>(
2889            (iterator,),
2890            0x366b2c4429d44155,
2891            fidl::encoding::DynamicFlags::FLEXIBLE,
2892        )
2893    }
2894
2895    type RestartDriverHostsResponseFut = fidl::client::QueryResponseFut<
2896        ManagerRestartDriverHostsResult,
2897        fidl::encoding::DefaultFuchsiaResourceDialect,
2898    >;
2899    fn r#restart_driver_hosts(
2900        &self,
2901        mut driver_url: &str,
2902        mut rematch_flags: RestartRematchFlags,
2903    ) -> Self::RestartDriverHostsResponseFut {
2904        fn _decode(
2905            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2906        ) -> Result<ManagerRestartDriverHostsResult, fidl::Error> {
2907            let _response = fidl::client::decode_transaction_body::<
2908                fidl::encoding::FlexibleResultType<ManagerRestartDriverHostsResponse, i32>,
2909                fidl::encoding::DefaultFuchsiaResourceDialect,
2910                0x64fb09a17a4dd8c7,
2911            >(_buf?)?
2912            .into_result::<ManagerMarker>("restart_driver_hosts")?;
2913            Ok(_response.map(|x| x.count))
2914        }
2915        self.client.send_query_and_decode::<
2916            ManagerRestartDriverHostsRequest,
2917            ManagerRestartDriverHostsResult,
2918        >(
2919            (driver_url, rematch_flags,),
2920            0x64fb09a17a4dd8c7,
2921            fidl::encoding::DynamicFlags::FLEXIBLE,
2922            _decode,
2923        )
2924    }
2925
2926    type DisableDriverResponseFut = fidl::client::QueryResponseFut<
2927        ManagerDisableDriverResult,
2928        fidl::encoding::DefaultFuchsiaResourceDialect,
2929    >;
2930    fn r#disable_driver(
2931        &self,
2932        mut driver_url: &str,
2933        mut package_hash: Option<&str>,
2934    ) -> Self::DisableDriverResponseFut {
2935        fn _decode(
2936            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2937        ) -> Result<ManagerDisableDriverResult, fidl::Error> {
2938            let _response = fidl::client::decode_transaction_body::<
2939                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2940                fidl::encoding::DefaultFuchsiaResourceDialect,
2941                0x3cabde92ba1ac967,
2942            >(_buf?)?
2943            .into_result::<ManagerMarker>("disable_driver")?;
2944            Ok(_response.map(|x| x))
2945        }
2946        self.client
2947            .send_query_and_decode::<ManagerDisableDriverRequest, ManagerDisableDriverResult>(
2948                (driver_url, package_hash),
2949                0x3cabde92ba1ac967,
2950                fidl::encoding::DynamicFlags::FLEXIBLE,
2951                _decode,
2952            )
2953    }
2954
2955    type EnableDriverResponseFut = fidl::client::QueryResponseFut<
2956        ManagerEnableDriverResult,
2957        fidl::encoding::DefaultFuchsiaResourceDialect,
2958    >;
2959    fn r#enable_driver(
2960        &self,
2961        mut driver_url: &str,
2962        mut package_hash: Option<&str>,
2963    ) -> Self::EnableDriverResponseFut {
2964        fn _decode(
2965            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2966        ) -> Result<ManagerEnableDriverResult, fidl::Error> {
2967            let _response = fidl::client::decode_transaction_body::<
2968                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2969                fidl::encoding::DefaultFuchsiaResourceDialect,
2970                0x76a7518712965faf,
2971            >(_buf?)?
2972            .into_result::<ManagerMarker>("enable_driver")?;
2973            Ok(_response.map(|x| x))
2974        }
2975        self.client.send_query_and_decode::<ManagerEnableDriverRequest, ManagerEnableDriverResult>(
2976            (driver_url, package_hash),
2977            0x76a7518712965faf,
2978            fidl::encoding::DynamicFlags::FLEXIBLE,
2979            _decode,
2980        )
2981    }
2982
2983    type BindAllUnboundNodesResponseFut = fidl::client::QueryResponseFut<
2984        ManagerBindAllUnboundNodesResult,
2985        fidl::encoding::DefaultFuchsiaResourceDialect,
2986    >;
2987    fn r#bind_all_unbound_nodes(&self) -> Self::BindAllUnboundNodesResponseFut {
2988        fn _decode(
2989            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2990        ) -> Result<ManagerBindAllUnboundNodesResult, fidl::Error> {
2991            let _response = fidl::client::decode_transaction_body::<
2992                fidl::encoding::FlexibleResultType<ManagerBindAllUnboundNodesResponse, i32>,
2993                fidl::encoding::DefaultFuchsiaResourceDialect,
2994                0x2b4343fe1cfb9f21,
2995            >(_buf?)?
2996            .into_result::<ManagerMarker>("bind_all_unbound_nodes")?;
2997            Ok(_response.map(|x| x.binding_result))
2998        }
2999        self.client.send_query_and_decode::<
3000            fidl::encoding::EmptyPayload,
3001            ManagerBindAllUnboundNodesResult,
3002        >(
3003            (),
3004            0x2b4343fe1cfb9f21,
3005            fidl::encoding::DynamicFlags::FLEXIBLE,
3006            _decode,
3007        )
3008    }
3009
3010    type BindAllUnboundNodes2ResponseFut = fidl::client::QueryResponseFut<
3011        ManagerBindAllUnboundNodes2Result,
3012        fidl::encoding::DefaultFuchsiaResourceDialect,
3013    >;
3014    fn r#bind_all_unbound_nodes2(&self) -> Self::BindAllUnboundNodes2ResponseFut {
3015        fn _decode(
3016            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3017        ) -> Result<ManagerBindAllUnboundNodes2Result, fidl::Error> {
3018            let _response = fidl::client::decode_transaction_body::<
3019                fidl::encoding::FlexibleResultType<ManagerBindAllUnboundNodes2Response, i32>,
3020                fidl::encoding::DefaultFuchsiaResourceDialect,
3021                0x3e82ce2d6fc998d7,
3022            >(_buf?)?
3023            .into_result::<ManagerMarker>("bind_all_unbound_nodes2")?;
3024            Ok(_response.map(|x| x.binding_result))
3025        }
3026        self.client.send_query_and_decode::<
3027            fidl::encoding::EmptyPayload,
3028            ManagerBindAllUnboundNodes2Result,
3029        >(
3030            (),
3031            0x3e82ce2d6fc998d7,
3032            fidl::encoding::DynamicFlags::FLEXIBLE,
3033            _decode,
3034        )
3035    }
3036
3037    type AddTestNodeResponseFut = fidl::client::QueryResponseFut<
3038        ManagerAddTestNodeResult,
3039        fidl::encoding::DefaultFuchsiaResourceDialect,
3040    >;
3041    fn r#add_test_node(&self, mut args: &TestNodeAddArgs) -> Self::AddTestNodeResponseFut {
3042        fn _decode(
3043            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3044        ) -> Result<ManagerAddTestNodeResult, fidl::Error> {
3045            let _response = fidl::client::decode_transaction_body::<
3046                fidl::encoding::FlexibleResultType<
3047                    fidl::encoding::EmptyStruct,
3048                    fidl_fuchsia_driver_framework::NodeError,
3049                >,
3050                fidl::encoding::DefaultFuchsiaResourceDialect,
3051                0x774836bbb7fbc5b9,
3052            >(_buf?)?
3053            .into_result::<ManagerMarker>("add_test_node")?;
3054            Ok(_response.map(|x| x))
3055        }
3056        self.client.send_query_and_decode::<ManagerAddTestNodeRequest, ManagerAddTestNodeResult>(
3057            (args,),
3058            0x774836bbb7fbc5b9,
3059            fidl::encoding::DynamicFlags::FLEXIBLE,
3060            _decode,
3061        )
3062    }
3063
3064    type RemoveTestNodeResponseFut = fidl::client::QueryResponseFut<
3065        ManagerRemoveTestNodeResult,
3066        fidl::encoding::DefaultFuchsiaResourceDialect,
3067    >;
3068    fn r#remove_test_node(&self, mut name: &str) -> Self::RemoveTestNodeResponseFut {
3069        fn _decode(
3070            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3071        ) -> Result<ManagerRemoveTestNodeResult, fidl::Error> {
3072            let _response = fidl::client::decode_transaction_body::<
3073                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
3074                fidl::encoding::DefaultFuchsiaResourceDialect,
3075                0x1618ec4e5fc4010e,
3076            >(_buf?)?
3077            .into_result::<ManagerMarker>("remove_test_node")?;
3078            Ok(_response.map(|x| x))
3079        }
3080        self.client
3081            .send_query_and_decode::<ManagerRemoveTestNodeRequest, ManagerRemoveTestNodeResult>(
3082                (name,),
3083                0x1618ec4e5fc4010e,
3084                fidl::encoding::DynamicFlags::FLEXIBLE,
3085                _decode,
3086            )
3087    }
3088
3089    type WaitForBootupResponseFut =
3090        fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
3091    fn r#wait_for_bootup(&self) -> Self::WaitForBootupResponseFut {
3092        fn _decode(
3093            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3094        ) -> Result<(), fidl::Error> {
3095            let _response = fidl::client::decode_transaction_body::<
3096                fidl::encoding::EmptyPayload,
3097                fidl::encoding::DefaultFuchsiaResourceDialect,
3098                0x52077de068225cdc,
3099            >(_buf?)?;
3100            Ok(_response)
3101        }
3102        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
3103            (),
3104            0x52077de068225cdc,
3105            fidl::encoding::DynamicFlags::empty(),
3106            _decode,
3107        )
3108    }
3109
3110    type RestartWithDictionaryResponseFut = fidl::client::QueryResponseFut<
3111        ManagerRestartWithDictionaryResult,
3112        fidl::encoding::DefaultFuchsiaResourceDialect,
3113    >;
3114    fn r#restart_with_dictionary(
3115        &self,
3116        mut moniker: &str,
3117        mut dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
3118    ) -> Self::RestartWithDictionaryResponseFut {
3119        fn _decode(
3120            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3121        ) -> Result<ManagerRestartWithDictionaryResult, fidl::Error> {
3122            let _response = fidl::client::decode_transaction_body::<
3123                fidl::encoding::ResultType<ManagerRestartWithDictionaryResponse, i32>,
3124                fidl::encoding::DefaultFuchsiaResourceDialect,
3125                0x5eb620a85359a10e,
3126            >(_buf?)?;
3127            Ok(_response.map(|x| x.release_fence))
3128        }
3129        self.client.send_query_and_decode::<
3130            ManagerRestartWithDictionaryRequest,
3131            ManagerRestartWithDictionaryResult,
3132        >(
3133            (moniker, &mut dictionary,),
3134            0x5eb620a85359a10e,
3135            fidl::encoding::DynamicFlags::empty(),
3136            _decode,
3137        )
3138    }
3139
3140    type RestartWithDictionaryAndPowerDependenciesResponseFut = fidl::client::QueryResponseFut<
3141        ManagerRestartWithDictionaryAndPowerDependenciesResult,
3142        fidl::encoding::DefaultFuchsiaResourceDialect,
3143    >;
3144    fn r#restart_with_dictionary_and_power_dependencies(
3145        &self,
3146        mut moniker: &str,
3147        mut dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
3148        mut power_dependencies: Vec<fidl_fuchsia_power_broker::LevelDependency>,
3149        mut cpu_token_override: Option<fidl::Event>,
3150        mut node_power_token_overrides: Vec<NodePowerTokenOverride>,
3151    ) -> Self::RestartWithDictionaryAndPowerDependenciesResponseFut {
3152        fn _decode(
3153            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3154        ) -> Result<ManagerRestartWithDictionaryAndPowerDependenciesResult, fidl::Error> {
3155            let _response = fidl::client::decode_transaction_body::<
3156                fidl::encoding::ResultType<
3157                    ManagerRestartWithDictionaryAndPowerDependenciesResponse,
3158                    i32,
3159                >,
3160                fidl::encoding::DefaultFuchsiaResourceDialect,
3161                0x42914549590210,
3162            >(_buf?)?;
3163            Ok(_response.map(|x| x.release_fence))
3164        }
3165        self.client.send_query_and_decode::<
3166            ManagerRestartWithDictionaryAndPowerDependenciesRequest,
3167            ManagerRestartWithDictionaryAndPowerDependenciesResult,
3168        >(
3169            (moniker, &mut dictionary, power_dependencies.as_mut(), cpu_token_override, node_power_token_overrides.as_mut(),),
3170            0x42914549590210,
3171            fidl::encoding::DynamicFlags::empty(),
3172            _decode,
3173        )
3174    }
3175
3176    type RebindCompositesWithDriverResponseFut = fidl::client::QueryResponseFut<
3177        ManagerRebindCompositesWithDriverResult,
3178        fidl::encoding::DefaultFuchsiaResourceDialect,
3179    >;
3180    fn r#rebind_composites_with_driver(
3181        &self,
3182        mut driver_url: &str,
3183    ) -> Self::RebindCompositesWithDriverResponseFut {
3184        fn _decode(
3185            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3186        ) -> Result<ManagerRebindCompositesWithDriverResult, fidl::Error> {
3187            let _response = fidl::client::decode_transaction_body::<
3188                fidl::encoding::ResultType<ManagerRebindCompositesWithDriverResponse, i32>,
3189                fidl::encoding::DefaultFuchsiaResourceDialect,
3190                0x175d492045f61f28,
3191            >(_buf?)?;
3192            Ok(_response.map(|x| x.count))
3193        }
3194        self.client.send_query_and_decode::<
3195            ManagerRebindCompositesWithDriverRequest,
3196            ManagerRebindCompositesWithDriverResult,
3197        >(
3198            (driver_url,),
3199            0x175d492045f61f28,
3200            fidl::encoding::DynamicFlags::empty(),
3201            _decode,
3202        )
3203    }
3204
3205    type RunHealthCheckResponseFut = fidl::client::QueryResponseFut<
3206        ManagerRunHealthCheckResult,
3207        fidl::encoding::DefaultFuchsiaResourceDialect,
3208    >;
3209    fn r#run_health_check(
3210        &self,
3211        mut moniker: &str,
3212        mut request: fidl_fuchsia_driver_framework::HealthCheckRequest,
3213    ) -> Self::RunHealthCheckResponseFut {
3214        fn _decode(
3215            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3216        ) -> Result<ManagerRunHealthCheckResult, fidl::Error> {
3217            let _response = fidl::client::decode_transaction_body::<
3218                fidl::encoding::FlexibleResultType<
3219                    fidl_fuchsia_driver_framework::HealthCheckResponse,
3220                    fidl_fuchsia_driver_framework::HealthCheckError,
3221                >,
3222                fidl::encoding::DefaultFuchsiaResourceDialect,
3223                0x40c5975519795d82,
3224            >(_buf?)?
3225            .into_result::<ManagerMarker>("run_health_check")?;
3226            Ok(_response.map(|x| x))
3227        }
3228        self.client
3229            .send_query_and_decode::<ManagerRunHealthCheckRequest, ManagerRunHealthCheckResult>(
3230                (moniker, request),
3231                0x40c5975519795d82,
3232                fidl::encoding::DynamicFlags::FLEXIBLE,
3233                _decode,
3234            )
3235    }
3236}
3237
3238pub struct ManagerEventStream {
3239    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3240}
3241
3242impl std::marker::Unpin for ManagerEventStream {}
3243
3244impl futures::stream::FusedStream for ManagerEventStream {
3245    fn is_terminated(&self) -> bool {
3246        self.event_receiver.is_terminated()
3247    }
3248}
3249
3250impl futures::Stream for ManagerEventStream {
3251    type Item = Result<ManagerEvent, fidl::Error>;
3252
3253    fn poll_next(
3254        mut self: std::pin::Pin<&mut Self>,
3255        cx: &mut std::task::Context<'_>,
3256    ) -> std::task::Poll<Option<Self::Item>> {
3257        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3258            &mut self.event_receiver,
3259            cx
3260        )?) {
3261            Some(buf) => std::task::Poll::Ready(Some(ManagerEvent::decode(buf))),
3262            None => std::task::Poll::Ready(None),
3263        }
3264    }
3265}
3266
3267#[derive(Debug)]
3268pub enum ManagerEvent {
3269    #[non_exhaustive]
3270    _UnknownEvent {
3271        /// Ordinal of the event that was sent.
3272        ordinal: u64,
3273    },
3274}
3275
3276impl ManagerEvent {
3277    /// Decodes a message buffer as a [`ManagerEvent`].
3278    fn decode(
3279        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3280    ) -> Result<ManagerEvent, fidl::Error> {
3281        let (bytes, _handles) = buf.split_mut();
3282        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3283        debug_assert_eq!(tx_header.tx_id, 0);
3284        match tx_header.ordinal {
3285            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3286                Ok(ManagerEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3287            }
3288            _ => Err(fidl::Error::UnknownOrdinal {
3289                ordinal: tx_header.ordinal,
3290                protocol_name: <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3291            }),
3292        }
3293    }
3294}
3295
3296/// A Stream of incoming requests for fuchsia.driver.development/Manager.
3297pub struct ManagerRequestStream {
3298    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3299    is_terminated: bool,
3300}
3301
3302impl std::marker::Unpin for ManagerRequestStream {}
3303
3304impl futures::stream::FusedStream for ManagerRequestStream {
3305    fn is_terminated(&self) -> bool {
3306        self.is_terminated
3307    }
3308}
3309
3310impl fidl::endpoints::RequestStream for ManagerRequestStream {
3311    type Protocol = ManagerMarker;
3312    type ControlHandle = ManagerControlHandle;
3313
3314    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3315        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3316    }
3317
3318    fn control_handle(&self) -> Self::ControlHandle {
3319        ManagerControlHandle { inner: self.inner.clone() }
3320    }
3321
3322    fn into_inner(
3323        self,
3324    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3325    {
3326        (self.inner, self.is_terminated)
3327    }
3328
3329    fn from_inner(
3330        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3331        is_terminated: bool,
3332    ) -> Self {
3333        Self { inner, is_terminated }
3334    }
3335}
3336
3337impl futures::Stream for ManagerRequestStream {
3338    type Item = Result<ManagerRequest, fidl::Error>;
3339
3340    fn poll_next(
3341        mut self: std::pin::Pin<&mut Self>,
3342        cx: &mut std::task::Context<'_>,
3343    ) -> std::task::Poll<Option<Self::Item>> {
3344        let this = &mut *self;
3345        if this.inner.check_shutdown(cx) {
3346            this.is_terminated = true;
3347            return std::task::Poll::Ready(None);
3348        }
3349        if this.is_terminated {
3350            panic!("polled ManagerRequestStream after completion");
3351        }
3352        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3353            |bytes, handles| {
3354                match this.inner.channel().read_etc(cx, bytes, handles) {
3355                    std::task::Poll::Ready(Ok(())) => {}
3356                    std::task::Poll::Pending => return std::task::Poll::Pending,
3357                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3358                        this.is_terminated = true;
3359                        return std::task::Poll::Ready(None);
3360                    }
3361                    std::task::Poll::Ready(Err(e)) => {
3362                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3363                            e.into(),
3364                        ))));
3365                    }
3366                }
3367
3368                // A message has been received from the channel
3369                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3370
3371                std::task::Poll::Ready(Some(match header.ordinal {
3372                    0x34b1541e24e5d587 => {
3373                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3374                        let mut req = fidl::new_empty!(
3375                            ManagerGetDriverInfoRequest,
3376                            fidl::encoding::DefaultFuchsiaResourceDialect
3377                        );
3378                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerGetDriverInfoRequest>(&header, _body_bytes, handles, &mut req)?;
3379                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3380                        Ok(ManagerRequest::GetDriverInfo {
3381                            driver_filter: req.driver_filter,
3382                            iterator: req.iterator,
3383
3384                            control_handle,
3385                        })
3386                    }
3387                    0x258540c7ff37328f => {
3388                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3389                        let mut req = fidl::new_empty!(
3390                            ManagerGetCompositeNodeSpecsRequest,
3391                            fidl::encoding::DefaultFuchsiaResourceDialect
3392                        );
3393                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerGetCompositeNodeSpecsRequest>(&header, _body_bytes, handles, &mut req)?;
3394                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3395                        Ok(ManagerRequest::GetCompositeNodeSpecs {
3396                            name_filter: req.name_filter,
3397                            iterator: req.iterator,
3398
3399                            control_handle,
3400                        })
3401                    }
3402                    0x7c272c6b7bcb4f9e => {
3403                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3404                        let mut req = fidl::new_empty!(
3405                            ManagerGetNodeInfoRequest,
3406                            fidl::encoding::DefaultFuchsiaResourceDialect
3407                        );
3408                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerGetNodeInfoRequest>(&header, _body_bytes, handles, &mut req)?;
3409                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3410                        Ok(ManagerRequest::GetNodeInfo {
3411                            node_filter: req.node_filter,
3412                            iterator: req.iterator,
3413                            exact_match: req.exact_match,
3414
3415                            control_handle,
3416                        })
3417                    }
3418                    0x4456da4372a49a36 => {
3419                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3420                        let mut req = fidl::new_empty!(
3421                            ManagerGetCompositeInfoRequest,
3422                            fidl::encoding::DefaultFuchsiaResourceDialect
3423                        );
3424                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerGetCompositeInfoRequest>(&header, _body_bytes, handles, &mut req)?;
3425                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3426                        Ok(ManagerRequest::GetCompositeInfo {
3427                            iterator: req.iterator,
3428
3429                            control_handle,
3430                        })
3431                    }
3432                    0x366b2c4429d44155 => {
3433                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3434                        let mut req = fidl::new_empty!(
3435                            ManagerGetDriverHostInfoRequest,
3436                            fidl::encoding::DefaultFuchsiaResourceDialect
3437                        );
3438                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerGetDriverHostInfoRequest>(&header, _body_bytes, handles, &mut req)?;
3439                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3440                        Ok(ManagerRequest::GetDriverHostInfo {
3441                            iterator: req.iterator,
3442
3443                            control_handle,
3444                        })
3445                    }
3446                    0x64fb09a17a4dd8c7 => {
3447                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3448                        let mut req = fidl::new_empty!(
3449                            ManagerRestartDriverHostsRequest,
3450                            fidl::encoding::DefaultFuchsiaResourceDialect
3451                        );
3452                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerRestartDriverHostsRequest>(&header, _body_bytes, handles, &mut req)?;
3453                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3454                        Ok(ManagerRequest::RestartDriverHosts {
3455                            driver_url: req.driver_url,
3456                            rematch_flags: req.rematch_flags,
3457
3458                            responder: ManagerRestartDriverHostsResponder {
3459                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3460                                tx_id: header.tx_id,
3461                            },
3462                        })
3463                    }
3464                    0x3cabde92ba1ac967 => {
3465                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3466                        let mut req = fidl::new_empty!(
3467                            ManagerDisableDriverRequest,
3468                            fidl::encoding::DefaultFuchsiaResourceDialect
3469                        );
3470                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerDisableDriverRequest>(&header, _body_bytes, handles, &mut req)?;
3471                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3472                        Ok(ManagerRequest::DisableDriver {
3473                            driver_url: req.driver_url,
3474                            package_hash: req.package_hash,
3475
3476                            responder: ManagerDisableDriverResponder {
3477                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3478                                tx_id: header.tx_id,
3479                            },
3480                        })
3481                    }
3482                    0x76a7518712965faf => {
3483                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3484                        let mut req = fidl::new_empty!(
3485                            ManagerEnableDriverRequest,
3486                            fidl::encoding::DefaultFuchsiaResourceDialect
3487                        );
3488                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerEnableDriverRequest>(&header, _body_bytes, handles, &mut req)?;
3489                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3490                        Ok(ManagerRequest::EnableDriver {
3491                            driver_url: req.driver_url,
3492                            package_hash: req.package_hash,
3493
3494                            responder: ManagerEnableDriverResponder {
3495                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3496                                tx_id: header.tx_id,
3497                            },
3498                        })
3499                    }
3500                    0x2b4343fe1cfb9f21 => {
3501                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3502                        let mut req = fidl::new_empty!(
3503                            fidl::encoding::EmptyPayload,
3504                            fidl::encoding::DefaultFuchsiaResourceDialect
3505                        );
3506                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3507                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3508                        Ok(ManagerRequest::BindAllUnboundNodes {
3509                            responder: ManagerBindAllUnboundNodesResponder {
3510                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3511                                tx_id: header.tx_id,
3512                            },
3513                        })
3514                    }
3515                    0x3e82ce2d6fc998d7 => {
3516                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3517                        let mut req = fidl::new_empty!(
3518                            fidl::encoding::EmptyPayload,
3519                            fidl::encoding::DefaultFuchsiaResourceDialect
3520                        );
3521                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3522                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3523                        Ok(ManagerRequest::BindAllUnboundNodes2 {
3524                            responder: ManagerBindAllUnboundNodes2Responder {
3525                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3526                                tx_id: header.tx_id,
3527                            },
3528                        })
3529                    }
3530                    0x774836bbb7fbc5b9 => {
3531                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3532                        let mut req = fidl::new_empty!(
3533                            ManagerAddTestNodeRequest,
3534                            fidl::encoding::DefaultFuchsiaResourceDialect
3535                        );
3536                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerAddTestNodeRequest>(&header, _body_bytes, handles, &mut req)?;
3537                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3538                        Ok(ManagerRequest::AddTestNode {
3539                            args: req.args,
3540
3541                            responder: ManagerAddTestNodeResponder {
3542                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3543                                tx_id: header.tx_id,
3544                            },
3545                        })
3546                    }
3547                    0x1618ec4e5fc4010e => {
3548                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3549                        let mut req = fidl::new_empty!(
3550                            ManagerRemoveTestNodeRequest,
3551                            fidl::encoding::DefaultFuchsiaResourceDialect
3552                        );
3553                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerRemoveTestNodeRequest>(&header, _body_bytes, handles, &mut req)?;
3554                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3555                        Ok(ManagerRequest::RemoveTestNode {
3556                            name: req.name,
3557
3558                            responder: ManagerRemoveTestNodeResponder {
3559                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3560                                tx_id: header.tx_id,
3561                            },
3562                        })
3563                    }
3564                    0x52077de068225cdc => {
3565                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3566                        let mut req = fidl::new_empty!(
3567                            fidl::encoding::EmptyPayload,
3568                            fidl::encoding::DefaultFuchsiaResourceDialect
3569                        );
3570                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3571                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3572                        Ok(ManagerRequest::WaitForBootup {
3573                            responder: ManagerWaitForBootupResponder {
3574                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3575                                tx_id: header.tx_id,
3576                            },
3577                        })
3578                    }
3579                    0x5eb620a85359a10e => {
3580                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3581                        let mut req = fidl::new_empty!(
3582                            ManagerRestartWithDictionaryRequest,
3583                            fidl::encoding::DefaultFuchsiaResourceDialect
3584                        );
3585                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerRestartWithDictionaryRequest>(&header, _body_bytes, handles, &mut req)?;
3586                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3587                        Ok(ManagerRequest::RestartWithDictionary {
3588                            moniker: req.moniker,
3589                            dictionary: req.dictionary,
3590
3591                            responder: ManagerRestartWithDictionaryResponder {
3592                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3593                                tx_id: header.tx_id,
3594                            },
3595                        })
3596                    }
3597                    0x42914549590210 => {
3598                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3599                        let mut req = fidl::new_empty!(
3600                            ManagerRestartWithDictionaryAndPowerDependenciesRequest,
3601                            fidl::encoding::DefaultFuchsiaResourceDialect
3602                        );
3603                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerRestartWithDictionaryAndPowerDependenciesRequest>(&header, _body_bytes, handles, &mut req)?;
3604                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3605                        Ok(ManagerRequest::RestartWithDictionaryAndPowerDependencies {
3606                            moniker: req.moniker,
3607                            dictionary: req.dictionary,
3608                            power_dependencies: req.power_dependencies,
3609                            cpu_token_override: req.cpu_token_override,
3610                            node_power_token_overrides: req.node_power_token_overrides,
3611
3612                            responder: ManagerRestartWithDictionaryAndPowerDependenciesResponder {
3613                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3614                                tx_id: header.tx_id,
3615                            },
3616                        })
3617                    }
3618                    0x175d492045f61f28 => {
3619                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3620                        let mut req = fidl::new_empty!(
3621                            ManagerRebindCompositesWithDriverRequest,
3622                            fidl::encoding::DefaultFuchsiaResourceDialect
3623                        );
3624                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerRebindCompositesWithDriverRequest>(&header, _body_bytes, handles, &mut req)?;
3625                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3626                        Ok(ManagerRequest::RebindCompositesWithDriver {
3627                            driver_url: req.driver_url,
3628
3629                            responder: ManagerRebindCompositesWithDriverResponder {
3630                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3631                                tx_id: header.tx_id,
3632                            },
3633                        })
3634                    }
3635                    0x40c5975519795d82 => {
3636                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3637                        let mut req = fidl::new_empty!(
3638                            ManagerRunHealthCheckRequest,
3639                            fidl::encoding::DefaultFuchsiaResourceDialect
3640                        );
3641                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerRunHealthCheckRequest>(&header, _body_bytes, handles, &mut req)?;
3642                        let control_handle = ManagerControlHandle { inner: this.inner.clone() };
3643                        Ok(ManagerRequest::RunHealthCheck {
3644                            moniker: req.moniker,
3645                            request: req.request,
3646
3647                            responder: ManagerRunHealthCheckResponder {
3648                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3649                                tx_id: header.tx_id,
3650                            },
3651                        })
3652                    }
3653                    _ if header.tx_id == 0
3654                        && header
3655                            .dynamic_flags()
3656                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3657                    {
3658                        Ok(ManagerRequest::_UnknownMethod {
3659                            ordinal: header.ordinal,
3660                            control_handle: ManagerControlHandle { inner: this.inner.clone() },
3661                            method_type: fidl::MethodType::OneWay,
3662                        })
3663                    }
3664                    _ if header
3665                        .dynamic_flags()
3666                        .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3667                    {
3668                        this.inner.send_framework_err(
3669                            fidl::encoding::FrameworkErr::UnknownMethod,
3670                            header.tx_id,
3671                            header.ordinal,
3672                            header.dynamic_flags(),
3673                            (bytes, handles),
3674                        )?;
3675                        Ok(ManagerRequest::_UnknownMethod {
3676                            ordinal: header.ordinal,
3677                            control_handle: ManagerControlHandle { inner: this.inner.clone() },
3678                            method_type: fidl::MethodType::TwoWay,
3679                        })
3680                    }
3681                    _ => Err(fidl::Error::UnknownOrdinal {
3682                        ordinal: header.ordinal,
3683                        protocol_name:
3684                            <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3685                    }),
3686                }))
3687            },
3688        )
3689    }
3690}
3691
3692/// Interface for the driver development manager.
3693/// This interface should only be used for development and disabled in release builds.
3694#[derive(Debug)]
3695pub enum ManagerRequest {
3696    /// Returns a list of all drivers that are known to the system.
3697    /// If a |driver_filter| is provided, the returned list will be filtered to
3698    /// only include drivers specified in the filter.
3699    ///
3700    /// |iterator| is closed with following epitaphs on error:
3701    /// ZX_ERR_NOT_FOUND indicates that there is no driver matching the given path for at least
3702    /// one driver in |driver_filter|.
3703    /// ZX_ERR_BUFFER_TOO_SMALL indicates that the driver's bind program is longer than the
3704    /// maximum number of instructions (BIND_PROGRAM_INSTRUCTIONS_MAX).
3705    GetDriverInfo {
3706        driver_filter: Vec<String>,
3707        iterator: fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>,
3708        control_handle: ManagerControlHandle,
3709    },
3710    /// Returns a list of all composite node specs that are known to the system.
3711    /// If a |name_filter| is provided, the returned list will only include 1 spec,
3712    /// the one with that exact name.
3713    ///
3714    /// |iterator| is closed with following epitaphs on error:
3715    /// ZX_ERR_NOT_FOUND indicates that there are no specs or if a |name_filter| is provided,
3716    /// that there are no specs with that name.
3717    GetCompositeNodeSpecs {
3718        name_filter: Option<String>,
3719        iterator: fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
3720        control_handle: ManagerControlHandle,
3721    },
3722    /// Returns the list of nodes that are running on the system.
3723    ///
3724    /// If a |node_filter| is provided, the returned list will be filtered to
3725    /// only include nodes specified in the filter. If |exact_match| is true,
3726    /// then the filter must exactly match a node's topological path;
3727    /// otherwise, it performs a substring match. The list will be empty if no
3728    /// nodes match the filter.
3729    ///
3730    /// |iterator| is closed with following epitaphs on error:
3731    /// ZX_ERR_BAD_PATH indicates that the given path is not valid.
3732    /// ZX_ERR_BUFFER_TOO_SMALL indicates either that the given path is too long,
3733    /// or that the node has more than the maximum number of properties (PROPERTIES_MAX).
3734    GetNodeInfo {
3735        node_filter: Vec<String>,
3736        iterator: fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>,
3737        exact_match: bool,
3738        control_handle: ManagerControlHandle,
3739    },
3740    /// Returns the list of composites in the system. This includes composites
3741    /// that are not yet assembled and added into the node topology.
3742    GetCompositeInfo {
3743        iterator: fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>,
3744        control_handle: ManagerControlHandle,
3745    },
3746    /// Returns a list of all driver hosts that are known to the system.
3747    GetDriverHostInfo {
3748        iterator: fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>,
3749        control_handle: ManagerControlHandle,
3750    },
3751    /// Restarts all driver hosts containing the driver specified by the `driver_url`,
3752    /// and returns the number of driver hosts that were restarted.
3753    /// The |rematch_flags| will be used to decide for which restarting nodes the existing driver
3754    /// should be bound vs. for which ones the matching process should be performed again.
3755    RestartDriverHosts {
3756        driver_url: String,
3757        rematch_flags: RestartRematchFlags,
3758        responder: ManagerRestartDriverHostsResponder,
3759    },
3760    /// Disables the driver with the given driver component url.
3761    /// Disabled drivers will not be considered for matching to nodes.
3762    /// If a |package_hash| is provided, only that specific version of the driver
3763    /// package will be disabled. Otherwise this applies to all existing versions
3764    /// of a driver with the given url.
3765    /// Returns an error ZX_ERR_NOT_FOUND if no drivers were affected.
3766    DisableDriver {
3767        driver_url: String,
3768        package_hash: Option<String>,
3769        responder: ManagerDisableDriverResponder,
3770    },
3771    /// Enables the driver with the given driver component url.
3772    /// This is only meant to revert a |DisableDriver| action.
3773    /// Returns an error ZX_ERR_NOT_FOUND if no drivers were affected.
3774    EnableDriver {
3775        driver_url: String,
3776        package_hash: Option<String>,
3777        responder: ManagerEnableDriverResponder,
3778    },
3779    /// Attempts to bind all unbound nodes in the topology.
3780    /// Returns new successful binds.
3781    BindAllUnboundNodes { responder: ManagerBindAllUnboundNodesResponder },
3782    /// Attempts to bind all unbound nodes in the topology.
3783    /// Returns new successful binds.
3784    BindAllUnboundNodes2 { responder: ManagerBindAllUnboundNodes2Responder },
3785    /// Adds test node under the root node.
3786    AddTestNode { args: TestNodeAddArgs, responder: ManagerAddTestNodeResponder },
3787    /// Removes the test node. The node is removed asynchronously and is
3788    /// not guaranteed to be removed by the time this returns.
3789    RemoveTestNode { name: String, responder: ManagerRemoveTestNodeResponder },
3790    /// Waits for bootup to complete.
3791    WaitForBootup { responder: ManagerWaitForBootupResponder },
3792    /// Restarts the driver components bound to the nodes identified in |node_ids|,
3793    /// providing them with the given dictionary. All child nodes are also restarted
3794    /// and provided with this dictionary. This operation is temporary and
3795    /// is reversed by releasing the |release_fence| that is returned.
3796    RestartWithDictionary {
3797        moniker: String,
3798        dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
3799        responder: ManagerRestartWithDictionaryResponder,
3800    },
3801    /// Restarts the driver components bound to the node identified by |moniker|,
3802    /// providing it with the given dictionary and power dependencies.
3803    /// All child nodes are also restarted and provided with the dictionary,
3804    /// but only the node identified by |moniker| will be provided with the
3805    /// power dependencies. An empty vector of power dependencies results in
3806    /// the driver's power element having no dependencies other than a
3807    /// dependency on CPU. The |cpu_token_override| will be used as the token
3808    /// for making dependencies on the CPU power element. This override remains
3809    /// in place for all restarted drivers until the fence is released.
3810    ///
3811    /// The effects of this call are temporary and are reversed by releasing
3812    /// the |release_fence| that is returned.
3813    /// TODO(https://fxbug.dev/494673577) Consolidate this API with
3814    /// `RestartWithDictionary`.
3815    RestartWithDictionaryAndPowerDependencies {
3816        moniker: String,
3817        dictionary: fidl_fuchsia_component_sandbox::DictionaryRef,
3818        power_dependencies: Vec<fidl_fuchsia_power_broker::LevelDependency>,
3819        cpu_token_override: Option<fidl::Event>,
3820        node_power_token_overrides: Vec<NodePowerTokenOverride>,
3821        responder: ManagerRestartWithDictionaryAndPowerDependenciesResponder,
3822    },
3823    /// Rebinds any composites and composite specs that have the given driver_url. This means the
3824    /// spec is rematched with possibly another driver, or none if the only matching driver is
3825    /// disabled, and any active nodes created from this spec are removed and re-bound.
3826    ///
3827    /// Returns the number of affected composite nodes.
3828    RebindCompositesWithDriver {
3829        driver_url: String,
3830        responder: ManagerRebindCompositesWithDriverResponder,
3831    },
3832    /// Requests the driver bound to the node identified by |moniker| to perform a self-diagnostic
3833    /// check.
3834    ///
3835    /// |moniker| must exactly match either the node's component moniker (as reported in
3836    /// `NodeInfo.moniker`) or its topological path. If no node matches, the call fails with
3837    /// `NOT_FOUND`; if the matching node does not have a running driver, it fails with
3838    /// `INVALID_STATE`.
3839    RunHealthCheck {
3840        moniker: String,
3841        request: fidl_fuchsia_driver_framework::HealthCheckRequest,
3842        responder: ManagerRunHealthCheckResponder,
3843    },
3844    /// An interaction was received which does not match any known method.
3845    #[non_exhaustive]
3846    _UnknownMethod {
3847        /// Ordinal of the method that was called.
3848        ordinal: u64,
3849        control_handle: ManagerControlHandle,
3850        method_type: fidl::MethodType,
3851    },
3852}
3853
3854impl ManagerRequest {
3855    #[allow(irrefutable_let_patterns)]
3856    pub fn into_get_driver_info(
3857        self,
3858    ) -> Option<(
3859        Vec<String>,
3860        fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>,
3861        ManagerControlHandle,
3862    )> {
3863        if let ManagerRequest::GetDriverInfo { driver_filter, iterator, control_handle } = self {
3864            Some((driver_filter, iterator, control_handle))
3865        } else {
3866            None
3867        }
3868    }
3869
3870    #[allow(irrefutable_let_patterns)]
3871    pub fn into_get_composite_node_specs(
3872        self,
3873    ) -> Option<(
3874        Option<String>,
3875        fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
3876        ManagerControlHandle,
3877    )> {
3878        if let ManagerRequest::GetCompositeNodeSpecs { name_filter, iterator, control_handle } =
3879            self
3880        {
3881            Some((name_filter, iterator, control_handle))
3882        } else {
3883            None
3884        }
3885    }
3886
3887    #[allow(irrefutable_let_patterns)]
3888    pub fn into_get_node_info(
3889        self,
3890    ) -> Option<(
3891        Vec<String>,
3892        fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>,
3893        bool,
3894        ManagerControlHandle,
3895    )> {
3896        if let ManagerRequest::GetNodeInfo { node_filter, iterator, exact_match, control_handle } =
3897            self
3898        {
3899            Some((node_filter, iterator, exact_match, control_handle))
3900        } else {
3901            None
3902        }
3903    }
3904
3905    #[allow(irrefutable_let_patterns)]
3906    pub fn into_get_composite_info(
3907        self,
3908    ) -> Option<(fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>, ManagerControlHandle)>
3909    {
3910        if let ManagerRequest::GetCompositeInfo { iterator, control_handle } = self {
3911            Some((iterator, control_handle))
3912        } else {
3913            None
3914        }
3915    }
3916
3917    #[allow(irrefutable_let_patterns)]
3918    pub fn into_get_driver_host_info(
3919        self,
3920    ) -> Option<(fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>, ManagerControlHandle)>
3921    {
3922        if let ManagerRequest::GetDriverHostInfo { iterator, control_handle } = self {
3923            Some((iterator, control_handle))
3924        } else {
3925            None
3926        }
3927    }
3928
3929    #[allow(irrefutable_let_patterns)]
3930    pub fn into_restart_driver_hosts(
3931        self,
3932    ) -> Option<(String, RestartRematchFlags, ManagerRestartDriverHostsResponder)> {
3933        if let ManagerRequest::RestartDriverHosts { driver_url, rematch_flags, responder } = self {
3934            Some((driver_url, rematch_flags, responder))
3935        } else {
3936            None
3937        }
3938    }
3939
3940    #[allow(irrefutable_let_patterns)]
3941    pub fn into_disable_driver(
3942        self,
3943    ) -> Option<(String, Option<String>, ManagerDisableDriverResponder)> {
3944        if let ManagerRequest::DisableDriver { driver_url, package_hash, responder } = self {
3945            Some((driver_url, package_hash, responder))
3946        } else {
3947            None
3948        }
3949    }
3950
3951    #[allow(irrefutable_let_patterns)]
3952    pub fn into_enable_driver(
3953        self,
3954    ) -> Option<(String, Option<String>, ManagerEnableDriverResponder)> {
3955        if let ManagerRequest::EnableDriver { driver_url, package_hash, responder } = self {
3956            Some((driver_url, package_hash, responder))
3957        } else {
3958            None
3959        }
3960    }
3961
3962    #[allow(irrefutable_let_patterns)]
3963    pub fn into_bind_all_unbound_nodes(self) -> Option<(ManagerBindAllUnboundNodesResponder)> {
3964        if let ManagerRequest::BindAllUnboundNodes { responder } = self {
3965            Some((responder))
3966        } else {
3967            None
3968        }
3969    }
3970
3971    #[allow(irrefutable_let_patterns)]
3972    pub fn into_bind_all_unbound_nodes2(self) -> Option<(ManagerBindAllUnboundNodes2Responder)> {
3973        if let ManagerRequest::BindAllUnboundNodes2 { responder } = self {
3974            Some((responder))
3975        } else {
3976            None
3977        }
3978    }
3979
3980    #[allow(irrefutable_let_patterns)]
3981    pub fn into_add_test_node(self) -> Option<(TestNodeAddArgs, ManagerAddTestNodeResponder)> {
3982        if let ManagerRequest::AddTestNode { args, responder } = self {
3983            Some((args, responder))
3984        } else {
3985            None
3986        }
3987    }
3988
3989    #[allow(irrefutable_let_patterns)]
3990    pub fn into_remove_test_node(self) -> Option<(String, ManagerRemoveTestNodeResponder)> {
3991        if let ManagerRequest::RemoveTestNode { name, responder } = self {
3992            Some((name, responder))
3993        } else {
3994            None
3995        }
3996    }
3997
3998    #[allow(irrefutable_let_patterns)]
3999    pub fn into_wait_for_bootup(self) -> Option<(ManagerWaitForBootupResponder)> {
4000        if let ManagerRequest::WaitForBootup { responder } = self {
4001            Some((responder))
4002        } else {
4003            None
4004        }
4005    }
4006
4007    #[allow(irrefutable_let_patterns)]
4008    pub fn into_restart_with_dictionary(
4009        self,
4010    ) -> Option<(
4011        String,
4012        fidl_fuchsia_component_sandbox::DictionaryRef,
4013        ManagerRestartWithDictionaryResponder,
4014    )> {
4015        if let ManagerRequest::RestartWithDictionary { moniker, dictionary, responder } = self {
4016            Some((moniker, dictionary, responder))
4017        } else {
4018            None
4019        }
4020    }
4021
4022    #[allow(irrefutable_let_patterns)]
4023    pub fn into_restart_with_dictionary_and_power_dependencies(
4024        self,
4025    ) -> Option<(
4026        String,
4027        fidl_fuchsia_component_sandbox::DictionaryRef,
4028        Vec<fidl_fuchsia_power_broker::LevelDependency>,
4029        Option<fidl::Event>,
4030        Vec<NodePowerTokenOverride>,
4031        ManagerRestartWithDictionaryAndPowerDependenciesResponder,
4032    )> {
4033        if let ManagerRequest::RestartWithDictionaryAndPowerDependencies {
4034            moniker,
4035            dictionary,
4036            power_dependencies,
4037            cpu_token_override,
4038            node_power_token_overrides,
4039            responder,
4040        } = self
4041        {
4042            Some((
4043                moniker,
4044                dictionary,
4045                power_dependencies,
4046                cpu_token_override,
4047                node_power_token_overrides,
4048                responder,
4049            ))
4050        } else {
4051            None
4052        }
4053    }
4054
4055    #[allow(irrefutable_let_patterns)]
4056    pub fn into_rebind_composites_with_driver(
4057        self,
4058    ) -> Option<(String, ManagerRebindCompositesWithDriverResponder)> {
4059        if let ManagerRequest::RebindCompositesWithDriver { driver_url, responder } = self {
4060            Some((driver_url, responder))
4061        } else {
4062            None
4063        }
4064    }
4065
4066    #[allow(irrefutable_let_patterns)]
4067    pub fn into_run_health_check(
4068        self,
4069    ) -> Option<(
4070        String,
4071        fidl_fuchsia_driver_framework::HealthCheckRequest,
4072        ManagerRunHealthCheckResponder,
4073    )> {
4074        if let ManagerRequest::RunHealthCheck { moniker, request, responder } = self {
4075            Some((moniker, request, responder))
4076        } else {
4077            None
4078        }
4079    }
4080
4081    /// Name of the method defined in FIDL
4082    pub fn method_name(&self) -> &'static str {
4083        match *self {
4084            ManagerRequest::GetDriverInfo { .. } => "get_driver_info",
4085            ManagerRequest::GetCompositeNodeSpecs { .. } => "get_composite_node_specs",
4086            ManagerRequest::GetNodeInfo { .. } => "get_node_info",
4087            ManagerRequest::GetCompositeInfo { .. } => "get_composite_info",
4088            ManagerRequest::GetDriverHostInfo { .. } => "get_driver_host_info",
4089            ManagerRequest::RestartDriverHosts { .. } => "restart_driver_hosts",
4090            ManagerRequest::DisableDriver { .. } => "disable_driver",
4091            ManagerRequest::EnableDriver { .. } => "enable_driver",
4092            ManagerRequest::BindAllUnboundNodes { .. } => "bind_all_unbound_nodes",
4093            ManagerRequest::BindAllUnboundNodes2 { .. } => "bind_all_unbound_nodes2",
4094            ManagerRequest::AddTestNode { .. } => "add_test_node",
4095            ManagerRequest::RemoveTestNode { .. } => "remove_test_node",
4096            ManagerRequest::WaitForBootup { .. } => "wait_for_bootup",
4097            ManagerRequest::RestartWithDictionary { .. } => "restart_with_dictionary",
4098            ManagerRequest::RestartWithDictionaryAndPowerDependencies { .. } => {
4099                "restart_with_dictionary_and_power_dependencies"
4100            }
4101            ManagerRequest::RebindCompositesWithDriver { .. } => "rebind_composites_with_driver",
4102            ManagerRequest::RunHealthCheck { .. } => "run_health_check",
4103            ManagerRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
4104                "unknown one-way method"
4105            }
4106            ManagerRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
4107                "unknown two-way method"
4108            }
4109        }
4110    }
4111}
4112
4113#[derive(Debug, Clone)]
4114pub struct ManagerControlHandle {
4115    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4116}
4117
4118impl ManagerControlHandle {
4119    pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
4120        self.inner.shutdown_with_epitaph(status.into())
4121    }
4122}
4123
4124impl fidl::endpoints::ControlHandle for ManagerControlHandle {
4125    fn shutdown(&self) {
4126        self.inner.shutdown()
4127    }
4128
4129    fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
4130        self.inner.shutdown_with_epitaph(status)
4131    }
4132
4133    fn is_closed(&self) -> bool {
4134        self.inner.channel().is_closed()
4135    }
4136    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4137        self.inner.channel().on_closed()
4138    }
4139
4140    #[cfg(target_os = "fuchsia")]
4141    fn signal_peer(
4142        &self,
4143        clear_mask: zx::Signals,
4144        set_mask: zx::Signals,
4145    ) -> Result<(), zx_status::Status> {
4146        use fidl::Peered;
4147        self.inner.channel().signal_peer(clear_mask, set_mask)
4148    }
4149}
4150
4151impl ManagerControlHandle {}
4152
4153#[must_use = "FIDL methods require a response to be sent"]
4154#[derive(Debug)]
4155pub struct ManagerRestartDriverHostsResponder {
4156    control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4157    tx_id: u32,
4158}
4159
4160/// Set the the channel to be shutdown (see [`ManagerControlHandle::shutdown`])
4161/// if the responder is dropped without sending a response, so that the client
4162/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4163impl std::ops::Drop for ManagerRestartDriverHostsResponder {
4164    fn drop(&mut self) {
4165        self.control_handle.shutdown();
4166        // Safety: drops once, never accessed again
4167        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4168    }
4169}
4170
4171impl fidl::endpoints::Responder for ManagerRestartDriverHostsResponder {
4172    type ControlHandle = ManagerControlHandle;
4173
4174    fn control_handle(&self) -> &ManagerControlHandle {
4175        &self.control_handle
4176    }
4177
4178    fn drop_without_shutdown(mut self) {
4179        // Safety: drops once, never accessed again due to mem::forget
4180        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4181        // Prevent Drop from running (which would shut down the channel)
4182        std::mem::forget(self);
4183    }
4184}
4185
4186impl ManagerRestartDriverHostsResponder {
4187    /// Sends a response to the FIDL transaction.
4188    ///
4189    /// Sets the channel to shutdown if an error occurs.
4190    pub fn send(self, mut result: Result<u32, i32>) -> Result<(), fidl::Error> {
4191        let _result = self.send_raw(result);
4192        if _result.is_err() {
4193            self.control_handle.shutdown();
4194        }
4195        self.drop_without_shutdown();
4196        _result
4197    }
4198
4199    /// Similar to "send" but does not shutdown the channel if an error occurs.
4200    pub fn send_no_shutdown_on_err(self, mut result: Result<u32, i32>) -> Result<(), fidl::Error> {
4201        let _result = self.send_raw(result);
4202        self.drop_without_shutdown();
4203        _result
4204    }
4205
4206    fn send_raw(&self, mut result: Result<u32, i32>) -> Result<(), fidl::Error> {
4207        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4208            ManagerRestartDriverHostsResponse,
4209            i32,
4210        >>(
4211            fidl::encoding::FlexibleResult::new(result.map(|count| (count,))),
4212            self.tx_id,
4213            0x64fb09a17a4dd8c7,
4214            fidl::encoding::DynamicFlags::FLEXIBLE,
4215        )
4216    }
4217}
4218
4219#[must_use = "FIDL methods require a response to be sent"]
4220#[derive(Debug)]
4221pub struct ManagerDisableDriverResponder {
4222    control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4223    tx_id: u32,
4224}
4225
4226/// Set the the channel to be shutdown (see [`ManagerControlHandle::shutdown`])
4227/// if the responder is dropped without sending a response, so that the client
4228/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4229impl std::ops::Drop for ManagerDisableDriverResponder {
4230    fn drop(&mut self) {
4231        self.control_handle.shutdown();
4232        // Safety: drops once, never accessed again
4233        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4234    }
4235}
4236
4237impl fidl::endpoints::Responder for ManagerDisableDriverResponder {
4238    type ControlHandle = ManagerControlHandle;
4239
4240    fn control_handle(&self) -> &ManagerControlHandle {
4241        &self.control_handle
4242    }
4243
4244    fn drop_without_shutdown(mut self) {
4245        // Safety: drops once, never accessed again due to mem::forget
4246        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4247        // Prevent Drop from running (which would shut down the channel)
4248        std::mem::forget(self);
4249    }
4250}
4251
4252impl ManagerDisableDriverResponder {
4253    /// Sends a response to the FIDL transaction.
4254    ///
4255    /// Sets the channel to shutdown if an error occurs.
4256    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4257        let _result = self.send_raw(result);
4258        if _result.is_err() {
4259            self.control_handle.shutdown();
4260        }
4261        self.drop_without_shutdown();
4262        _result
4263    }
4264
4265    /// Similar to "send" but does not shutdown the channel if an error occurs.
4266    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4267        let _result = self.send_raw(result);
4268        self.drop_without_shutdown();
4269        _result
4270    }
4271
4272    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4273        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4274            fidl::encoding::EmptyStruct,
4275            i32,
4276        >>(
4277            fidl::encoding::FlexibleResult::new(result),
4278            self.tx_id,
4279            0x3cabde92ba1ac967,
4280            fidl::encoding::DynamicFlags::FLEXIBLE,
4281        )
4282    }
4283}
4284
4285#[must_use = "FIDL methods require a response to be sent"]
4286#[derive(Debug)]
4287pub struct ManagerEnableDriverResponder {
4288    control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4289    tx_id: u32,
4290}
4291
4292/// Set the the channel to be shutdown (see [`ManagerControlHandle::shutdown`])
4293/// if the responder is dropped without sending a response, so that the client
4294/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4295impl std::ops::Drop for ManagerEnableDriverResponder {
4296    fn drop(&mut self) {
4297        self.control_handle.shutdown();
4298        // Safety: drops once, never accessed again
4299        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4300    }
4301}
4302
4303impl fidl::endpoints::Responder for ManagerEnableDriverResponder {
4304    type ControlHandle = ManagerControlHandle;
4305
4306    fn control_handle(&self) -> &ManagerControlHandle {
4307        &self.control_handle
4308    }
4309
4310    fn drop_without_shutdown(mut self) {
4311        // Safety: drops once, never accessed again due to mem::forget
4312        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4313        // Prevent Drop from running (which would shut down the channel)
4314        std::mem::forget(self);
4315    }
4316}
4317
4318impl ManagerEnableDriverResponder {
4319    /// Sends a response to the FIDL transaction.
4320    ///
4321    /// Sets the channel to shutdown if an error occurs.
4322    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4323        let _result = self.send_raw(result);
4324        if _result.is_err() {
4325            self.control_handle.shutdown();
4326        }
4327        self.drop_without_shutdown();
4328        _result
4329    }
4330
4331    /// Similar to "send" but does not shutdown the channel if an error occurs.
4332    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4333        let _result = self.send_raw(result);
4334        self.drop_without_shutdown();
4335        _result
4336    }
4337
4338    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4339        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4340            fidl::encoding::EmptyStruct,
4341            i32,
4342        >>(
4343            fidl::encoding::FlexibleResult::new(result),
4344            self.tx_id,
4345            0x76a7518712965faf,
4346            fidl::encoding::DynamicFlags::FLEXIBLE,
4347        )
4348    }
4349}
4350
4351#[must_use = "FIDL methods require a response to be sent"]
4352#[derive(Debug)]
4353pub struct ManagerBindAllUnboundNodesResponder {
4354    control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4355    tx_id: u32,
4356}
4357
4358/// Set the the channel to be shutdown (see [`ManagerControlHandle::shutdown`])
4359/// if the responder is dropped without sending a response, so that the client
4360/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4361impl std::ops::Drop for ManagerBindAllUnboundNodesResponder {
4362    fn drop(&mut self) {
4363        self.control_handle.shutdown();
4364        // Safety: drops once, never accessed again
4365        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4366    }
4367}
4368
4369impl fidl::endpoints::Responder for ManagerBindAllUnboundNodesResponder {
4370    type ControlHandle = ManagerControlHandle;
4371
4372    fn control_handle(&self) -> &ManagerControlHandle {
4373        &self.control_handle
4374    }
4375
4376    fn drop_without_shutdown(mut self) {
4377        // Safety: drops once, never accessed again due to mem::forget
4378        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4379        // Prevent Drop from running (which would shut down the channel)
4380        std::mem::forget(self);
4381    }
4382}
4383
4384impl ManagerBindAllUnboundNodesResponder {
4385    /// Sends a response to the FIDL transaction.
4386    ///
4387    /// Sets the channel to shutdown if an error occurs.
4388    pub fn send(self, mut result: Result<&[NodeBindingInfo], i32>) -> Result<(), fidl::Error> {
4389        let _result = self.send_raw(result);
4390        if _result.is_err() {
4391            self.control_handle.shutdown();
4392        }
4393        self.drop_without_shutdown();
4394        _result
4395    }
4396
4397    /// Similar to "send" but does not shutdown the channel if an error occurs.
4398    pub fn send_no_shutdown_on_err(
4399        self,
4400        mut result: Result<&[NodeBindingInfo], i32>,
4401    ) -> Result<(), fidl::Error> {
4402        let _result = self.send_raw(result);
4403        self.drop_without_shutdown();
4404        _result
4405    }
4406
4407    fn send_raw(&self, mut result: Result<&[NodeBindingInfo], i32>) -> Result<(), fidl::Error> {
4408        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4409            ManagerBindAllUnboundNodesResponse,
4410            i32,
4411        >>(
4412            fidl::encoding::FlexibleResult::new(result.map(|binding_result| (binding_result,))),
4413            self.tx_id,
4414            0x2b4343fe1cfb9f21,
4415            fidl::encoding::DynamicFlags::FLEXIBLE,
4416        )
4417    }
4418}
4419
4420#[must_use = "FIDL methods require a response to be sent"]
4421#[derive(Debug)]
4422pub struct ManagerBindAllUnboundNodes2Responder {
4423    control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4424    tx_id: u32,
4425}
4426
4427/// Set the the channel to be shutdown (see [`ManagerControlHandle::shutdown`])
4428/// if the responder is dropped without sending a response, so that the client
4429/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4430impl std::ops::Drop for ManagerBindAllUnboundNodes2Responder {
4431    fn drop(&mut self) {
4432        self.control_handle.shutdown();
4433        // Safety: drops once, never accessed again
4434        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4435    }
4436}
4437
4438impl fidl::endpoints::Responder for ManagerBindAllUnboundNodes2Responder {
4439    type ControlHandle = ManagerControlHandle;
4440
4441    fn control_handle(&self) -> &ManagerControlHandle {
4442        &self.control_handle
4443    }
4444
4445    fn drop_without_shutdown(mut self) {
4446        // Safety: drops once, never accessed again due to mem::forget
4447        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4448        // Prevent Drop from running (which would shut down the channel)
4449        std::mem::forget(self);
4450    }
4451}
4452
4453impl ManagerBindAllUnboundNodes2Responder {
4454    /// Sends a response to the FIDL transaction.
4455    ///
4456    /// Sets the channel to shutdown if an error occurs.
4457    pub fn send(self, mut result: Result<&[NodeBindingInfo], i32>) -> Result<(), fidl::Error> {
4458        let _result = self.send_raw(result);
4459        if _result.is_err() {
4460            self.control_handle.shutdown();
4461        }
4462        self.drop_without_shutdown();
4463        _result
4464    }
4465
4466    /// Similar to "send" but does not shutdown the channel if an error occurs.
4467    pub fn send_no_shutdown_on_err(
4468        self,
4469        mut result: Result<&[NodeBindingInfo], i32>,
4470    ) -> Result<(), fidl::Error> {
4471        let _result = self.send_raw(result);
4472        self.drop_without_shutdown();
4473        _result
4474    }
4475
4476    fn send_raw(&self, mut result: Result<&[NodeBindingInfo], i32>) -> Result<(), fidl::Error> {
4477        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4478            ManagerBindAllUnboundNodes2Response,
4479            i32,
4480        >>(
4481            fidl::encoding::FlexibleResult::new(result.map(|binding_result| (binding_result,))),
4482            self.tx_id,
4483            0x3e82ce2d6fc998d7,
4484            fidl::encoding::DynamicFlags::FLEXIBLE,
4485        )
4486    }
4487}
4488
4489#[must_use = "FIDL methods require a response to be sent"]
4490#[derive(Debug)]
4491pub struct ManagerAddTestNodeResponder {
4492    control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4493    tx_id: u32,
4494}
4495
4496/// Set the the channel to be shutdown (see [`ManagerControlHandle::shutdown`])
4497/// if the responder is dropped without sending a response, so that the client
4498/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4499impl std::ops::Drop for ManagerAddTestNodeResponder {
4500    fn drop(&mut self) {
4501        self.control_handle.shutdown();
4502        // Safety: drops once, never accessed again
4503        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4504    }
4505}
4506
4507impl fidl::endpoints::Responder for ManagerAddTestNodeResponder {
4508    type ControlHandle = ManagerControlHandle;
4509
4510    fn control_handle(&self) -> &ManagerControlHandle {
4511        &self.control_handle
4512    }
4513
4514    fn drop_without_shutdown(mut self) {
4515        // Safety: drops once, never accessed again due to mem::forget
4516        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4517        // Prevent Drop from running (which would shut down the channel)
4518        std::mem::forget(self);
4519    }
4520}
4521
4522impl ManagerAddTestNodeResponder {
4523    /// Sends a response to the FIDL transaction.
4524    ///
4525    /// Sets the channel to shutdown if an error occurs.
4526    pub fn send(
4527        self,
4528        mut result: Result<(), fidl_fuchsia_driver_framework::NodeError>,
4529    ) -> Result<(), fidl::Error> {
4530        let _result = self.send_raw(result);
4531        if _result.is_err() {
4532            self.control_handle.shutdown();
4533        }
4534        self.drop_without_shutdown();
4535        _result
4536    }
4537
4538    /// Similar to "send" but does not shutdown the channel if an error occurs.
4539    pub fn send_no_shutdown_on_err(
4540        self,
4541        mut result: Result<(), fidl_fuchsia_driver_framework::NodeError>,
4542    ) -> Result<(), fidl::Error> {
4543        let _result = self.send_raw(result);
4544        self.drop_without_shutdown();
4545        _result
4546    }
4547
4548    fn send_raw(
4549        &self,
4550        mut result: Result<(), fidl_fuchsia_driver_framework::NodeError>,
4551    ) -> Result<(), fidl::Error> {
4552        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4553            fidl::encoding::EmptyStruct,
4554            fidl_fuchsia_driver_framework::NodeError,
4555        >>(
4556            fidl::encoding::FlexibleResult::new(result),
4557            self.tx_id,
4558            0x774836bbb7fbc5b9,
4559            fidl::encoding::DynamicFlags::FLEXIBLE,
4560        )
4561    }
4562}
4563
4564#[must_use = "FIDL methods require a response to be sent"]
4565#[derive(Debug)]
4566pub struct ManagerRemoveTestNodeResponder {
4567    control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4568    tx_id: u32,
4569}
4570
4571/// Set the the channel to be shutdown (see [`ManagerControlHandle::shutdown`])
4572/// if the responder is dropped without sending a response, so that the client
4573/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4574impl std::ops::Drop for ManagerRemoveTestNodeResponder {
4575    fn drop(&mut self) {
4576        self.control_handle.shutdown();
4577        // Safety: drops once, never accessed again
4578        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4579    }
4580}
4581
4582impl fidl::endpoints::Responder for ManagerRemoveTestNodeResponder {
4583    type ControlHandle = ManagerControlHandle;
4584
4585    fn control_handle(&self) -> &ManagerControlHandle {
4586        &self.control_handle
4587    }
4588
4589    fn drop_without_shutdown(mut self) {
4590        // Safety: drops once, never accessed again due to mem::forget
4591        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4592        // Prevent Drop from running (which would shut down the channel)
4593        std::mem::forget(self);
4594    }
4595}
4596
4597impl ManagerRemoveTestNodeResponder {
4598    /// Sends a response to the FIDL transaction.
4599    ///
4600    /// Sets the channel to shutdown if an error occurs.
4601    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4602        let _result = self.send_raw(result);
4603        if _result.is_err() {
4604            self.control_handle.shutdown();
4605        }
4606        self.drop_without_shutdown();
4607        _result
4608    }
4609
4610    /// Similar to "send" but does not shutdown the channel if an error occurs.
4611    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4612        let _result = self.send_raw(result);
4613        self.drop_without_shutdown();
4614        _result
4615    }
4616
4617    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4618        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4619            fidl::encoding::EmptyStruct,
4620            i32,
4621        >>(
4622            fidl::encoding::FlexibleResult::new(result),
4623            self.tx_id,
4624            0x1618ec4e5fc4010e,
4625            fidl::encoding::DynamicFlags::FLEXIBLE,
4626        )
4627    }
4628}
4629
4630#[must_use = "FIDL methods require a response to be sent"]
4631#[derive(Debug)]
4632pub struct ManagerWaitForBootupResponder {
4633    control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4634    tx_id: u32,
4635}
4636
4637/// Set the the channel to be shutdown (see [`ManagerControlHandle::shutdown`])
4638/// if the responder is dropped without sending a response, so that the client
4639/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4640impl std::ops::Drop for ManagerWaitForBootupResponder {
4641    fn drop(&mut self) {
4642        self.control_handle.shutdown();
4643        // Safety: drops once, never accessed again
4644        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4645    }
4646}
4647
4648impl fidl::endpoints::Responder for ManagerWaitForBootupResponder {
4649    type ControlHandle = ManagerControlHandle;
4650
4651    fn control_handle(&self) -> &ManagerControlHandle {
4652        &self.control_handle
4653    }
4654
4655    fn drop_without_shutdown(mut self) {
4656        // Safety: drops once, never accessed again due to mem::forget
4657        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4658        // Prevent Drop from running (which would shut down the channel)
4659        std::mem::forget(self);
4660    }
4661}
4662
4663impl ManagerWaitForBootupResponder {
4664    /// Sends a response to the FIDL transaction.
4665    ///
4666    /// Sets the channel to shutdown if an error occurs.
4667    pub fn send(self) -> Result<(), fidl::Error> {
4668        let _result = self.send_raw();
4669        if _result.is_err() {
4670            self.control_handle.shutdown();
4671        }
4672        self.drop_without_shutdown();
4673        _result
4674    }
4675
4676    /// Similar to "send" but does not shutdown the channel if an error occurs.
4677    pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
4678        let _result = self.send_raw();
4679        self.drop_without_shutdown();
4680        _result
4681    }
4682
4683    fn send_raw(&self) -> Result<(), fidl::Error> {
4684        self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
4685            (),
4686            self.tx_id,
4687            0x52077de068225cdc,
4688            fidl::encoding::DynamicFlags::empty(),
4689        )
4690    }
4691}
4692
4693#[must_use = "FIDL methods require a response to be sent"]
4694#[derive(Debug)]
4695pub struct ManagerRestartWithDictionaryResponder {
4696    control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4697    tx_id: u32,
4698}
4699
4700/// Set the the channel to be shutdown (see [`ManagerControlHandle::shutdown`])
4701/// if the responder is dropped without sending a response, so that the client
4702/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4703impl std::ops::Drop for ManagerRestartWithDictionaryResponder {
4704    fn drop(&mut self) {
4705        self.control_handle.shutdown();
4706        // Safety: drops once, never accessed again
4707        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4708    }
4709}
4710
4711impl fidl::endpoints::Responder for ManagerRestartWithDictionaryResponder {
4712    type ControlHandle = ManagerControlHandle;
4713
4714    fn control_handle(&self) -> &ManagerControlHandle {
4715        &self.control_handle
4716    }
4717
4718    fn drop_without_shutdown(mut self) {
4719        // Safety: drops once, never accessed again due to mem::forget
4720        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4721        // Prevent Drop from running (which would shut down the channel)
4722        std::mem::forget(self);
4723    }
4724}
4725
4726impl ManagerRestartWithDictionaryResponder {
4727    /// Sends a response to the FIDL transaction.
4728    ///
4729    /// Sets the channel to shutdown if an error occurs.
4730    pub fn send(self, mut result: Result<fidl::EventPair, i32>) -> Result<(), fidl::Error> {
4731        let _result = self.send_raw(result);
4732        if _result.is_err() {
4733            self.control_handle.shutdown();
4734        }
4735        self.drop_without_shutdown();
4736        _result
4737    }
4738
4739    /// Similar to "send" but does not shutdown the channel if an error occurs.
4740    pub fn send_no_shutdown_on_err(
4741        self,
4742        mut result: Result<fidl::EventPair, i32>,
4743    ) -> Result<(), fidl::Error> {
4744        let _result = self.send_raw(result);
4745        self.drop_without_shutdown();
4746        _result
4747    }
4748
4749    fn send_raw(&self, mut result: Result<fidl::EventPair, i32>) -> Result<(), fidl::Error> {
4750        self.control_handle.inner.send::<fidl::encoding::ResultType<
4751            ManagerRestartWithDictionaryResponse,
4752            i32,
4753        >>(
4754            result.map(|release_fence| (release_fence,)),
4755            self.tx_id,
4756            0x5eb620a85359a10e,
4757            fidl::encoding::DynamicFlags::empty(),
4758        )
4759    }
4760}
4761
4762#[must_use = "FIDL methods require a response to be sent"]
4763#[derive(Debug)]
4764pub struct ManagerRestartWithDictionaryAndPowerDependenciesResponder {
4765    control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4766    tx_id: u32,
4767}
4768
4769/// Set the the channel to be shutdown (see [`ManagerControlHandle::shutdown`])
4770/// if the responder is dropped without sending a response, so that the client
4771/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4772impl std::ops::Drop for ManagerRestartWithDictionaryAndPowerDependenciesResponder {
4773    fn drop(&mut self) {
4774        self.control_handle.shutdown();
4775        // Safety: drops once, never accessed again
4776        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4777    }
4778}
4779
4780impl fidl::endpoints::Responder for ManagerRestartWithDictionaryAndPowerDependenciesResponder {
4781    type ControlHandle = ManagerControlHandle;
4782
4783    fn control_handle(&self) -> &ManagerControlHandle {
4784        &self.control_handle
4785    }
4786
4787    fn drop_without_shutdown(mut self) {
4788        // Safety: drops once, never accessed again due to mem::forget
4789        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4790        // Prevent Drop from running (which would shut down the channel)
4791        std::mem::forget(self);
4792    }
4793}
4794
4795impl ManagerRestartWithDictionaryAndPowerDependenciesResponder {
4796    /// Sends a response to the FIDL transaction.
4797    ///
4798    /// Sets the channel to shutdown if an error occurs.
4799    pub fn send(self, mut result: Result<fidl::EventPair, i32>) -> Result<(), fidl::Error> {
4800        let _result = self.send_raw(result);
4801        if _result.is_err() {
4802            self.control_handle.shutdown();
4803        }
4804        self.drop_without_shutdown();
4805        _result
4806    }
4807
4808    /// Similar to "send" but does not shutdown the channel if an error occurs.
4809    pub fn send_no_shutdown_on_err(
4810        self,
4811        mut result: Result<fidl::EventPair, i32>,
4812    ) -> Result<(), fidl::Error> {
4813        let _result = self.send_raw(result);
4814        self.drop_without_shutdown();
4815        _result
4816    }
4817
4818    fn send_raw(&self, mut result: Result<fidl::EventPair, i32>) -> Result<(), fidl::Error> {
4819        self.control_handle.inner.send::<fidl::encoding::ResultType<
4820            ManagerRestartWithDictionaryAndPowerDependenciesResponse,
4821            i32,
4822        >>(
4823            result.map(|release_fence| (release_fence,)),
4824            self.tx_id,
4825            0x42914549590210,
4826            fidl::encoding::DynamicFlags::empty(),
4827        )
4828    }
4829}
4830
4831#[must_use = "FIDL methods require a response to be sent"]
4832#[derive(Debug)]
4833pub struct ManagerRebindCompositesWithDriverResponder {
4834    control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4835    tx_id: u32,
4836}
4837
4838/// Set the the channel to be shutdown (see [`ManagerControlHandle::shutdown`])
4839/// if the responder is dropped without sending a response, so that the client
4840/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4841impl std::ops::Drop for ManagerRebindCompositesWithDriverResponder {
4842    fn drop(&mut self) {
4843        self.control_handle.shutdown();
4844        // Safety: drops once, never accessed again
4845        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4846    }
4847}
4848
4849impl fidl::endpoints::Responder for ManagerRebindCompositesWithDriverResponder {
4850    type ControlHandle = ManagerControlHandle;
4851
4852    fn control_handle(&self) -> &ManagerControlHandle {
4853        &self.control_handle
4854    }
4855
4856    fn drop_without_shutdown(mut self) {
4857        // Safety: drops once, never accessed again due to mem::forget
4858        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4859        // Prevent Drop from running (which would shut down the channel)
4860        std::mem::forget(self);
4861    }
4862}
4863
4864impl ManagerRebindCompositesWithDriverResponder {
4865    /// Sends a response to the FIDL transaction.
4866    ///
4867    /// Sets the channel to shutdown if an error occurs.
4868    pub fn send(self, mut result: Result<u32, i32>) -> Result<(), fidl::Error> {
4869        let _result = self.send_raw(result);
4870        if _result.is_err() {
4871            self.control_handle.shutdown();
4872        }
4873        self.drop_without_shutdown();
4874        _result
4875    }
4876
4877    /// Similar to "send" but does not shutdown the channel if an error occurs.
4878    pub fn send_no_shutdown_on_err(self, mut result: Result<u32, i32>) -> Result<(), fidl::Error> {
4879        let _result = self.send_raw(result);
4880        self.drop_without_shutdown();
4881        _result
4882    }
4883
4884    fn send_raw(&self, mut result: Result<u32, i32>) -> Result<(), fidl::Error> {
4885        self.control_handle.inner.send::<fidl::encoding::ResultType<
4886            ManagerRebindCompositesWithDriverResponse,
4887            i32,
4888        >>(
4889            result.map(|count| (count,)),
4890            self.tx_id,
4891            0x175d492045f61f28,
4892            fidl::encoding::DynamicFlags::empty(),
4893        )
4894    }
4895}
4896
4897#[must_use = "FIDL methods require a response to be sent"]
4898#[derive(Debug)]
4899pub struct ManagerRunHealthCheckResponder {
4900    control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
4901    tx_id: u32,
4902}
4903
4904/// Set the the channel to be shutdown (see [`ManagerControlHandle::shutdown`])
4905/// if the responder is dropped without sending a response, so that the client
4906/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4907impl std::ops::Drop for ManagerRunHealthCheckResponder {
4908    fn drop(&mut self) {
4909        self.control_handle.shutdown();
4910        // Safety: drops once, never accessed again
4911        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4912    }
4913}
4914
4915impl fidl::endpoints::Responder for ManagerRunHealthCheckResponder {
4916    type ControlHandle = ManagerControlHandle;
4917
4918    fn control_handle(&self) -> &ManagerControlHandle {
4919        &self.control_handle
4920    }
4921
4922    fn drop_without_shutdown(mut self) {
4923        // Safety: drops once, never accessed again due to mem::forget
4924        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4925        // Prevent Drop from running (which would shut down the channel)
4926        std::mem::forget(self);
4927    }
4928}
4929
4930impl ManagerRunHealthCheckResponder {
4931    /// Sends a response to the FIDL transaction.
4932    ///
4933    /// Sets the channel to shutdown if an error occurs.
4934    pub fn send(
4935        self,
4936        mut result: Result<
4937            &fidl_fuchsia_driver_framework::HealthCheckResponse,
4938            fidl_fuchsia_driver_framework::HealthCheckError,
4939        >,
4940    ) -> Result<(), fidl::Error> {
4941        let _result = self.send_raw(result);
4942        if _result.is_err() {
4943            self.control_handle.shutdown();
4944        }
4945        self.drop_without_shutdown();
4946        _result
4947    }
4948
4949    /// Similar to "send" but does not shutdown the channel if an error occurs.
4950    pub fn send_no_shutdown_on_err(
4951        self,
4952        mut result: Result<
4953            &fidl_fuchsia_driver_framework::HealthCheckResponse,
4954            fidl_fuchsia_driver_framework::HealthCheckError,
4955        >,
4956    ) -> Result<(), fidl::Error> {
4957        let _result = self.send_raw(result);
4958        self.drop_without_shutdown();
4959        _result
4960    }
4961
4962    fn send_raw(
4963        &self,
4964        mut result: Result<
4965            &fidl_fuchsia_driver_framework::HealthCheckResponse,
4966            fidl_fuchsia_driver_framework::HealthCheckError,
4967        >,
4968    ) -> Result<(), fidl::Error> {
4969        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4970            fidl_fuchsia_driver_framework::HealthCheckResponse,
4971            fidl_fuchsia_driver_framework::HealthCheckError,
4972        >>(
4973            fidl::encoding::FlexibleResult::new(result),
4974            self.tx_id,
4975            0x40c5975519795d82,
4976            fidl::encoding::DynamicFlags::FLEXIBLE,
4977        )
4978    }
4979}
4980
4981#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4982pub struct NodeInfoIteratorMarker;
4983
4984impl fidl::endpoints::ProtocolMarker for NodeInfoIteratorMarker {
4985    type Proxy = NodeInfoIteratorProxy;
4986    type RequestStream = NodeInfoIteratorRequestStream;
4987    #[cfg(target_os = "fuchsia")]
4988    type SynchronousProxy = NodeInfoIteratorSynchronousProxy;
4989
4990    const DEBUG_NAME: &'static str = "(anonymous) NodeInfoIterator";
4991}
4992
4993pub trait NodeInfoIteratorProxyInterface: Send + Sync {
4994    type GetNextResponseFut: std::future::Future<Output = Result<Vec<NodeInfo>, fidl::Error>> + Send;
4995    fn r#get_next(&self) -> Self::GetNextResponseFut;
4996}
4997#[derive(Debug)]
4998#[cfg(target_os = "fuchsia")]
4999pub struct NodeInfoIteratorSynchronousProxy {
5000    client: fidl::client::sync::Client,
5001}
5002
5003#[cfg(target_os = "fuchsia")]
5004impl fidl::endpoints::SynchronousProxy for NodeInfoIteratorSynchronousProxy {
5005    type Proxy = NodeInfoIteratorProxy;
5006    type Protocol = NodeInfoIteratorMarker;
5007
5008    fn from_channel(inner: fidl::Channel) -> Self {
5009        Self::new(inner)
5010    }
5011
5012    fn into_channel(self) -> fidl::Channel {
5013        self.client.into_channel()
5014    }
5015
5016    fn as_channel(&self) -> &fidl::Channel {
5017        self.client.as_channel()
5018    }
5019}
5020
5021#[cfg(target_os = "fuchsia")]
5022impl NodeInfoIteratorSynchronousProxy {
5023    pub fn new(channel: fidl::Channel) -> Self {
5024        Self { client: fidl::client::sync::Client::new(channel) }
5025    }
5026
5027    pub fn into_channel(self) -> fidl::Channel {
5028        self.client.into_channel()
5029    }
5030
5031    /// Waits until an event arrives and returns it. It is safe for other
5032    /// threads to make concurrent requests while waiting for an event.
5033    pub fn wait_for_event(
5034        &self,
5035        deadline: zx::MonotonicInstant,
5036    ) -> Result<NodeInfoIteratorEvent, fidl::Error> {
5037        NodeInfoIteratorEvent::decode(
5038            self.client.wait_for_event::<NodeInfoIteratorMarker>(deadline)?,
5039        )
5040    }
5041
5042    /// Returns empty when no more entries left.
5043    pub fn r#get_next(
5044        &self,
5045        ___deadline: zx::MonotonicInstant,
5046    ) -> Result<Vec<NodeInfo>, fidl::Error> {
5047        let _response = self.client.send_query::<
5048            fidl::encoding::EmptyPayload,
5049            NodeInfoIteratorGetNextResponse,
5050            NodeInfoIteratorMarker,
5051        >(
5052            (),
5053            0x33c7c070412f889f,
5054            fidl::encoding::DynamicFlags::empty(),
5055            ___deadline,
5056        )?;
5057        Ok(_response.nodes)
5058    }
5059}
5060
5061#[cfg(target_os = "fuchsia")]
5062impl From<NodeInfoIteratorSynchronousProxy> for zx::NullableHandle {
5063    fn from(value: NodeInfoIteratorSynchronousProxy) -> Self {
5064        value.into_channel().into()
5065    }
5066}
5067
5068#[cfg(target_os = "fuchsia")]
5069impl From<fidl::Channel> for NodeInfoIteratorSynchronousProxy {
5070    fn from(value: fidl::Channel) -> Self {
5071        Self::new(value)
5072    }
5073}
5074
5075#[cfg(target_os = "fuchsia")]
5076impl fidl::endpoints::FromClient for NodeInfoIteratorSynchronousProxy {
5077    type Protocol = NodeInfoIteratorMarker;
5078
5079    fn from_client(value: fidl::endpoints::ClientEnd<NodeInfoIteratorMarker>) -> Self {
5080        Self::new(value.into_channel())
5081    }
5082}
5083
5084#[derive(Debug, Clone)]
5085pub struct NodeInfoIteratorProxy {
5086    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5087}
5088
5089impl fidl::endpoints::Proxy for NodeInfoIteratorProxy {
5090    type Protocol = NodeInfoIteratorMarker;
5091
5092    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5093        Self::new(inner)
5094    }
5095
5096    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5097        self.client.into_channel().map_err(|client| Self { client })
5098    }
5099
5100    fn as_channel(&self) -> &::fidl::AsyncChannel {
5101        self.client.as_channel()
5102    }
5103}
5104
5105impl NodeInfoIteratorProxy {
5106    /// Create a new Proxy for fuchsia.driver.development/NodeInfoIterator.
5107    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5108        let protocol_name = <NodeInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5109        Self { client: fidl::client::Client::new(channel, protocol_name) }
5110    }
5111
5112    /// Get a Stream of events from the remote end of the protocol.
5113    ///
5114    /// # Panics
5115    ///
5116    /// Panics if the event stream was already taken.
5117    pub fn take_event_stream(&self) -> NodeInfoIteratorEventStream {
5118        NodeInfoIteratorEventStream { event_receiver: self.client.take_event_receiver() }
5119    }
5120
5121    /// Returns empty when no more entries left.
5122    pub fn r#get_next(
5123        &self,
5124    ) -> fidl::client::QueryResponseFut<Vec<NodeInfo>, fidl::encoding::DefaultFuchsiaResourceDialect>
5125    {
5126        NodeInfoIteratorProxyInterface::r#get_next(self)
5127    }
5128}
5129
5130impl NodeInfoIteratorProxyInterface for NodeInfoIteratorProxy {
5131    type GetNextResponseFut = fidl::client::QueryResponseFut<
5132        Vec<NodeInfo>,
5133        fidl::encoding::DefaultFuchsiaResourceDialect,
5134    >;
5135    fn r#get_next(&self) -> Self::GetNextResponseFut {
5136        fn _decode(
5137            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5138        ) -> Result<Vec<NodeInfo>, fidl::Error> {
5139            let _response = fidl::client::decode_transaction_body::<
5140                NodeInfoIteratorGetNextResponse,
5141                fidl::encoding::DefaultFuchsiaResourceDialect,
5142                0x33c7c070412f889f,
5143            >(_buf?)?;
5144            Ok(_response.nodes)
5145        }
5146        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<NodeInfo>>(
5147            (),
5148            0x33c7c070412f889f,
5149            fidl::encoding::DynamicFlags::empty(),
5150            _decode,
5151        )
5152    }
5153}
5154
5155pub struct NodeInfoIteratorEventStream {
5156    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5157}
5158
5159impl std::marker::Unpin for NodeInfoIteratorEventStream {}
5160
5161impl futures::stream::FusedStream for NodeInfoIteratorEventStream {
5162    fn is_terminated(&self) -> bool {
5163        self.event_receiver.is_terminated()
5164    }
5165}
5166
5167impl futures::Stream for NodeInfoIteratorEventStream {
5168    type Item = Result<NodeInfoIteratorEvent, fidl::Error>;
5169
5170    fn poll_next(
5171        mut self: std::pin::Pin<&mut Self>,
5172        cx: &mut std::task::Context<'_>,
5173    ) -> std::task::Poll<Option<Self::Item>> {
5174        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5175            &mut self.event_receiver,
5176            cx
5177        )?) {
5178            Some(buf) => std::task::Poll::Ready(Some(NodeInfoIteratorEvent::decode(buf))),
5179            None => std::task::Poll::Ready(None),
5180        }
5181    }
5182}
5183
5184#[derive(Debug)]
5185pub enum NodeInfoIteratorEvent {}
5186
5187impl NodeInfoIteratorEvent {
5188    /// Decodes a message buffer as a [`NodeInfoIteratorEvent`].
5189    fn decode(
5190        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5191    ) -> Result<NodeInfoIteratorEvent, fidl::Error> {
5192        let (bytes, _handles) = buf.split_mut();
5193        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5194        debug_assert_eq!(tx_header.tx_id, 0);
5195        match tx_header.ordinal {
5196            _ => Err(fidl::Error::UnknownOrdinal {
5197                ordinal: tx_header.ordinal,
5198                protocol_name:
5199                    <NodeInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5200            }),
5201        }
5202    }
5203}
5204
5205/// A Stream of incoming requests for fuchsia.driver.development/NodeInfoIterator.
5206pub struct NodeInfoIteratorRequestStream {
5207    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5208    is_terminated: bool,
5209}
5210
5211impl std::marker::Unpin for NodeInfoIteratorRequestStream {}
5212
5213impl futures::stream::FusedStream for NodeInfoIteratorRequestStream {
5214    fn is_terminated(&self) -> bool {
5215        self.is_terminated
5216    }
5217}
5218
5219impl fidl::endpoints::RequestStream for NodeInfoIteratorRequestStream {
5220    type Protocol = NodeInfoIteratorMarker;
5221    type ControlHandle = NodeInfoIteratorControlHandle;
5222
5223    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5224        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5225    }
5226
5227    fn control_handle(&self) -> Self::ControlHandle {
5228        NodeInfoIteratorControlHandle { inner: self.inner.clone() }
5229    }
5230
5231    fn into_inner(
5232        self,
5233    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5234    {
5235        (self.inner, self.is_terminated)
5236    }
5237
5238    fn from_inner(
5239        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5240        is_terminated: bool,
5241    ) -> Self {
5242        Self { inner, is_terminated }
5243    }
5244}
5245
5246impl futures::Stream for NodeInfoIteratorRequestStream {
5247    type Item = Result<NodeInfoIteratorRequest, fidl::Error>;
5248
5249    fn poll_next(
5250        mut self: std::pin::Pin<&mut Self>,
5251        cx: &mut std::task::Context<'_>,
5252    ) -> std::task::Poll<Option<Self::Item>> {
5253        let this = &mut *self;
5254        if this.inner.check_shutdown(cx) {
5255            this.is_terminated = true;
5256            return std::task::Poll::Ready(None);
5257        }
5258        if this.is_terminated {
5259            panic!("polled NodeInfoIteratorRequestStream after completion");
5260        }
5261        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5262            |bytes, handles| {
5263                match this.inner.channel().read_etc(cx, bytes, handles) {
5264                    std::task::Poll::Ready(Ok(())) => {}
5265                    std::task::Poll::Pending => return std::task::Poll::Pending,
5266                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5267                        this.is_terminated = true;
5268                        return std::task::Poll::Ready(None);
5269                    }
5270                    std::task::Poll::Ready(Err(e)) => {
5271                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5272                            e.into(),
5273                        ))));
5274                    }
5275                }
5276
5277                // A message has been received from the channel
5278                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5279
5280                std::task::Poll::Ready(Some(match header.ordinal {
5281                    0x33c7c070412f889f => {
5282                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5283                        let mut req = fidl::new_empty!(
5284                            fidl::encoding::EmptyPayload,
5285                            fidl::encoding::DefaultFuchsiaResourceDialect
5286                        );
5287                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5288                        let control_handle =
5289                            NodeInfoIteratorControlHandle { inner: this.inner.clone() };
5290                        Ok(NodeInfoIteratorRequest::GetNext {
5291                            responder: NodeInfoIteratorGetNextResponder {
5292                                control_handle: std::mem::ManuallyDrop::new(control_handle),
5293                                tx_id: header.tx_id,
5294                            },
5295                        })
5296                    }
5297                    _ => Err(fidl::Error::UnknownOrdinal {
5298                        ordinal: header.ordinal,
5299                        protocol_name:
5300                            <NodeInfoIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5301                    }),
5302                }))
5303            },
5304        )
5305    }
5306}
5307
5308#[derive(Debug)]
5309pub enum NodeInfoIteratorRequest {
5310    /// Returns empty when no more entries left.
5311    GetNext { responder: NodeInfoIteratorGetNextResponder },
5312}
5313
5314impl NodeInfoIteratorRequest {
5315    #[allow(irrefutable_let_patterns)]
5316    pub fn into_get_next(self) -> Option<(NodeInfoIteratorGetNextResponder)> {
5317        if let NodeInfoIteratorRequest::GetNext { responder } = self {
5318            Some((responder))
5319        } else {
5320            None
5321        }
5322    }
5323
5324    /// Name of the method defined in FIDL
5325    pub fn method_name(&self) -> &'static str {
5326        match *self {
5327            NodeInfoIteratorRequest::GetNext { .. } => "get_next",
5328        }
5329    }
5330}
5331
5332#[derive(Debug, Clone)]
5333pub struct NodeInfoIteratorControlHandle {
5334    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5335}
5336
5337impl NodeInfoIteratorControlHandle {
5338    pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
5339        self.inner.shutdown_with_epitaph(status.into())
5340    }
5341}
5342
5343impl fidl::endpoints::ControlHandle for NodeInfoIteratorControlHandle {
5344    fn shutdown(&self) {
5345        self.inner.shutdown()
5346    }
5347
5348    fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
5349        self.inner.shutdown_with_epitaph(status)
5350    }
5351
5352    fn is_closed(&self) -> bool {
5353        self.inner.channel().is_closed()
5354    }
5355    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5356        self.inner.channel().on_closed()
5357    }
5358
5359    #[cfg(target_os = "fuchsia")]
5360    fn signal_peer(
5361        &self,
5362        clear_mask: zx::Signals,
5363        set_mask: zx::Signals,
5364    ) -> Result<(), zx_status::Status> {
5365        use fidl::Peered;
5366        self.inner.channel().signal_peer(clear_mask, set_mask)
5367    }
5368}
5369
5370impl NodeInfoIteratorControlHandle {}
5371
5372#[must_use = "FIDL methods require a response to be sent"]
5373#[derive(Debug)]
5374pub struct NodeInfoIteratorGetNextResponder {
5375    control_handle: std::mem::ManuallyDrop<NodeInfoIteratorControlHandle>,
5376    tx_id: u32,
5377}
5378
5379/// Set the the channel to be shutdown (see [`NodeInfoIteratorControlHandle::shutdown`])
5380/// if the responder is dropped without sending a response, so that the client
5381/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5382impl std::ops::Drop for NodeInfoIteratorGetNextResponder {
5383    fn drop(&mut self) {
5384        self.control_handle.shutdown();
5385        // Safety: drops once, never accessed again
5386        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5387    }
5388}
5389
5390impl fidl::endpoints::Responder for NodeInfoIteratorGetNextResponder {
5391    type ControlHandle = NodeInfoIteratorControlHandle;
5392
5393    fn control_handle(&self) -> &NodeInfoIteratorControlHandle {
5394        &self.control_handle
5395    }
5396
5397    fn drop_without_shutdown(mut self) {
5398        // Safety: drops once, never accessed again due to mem::forget
5399        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5400        // Prevent Drop from running (which would shut down the channel)
5401        std::mem::forget(self);
5402    }
5403}
5404
5405impl NodeInfoIteratorGetNextResponder {
5406    /// Sends a response to the FIDL transaction.
5407    ///
5408    /// Sets the channel to shutdown if an error occurs.
5409    pub fn send(self, mut nodes: &[NodeInfo]) -> Result<(), fidl::Error> {
5410        let _result = self.send_raw(nodes);
5411        if _result.is_err() {
5412            self.control_handle.shutdown();
5413        }
5414        self.drop_without_shutdown();
5415        _result
5416    }
5417
5418    /// Similar to "send" but does not shutdown the channel if an error occurs.
5419    pub fn send_no_shutdown_on_err(self, mut nodes: &[NodeInfo]) -> Result<(), fidl::Error> {
5420        let _result = self.send_raw(nodes);
5421        self.drop_without_shutdown();
5422        _result
5423    }
5424
5425    fn send_raw(&self, mut nodes: &[NodeInfo]) -> Result<(), fidl::Error> {
5426        self.control_handle.inner.send::<NodeInfoIteratorGetNextResponse>(
5427            (nodes,),
5428            self.tx_id,
5429            0x33c7c070412f889f,
5430            fidl::encoding::DynamicFlags::empty(),
5431        )
5432    }
5433}
5434
5435mod internal {
5436    use super::*;
5437
5438    impl fidl::encoding::ResourceTypeMarker for ManagerGetCompositeInfoRequest {
5439        type Borrowed<'a> = &'a mut Self;
5440        fn take_or_borrow<'a>(
5441            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5442        ) -> Self::Borrowed<'a> {
5443            value
5444        }
5445    }
5446
5447    unsafe impl fidl::encoding::TypeMarker for ManagerGetCompositeInfoRequest {
5448        type Owned = Self;
5449
5450        #[inline(always)]
5451        fn inline_align(_context: fidl::encoding::Context) -> usize {
5452            4
5453        }
5454
5455        #[inline(always)]
5456        fn inline_size(_context: fidl::encoding::Context) -> usize {
5457            4
5458        }
5459    }
5460
5461    unsafe impl
5462        fidl::encoding::Encode<
5463            ManagerGetCompositeInfoRequest,
5464            fidl::encoding::DefaultFuchsiaResourceDialect,
5465        > for &mut ManagerGetCompositeInfoRequest
5466    {
5467        #[inline]
5468        unsafe fn encode(
5469            self,
5470            encoder: &mut fidl::encoding::Encoder<
5471                '_,
5472                fidl::encoding::DefaultFuchsiaResourceDialect,
5473            >,
5474            offset: usize,
5475            _depth: fidl::encoding::Depth,
5476        ) -> fidl::Result<()> {
5477            encoder.debug_check_bounds::<ManagerGetCompositeInfoRequest>(offset);
5478            // Delegate to tuple encoding.
5479            fidl::encoding::Encode::<
5480                ManagerGetCompositeInfoRequest,
5481                fidl::encoding::DefaultFuchsiaResourceDialect,
5482            >::encode(
5483                (
5484                    <fidl::encoding::Endpoint<
5485                        fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>,
5486                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5487                        &mut self.iterator
5488                    ),
5489                ),
5490                encoder,
5491                offset,
5492                _depth,
5493            )
5494        }
5495    }
5496    unsafe impl<
5497        T0: fidl::encoding::Encode<
5498                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>>,
5499                fidl::encoding::DefaultFuchsiaResourceDialect,
5500            >,
5501    >
5502        fidl::encoding::Encode<
5503            ManagerGetCompositeInfoRequest,
5504            fidl::encoding::DefaultFuchsiaResourceDialect,
5505        > for (T0,)
5506    {
5507        #[inline]
5508        unsafe fn encode(
5509            self,
5510            encoder: &mut fidl::encoding::Encoder<
5511                '_,
5512                fidl::encoding::DefaultFuchsiaResourceDialect,
5513            >,
5514            offset: usize,
5515            depth: fidl::encoding::Depth,
5516        ) -> fidl::Result<()> {
5517            encoder.debug_check_bounds::<ManagerGetCompositeInfoRequest>(offset);
5518            // Zero out padding regions. There's no need to apply masks
5519            // because the unmasked parts will be overwritten by fields.
5520            // Write the fields.
5521            self.0.encode(encoder, offset + 0, depth)?;
5522            Ok(())
5523        }
5524    }
5525
5526    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5527        for ManagerGetCompositeInfoRequest
5528    {
5529        #[inline(always)]
5530        fn new_empty() -> Self {
5531            Self {
5532                iterator: fidl::new_empty!(
5533                    fidl::encoding::Endpoint<
5534                        fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>,
5535                    >,
5536                    fidl::encoding::DefaultFuchsiaResourceDialect
5537                ),
5538            }
5539        }
5540
5541        #[inline]
5542        unsafe fn decode(
5543            &mut self,
5544            decoder: &mut fidl::encoding::Decoder<
5545                '_,
5546                fidl::encoding::DefaultFuchsiaResourceDialect,
5547            >,
5548            offset: usize,
5549            _depth: fidl::encoding::Depth,
5550        ) -> fidl::Result<()> {
5551            decoder.debug_check_bounds::<Self>(offset);
5552            // Verify that padding bytes are zero.
5553            fidl::decode!(
5554                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CompositeInfoIteratorMarker>>,
5555                fidl::encoding::DefaultFuchsiaResourceDialect,
5556                &mut self.iterator,
5557                decoder,
5558                offset + 0,
5559                _depth
5560            )?;
5561            Ok(())
5562        }
5563    }
5564
5565    impl fidl::encoding::ResourceTypeMarker for ManagerGetCompositeNodeSpecsRequest {
5566        type Borrowed<'a> = &'a mut Self;
5567        fn take_or_borrow<'a>(
5568            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5569        ) -> Self::Borrowed<'a> {
5570            value
5571        }
5572    }
5573
5574    unsafe impl fidl::encoding::TypeMarker for ManagerGetCompositeNodeSpecsRequest {
5575        type Owned = Self;
5576
5577        #[inline(always)]
5578        fn inline_align(_context: fidl::encoding::Context) -> usize {
5579            8
5580        }
5581
5582        #[inline(always)]
5583        fn inline_size(_context: fidl::encoding::Context) -> usize {
5584            24
5585        }
5586    }
5587
5588    unsafe impl
5589        fidl::encoding::Encode<
5590            ManagerGetCompositeNodeSpecsRequest,
5591            fidl::encoding::DefaultFuchsiaResourceDialect,
5592        > for &mut ManagerGetCompositeNodeSpecsRequest
5593    {
5594        #[inline]
5595        unsafe fn encode(
5596            self,
5597            encoder: &mut fidl::encoding::Encoder<
5598                '_,
5599                fidl::encoding::DefaultFuchsiaResourceDialect,
5600            >,
5601            offset: usize,
5602            _depth: fidl::encoding::Depth,
5603        ) -> fidl::Result<()> {
5604            encoder.debug_check_bounds::<ManagerGetCompositeNodeSpecsRequest>(offset);
5605            // Delegate to tuple encoding.
5606            fidl::encoding::Encode::<ManagerGetCompositeNodeSpecsRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5607                (
5608                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.name_filter),
5609                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
5610                ),
5611                encoder, offset, _depth
5612            )
5613        }
5614    }
5615    unsafe impl<
5616        T0: fidl::encoding::Encode<
5617                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
5618                fidl::encoding::DefaultFuchsiaResourceDialect,
5619            >,
5620        T1: fidl::encoding::Encode<
5621                fidl::encoding::Endpoint<
5622                    fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
5623                >,
5624                fidl::encoding::DefaultFuchsiaResourceDialect,
5625            >,
5626    >
5627        fidl::encoding::Encode<
5628            ManagerGetCompositeNodeSpecsRequest,
5629            fidl::encoding::DefaultFuchsiaResourceDialect,
5630        > for (T0, T1)
5631    {
5632        #[inline]
5633        unsafe fn encode(
5634            self,
5635            encoder: &mut fidl::encoding::Encoder<
5636                '_,
5637                fidl::encoding::DefaultFuchsiaResourceDialect,
5638            >,
5639            offset: usize,
5640            depth: fidl::encoding::Depth,
5641        ) -> fidl::Result<()> {
5642            encoder.debug_check_bounds::<ManagerGetCompositeNodeSpecsRequest>(offset);
5643            // Zero out padding regions. There's no need to apply masks
5644            // because the unmasked parts will be overwritten by fields.
5645            unsafe {
5646                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
5647                (ptr as *mut u64).write_unaligned(0);
5648            }
5649            // Write the fields.
5650            self.0.encode(encoder, offset + 0, depth)?;
5651            self.1.encode(encoder, offset + 16, depth)?;
5652            Ok(())
5653        }
5654    }
5655
5656    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5657        for ManagerGetCompositeNodeSpecsRequest
5658    {
5659        #[inline(always)]
5660        fn new_empty() -> Self {
5661            Self {
5662                name_filter: fidl::new_empty!(
5663                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
5664                    fidl::encoding::DefaultFuchsiaResourceDialect
5665                ),
5666                iterator: fidl::new_empty!(
5667                    fidl::encoding::Endpoint<
5668                        fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
5669                    >,
5670                    fidl::encoding::DefaultFuchsiaResourceDialect
5671                ),
5672            }
5673        }
5674
5675        #[inline]
5676        unsafe fn decode(
5677            &mut self,
5678            decoder: &mut fidl::encoding::Decoder<
5679                '_,
5680                fidl::encoding::DefaultFuchsiaResourceDialect,
5681            >,
5682            offset: usize,
5683            _depth: fidl::encoding::Depth,
5684        ) -> fidl::Result<()> {
5685            decoder.debug_check_bounds::<Self>(offset);
5686            // Verify that padding bytes are zero.
5687            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
5688            let padval = unsafe { (ptr as *const u64).read_unaligned() };
5689            let mask = 0xffffffff00000000u64;
5690            let maskedval = padval & mask;
5691            if maskedval != 0 {
5692                return Err(fidl::Error::NonZeroPadding {
5693                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
5694                });
5695            }
5696            fidl::decode!(
5697                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
5698                fidl::encoding::DefaultFuchsiaResourceDialect,
5699                &mut self.name_filter,
5700                decoder,
5701                offset + 0,
5702                _depth
5703            )?;
5704            fidl::decode!(
5705                fidl::encoding::Endpoint<
5706                    fidl::endpoints::ServerEnd<CompositeNodeSpecIteratorMarker>,
5707                >,
5708                fidl::encoding::DefaultFuchsiaResourceDialect,
5709                &mut self.iterator,
5710                decoder,
5711                offset + 16,
5712                _depth
5713            )?;
5714            Ok(())
5715        }
5716    }
5717
5718    impl fidl::encoding::ResourceTypeMarker for ManagerGetDriverHostInfoRequest {
5719        type Borrowed<'a> = &'a mut Self;
5720        fn take_or_borrow<'a>(
5721            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5722        ) -> Self::Borrowed<'a> {
5723            value
5724        }
5725    }
5726
5727    unsafe impl fidl::encoding::TypeMarker for ManagerGetDriverHostInfoRequest {
5728        type Owned = Self;
5729
5730        #[inline(always)]
5731        fn inline_align(_context: fidl::encoding::Context) -> usize {
5732            4
5733        }
5734
5735        #[inline(always)]
5736        fn inline_size(_context: fidl::encoding::Context) -> usize {
5737            4
5738        }
5739    }
5740
5741    unsafe impl
5742        fidl::encoding::Encode<
5743            ManagerGetDriverHostInfoRequest,
5744            fidl::encoding::DefaultFuchsiaResourceDialect,
5745        > for &mut ManagerGetDriverHostInfoRequest
5746    {
5747        #[inline]
5748        unsafe fn encode(
5749            self,
5750            encoder: &mut fidl::encoding::Encoder<
5751                '_,
5752                fidl::encoding::DefaultFuchsiaResourceDialect,
5753            >,
5754            offset: usize,
5755            _depth: fidl::encoding::Depth,
5756        ) -> fidl::Result<()> {
5757            encoder.debug_check_bounds::<ManagerGetDriverHostInfoRequest>(offset);
5758            // Delegate to tuple encoding.
5759            fidl::encoding::Encode::<
5760                ManagerGetDriverHostInfoRequest,
5761                fidl::encoding::DefaultFuchsiaResourceDialect,
5762            >::encode(
5763                (<fidl::encoding::Endpoint<
5764                    fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>,
5765                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5766                    &mut self.iterator
5767                ),),
5768                encoder,
5769                offset,
5770                _depth,
5771            )
5772        }
5773    }
5774    unsafe impl<
5775        T0: fidl::encoding::Encode<
5776                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>>,
5777                fidl::encoding::DefaultFuchsiaResourceDialect,
5778            >,
5779    >
5780        fidl::encoding::Encode<
5781            ManagerGetDriverHostInfoRequest,
5782            fidl::encoding::DefaultFuchsiaResourceDialect,
5783        > for (T0,)
5784    {
5785        #[inline]
5786        unsafe fn encode(
5787            self,
5788            encoder: &mut fidl::encoding::Encoder<
5789                '_,
5790                fidl::encoding::DefaultFuchsiaResourceDialect,
5791            >,
5792            offset: usize,
5793            depth: fidl::encoding::Depth,
5794        ) -> fidl::Result<()> {
5795            encoder.debug_check_bounds::<ManagerGetDriverHostInfoRequest>(offset);
5796            // Zero out padding regions. There's no need to apply masks
5797            // because the unmasked parts will be overwritten by fields.
5798            // Write the fields.
5799            self.0.encode(encoder, offset + 0, depth)?;
5800            Ok(())
5801        }
5802    }
5803
5804    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5805        for ManagerGetDriverHostInfoRequest
5806    {
5807        #[inline(always)]
5808        fn new_empty() -> Self {
5809            Self {
5810                iterator: fidl::new_empty!(
5811                    fidl::encoding::Endpoint<
5812                        fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>,
5813                    >,
5814                    fidl::encoding::DefaultFuchsiaResourceDialect
5815                ),
5816            }
5817        }
5818
5819        #[inline]
5820        unsafe fn decode(
5821            &mut self,
5822            decoder: &mut fidl::encoding::Decoder<
5823                '_,
5824                fidl::encoding::DefaultFuchsiaResourceDialect,
5825            >,
5826            offset: usize,
5827            _depth: fidl::encoding::Depth,
5828        ) -> fidl::Result<()> {
5829            decoder.debug_check_bounds::<Self>(offset);
5830            // Verify that padding bytes are zero.
5831            fidl::decode!(
5832                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DriverHostInfoIteratorMarker>>,
5833                fidl::encoding::DefaultFuchsiaResourceDialect,
5834                &mut self.iterator,
5835                decoder,
5836                offset + 0,
5837                _depth
5838            )?;
5839            Ok(())
5840        }
5841    }
5842
5843    impl fidl::encoding::ResourceTypeMarker for ManagerGetDriverInfoRequest {
5844        type Borrowed<'a> = &'a mut Self;
5845        fn take_or_borrow<'a>(
5846            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5847        ) -> Self::Borrowed<'a> {
5848            value
5849        }
5850    }
5851
5852    unsafe impl fidl::encoding::TypeMarker for ManagerGetDriverInfoRequest {
5853        type Owned = Self;
5854
5855        #[inline(always)]
5856        fn inline_align(_context: fidl::encoding::Context) -> usize {
5857            8
5858        }
5859
5860        #[inline(always)]
5861        fn inline_size(_context: fidl::encoding::Context) -> usize {
5862            24
5863        }
5864    }
5865
5866    unsafe impl
5867        fidl::encoding::Encode<
5868            ManagerGetDriverInfoRequest,
5869            fidl::encoding::DefaultFuchsiaResourceDialect,
5870        > for &mut ManagerGetDriverInfoRequest
5871    {
5872        #[inline]
5873        unsafe fn encode(
5874            self,
5875            encoder: &mut fidl::encoding::Encoder<
5876                '_,
5877                fidl::encoding::DefaultFuchsiaResourceDialect,
5878            >,
5879            offset: usize,
5880            _depth: fidl::encoding::Depth,
5881        ) -> fidl::Result<()> {
5882            encoder.debug_check_bounds::<ManagerGetDriverInfoRequest>(offset);
5883            // Delegate to tuple encoding.
5884            fidl::encoding::Encode::<ManagerGetDriverInfoRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5885                (
5886                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.driver_filter),
5887                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
5888                ),
5889                encoder, offset, _depth
5890            )
5891        }
5892    }
5893    unsafe impl<
5894        T0: fidl::encoding::Encode<
5895                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5896                fidl::encoding::DefaultFuchsiaResourceDialect,
5897            >,
5898        T1: fidl::encoding::Encode<
5899                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>>,
5900                fidl::encoding::DefaultFuchsiaResourceDialect,
5901            >,
5902    >
5903        fidl::encoding::Encode<
5904            ManagerGetDriverInfoRequest,
5905            fidl::encoding::DefaultFuchsiaResourceDialect,
5906        > for (T0, T1)
5907    {
5908        #[inline]
5909        unsafe fn encode(
5910            self,
5911            encoder: &mut fidl::encoding::Encoder<
5912                '_,
5913                fidl::encoding::DefaultFuchsiaResourceDialect,
5914            >,
5915            offset: usize,
5916            depth: fidl::encoding::Depth,
5917        ) -> fidl::Result<()> {
5918            encoder.debug_check_bounds::<ManagerGetDriverInfoRequest>(offset);
5919            // Zero out padding regions. There's no need to apply masks
5920            // because the unmasked parts will be overwritten by fields.
5921            unsafe {
5922                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
5923                (ptr as *mut u64).write_unaligned(0);
5924            }
5925            // Write the fields.
5926            self.0.encode(encoder, offset + 0, depth)?;
5927            self.1.encode(encoder, offset + 16, depth)?;
5928            Ok(())
5929        }
5930    }
5931
5932    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5933        for ManagerGetDriverInfoRequest
5934    {
5935        #[inline(always)]
5936        fn new_empty() -> Self {
5937            Self {
5938                driver_filter: fidl::new_empty!(
5939                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5940                    fidl::encoding::DefaultFuchsiaResourceDialect
5941                ),
5942                iterator: fidl::new_empty!(
5943                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>>,
5944                    fidl::encoding::DefaultFuchsiaResourceDialect
5945                ),
5946            }
5947        }
5948
5949        #[inline]
5950        unsafe fn decode(
5951            &mut self,
5952            decoder: &mut fidl::encoding::Decoder<
5953                '_,
5954                fidl::encoding::DefaultFuchsiaResourceDialect,
5955            >,
5956            offset: usize,
5957            _depth: fidl::encoding::Depth,
5958        ) -> fidl::Result<()> {
5959            decoder.debug_check_bounds::<Self>(offset);
5960            // Verify that padding bytes are zero.
5961            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
5962            let padval = unsafe { (ptr as *const u64).read_unaligned() };
5963            let mask = 0xffffffff00000000u64;
5964            let maskedval = padval & mask;
5965            if maskedval != 0 {
5966                return Err(fidl::Error::NonZeroPadding {
5967                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
5968                });
5969            }
5970            fidl::decode!(
5971                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
5972                fidl::encoding::DefaultFuchsiaResourceDialect,
5973                &mut self.driver_filter,
5974                decoder,
5975                offset + 0,
5976                _depth
5977            )?;
5978            fidl::decode!(
5979                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DriverInfoIteratorMarker>>,
5980                fidl::encoding::DefaultFuchsiaResourceDialect,
5981                &mut self.iterator,
5982                decoder,
5983                offset + 16,
5984                _depth
5985            )?;
5986            Ok(())
5987        }
5988    }
5989
5990    impl fidl::encoding::ResourceTypeMarker for ManagerGetNodeInfoRequest {
5991        type Borrowed<'a> = &'a mut Self;
5992        fn take_or_borrow<'a>(
5993            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5994        ) -> Self::Borrowed<'a> {
5995            value
5996        }
5997    }
5998
5999    unsafe impl fidl::encoding::TypeMarker for ManagerGetNodeInfoRequest {
6000        type Owned = Self;
6001
6002        #[inline(always)]
6003        fn inline_align(_context: fidl::encoding::Context) -> usize {
6004            8
6005        }
6006
6007        #[inline(always)]
6008        fn inline_size(_context: fidl::encoding::Context) -> usize {
6009            24
6010        }
6011    }
6012
6013    unsafe impl
6014        fidl::encoding::Encode<
6015            ManagerGetNodeInfoRequest,
6016            fidl::encoding::DefaultFuchsiaResourceDialect,
6017        > for &mut ManagerGetNodeInfoRequest
6018    {
6019        #[inline]
6020        unsafe fn encode(
6021            self,
6022            encoder: &mut fidl::encoding::Encoder<
6023                '_,
6024                fidl::encoding::DefaultFuchsiaResourceDialect,
6025            >,
6026            offset: usize,
6027            _depth: fidl::encoding::Depth,
6028        ) -> fidl::Result<()> {
6029            encoder.debug_check_bounds::<ManagerGetNodeInfoRequest>(offset);
6030            // Delegate to tuple encoding.
6031            fidl::encoding::Encode::<ManagerGetNodeInfoRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6032                (
6033                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.node_filter),
6034                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
6035                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.exact_match),
6036                ),
6037                encoder, offset, _depth
6038            )
6039        }
6040    }
6041    unsafe impl<
6042        T0: fidl::encoding::Encode<
6043                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
6044                fidl::encoding::DefaultFuchsiaResourceDialect,
6045            >,
6046        T1: fidl::encoding::Encode<
6047                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>>,
6048                fidl::encoding::DefaultFuchsiaResourceDialect,
6049            >,
6050        T2: fidl::encoding::Encode<bool, fidl::encoding::DefaultFuchsiaResourceDialect>,
6051    >
6052        fidl::encoding::Encode<
6053            ManagerGetNodeInfoRequest,
6054            fidl::encoding::DefaultFuchsiaResourceDialect,
6055        > for (T0, T1, T2)
6056    {
6057        #[inline]
6058        unsafe fn encode(
6059            self,
6060            encoder: &mut fidl::encoding::Encoder<
6061                '_,
6062                fidl::encoding::DefaultFuchsiaResourceDialect,
6063            >,
6064            offset: usize,
6065            depth: fidl::encoding::Depth,
6066        ) -> fidl::Result<()> {
6067            encoder.debug_check_bounds::<ManagerGetNodeInfoRequest>(offset);
6068            // Zero out padding regions. There's no need to apply masks
6069            // because the unmasked parts will be overwritten by fields.
6070            unsafe {
6071                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
6072                (ptr as *mut u64).write_unaligned(0);
6073            }
6074            // Write the fields.
6075            self.0.encode(encoder, offset + 0, depth)?;
6076            self.1.encode(encoder, offset + 16, depth)?;
6077            self.2.encode(encoder, offset + 20, depth)?;
6078            Ok(())
6079        }
6080    }
6081
6082    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6083        for ManagerGetNodeInfoRequest
6084    {
6085        #[inline(always)]
6086        fn new_empty() -> Self {
6087            Self {
6088                node_filter: fidl::new_empty!(
6089                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
6090                    fidl::encoding::DefaultFuchsiaResourceDialect
6091                ),
6092                iterator: fidl::new_empty!(
6093                    fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>>,
6094                    fidl::encoding::DefaultFuchsiaResourceDialect
6095                ),
6096                exact_match: fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect),
6097            }
6098        }
6099
6100        #[inline]
6101        unsafe fn decode(
6102            &mut self,
6103            decoder: &mut fidl::encoding::Decoder<
6104                '_,
6105                fidl::encoding::DefaultFuchsiaResourceDialect,
6106            >,
6107            offset: usize,
6108            _depth: fidl::encoding::Depth,
6109        ) -> fidl::Result<()> {
6110            decoder.debug_check_bounds::<Self>(offset);
6111            // Verify that padding bytes are zero.
6112            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
6113            let padval = unsafe { (ptr as *const u64).read_unaligned() };
6114            let mask = 0xffffff0000000000u64;
6115            let maskedval = padval & mask;
6116            if maskedval != 0 {
6117                return Err(fidl::Error::NonZeroPadding {
6118                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
6119                });
6120            }
6121            fidl::decode!(
6122                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
6123                fidl::encoding::DefaultFuchsiaResourceDialect,
6124                &mut self.node_filter,
6125                decoder,
6126                offset + 0,
6127                _depth
6128            )?;
6129            fidl::decode!(
6130                fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeInfoIteratorMarker>>,
6131                fidl::encoding::DefaultFuchsiaResourceDialect,
6132                &mut self.iterator,
6133                decoder,
6134                offset + 16,
6135                _depth
6136            )?;
6137            fidl::decode!(
6138                bool,
6139                fidl::encoding::DefaultFuchsiaResourceDialect,
6140                &mut self.exact_match,
6141                decoder,
6142                offset + 20,
6143                _depth
6144            )?;
6145            Ok(())
6146        }
6147    }
6148
6149    impl fidl::encoding::ResourceTypeMarker
6150        for ManagerRestartWithDictionaryAndPowerDependenciesRequest
6151    {
6152        type Borrowed<'a> = &'a mut Self;
6153        fn take_or_borrow<'a>(
6154            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6155        ) -> Self::Borrowed<'a> {
6156            value
6157        }
6158    }
6159
6160    unsafe impl fidl::encoding::TypeMarker for ManagerRestartWithDictionaryAndPowerDependenciesRequest {
6161        type Owned = Self;
6162
6163        #[inline(always)]
6164        fn inline_align(_context: fidl::encoding::Context) -> usize {
6165            8
6166        }
6167
6168        #[inline(always)]
6169        fn inline_size(_context: fidl::encoding::Context) -> usize {
6170            64
6171        }
6172    }
6173
6174    unsafe impl
6175        fidl::encoding::Encode<
6176            ManagerRestartWithDictionaryAndPowerDependenciesRequest,
6177            fidl::encoding::DefaultFuchsiaResourceDialect,
6178        > for &mut ManagerRestartWithDictionaryAndPowerDependenciesRequest
6179    {
6180        #[inline]
6181        unsafe fn encode(
6182            self,
6183            encoder: &mut fidl::encoding::Encoder<
6184                '_,
6185                fidl::encoding::DefaultFuchsiaResourceDialect,
6186            >,
6187            offset: usize,
6188            _depth: fidl::encoding::Depth,
6189        ) -> fidl::Result<()> {
6190            encoder.debug_check_bounds::<ManagerRestartWithDictionaryAndPowerDependenciesRequest>(
6191                offset,
6192            );
6193            // Delegate to tuple encoding.
6194            fidl::encoding::Encode::<ManagerRestartWithDictionaryAndPowerDependenciesRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6195                (
6196                    <fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
6197                    <fidl_fuchsia_component_sandbox::DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.dictionary),
6198                    <fidl::encoding::Vector<fidl_fuchsia_power_broker::LevelDependency, 128> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.power_dependencies),
6199                    <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.cpu_token_override),
6200                    <fidl::encoding::Vector<NodePowerTokenOverride, 16> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.node_power_token_overrides),
6201                ),
6202                encoder, offset, _depth
6203            )
6204        }
6205    }
6206    unsafe impl<
6207        T0: fidl::encoding::Encode<
6208                fidl::encoding::BoundedString<1024>,
6209                fidl::encoding::DefaultFuchsiaResourceDialect,
6210            >,
6211        T1: fidl::encoding::Encode<
6212                fidl_fuchsia_component_sandbox::DictionaryRef,
6213                fidl::encoding::DefaultFuchsiaResourceDialect,
6214            >,
6215        T2: fidl::encoding::Encode<
6216                fidl::encoding::Vector<fidl_fuchsia_power_broker::LevelDependency, 128>,
6217                fidl::encoding::DefaultFuchsiaResourceDialect,
6218            >,
6219        T3: fidl::encoding::Encode<
6220                fidl::encoding::Optional<
6221                    fidl::encoding::HandleType<
6222                        fidl::Event,
6223                        { fidl::ObjectType::EVENT.into_raw() },
6224                        2147483648,
6225                    >,
6226                >,
6227                fidl::encoding::DefaultFuchsiaResourceDialect,
6228            >,
6229        T4: fidl::encoding::Encode<
6230                fidl::encoding::Vector<NodePowerTokenOverride, 16>,
6231                fidl::encoding::DefaultFuchsiaResourceDialect,
6232            >,
6233    >
6234        fidl::encoding::Encode<
6235            ManagerRestartWithDictionaryAndPowerDependenciesRequest,
6236            fidl::encoding::DefaultFuchsiaResourceDialect,
6237        > for (T0, T1, T2, T3, T4)
6238    {
6239        #[inline]
6240        unsafe fn encode(
6241            self,
6242            encoder: &mut fidl::encoding::Encoder<
6243                '_,
6244                fidl::encoding::DefaultFuchsiaResourceDialect,
6245            >,
6246            offset: usize,
6247            depth: fidl::encoding::Depth,
6248        ) -> fidl::Result<()> {
6249            encoder.debug_check_bounds::<ManagerRestartWithDictionaryAndPowerDependenciesRequest>(
6250                offset,
6251            );
6252            // Zero out padding regions. There's no need to apply masks
6253            // because the unmasked parts will be overwritten by fields.
6254            unsafe {
6255                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
6256                (ptr as *mut u64).write_unaligned(0);
6257            }
6258            unsafe {
6259                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
6260                (ptr as *mut u64).write_unaligned(0);
6261            }
6262            // Write the fields.
6263            self.0.encode(encoder, offset + 0, depth)?;
6264            self.1.encode(encoder, offset + 16, depth)?;
6265            self.2.encode(encoder, offset + 24, depth)?;
6266            self.3.encode(encoder, offset + 40, depth)?;
6267            self.4.encode(encoder, offset + 48, depth)?;
6268            Ok(())
6269        }
6270    }
6271
6272    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6273        for ManagerRestartWithDictionaryAndPowerDependenciesRequest
6274    {
6275        #[inline(always)]
6276        fn new_empty() -> Self {
6277            Self {
6278                moniker: fidl::new_empty!(
6279                    fidl::encoding::BoundedString<1024>,
6280                    fidl::encoding::DefaultFuchsiaResourceDialect
6281                ),
6282                dictionary: fidl::new_empty!(
6283                    fidl_fuchsia_component_sandbox::DictionaryRef,
6284                    fidl::encoding::DefaultFuchsiaResourceDialect
6285                ),
6286                power_dependencies: fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_power_broker::LevelDependency, 128>, fidl::encoding::DefaultFuchsiaResourceDialect),
6287                cpu_token_override: fidl::new_empty!(
6288                    fidl::encoding::Optional<
6289                        fidl::encoding::HandleType<
6290                            fidl::Event,
6291                            { fidl::ObjectType::EVENT.into_raw() },
6292                            2147483648,
6293                        >,
6294                    >,
6295                    fidl::encoding::DefaultFuchsiaResourceDialect
6296                ),
6297                node_power_token_overrides: fidl::new_empty!(fidl::encoding::Vector<NodePowerTokenOverride, 16>, fidl::encoding::DefaultFuchsiaResourceDialect),
6298            }
6299        }
6300
6301        #[inline]
6302        unsafe fn decode(
6303            &mut self,
6304            decoder: &mut fidl::encoding::Decoder<
6305                '_,
6306                fidl::encoding::DefaultFuchsiaResourceDialect,
6307            >,
6308            offset: usize,
6309            _depth: fidl::encoding::Depth,
6310        ) -> fidl::Result<()> {
6311            decoder.debug_check_bounds::<Self>(offset);
6312            // Verify that padding bytes are zero.
6313            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
6314            let padval = unsafe { (ptr as *const u64).read_unaligned() };
6315            let mask = 0xffffffff00000000u64;
6316            let maskedval = padval & mask;
6317            if maskedval != 0 {
6318                return Err(fidl::Error::NonZeroPadding {
6319                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
6320                });
6321            }
6322            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
6323            let padval = unsafe { (ptr as *const u64).read_unaligned() };
6324            let mask = 0xffffffff00000000u64;
6325            let maskedval = padval & mask;
6326            if maskedval != 0 {
6327                return Err(fidl::Error::NonZeroPadding {
6328                    padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
6329                });
6330            }
6331            fidl::decode!(
6332                fidl::encoding::BoundedString<1024>,
6333                fidl::encoding::DefaultFuchsiaResourceDialect,
6334                &mut self.moniker,
6335                decoder,
6336                offset + 0,
6337                _depth
6338            )?;
6339            fidl::decode!(
6340                fidl_fuchsia_component_sandbox::DictionaryRef,
6341                fidl::encoding::DefaultFuchsiaResourceDialect,
6342                &mut self.dictionary,
6343                decoder,
6344                offset + 16,
6345                _depth
6346            )?;
6347            fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_power_broker::LevelDependency, 128>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.power_dependencies, decoder, offset + 24, _depth)?;
6348            fidl::decode!(
6349                fidl::encoding::Optional<
6350                    fidl::encoding::HandleType<
6351                        fidl::Event,
6352                        { fidl::ObjectType::EVENT.into_raw() },
6353                        2147483648,
6354                    >,
6355                >,
6356                fidl::encoding::DefaultFuchsiaResourceDialect,
6357                &mut self.cpu_token_override,
6358                decoder,
6359                offset + 40,
6360                _depth
6361            )?;
6362            fidl::decode!(fidl::encoding::Vector<NodePowerTokenOverride, 16>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.node_power_token_overrides, decoder, offset + 48, _depth)?;
6363            Ok(())
6364        }
6365    }
6366
6367    impl fidl::encoding::ResourceTypeMarker for ManagerRestartWithDictionaryRequest {
6368        type Borrowed<'a> = &'a mut Self;
6369        fn take_or_borrow<'a>(
6370            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6371        ) -> Self::Borrowed<'a> {
6372            value
6373        }
6374    }
6375
6376    unsafe impl fidl::encoding::TypeMarker for ManagerRestartWithDictionaryRequest {
6377        type Owned = Self;
6378
6379        #[inline(always)]
6380        fn inline_align(_context: fidl::encoding::Context) -> usize {
6381            8
6382        }
6383
6384        #[inline(always)]
6385        fn inline_size(_context: fidl::encoding::Context) -> usize {
6386            24
6387        }
6388    }
6389
6390    unsafe impl
6391        fidl::encoding::Encode<
6392            ManagerRestartWithDictionaryRequest,
6393            fidl::encoding::DefaultFuchsiaResourceDialect,
6394        > for &mut ManagerRestartWithDictionaryRequest
6395    {
6396        #[inline]
6397        unsafe fn encode(
6398            self,
6399            encoder: &mut fidl::encoding::Encoder<
6400                '_,
6401                fidl::encoding::DefaultFuchsiaResourceDialect,
6402            >,
6403            offset: usize,
6404            _depth: fidl::encoding::Depth,
6405        ) -> fidl::Result<()> {
6406            encoder.debug_check_bounds::<ManagerRestartWithDictionaryRequest>(offset);
6407            // Delegate to tuple encoding.
6408            fidl::encoding::Encode::<ManagerRestartWithDictionaryRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6409                (
6410                    <fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
6411                    <fidl_fuchsia_component_sandbox::DictionaryRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.dictionary),
6412                ),
6413                encoder, offset, _depth
6414            )
6415        }
6416    }
6417    unsafe impl<
6418        T0: fidl::encoding::Encode<
6419                fidl::encoding::BoundedString<1024>,
6420                fidl::encoding::DefaultFuchsiaResourceDialect,
6421            >,
6422        T1: fidl::encoding::Encode<
6423                fidl_fuchsia_component_sandbox::DictionaryRef,
6424                fidl::encoding::DefaultFuchsiaResourceDialect,
6425            >,
6426    >
6427        fidl::encoding::Encode<
6428            ManagerRestartWithDictionaryRequest,
6429            fidl::encoding::DefaultFuchsiaResourceDialect,
6430        > for (T0, T1)
6431    {
6432        #[inline]
6433        unsafe fn encode(
6434            self,
6435            encoder: &mut fidl::encoding::Encoder<
6436                '_,
6437                fidl::encoding::DefaultFuchsiaResourceDialect,
6438            >,
6439            offset: usize,
6440            depth: fidl::encoding::Depth,
6441        ) -> fidl::Result<()> {
6442            encoder.debug_check_bounds::<ManagerRestartWithDictionaryRequest>(offset);
6443            // Zero out padding regions. There's no need to apply masks
6444            // because the unmasked parts will be overwritten by fields.
6445            unsafe {
6446                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
6447                (ptr as *mut u64).write_unaligned(0);
6448            }
6449            // Write the fields.
6450            self.0.encode(encoder, offset + 0, depth)?;
6451            self.1.encode(encoder, offset + 16, depth)?;
6452            Ok(())
6453        }
6454    }
6455
6456    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6457        for ManagerRestartWithDictionaryRequest
6458    {
6459        #[inline(always)]
6460        fn new_empty() -> Self {
6461            Self {
6462                moniker: fidl::new_empty!(
6463                    fidl::encoding::BoundedString<1024>,
6464                    fidl::encoding::DefaultFuchsiaResourceDialect
6465                ),
6466                dictionary: fidl::new_empty!(
6467                    fidl_fuchsia_component_sandbox::DictionaryRef,
6468                    fidl::encoding::DefaultFuchsiaResourceDialect
6469                ),
6470            }
6471        }
6472
6473        #[inline]
6474        unsafe fn decode(
6475            &mut self,
6476            decoder: &mut fidl::encoding::Decoder<
6477                '_,
6478                fidl::encoding::DefaultFuchsiaResourceDialect,
6479            >,
6480            offset: usize,
6481            _depth: fidl::encoding::Depth,
6482        ) -> fidl::Result<()> {
6483            decoder.debug_check_bounds::<Self>(offset);
6484            // Verify that padding bytes are zero.
6485            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
6486            let padval = unsafe { (ptr as *const u64).read_unaligned() };
6487            let mask = 0xffffffff00000000u64;
6488            let maskedval = padval & mask;
6489            if maskedval != 0 {
6490                return Err(fidl::Error::NonZeroPadding {
6491                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
6492                });
6493            }
6494            fidl::decode!(
6495                fidl::encoding::BoundedString<1024>,
6496                fidl::encoding::DefaultFuchsiaResourceDialect,
6497                &mut self.moniker,
6498                decoder,
6499                offset + 0,
6500                _depth
6501            )?;
6502            fidl::decode!(
6503                fidl_fuchsia_component_sandbox::DictionaryRef,
6504                fidl::encoding::DefaultFuchsiaResourceDialect,
6505                &mut self.dictionary,
6506                decoder,
6507                offset + 16,
6508                _depth
6509            )?;
6510            Ok(())
6511        }
6512    }
6513
6514    impl fidl::encoding::ResourceTypeMarker
6515        for ManagerRestartWithDictionaryAndPowerDependenciesResponse
6516    {
6517        type Borrowed<'a> = &'a mut Self;
6518        fn take_or_borrow<'a>(
6519            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6520        ) -> Self::Borrowed<'a> {
6521            value
6522        }
6523    }
6524
6525    unsafe impl fidl::encoding::TypeMarker
6526        for ManagerRestartWithDictionaryAndPowerDependenciesResponse
6527    {
6528        type Owned = Self;
6529
6530        #[inline(always)]
6531        fn inline_align(_context: fidl::encoding::Context) -> usize {
6532            4
6533        }
6534
6535        #[inline(always)]
6536        fn inline_size(_context: fidl::encoding::Context) -> usize {
6537            4
6538        }
6539    }
6540
6541    unsafe impl
6542        fidl::encoding::Encode<
6543            ManagerRestartWithDictionaryAndPowerDependenciesResponse,
6544            fidl::encoding::DefaultFuchsiaResourceDialect,
6545        > for &mut ManagerRestartWithDictionaryAndPowerDependenciesResponse
6546    {
6547        #[inline]
6548        unsafe fn encode(
6549            self,
6550            encoder: &mut fidl::encoding::Encoder<
6551                '_,
6552                fidl::encoding::DefaultFuchsiaResourceDialect,
6553            >,
6554            offset: usize,
6555            _depth: fidl::encoding::Depth,
6556        ) -> fidl::Result<()> {
6557            encoder.debug_check_bounds::<ManagerRestartWithDictionaryAndPowerDependenciesResponse>(
6558                offset,
6559            );
6560            // Delegate to tuple encoding.
6561            fidl::encoding::Encode::<
6562                ManagerRestartWithDictionaryAndPowerDependenciesResponse,
6563                fidl::encoding::DefaultFuchsiaResourceDialect,
6564            >::encode(
6565                (<fidl::encoding::HandleType<
6566                    fidl::EventPair,
6567                    { fidl::ObjectType::EVENTPAIR.into_raw() },
6568                    2147483648,
6569                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6570                    &mut self.release_fence
6571                ),),
6572                encoder,
6573                offset,
6574                _depth,
6575            )
6576        }
6577    }
6578    unsafe impl<
6579        T0: fidl::encoding::Encode<
6580                fidl::encoding::HandleType<
6581                    fidl::EventPair,
6582                    { fidl::ObjectType::EVENTPAIR.into_raw() },
6583                    2147483648,
6584                >,
6585                fidl::encoding::DefaultFuchsiaResourceDialect,
6586            >,
6587    >
6588        fidl::encoding::Encode<
6589            ManagerRestartWithDictionaryAndPowerDependenciesResponse,
6590            fidl::encoding::DefaultFuchsiaResourceDialect,
6591        > for (T0,)
6592    {
6593        #[inline]
6594        unsafe fn encode(
6595            self,
6596            encoder: &mut fidl::encoding::Encoder<
6597                '_,
6598                fidl::encoding::DefaultFuchsiaResourceDialect,
6599            >,
6600            offset: usize,
6601            depth: fidl::encoding::Depth,
6602        ) -> fidl::Result<()> {
6603            encoder.debug_check_bounds::<ManagerRestartWithDictionaryAndPowerDependenciesResponse>(
6604                offset,
6605            );
6606            // Zero out padding regions. There's no need to apply masks
6607            // because the unmasked parts will be overwritten by fields.
6608            // Write the fields.
6609            self.0.encode(encoder, offset + 0, depth)?;
6610            Ok(())
6611        }
6612    }
6613
6614    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6615        for ManagerRestartWithDictionaryAndPowerDependenciesResponse
6616    {
6617        #[inline(always)]
6618        fn new_empty() -> Self {
6619            Self {
6620                release_fence: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6621            }
6622        }
6623
6624        #[inline]
6625        unsafe fn decode(
6626            &mut self,
6627            decoder: &mut fidl::encoding::Decoder<
6628                '_,
6629                fidl::encoding::DefaultFuchsiaResourceDialect,
6630            >,
6631            offset: usize,
6632            _depth: fidl::encoding::Depth,
6633        ) -> fidl::Result<()> {
6634            decoder.debug_check_bounds::<Self>(offset);
6635            // Verify that padding bytes are zero.
6636            fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.release_fence, decoder, offset + 0, _depth)?;
6637            Ok(())
6638        }
6639    }
6640
6641    impl fidl::encoding::ResourceTypeMarker for ManagerRestartWithDictionaryResponse {
6642        type Borrowed<'a> = &'a mut Self;
6643        fn take_or_borrow<'a>(
6644            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6645        ) -> Self::Borrowed<'a> {
6646            value
6647        }
6648    }
6649
6650    unsafe impl fidl::encoding::TypeMarker for ManagerRestartWithDictionaryResponse {
6651        type Owned = Self;
6652
6653        #[inline(always)]
6654        fn inline_align(_context: fidl::encoding::Context) -> usize {
6655            4
6656        }
6657
6658        #[inline(always)]
6659        fn inline_size(_context: fidl::encoding::Context) -> usize {
6660            4
6661        }
6662    }
6663
6664    unsafe impl
6665        fidl::encoding::Encode<
6666            ManagerRestartWithDictionaryResponse,
6667            fidl::encoding::DefaultFuchsiaResourceDialect,
6668        > for &mut ManagerRestartWithDictionaryResponse
6669    {
6670        #[inline]
6671        unsafe fn encode(
6672            self,
6673            encoder: &mut fidl::encoding::Encoder<
6674                '_,
6675                fidl::encoding::DefaultFuchsiaResourceDialect,
6676            >,
6677            offset: usize,
6678            _depth: fidl::encoding::Depth,
6679        ) -> fidl::Result<()> {
6680            encoder.debug_check_bounds::<ManagerRestartWithDictionaryResponse>(offset);
6681            // Delegate to tuple encoding.
6682            fidl::encoding::Encode::<
6683                ManagerRestartWithDictionaryResponse,
6684                fidl::encoding::DefaultFuchsiaResourceDialect,
6685            >::encode(
6686                (<fidl::encoding::HandleType<
6687                    fidl::EventPair,
6688                    { fidl::ObjectType::EVENTPAIR.into_raw() },
6689                    2147483648,
6690                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6691                    &mut self.release_fence
6692                ),),
6693                encoder,
6694                offset,
6695                _depth,
6696            )
6697        }
6698    }
6699    unsafe impl<
6700        T0: fidl::encoding::Encode<
6701                fidl::encoding::HandleType<
6702                    fidl::EventPair,
6703                    { fidl::ObjectType::EVENTPAIR.into_raw() },
6704                    2147483648,
6705                >,
6706                fidl::encoding::DefaultFuchsiaResourceDialect,
6707            >,
6708    >
6709        fidl::encoding::Encode<
6710            ManagerRestartWithDictionaryResponse,
6711            fidl::encoding::DefaultFuchsiaResourceDialect,
6712        > for (T0,)
6713    {
6714        #[inline]
6715        unsafe fn encode(
6716            self,
6717            encoder: &mut fidl::encoding::Encoder<
6718                '_,
6719                fidl::encoding::DefaultFuchsiaResourceDialect,
6720            >,
6721            offset: usize,
6722            depth: fidl::encoding::Depth,
6723        ) -> fidl::Result<()> {
6724            encoder.debug_check_bounds::<ManagerRestartWithDictionaryResponse>(offset);
6725            // Zero out padding regions. There's no need to apply masks
6726            // because the unmasked parts will be overwritten by fields.
6727            // Write the fields.
6728            self.0.encode(encoder, offset + 0, depth)?;
6729            Ok(())
6730        }
6731    }
6732
6733    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6734        for ManagerRestartWithDictionaryResponse
6735    {
6736        #[inline(always)]
6737        fn new_empty() -> Self {
6738            Self {
6739                release_fence: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6740            }
6741        }
6742
6743        #[inline]
6744        unsafe fn decode(
6745            &mut self,
6746            decoder: &mut fidl::encoding::Decoder<
6747                '_,
6748                fidl::encoding::DefaultFuchsiaResourceDialect,
6749            >,
6750            offset: usize,
6751            _depth: fidl::encoding::Depth,
6752        ) -> fidl::Result<()> {
6753            decoder.debug_check_bounds::<Self>(offset);
6754            // Verify that padding bytes are zero.
6755            fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.release_fence, decoder, offset + 0, _depth)?;
6756            Ok(())
6757        }
6758    }
6759
6760    impl fidl::encoding::ResourceTypeMarker for NodePowerTokenOverride {
6761        type Borrowed<'a> = &'a mut Self;
6762        fn take_or_borrow<'a>(
6763            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6764        ) -> Self::Borrowed<'a> {
6765            value
6766        }
6767    }
6768
6769    unsafe impl fidl::encoding::TypeMarker for NodePowerTokenOverride {
6770        type Owned = Self;
6771
6772        #[inline(always)]
6773        fn inline_align(_context: fidl::encoding::Context) -> usize {
6774            8
6775        }
6776
6777        #[inline(always)]
6778        fn inline_size(_context: fidl::encoding::Context) -> usize {
6779            24
6780        }
6781    }
6782
6783    unsafe impl
6784        fidl::encoding::Encode<
6785            NodePowerTokenOverride,
6786            fidl::encoding::DefaultFuchsiaResourceDialect,
6787        > for &mut NodePowerTokenOverride
6788    {
6789        #[inline]
6790        unsafe fn encode(
6791            self,
6792            encoder: &mut fidl::encoding::Encoder<
6793                '_,
6794                fidl::encoding::DefaultFuchsiaResourceDialect,
6795            >,
6796            offset: usize,
6797            _depth: fidl::encoding::Depth,
6798        ) -> fidl::Result<()> {
6799            encoder.debug_check_bounds::<NodePowerTokenOverride>(offset);
6800            // Delegate to tuple encoding.
6801            fidl::encoding::Encode::<NodePowerTokenOverride, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6802                (
6803                    <fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(&self.target_node),
6804                    <fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
6805                ),
6806                encoder, offset, _depth
6807            )
6808        }
6809    }
6810    unsafe impl<
6811        T0: fidl::encoding::Encode<
6812                fidl::encoding::BoundedString<1024>,
6813                fidl::encoding::DefaultFuchsiaResourceDialect,
6814            >,
6815        T1: fidl::encoding::Encode<
6816                fidl::encoding::HandleType<
6817                    fidl::Event,
6818                    { fidl::ObjectType::EVENT.into_raw() },
6819                    2147483648,
6820                >,
6821                fidl::encoding::DefaultFuchsiaResourceDialect,
6822            >,
6823    >
6824        fidl::encoding::Encode<
6825            NodePowerTokenOverride,
6826            fidl::encoding::DefaultFuchsiaResourceDialect,
6827        > for (T0, T1)
6828    {
6829        #[inline]
6830        unsafe fn encode(
6831            self,
6832            encoder: &mut fidl::encoding::Encoder<
6833                '_,
6834                fidl::encoding::DefaultFuchsiaResourceDialect,
6835            >,
6836            offset: usize,
6837            depth: fidl::encoding::Depth,
6838        ) -> fidl::Result<()> {
6839            encoder.debug_check_bounds::<NodePowerTokenOverride>(offset);
6840            // Zero out padding regions. There's no need to apply masks
6841            // because the unmasked parts will be overwritten by fields.
6842            unsafe {
6843                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
6844                (ptr as *mut u64).write_unaligned(0);
6845            }
6846            // Write the fields.
6847            self.0.encode(encoder, offset + 0, depth)?;
6848            self.1.encode(encoder, offset + 16, depth)?;
6849            Ok(())
6850        }
6851    }
6852
6853    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6854        for NodePowerTokenOverride
6855    {
6856        #[inline(always)]
6857        fn new_empty() -> Self {
6858            Self {
6859                target_node: fidl::new_empty!(
6860                    fidl::encoding::BoundedString<1024>,
6861                    fidl::encoding::DefaultFuchsiaResourceDialect
6862                ),
6863                token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6864            }
6865        }
6866
6867        #[inline]
6868        unsafe fn decode(
6869            &mut self,
6870            decoder: &mut fidl::encoding::Decoder<
6871                '_,
6872                fidl::encoding::DefaultFuchsiaResourceDialect,
6873            >,
6874            offset: usize,
6875            _depth: fidl::encoding::Depth,
6876        ) -> fidl::Result<()> {
6877            decoder.debug_check_bounds::<Self>(offset);
6878            // Verify that padding bytes are zero.
6879            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
6880            let padval = unsafe { (ptr as *const u64).read_unaligned() };
6881            let mask = 0xffffffff00000000u64;
6882            let maskedval = padval & mask;
6883            if maskedval != 0 {
6884                return Err(fidl::Error::NonZeroPadding {
6885                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
6886                });
6887            }
6888            fidl::decode!(
6889                fidl::encoding::BoundedString<1024>,
6890                fidl::encoding::DefaultFuchsiaResourceDialect,
6891                &mut self.target_node,
6892                decoder,
6893                offset + 0,
6894                _depth
6895            )?;
6896            fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 16, _depth)?;
6897            Ok(())
6898        }
6899    }
6900}