fdomain_fuchsia_io/
fdomain_fuchsia_io.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 fdomain_client::fidl::{ControlHandle as _, FDomainFlexibleIntoResult as _, Responder as _};
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9pub use fidl_fuchsia_io__common::*;
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13/// The type to identify a connection to a node.
14/// It represents a capability: a reference to a node with associated rights.
15pub type Token = fdomain_client::Event;
16
17#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
18pub struct DirectoryCreateSymlinkRequest {
19    pub name: String,
20    pub target: Vec<u8>,
21    pub connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
22}
23
24impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
25    for DirectoryCreateSymlinkRequest
26{
27}
28
29#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
30pub struct DirectoryDeprecatedOpenRequest {
31    pub flags: OpenFlags,
32    pub mode: ModeType,
33    pub path: String,
34    pub object: fdomain_client::fidl::ServerEnd<NodeMarker>,
35}
36
37impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
38    for DirectoryDeprecatedOpenRequest
39{
40}
41
42#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
43pub struct DirectoryGetTokenResponse {
44    pub s: i32,
45    pub token: Option<fdomain_client::Handle>,
46}
47
48impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirectoryGetTokenResponse {}
49
50#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
51pub struct DirectoryLinkRequest {
52    pub src: String,
53    pub dst_parent_token: fdomain_client::Handle,
54    pub dst: String,
55}
56
57impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirectoryLinkRequest {}
58
59#[derive(Debug, PartialEq)]
60pub struct DirectoryOpenRequest {
61    pub path: String,
62    pub flags: Flags,
63    pub options: Options,
64    pub object: fdomain_client::Channel,
65}
66
67impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirectoryOpenRequest {}
68
69#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
70pub struct DirectoryRenameRequest {
71    pub src: String,
72    pub dst_parent_token: fdomain_client::Event,
73    pub dst: String,
74}
75
76impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirectoryRenameRequest {}
77
78#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
79pub struct DirectoryWatchRequest {
80    pub mask: WatchMask,
81    pub options: u32,
82    pub watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
83}
84
85impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for DirectoryWatchRequest {}
86
87#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
88pub struct FileAllocateRequest {
89    pub offset: u64,
90    pub length: u64,
91    /// If an empty bits is passed for mode, the default behavior is used. Otherwise the
92    /// behavior is modified as described for each mode bit. If the backing filesystem doesn't
93    /// support a particular provided mode bit, or combination of mode bits, an error is
94    /// returned.
95    pub mode: AllocateMode,
96}
97
98impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for FileAllocateRequest {}
99
100#[derive(Debug, PartialEq)]
101pub struct FileEnableVerityRequest {
102    pub options: VerificationOptions,
103}
104
105impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for FileEnableVerityRequest {}
106
107#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
108pub struct FileObject {
109    /// An optional event which transmits information about an object's readability
110    /// or writability. This event relays information about the underlying object, not
111    /// the capability granted to client: this event may be signalled "readable" on a
112    /// connection that does not have the capability to read.
113    ///
114    /// The "`FILE_SIGNAL_`" values may be observed on this event.
115    pub event: Option<fdomain_client::Event>,
116    /// A placeholder for future stream support.
117    ///
118    /// Currently, servers are required not to send a handle in this field.
119    pub stream: Option<fdomain_client::Stream>,
120}
121
122impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for FileObject {}
123
124#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
125pub struct FileGetBackingMemoryResponse {
126    pub vmo: fdomain_client::Vmo,
127}
128
129impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
130    for FileGetBackingMemoryResponse
131{
132}
133
134#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
135pub struct LinkableLinkIntoRequest {
136    pub dst_parent_token: fdomain_client::Event,
137    pub dst: String,
138}
139
140impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for LinkableLinkIntoRequest {}
141
142#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
143pub struct NodeDeprecatedCloneRequest {
144    pub flags: OpenFlags,
145    pub object: fdomain_client::fidl::ServerEnd<NodeMarker>,
146}
147
148impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NodeDeprecatedCloneRequest {}
149
150#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
151pub struct NodeListExtendedAttributesRequest {
152    pub iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
153}
154
155impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
156    for NodeListExtendedAttributesRequest
157{
158}
159
160#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
161pub struct NodeOnOpenRequest {
162    pub s: i32,
163    pub info: Option<Box<NodeInfoDeprecated>>,
164}
165
166impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NodeOnOpenRequest {}
167
168#[derive(Debug, PartialEq)]
169pub struct NodeSetExtendedAttributeRequest {
170    pub name: Vec<u8>,
171    pub value: ExtendedAttributeValue,
172    /// Specifies the behavior based on the current state of the attribute.
173    pub mode: SetExtendedAttributeMode,
174}
175
176impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect>
177    for NodeSetExtendedAttributeRequest
178{
179}
180
181#[derive(Debug, Default, PartialEq)]
182pub struct ConnectionInfo {
183    /// The rights possessed by the current connection. Note: `rights` limits
184    /// the set of operations allowed on the connection, but does not guarantee
185    /// their availability. For example, one may have the [`Rights.EXECUTE`]
186    /// right on a file connection, but the file itself does not have the
187    /// `EXECUTE` ability, and hence cannot be executed. See
188    /// [`ConnectionOptions.rights`].
189    pub rights: Option<Operations>,
190    #[doc(hidden)]
191    pub __source_breaking: fidl::marker::SourceBreaking,
192}
193
194impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for ConnectionInfo {}
195
196/// Auxiliary data for the file representation of a node.
197#[derive(Debug, Default, PartialEq)]
198pub struct FileInfo {
199    /// True if the file is opened in append mode.
200    /// In append mode, the seek offset is moved to the end before every
201    /// write, the two steps performed in an atomic manner.
202    pub is_append: Option<bool>,
203    /// An optional event which transmits information about an object's
204    /// readability or writability. This event relays information about the
205    /// underlying object, not the capability granted to client: this event
206    /// may be signalled "readable" on a connection that does not have
207    /// the capability to read.
208    ///
209    /// This event will be present if the following conditions are met:
210    ///
211    /// - The `available_operations` on the file connection is not empty.
212    /// - The filesystem supports signalling readability/writability events.
213    ///
214    /// The [`FileSignal`] values may be observed on this event.
215    pub observer: Option<fdomain_client::Event>,
216    /// An optional stream object, which can be used to read to and write from
217    /// the file.
218    ///
219    /// Reading and writing the file using the stream object can be up to 20x
220    /// faster than reading and writing the file using the Read and Write
221    /// operations in the [`File`] protocol.
222    pub stream: Option<fdomain_client::Stream>,
223    /// Requested attributes for the file. This is only populated if requested.
224    pub attributes: Option<NodeAttributes2>,
225    #[doc(hidden)]
226    pub __source_breaking: fidl::marker::SourceBreaking,
227}
228
229impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for FileInfo {}
230
231/// The value type for an extended attribute. If the value is less than 32768
232/// bytes, then it is included inline. Values larger than this size are written
233/// into a vmo buffer.
234#[derive(Debug)]
235pub enum ExtendedAttributeValue {
236    Bytes(Vec<u8>),
237    Buffer(fdomain_client::Vmo),
238    #[doc(hidden)]
239    __SourceBreaking {
240        unknown_ordinal: u64,
241    },
242}
243
244/// Pattern that matches an unknown `ExtendedAttributeValue` member.
245#[macro_export]
246macro_rules! ExtendedAttributeValueUnknown {
247    () => {
248        _
249    };
250}
251
252// Custom PartialEq so that unknown variants are not equal to themselves.
253impl PartialEq for ExtendedAttributeValue {
254    fn eq(&self, other: &Self) -> bool {
255        match (self, other) {
256            (Self::Bytes(x), Self::Bytes(y)) => *x == *y,
257            (Self::Buffer(x), Self::Buffer(y)) => *x == *y,
258            _ => false,
259        }
260    }
261}
262
263impl ExtendedAttributeValue {
264    #[inline]
265    pub fn ordinal(&self) -> u64 {
266        match *self {
267            Self::Bytes(_) => 1,
268            Self::Buffer(_) => 2,
269            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
270        }
271    }
272
273    #[inline]
274    pub fn unknown_variant_for_testing() -> Self {
275        Self::__SourceBreaking { unknown_ordinal: 0 }
276    }
277
278    #[inline]
279    pub fn is_unknown(&self) -> bool {
280        match self {
281            Self::__SourceBreaking { .. } => true,
282            _ => false,
283        }
284    }
285}
286
287impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for ExtendedAttributeValue {}
288
289#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
290pub enum NodeInfoDeprecated {
291    /// No protocol information was supplied by the connection.
292    Service(Service),
293    /// The connection composes [`File`].
294    File(FileObject),
295    /// The connection composes [`Directory`].
296    Directory(DirectoryObject),
297    /// The connection composes ['Symlink'].
298    Symlink(SymlinkObject),
299}
300
301impl NodeInfoDeprecated {
302    #[inline]
303    pub fn ordinal(&self) -> u64 {
304        match *self {
305            Self::Service(_) => 1,
306            Self::File(_) => 2,
307            Self::Directory(_) => 3,
308            Self::Symlink(_) => 4,
309        }
310    }
311}
312
313impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for NodeInfoDeprecated {}
314
315#[derive(Debug)]
316pub enum Representation {
317    /// The [`Node`] protocol was negotiated for this connection.
318    Node(NodeInfo),
319    /// The [`File`] protocol was negotiated for this connection.
320    Directory(DirectoryInfo),
321    /// The [`File`] protocol was negotiated for this connection.
322    File(FileInfo),
323    /// The [`Symlink`] protocol was negotiated for this connection.
324    Symlink(SymlinkInfo),
325    #[doc(hidden)]
326    __SourceBreaking { unknown_ordinal: u64 },
327}
328
329/// Pattern that matches an unknown `Representation` member.
330#[macro_export]
331macro_rules! RepresentationUnknown {
332    () => {
333        _
334    };
335}
336
337// Custom PartialEq so that unknown variants are not equal to themselves.
338impl PartialEq for Representation {
339    fn eq(&self, other: &Self) -> bool {
340        match (self, other) {
341            (Self::Node(x), Self::Node(y)) => *x == *y,
342            (Self::Directory(x), Self::Directory(y)) => *x == *y,
343            (Self::File(x), Self::File(y)) => *x == *y,
344            (Self::Symlink(x), Self::Symlink(y)) => *x == *y,
345            _ => false,
346        }
347    }
348}
349
350impl Representation {
351    #[inline]
352    pub fn ordinal(&self) -> u64 {
353        match *self {
354            Self::Node(_) => 1,
355            Self::Directory(_) => 2,
356            Self::File(_) => 3,
357            Self::Symlink(_) => 4,
358            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
359        }
360    }
361
362    #[inline]
363    pub fn unknown_variant_for_testing() -> Self {
364        Self::__SourceBreaking { unknown_ordinal: 0 }
365    }
366
367    #[inline]
368    pub fn is_unknown(&self) -> bool {
369        match self {
370            Self::__SourceBreaking { .. } => true,
371            _ => false,
372        }
373    }
374}
375
376impl fidl::Standalone<fdomain_client::fidl::FDomainResourceDialect> for Representation {}
377
378#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
379pub struct AdvisoryLockingMarker;
380
381impl fdomain_client::fidl::ProtocolMarker for AdvisoryLockingMarker {
382    type Proxy = AdvisoryLockingProxy;
383    type RequestStream = AdvisoryLockingRequestStream;
384
385    const DEBUG_NAME: &'static str = "(anonymous) AdvisoryLocking";
386}
387pub type AdvisoryLockingAdvisoryLockResult = Result<(), i32>;
388
389pub trait AdvisoryLockingProxyInterface: Send + Sync {
390    type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
391        + Send;
392    fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
393}
394
395#[derive(Debug, Clone)]
396pub struct AdvisoryLockingProxy {
397    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
398}
399
400impl fdomain_client::fidl::Proxy for AdvisoryLockingProxy {
401    type Protocol = AdvisoryLockingMarker;
402
403    fn from_channel(inner: fdomain_client::Channel) -> Self {
404        Self::new(inner)
405    }
406
407    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
408        self.client.into_channel().map_err(|client| Self { client })
409    }
410
411    fn as_channel(&self) -> &fdomain_client::Channel {
412        self.client.as_channel()
413    }
414}
415
416impl AdvisoryLockingProxy {
417    /// Create a new Proxy for fuchsia.io/AdvisoryLocking.
418    pub fn new(channel: fdomain_client::Channel) -> Self {
419        let protocol_name =
420            <AdvisoryLockingMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
421        Self { client: fidl::client::Client::new(channel, protocol_name) }
422    }
423
424    /// Get a Stream of events from the remote end of the protocol.
425    ///
426    /// # Panics
427    ///
428    /// Panics if the event stream was already taken.
429    pub fn take_event_stream(&self) -> AdvisoryLockingEventStream {
430        AdvisoryLockingEventStream { event_receiver: self.client.take_event_receiver() }
431    }
432
433    /// Acquires an advisory lock on the underlying file.
434    ///
435    /// The lock lasts until either this connection is closed or
436    /// this method is called with |AdvisoryLockType.UNLOCK| to release the lock
437    /// explicitly.
438    ///
439    /// Advisory locks are purely advisory. They do not prevent actual read or
440    /// write operations from occurring on the file, either through this
441    /// connection or through other connections.
442    ///
443    /// This method requires the following rights:
444    ///
445    /// * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
446    /// * [`Rights.WRITE_BYTES`] if `request.type` is
447    ///   [`AdvisoryLockType.WRITE`].
448    ///
449    /// # Errors
450    ///
451    /// * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
452    ///   example, another connection might hold a conflicting lock type.
453    /// * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
454    /// * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
455    ///   to acquire the given type of lock.
456    pub fn r#advisory_lock(
457        &self,
458        mut request: &AdvisoryLockRequest,
459    ) -> fidl::client::QueryResponseFut<
460        AdvisoryLockingAdvisoryLockResult,
461        fdomain_client::fidl::FDomainResourceDialect,
462    > {
463        AdvisoryLockingProxyInterface::r#advisory_lock(self, request)
464    }
465}
466
467impl AdvisoryLockingProxyInterface for AdvisoryLockingProxy {
468    type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
469        AdvisoryLockingAdvisoryLockResult,
470        fdomain_client::fidl::FDomainResourceDialect,
471    >;
472    fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
473        fn _decode(
474            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
475        ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
476            let _response = fidl::client::decode_transaction_body::<
477                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
478                fdomain_client::fidl::FDomainResourceDialect,
479                0x6ee9c0ad53ec87aa,
480            >(_buf?)?;
481            Ok(_response.map(|x| x))
482        }
483        self.client.send_query_and_decode::<
484            AdvisoryLockingAdvisoryLockRequest,
485            AdvisoryLockingAdvisoryLockResult,
486        >(
487            (request,),
488            0x6ee9c0ad53ec87aa,
489            fidl::encoding::DynamicFlags::empty(),
490            _decode,
491        )
492    }
493}
494
495pub struct AdvisoryLockingEventStream {
496    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
497}
498
499impl std::marker::Unpin for AdvisoryLockingEventStream {}
500
501impl futures::stream::FusedStream for AdvisoryLockingEventStream {
502    fn is_terminated(&self) -> bool {
503        self.event_receiver.is_terminated()
504    }
505}
506
507impl futures::Stream for AdvisoryLockingEventStream {
508    type Item = Result<AdvisoryLockingEvent, fidl::Error>;
509
510    fn poll_next(
511        mut self: std::pin::Pin<&mut Self>,
512        cx: &mut std::task::Context<'_>,
513    ) -> std::task::Poll<Option<Self::Item>> {
514        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
515            &mut self.event_receiver,
516            cx
517        )?) {
518            Some(buf) => std::task::Poll::Ready(Some(AdvisoryLockingEvent::decode(buf))),
519            None => std::task::Poll::Ready(None),
520        }
521    }
522}
523
524#[derive(Debug)]
525pub enum AdvisoryLockingEvent {}
526
527impl AdvisoryLockingEvent {
528    /// Decodes a message buffer as a [`AdvisoryLockingEvent`].
529    fn decode(
530        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
531    ) -> Result<AdvisoryLockingEvent, fidl::Error> {
532        let (bytes, _handles) = buf.split_mut();
533        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
534        debug_assert_eq!(tx_header.tx_id, 0);
535        match tx_header.ordinal {
536            _ => Err(fidl::Error::UnknownOrdinal {
537                ordinal: tx_header.ordinal,
538                protocol_name:
539                    <AdvisoryLockingMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
540            }),
541        }
542    }
543}
544
545/// A Stream of incoming requests for fuchsia.io/AdvisoryLocking.
546pub struct AdvisoryLockingRequestStream {
547    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
548    is_terminated: bool,
549}
550
551impl std::marker::Unpin for AdvisoryLockingRequestStream {}
552
553impl futures::stream::FusedStream for AdvisoryLockingRequestStream {
554    fn is_terminated(&self) -> bool {
555        self.is_terminated
556    }
557}
558
559impl fdomain_client::fidl::RequestStream for AdvisoryLockingRequestStream {
560    type Protocol = AdvisoryLockingMarker;
561    type ControlHandle = AdvisoryLockingControlHandle;
562
563    fn from_channel(channel: fdomain_client::Channel) -> Self {
564        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
565    }
566
567    fn control_handle(&self) -> Self::ControlHandle {
568        AdvisoryLockingControlHandle { inner: self.inner.clone() }
569    }
570
571    fn into_inner(
572        self,
573    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
574    {
575        (self.inner, self.is_terminated)
576    }
577
578    fn from_inner(
579        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
580        is_terminated: bool,
581    ) -> Self {
582        Self { inner, is_terminated }
583    }
584}
585
586impl futures::Stream for AdvisoryLockingRequestStream {
587    type Item = Result<AdvisoryLockingRequest, fidl::Error>;
588
589    fn poll_next(
590        mut self: std::pin::Pin<&mut Self>,
591        cx: &mut std::task::Context<'_>,
592    ) -> std::task::Poll<Option<Self::Item>> {
593        let this = &mut *self;
594        if this.inner.check_shutdown(cx) {
595            this.is_terminated = true;
596            return std::task::Poll::Ready(None);
597        }
598        if this.is_terminated {
599            panic!("polled AdvisoryLockingRequestStream after completion");
600        }
601        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
602            |bytes, handles| {
603                match this.inner.channel().read_etc(cx, bytes, handles) {
604                    std::task::Poll::Ready(Ok(())) => {}
605                    std::task::Poll::Pending => return std::task::Poll::Pending,
606                    std::task::Poll::Ready(Err(None)) => {
607                        this.is_terminated = true;
608                        return std::task::Poll::Ready(None);
609                    }
610                    std::task::Poll::Ready(Err(Some(e))) => {
611                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
612                            e.into(),
613                        ))))
614                    }
615                }
616
617                // A message has been received from the channel
618                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
619
620                std::task::Poll::Ready(Some(match header.ordinal {
621                0x6ee9c0ad53ec87aa => {
622                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
623                    let mut req = fidl::new_empty!(AdvisoryLockingAdvisoryLockRequest, fdomain_client::fidl::FDomainResourceDialect);
624                    fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
625                    let control_handle = AdvisoryLockingControlHandle {
626                        inner: this.inner.clone(),
627                    };
628                    Ok(AdvisoryLockingRequest::AdvisoryLock {request: req.request,
629
630                        responder: AdvisoryLockingAdvisoryLockResponder {
631                            control_handle: std::mem::ManuallyDrop::new(control_handle),
632                            tx_id: header.tx_id,
633                        },
634                    })
635                }
636                _ => Err(fidl::Error::UnknownOrdinal {
637                    ordinal: header.ordinal,
638                    protocol_name: <AdvisoryLockingMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
639                }),
640            }))
641            },
642        )
643    }
644}
645
646/// Advisory locking protocol.
647///
648/// This protocol is intended to be composed into the |File| protocol to
649/// provide support for advisory locking.
650///
651/// Advisory locks are purely advisory. They do not prevent actual read or
652/// write operations from occurring on the file, either through this
653/// connection or through other connections.
654///
655/// These primitives are designed to support the flock() and fcntl(),
656/// specifically F_SETLK, F_SETLKW, and F_GETLK, functionality that code
657/// running on Fuchsia expects from other operating systems.
658#[derive(Debug)]
659pub enum AdvisoryLockingRequest {
660    /// Acquires an advisory lock on the underlying file.
661    ///
662    /// The lock lasts until either this connection is closed or
663    /// this method is called with |AdvisoryLockType.UNLOCK| to release the lock
664    /// explicitly.
665    ///
666    /// Advisory locks are purely advisory. They do not prevent actual read or
667    /// write operations from occurring on the file, either through this
668    /// connection or through other connections.
669    ///
670    /// This method requires the following rights:
671    ///
672    /// * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
673    /// * [`Rights.WRITE_BYTES`] if `request.type` is
674    ///   [`AdvisoryLockType.WRITE`].
675    ///
676    /// # Errors
677    ///
678    /// * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
679    ///   example, another connection might hold a conflicting lock type.
680    /// * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
681    /// * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
682    ///   to acquire the given type of lock.
683    AdvisoryLock { request: AdvisoryLockRequest, responder: AdvisoryLockingAdvisoryLockResponder },
684}
685
686impl AdvisoryLockingRequest {
687    #[allow(irrefutable_let_patterns)]
688    pub fn into_advisory_lock(
689        self,
690    ) -> Option<(AdvisoryLockRequest, AdvisoryLockingAdvisoryLockResponder)> {
691        if let AdvisoryLockingRequest::AdvisoryLock { request, responder } = self {
692            Some((request, responder))
693        } else {
694            None
695        }
696    }
697
698    /// Name of the method defined in FIDL
699    pub fn method_name(&self) -> &'static str {
700        match *self {
701            AdvisoryLockingRequest::AdvisoryLock { .. } => "advisory_lock",
702        }
703    }
704}
705
706#[derive(Debug, Clone)]
707pub struct AdvisoryLockingControlHandle {
708    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
709}
710
711impl fdomain_client::fidl::ControlHandle for AdvisoryLockingControlHandle {
712    fn shutdown(&self) {
713        self.inner.shutdown()
714    }
715
716    fn is_closed(&self) -> bool {
717        self.inner.channel().is_closed()
718    }
719    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
720        self.inner.channel().on_closed()
721    }
722}
723
724impl AdvisoryLockingControlHandle {}
725
726#[must_use = "FIDL methods require a response to be sent"]
727#[derive(Debug)]
728pub struct AdvisoryLockingAdvisoryLockResponder {
729    control_handle: std::mem::ManuallyDrop<AdvisoryLockingControlHandle>,
730    tx_id: u32,
731}
732
733/// Set the the channel to be shutdown (see [`AdvisoryLockingControlHandle::shutdown`])
734/// if the responder is dropped without sending a response, so that the client
735/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
736impl std::ops::Drop for AdvisoryLockingAdvisoryLockResponder {
737    fn drop(&mut self) {
738        self.control_handle.shutdown();
739        // Safety: drops once, never accessed again
740        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
741    }
742}
743
744impl fdomain_client::fidl::Responder for AdvisoryLockingAdvisoryLockResponder {
745    type ControlHandle = AdvisoryLockingControlHandle;
746
747    fn control_handle(&self) -> &AdvisoryLockingControlHandle {
748        &self.control_handle
749    }
750
751    fn drop_without_shutdown(mut self) {
752        // Safety: drops once, never accessed again due to mem::forget
753        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
754        // Prevent Drop from running (which would shut down the channel)
755        std::mem::forget(self);
756    }
757}
758
759impl AdvisoryLockingAdvisoryLockResponder {
760    /// Sends a response to the FIDL transaction.
761    ///
762    /// Sets the channel to shutdown if an error occurs.
763    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
764        let _result = self.send_raw(result);
765        if _result.is_err() {
766            self.control_handle.shutdown();
767        }
768        self.drop_without_shutdown();
769        _result
770    }
771
772    /// Similar to "send" but does not shutdown the channel if an error occurs.
773    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
774        let _result = self.send_raw(result);
775        self.drop_without_shutdown();
776        _result
777    }
778
779    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
780        self.control_handle
781            .inner
782            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
783                result,
784                self.tx_id,
785                0x6ee9c0ad53ec87aa,
786                fidl::encoding::DynamicFlags::empty(),
787            )
788    }
789}
790
791#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
792pub struct DirectoryMarker;
793
794impl fdomain_client::fidl::ProtocolMarker for DirectoryMarker {
795    type Proxy = DirectoryProxy;
796    type RequestStream = DirectoryRequestStream;
797
798    const DEBUG_NAME: &'static str = "fuchsia.io.Directory";
799}
800impl fdomain_client::fidl::DiscoverableProtocolMarker for DirectoryMarker {}
801pub type DirectoryUnlinkResult = Result<(), i32>;
802pub type DirectoryRenameResult = Result<(), i32>;
803pub type DirectoryCreateSymlinkResult = Result<(), i32>;
804
805pub trait DirectoryProxyInterface: Send + Sync {
806    type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
807        + Send;
808    fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
809    fn r#clone(
810        &self,
811        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
812    ) -> Result<(), fidl::Error>;
813    type CloseResponseFut: std::future::Future<
814            Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
815        > + Send;
816    fn r#close(&self) -> Self::CloseResponseFut;
817    type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
818    fn r#query(&self) -> Self::QueryResponseFut;
819    fn r#deprecated_clone(
820        &self,
821        flags: OpenFlags,
822        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
823    ) -> Result<(), fidl::Error>;
824    type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
825        + Send;
826    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
827    type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
828    fn r#deprecated_set_attr(
829        &self,
830        flags: NodeAttributeFlags,
831        attributes: &NodeAttributes,
832    ) -> Self::DeprecatedSetAttrResponseFut;
833    type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
834        + Send;
835    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
836    type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
837        + Send;
838    fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
839    type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
840        + Send;
841    fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
842    type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
843        + Send;
844    fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
845    type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
846        + Send;
847    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
848    type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
849        + Send;
850    fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
851    type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
852        + Send;
853    fn r#update_attributes(
854        &self,
855        payload: &MutableNodeAttributes,
856    ) -> Self::UpdateAttributesResponseFut;
857    type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
858    fn r#sync(&self) -> Self::SyncResponseFut;
859    fn r#list_extended_attributes(
860        &self,
861        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
862    ) -> Result<(), fidl::Error>;
863    type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
864        + Send;
865    fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
866    type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
867        + Send;
868    fn r#set_extended_attribute(
869        &self,
870        name: &[u8],
871        value: ExtendedAttributeValue,
872        mode: SetExtendedAttributeMode,
873    ) -> Self::SetExtendedAttributeResponseFut;
874    type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
875        + Send;
876    fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
877    fn r#deprecated_open(
878        &self,
879        flags: OpenFlags,
880        mode: ModeType,
881        path: &str,
882        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
883    ) -> Result<(), fidl::Error>;
884    fn r#open(
885        &self,
886        path: &str,
887        flags: Flags,
888        options: &Options,
889        object: fdomain_client::Channel,
890    ) -> Result<(), fidl::Error>;
891    type ReadDirentsResponseFut: std::future::Future<Output = Result<(i32, Vec<u8>), fidl::Error>>
892        + Send;
893    fn r#read_dirents(&self, max_bytes: u64) -> Self::ReadDirentsResponseFut;
894    type RewindResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
895    fn r#rewind(&self) -> Self::RewindResponseFut;
896    type GetTokenResponseFut: std::future::Future<Output = Result<(i32, Option<fdomain_client::Handle>), fidl::Error>>
897        + Send;
898    fn r#get_token(&self) -> Self::GetTokenResponseFut;
899    type LinkResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
900    fn r#link(
901        &self,
902        src: &str,
903        dst_parent_token: fdomain_client::Handle,
904        dst: &str,
905    ) -> Self::LinkResponseFut;
906    type UnlinkResponseFut: std::future::Future<Output = Result<DirectoryUnlinkResult, fidl::Error>>
907        + Send;
908    fn r#unlink(&self, name: &str, options: &UnlinkOptions) -> Self::UnlinkResponseFut;
909    type RenameResponseFut: std::future::Future<Output = Result<DirectoryRenameResult, fidl::Error>>
910        + Send;
911    fn r#rename(
912        &self,
913        src: &str,
914        dst_parent_token: fdomain_client::Event,
915        dst: &str,
916    ) -> Self::RenameResponseFut;
917    type CreateSymlinkResponseFut: std::future::Future<Output = Result<DirectoryCreateSymlinkResult, fidl::Error>>
918        + Send;
919    fn r#create_symlink(
920        &self,
921        name: &str,
922        target: &[u8],
923        connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
924    ) -> Self::CreateSymlinkResponseFut;
925    type WatchResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
926    fn r#watch(
927        &self,
928        mask: WatchMask,
929        options: u32,
930        watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
931    ) -> Self::WatchResponseFut;
932}
933
934#[derive(Debug, Clone)]
935pub struct DirectoryProxy {
936    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
937}
938
939impl fdomain_client::fidl::Proxy for DirectoryProxy {
940    type Protocol = DirectoryMarker;
941
942    fn from_channel(inner: fdomain_client::Channel) -> Self {
943        Self::new(inner)
944    }
945
946    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
947        self.client.into_channel().map_err(|client| Self { client })
948    }
949
950    fn as_channel(&self) -> &fdomain_client::Channel {
951        self.client.as_channel()
952    }
953}
954
955impl DirectoryProxy {
956    /// Create a new Proxy for fuchsia.io/Directory.
957    pub fn new(channel: fdomain_client::Channel) -> Self {
958        let protocol_name = <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
959        Self { client: fidl::client::Client::new(channel, protocol_name) }
960    }
961
962    /// Get a Stream of events from the remote end of the protocol.
963    ///
964    /// # Panics
965    ///
966    /// Panics if the event stream was already taken.
967    pub fn take_event_stream(&self) -> DirectoryEventStream {
968        DirectoryEventStream { event_receiver: self.client.take_event_receiver() }
969    }
970
971    /// Acquires an advisory lock on the underlying file.
972    ///
973    /// The lock lasts until either this connection is closed or
974    /// this method is called with |AdvisoryLockType.UNLOCK| to release the lock
975    /// explicitly.
976    ///
977    /// Advisory locks are purely advisory. They do not prevent actual read or
978    /// write operations from occurring on the file, either through this
979    /// connection or through other connections.
980    ///
981    /// This method requires the following rights:
982    ///
983    /// * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
984    /// * [`Rights.WRITE_BYTES`] if `request.type` is
985    ///   [`AdvisoryLockType.WRITE`].
986    ///
987    /// # Errors
988    ///
989    /// * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
990    ///   example, another connection might hold a conflicting lock type.
991    /// * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
992    /// * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
993    ///   to acquire the given type of lock.
994    pub fn r#advisory_lock(
995        &self,
996        mut request: &AdvisoryLockRequest,
997    ) -> fidl::client::QueryResponseFut<
998        AdvisoryLockingAdvisoryLockResult,
999        fdomain_client::fidl::FDomainResourceDialect,
1000    > {
1001        DirectoryProxyInterface::r#advisory_lock(self, request)
1002    }
1003
1004    pub fn r#clone(
1005        &self,
1006        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
1007    ) -> Result<(), fidl::Error> {
1008        DirectoryProxyInterface::r#clone(self, request)
1009    }
1010
1011    /// Terminates the connection.
1012    ///
1013    /// After calling `Close`, the client must not send any other requests.
1014    ///
1015    /// Servers, after sending the status response, should close the connection
1016    /// regardless of status and without sending an epitaph.
1017    ///
1018    /// Closing the client end of the channel should be semantically equivalent
1019    /// to calling `Close` without knowing when the close has completed or its
1020    /// status.
1021    pub fn r#close(
1022        &self,
1023    ) -> fidl::client::QueryResponseFut<
1024        fdomain_fuchsia_unknown::CloseableCloseResult,
1025        fdomain_client::fidl::FDomainResourceDialect,
1026    > {
1027        DirectoryProxyInterface::r#close(self)
1028    }
1029
1030    pub fn r#query(
1031        &self,
1032    ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
1033        DirectoryProxyInterface::r#query(self)
1034    }
1035
1036    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
1037    pub fn r#deprecated_clone(
1038        &self,
1039        mut flags: OpenFlags,
1040        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1041    ) -> Result<(), fidl::Error> {
1042        DirectoryProxyInterface::r#deprecated_clone(self, flags, object)
1043    }
1044
1045    /// DEPRECATED - Use `Node.GetAttributes` instead.
1046    pub fn r#deprecated_get_attr(
1047        &self,
1048    ) -> fidl::client::QueryResponseFut<
1049        (i32, NodeAttributes),
1050        fdomain_client::fidl::FDomainResourceDialect,
1051    > {
1052        DirectoryProxyInterface::r#deprecated_get_attr(self)
1053    }
1054
1055    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
1056    pub fn r#deprecated_set_attr(
1057        &self,
1058        mut flags: NodeAttributeFlags,
1059        mut attributes: &NodeAttributes,
1060    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1061        DirectoryProxyInterface::r#deprecated_set_attr(self, flags, attributes)
1062    }
1063
1064    /// [DEPRECATED - Use new GetFlags method instead.]
1065    pub fn r#deprecated_get_flags(
1066        &self,
1067    ) -> fidl::client::QueryResponseFut<
1068        (i32, OpenFlags),
1069        fdomain_client::fidl::FDomainResourceDialect,
1070    > {
1071        DirectoryProxyInterface::r#deprecated_get_flags(self)
1072    }
1073
1074    /// [DEPRECATED - Use new SetFlags method instead.]
1075    pub fn r#deprecated_set_flags(
1076        &self,
1077        mut flags: OpenFlags,
1078    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1079        DirectoryProxyInterface::r#deprecated_set_flags(self, flags)
1080    }
1081
1082    /// Queries the flags that apply to this node after it has been opened/created. This method does
1083    /// not require any rights.
1084    ///
1085    /// Note that the final set of flags that apply to the connection may differ from those
1086    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
1087    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
1088    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
1089    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
1090    pub fn r#get_flags(
1091        &self,
1092    ) -> fidl::client::QueryResponseFut<
1093        NodeGetFlagsResult,
1094        fdomain_client::fidl::FDomainResourceDialect,
1095    > {
1096        DirectoryProxyInterface::r#get_flags(self)
1097    }
1098
1099    /// Sets the flags that apply to this node after it has been opened. This method does not
1100    /// require any rights.
1101    ///
1102    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
1103    /// clear append mode.
1104    ///
1105    /// Errors:
1106    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
1107    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
1108    pub fn r#set_flags(
1109        &self,
1110        mut flags: Flags,
1111    ) -> fidl::client::QueryResponseFut<
1112        NodeSetFlagsResult,
1113        fdomain_client::fidl::FDomainResourceDialect,
1114    > {
1115        DirectoryProxyInterface::r#set_flags(self, flags)
1116    }
1117
1118    /// Query the filesystem for filesystem-specific information.
1119    pub fn r#query_filesystem(
1120        &self,
1121    ) -> fidl::client::QueryResponseFut<
1122        (i32, Option<Box<FilesystemInfo>>),
1123        fdomain_client::fidl::FDomainResourceDialect,
1124    > {
1125        DirectoryProxyInterface::r#query_filesystem(self)
1126    }
1127
1128    /// Acquires information about the node.
1129    ///
1130    /// The attributes of a node should be stable, independent of the
1131    /// specific protocol used to access it.
1132    ///
1133    /// If a particular attribute is not applicable or not supported,
1134    /// filesystems should leave the corresponding field absent.
1135    ///
1136    /// + `query` a bit-mask specifying which attributes to fetch. The server
1137    ///   should not return more than necessary.
1138    /// - `attributes` the returned attributes.
1139    ///
1140    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
1141    pub fn r#get_attributes(
1142        &self,
1143        mut query: NodeAttributesQuery,
1144    ) -> fidl::client::QueryResponseFut<
1145        NodeGetAttributesResult,
1146        fdomain_client::fidl::FDomainResourceDialect,
1147    > {
1148        DirectoryProxyInterface::r#get_attributes(self, query)
1149    }
1150
1151    /// Updates information about the node.
1152    ///
1153    /// + `attributes` the presence of a table field in `attributes` indicates
1154    /// the intent to update the corresponding attribute.
1155    ///
1156    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
1157    ///
1158    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
1159    pub fn r#update_attributes(
1160        &self,
1161        mut payload: &MutableNodeAttributes,
1162    ) -> fidl::client::QueryResponseFut<
1163        NodeUpdateAttributesResult,
1164        fdomain_client::fidl::FDomainResourceDialect,
1165    > {
1166        DirectoryProxyInterface::r#update_attributes(self, payload)
1167    }
1168
1169    /// Synchronizes updates to the node to the underlying media, if it exists.
1170    ///
1171    /// This method will return when the filesystem server has flushed the
1172    /// relevant updates to the underlying media, but does not guarantee the
1173    /// underlying media has persisted the information, nor that any information
1174    /// is committed to hardware. Clients may use `Sync` to ensure ordering
1175    /// between operations.
1176    ///
1177    /// This method does not require any rights.
1178    pub fn r#sync(
1179        &self,
1180    ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
1181    {
1182        DirectoryProxyInterface::r#sync(self)
1183    }
1184
1185    /// Creates an iterator over all the extended attribute names associated
1186    /// with this node. If an error occurs it is returned as an epitaph on the
1187    /// iterator request channel, and then the channel is closed.
1188    ///
1189    /// GetExtendedAttributes can be used with any of these names to retrieve
1190    /// the associated value.
1191    ///
1192    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
1193    pub fn r#list_extended_attributes(
1194        &self,
1195        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
1196    ) -> Result<(), fidl::Error> {
1197        DirectoryProxyInterface::r#list_extended_attributes(self, iterator)
1198    }
1199
1200    /// Get the value associated with the given attribute `name` for this node.
1201    ///
1202    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
1203    /// particular structure is imposed on them.
1204    ///
1205    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
1206    pub fn r#get_extended_attribute(
1207        &self,
1208        mut name: &[u8],
1209    ) -> fidl::client::QueryResponseFut<
1210        NodeGetExtendedAttributeResult,
1211        fdomain_client::fidl::FDomainResourceDialect,
1212    > {
1213        DirectoryProxyInterface::r#get_extended_attribute(self, name)
1214    }
1215
1216    /// Set the value for the given attribute `name` to `value` for this node.
1217    ///
1218    /// The attribute name may exist, in which case the attribute is updated.
1219    /// If the attribute doesn't exist, it is created. The name should have no
1220    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
1221    ///
1222    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
1223    pub fn r#set_extended_attribute(
1224        &self,
1225        mut name: &[u8],
1226        mut value: ExtendedAttributeValue,
1227        mut mode: SetExtendedAttributeMode,
1228    ) -> fidl::client::QueryResponseFut<
1229        NodeSetExtendedAttributeResult,
1230        fdomain_client::fidl::FDomainResourceDialect,
1231    > {
1232        DirectoryProxyInterface::r#set_extended_attribute(self, name, value, mode)
1233    }
1234
1235    /// Remove the specified extended attribute.
1236    ///
1237    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
1238    ///
1239    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
1240    pub fn r#remove_extended_attribute(
1241        &self,
1242        mut name: &[u8],
1243    ) -> fidl::client::QueryResponseFut<
1244        NodeRemoveExtendedAttributeResult,
1245        fdomain_client::fidl::FDomainResourceDialect,
1246    > {
1247        DirectoryProxyInterface::r#remove_extended_attribute(self, name)
1248    }
1249
1250    /// DEPRECATED - Use `fuchsia.io/Directory.Open` instead.
1251    pub fn r#deprecated_open(
1252        &self,
1253        mut flags: OpenFlags,
1254        mut mode: ModeType,
1255        mut path: &str,
1256        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1257    ) -> Result<(), fidl::Error> {
1258        DirectoryProxyInterface::r#deprecated_open(self, flags, mode, path, object)
1259    }
1260
1261    /// Open (or create) a node relative to this directory. Any errors are communicated via an
1262    /// epitaph sent on the `object` channel.
1263    ///
1264    /// Errors:
1265    /// * `ZX_ERR_BAD_PATH` if `path` is invalid
1266    /// * See [`Flags`] for other errors which may be communicated based on `flags`
1267    pub fn r#open(
1268        &self,
1269        mut path: &str,
1270        mut flags: Flags,
1271        mut options: &Options,
1272        mut object: fdomain_client::Channel,
1273    ) -> Result<(), fidl::Error> {
1274        DirectoryProxyInterface::r#open(self, path, flags, options, object)
1275    }
1276
1277    /// Reads a collection of variably sized dirents into a buffer.
1278    /// The number of dirents in a directory may be very large: akin to
1279    /// calling read multiple times on a file, directories have a seek
1280    /// offset which is updated on subsequent calls to ReadDirents.
1281    /// Each call to ReadDirents will only return whole dirent structures,
1282    /// they will not get split across ReadDirent calls. When the seek
1283    /// offset reaches the end, `dirents` will be empty.
1284    ///
1285    /// These dirents are of the form:
1286    /// ```
1287    /// struct dirent {
1288    ///   // Describes the inode of the entry.
1289    ///   uint64 ino;
1290    ///   // Describes the length of the dirent name in bytes.
1291    ///   uint8 size;
1292    ///   // Describes the type of the entry. Aligned with the
1293    ///   // POSIX d_type values. Use `DirentType` constants.
1294    ///   uint8 type;
1295    ///   // Unterminated name of entry.
1296    ///   char name[0];
1297    /// }
1298    /// ```
1299    ///
1300    /// This method does not require any rights, since one could always probe for
1301    /// directory contents by triggering name conflicts during file creation.
1302    pub fn r#read_dirents(
1303        &self,
1304        mut max_bytes: u64,
1305    ) -> fidl::client::QueryResponseFut<(i32, Vec<u8>), fdomain_client::fidl::FDomainResourceDialect>
1306    {
1307        DirectoryProxyInterface::r#read_dirents(self, max_bytes)
1308    }
1309
1310    /// Resets the directory seek offset.
1311    ///
1312    /// This method does not require any rights, similar to ReadDirents.
1313    pub fn r#rewind(
1314        &self,
1315    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1316        DirectoryProxyInterface::r#rewind(self)
1317    }
1318
1319    /// Acquires a token to a Directory which can be used to identify access to it at a later point
1320    /// in time. The token will remain valid for as long as the connection requesting the token
1321    /// remains open.
1322    ///
1323    /// This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns
1324    /// `ZX_ERR_BAD_HANDLE`.
1325    pub fn r#get_token(
1326        &self,
1327    ) -> fidl::client::QueryResponseFut<
1328        (i32, Option<fdomain_client::Handle>),
1329        fdomain_client::fidl::FDomainResourceDialect,
1330    > {
1331        DirectoryProxyInterface::r#get_token(self)
1332    }
1333
1334    /// Creates a link to an object named src by the name dst, within a directory represented by
1335    /// token.
1336    ///
1337    /// `src` must be a resolved object name. Including "/" in the string will
1338    /// return `ZX_ERR_INVALID_ARGS`.
1339    ///
1340    /// `dst` must be a resolved object name. Including "/" in the string will
1341    /// return `ZX_ERR_INVALID_ARGS`.
1342    ///
1343    /// This method requires following rights: `OpenFlags.RIGHT_WRITABLE` and
1344    /// `OpenFlags.RIGHT_READABLE`, otherwise returns `ZX_ERR_BAD_HANDLE`.
1345    ///
1346    /// This will be atomic with respect to renaming or unlinking the source concurrently e.g. if
1347    /// there are two actors operating concurrently, and one actor performs a rename that affects
1348    /// the source within this directory, and the other does a link, each will appear to occur
1349    /// atomically in an unspecified order.
1350    pub fn r#link(
1351        &self,
1352        mut src: &str,
1353        mut dst_parent_token: fdomain_client::Handle,
1354        mut dst: &str,
1355    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1356        DirectoryProxyInterface::r#link(self, src, dst_parent_token, dst)
1357    }
1358
1359    /// Removes a child node from the this directory's list of entries.
1360    ///
1361    /// Note: this does not guarantee that the underlying object is destroyed.
1362    /// Although the link will be removed from the containing directory,
1363    /// objects with multiple references (such as files which are still open)
1364    /// will not actually be destroyed until all references are closed.
1365    ///
1366    /// * error `ZX_ERR_ACCESS_DENIED` if the connection does not have
1367    ///   [`Rights.WRITE_BYTES`].
1368    /// * error `ZX_ERR_NOT_SUPPORTED` if the underlying filesystem does not
1369    ///   support writing.
1370    /// * error `ZX_ERR_BAD_PATH` if `name` is invalid.
1371    /// * error `ZX_ERR_NOT_EMPTY` if `name` refers to a non-empty directory.
1372    /// * error `ZX_ERR_UNAVAILABLE` if `name` refers to a mount point,
1373    ///   containing a remote channel.
1374    /// * error `ZX_ERR_NOT_DIR` if the options requested a directory but
1375    ///     something other than a directory was found.
1376    ///
1377    /// Other errors may be returned for filesystem-specific reasons.
1378    ///
1379    /// This method requires the following rights:
1380    ///
1381    /// * [`Rights.ENUMERATE`]
1382    /// * [`Rights.MODIFY_DIRECTORY`]
1383    pub fn r#unlink(
1384        &self,
1385        mut name: &str,
1386        mut options: &UnlinkOptions,
1387    ) -> fidl::client::QueryResponseFut<
1388        DirectoryUnlinkResult,
1389        fdomain_client::fidl::FDomainResourceDialect,
1390    > {
1391        DirectoryProxyInterface::r#unlink(self, name, options)
1392    }
1393
1394    /// Renames a node named `src` to the name `dst`, in a directory represented
1395    /// by `dst_parent_token`.
1396    ///
1397    /// `src` and `dst` must be valid node names.
1398    /// See [`Name`] for what constitutes a valid name.
1399    ///
1400    /// This method requires the following rights on both the current connection, and the connection
1401    /// identified by `dst_parent_token`:
1402    ///
1403    /// * [`Rights.ENUMERATE`]
1404    /// * [`Rights.MODIFY_DIRECTORY`]
1405    ///
1406    /// The following requirements are necessary to avoid rights escalations.
1407    ///
1408    /// If the source and destination directory differ, the source directory must also have the
1409    /// maximal set of abilities supported for files, which would typically be
1410    /// [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`], [`Rights.GET_ATTRIBUTES`] and
1411    /// [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also support the [`Rights.EXECUTE`]
1412    /// right.
1413    ///
1414    /// If `src` refers to a directory, and differs from the destination directory, then the source
1415    /// directory must have also have the [`Rights.CONNECT`] and [`Rights.TRAVERSE`] rights.
1416    ///
1417    /// * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.
1418    /// * error `ZX_ERR_ACCESS_DENIED` for insufficient rights.
1419    pub fn r#rename(
1420        &self,
1421        mut src: &str,
1422        mut dst_parent_token: fdomain_client::Event,
1423        mut dst: &str,
1424    ) -> fidl::client::QueryResponseFut<
1425        DirectoryRenameResult,
1426        fdomain_client::fidl::FDomainResourceDialect,
1427    > {
1428        DirectoryProxyInterface::r#rename(self, src, dst_parent_token, dst)
1429    }
1430
1431    /// Creates a symbolic link.
1432    ///
1433    /// `name` is the name to be given to the created symbolic link.
1434    /// `target` is the target of the symbolic link, which has no meaning on the server. The server
1435    /// will perform no validation of `target` except for a server chosen maximum length.
1436    /// `connection` is an optional server end of a channel that will speak the Symlink protocol
1437    /// on the successfully created node.
1438    ///
1439    /// * [`Rights.MODIFY_DIRECTORY`]
1440    ///
1441    /// * error `ZX_ERR_ALREADY_EXISTS` if `name` already exists.
1442    /// * error `ZX_ERR_BAD_PATH` if `target` exceeds the server length limit for symbolic links.
1443    /// * error `ZX_ERR_INVALID_ARGS` if `name` is not a valid [`Name`].
1444    /// * error `ZX_ERR_NOT_SUPPORTED` if creating symbolic links is not supported by the server.
1445    pub fn r#create_symlink(
1446        &self,
1447        mut name: &str,
1448        mut target: &[u8],
1449        mut connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
1450    ) -> fidl::client::QueryResponseFut<
1451        DirectoryCreateSymlinkResult,
1452        fdomain_client::fidl::FDomainResourceDialect,
1453    > {
1454        DirectoryProxyInterface::r#create_symlink(self, name, target, connection)
1455    }
1456
1457    /// Watches a directory, receiving events of added messages on the
1458    /// watcher request channel.
1459    ///
1460    /// Options must be zero; it is reserved.
1461    ///
1462    /// This method does not require any rights, similar to ReadDirents.
1463    pub fn r#watch(
1464        &self,
1465        mut mask: WatchMask,
1466        mut options: u32,
1467        mut watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
1468    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1469        DirectoryProxyInterface::r#watch(self, mask, options, watcher)
1470    }
1471}
1472
1473impl DirectoryProxyInterface for DirectoryProxy {
1474    type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
1475        AdvisoryLockingAdvisoryLockResult,
1476        fdomain_client::fidl::FDomainResourceDialect,
1477    >;
1478    fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
1479        fn _decode(
1480            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1481        ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
1482            let _response = fidl::client::decode_transaction_body::<
1483                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1484                fdomain_client::fidl::FDomainResourceDialect,
1485                0x6ee9c0ad53ec87aa,
1486            >(_buf?)?;
1487            Ok(_response.map(|x| x))
1488        }
1489        self.client.send_query_and_decode::<
1490            AdvisoryLockingAdvisoryLockRequest,
1491            AdvisoryLockingAdvisoryLockResult,
1492        >(
1493            (request,),
1494            0x6ee9c0ad53ec87aa,
1495            fidl::encoding::DynamicFlags::empty(),
1496            _decode,
1497        )
1498    }
1499
1500    fn r#clone(
1501        &self,
1502        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
1503    ) -> Result<(), fidl::Error> {
1504        self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
1505            (request,),
1506            0x20d8a7aba2168a79,
1507            fidl::encoding::DynamicFlags::empty(),
1508        )
1509    }
1510
1511    type CloseResponseFut = fidl::client::QueryResponseFut<
1512        fdomain_fuchsia_unknown::CloseableCloseResult,
1513        fdomain_client::fidl::FDomainResourceDialect,
1514    >;
1515    fn r#close(&self) -> Self::CloseResponseFut {
1516        fn _decode(
1517            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1518        ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
1519            let _response = fidl::client::decode_transaction_body::<
1520                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1521                fdomain_client::fidl::FDomainResourceDialect,
1522                0x5ac5d459ad7f657e,
1523            >(_buf?)?;
1524            Ok(_response.map(|x| x))
1525        }
1526        self.client.send_query_and_decode::<
1527            fidl::encoding::EmptyPayload,
1528            fdomain_fuchsia_unknown::CloseableCloseResult,
1529        >(
1530            (),
1531            0x5ac5d459ad7f657e,
1532            fidl::encoding::DynamicFlags::empty(),
1533            _decode,
1534        )
1535    }
1536
1537    type QueryResponseFut =
1538        fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
1539    fn r#query(&self) -> Self::QueryResponseFut {
1540        fn _decode(
1541            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1542        ) -> Result<Vec<u8>, fidl::Error> {
1543            let _response = fidl::client::decode_transaction_body::<
1544                fdomain_fuchsia_unknown::QueryableQueryResponse,
1545                fdomain_client::fidl::FDomainResourceDialect,
1546                0x2658edee9decfc06,
1547            >(_buf?)?;
1548            Ok(_response.protocol)
1549        }
1550        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
1551            (),
1552            0x2658edee9decfc06,
1553            fidl::encoding::DynamicFlags::empty(),
1554            _decode,
1555        )
1556    }
1557
1558    fn r#deprecated_clone(
1559        &self,
1560        mut flags: OpenFlags,
1561        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1562    ) -> Result<(), fidl::Error> {
1563        self.client.send::<NodeDeprecatedCloneRequest>(
1564            (flags, object),
1565            0x5a61678f293ce16f,
1566            fidl::encoding::DynamicFlags::FLEXIBLE,
1567        )
1568    }
1569
1570    type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
1571        (i32, NodeAttributes),
1572        fdomain_client::fidl::FDomainResourceDialect,
1573    >;
1574    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
1575        fn _decode(
1576            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1577        ) -> Result<(i32, NodeAttributes), fidl::Error> {
1578            let _response = fidl::client::decode_transaction_body::<
1579                NodeDeprecatedGetAttrResponse,
1580                fdomain_client::fidl::FDomainResourceDialect,
1581                0x78985e216314dafd,
1582            >(_buf?)?;
1583            Ok((_response.s, _response.attributes))
1584        }
1585        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
1586            (),
1587            0x78985e216314dafd,
1588            fidl::encoding::DynamicFlags::empty(),
1589            _decode,
1590        )
1591    }
1592
1593    type DeprecatedSetAttrResponseFut =
1594        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1595    fn r#deprecated_set_attr(
1596        &self,
1597        mut flags: NodeAttributeFlags,
1598        mut attributes: &NodeAttributes,
1599    ) -> Self::DeprecatedSetAttrResponseFut {
1600        fn _decode(
1601            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1602        ) -> Result<i32, fidl::Error> {
1603            let _response = fidl::client::decode_transaction_body::<
1604                NodeDeprecatedSetAttrResponse,
1605                fdomain_client::fidl::FDomainResourceDialect,
1606                0x4186c0f40d938f46,
1607            >(_buf?)?;
1608            Ok(_response.s)
1609        }
1610        self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
1611            (flags, attributes),
1612            0x4186c0f40d938f46,
1613            fidl::encoding::DynamicFlags::empty(),
1614            _decode,
1615        )
1616    }
1617
1618    type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
1619        (i32, OpenFlags),
1620        fdomain_client::fidl::FDomainResourceDialect,
1621    >;
1622    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
1623        fn _decode(
1624            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1625        ) -> Result<(i32, OpenFlags), fidl::Error> {
1626            let _response = fidl::client::decode_transaction_body::<
1627                NodeDeprecatedGetFlagsResponse,
1628                fdomain_client::fidl::FDomainResourceDialect,
1629                0x5b88fffb8eda3aa1,
1630            >(_buf?)?;
1631            Ok((_response.s, _response.flags))
1632        }
1633        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
1634            (),
1635            0x5b88fffb8eda3aa1,
1636            fidl::encoding::DynamicFlags::empty(),
1637            _decode,
1638        )
1639    }
1640
1641    type DeprecatedSetFlagsResponseFut =
1642        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1643    fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
1644        fn _decode(
1645            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1646        ) -> Result<i32, fidl::Error> {
1647            let _response = fidl::client::decode_transaction_body::<
1648                NodeDeprecatedSetFlagsResponse,
1649                fdomain_client::fidl::FDomainResourceDialect,
1650                0x5295b76c71fde733,
1651            >(_buf?)?;
1652            Ok(_response.s)
1653        }
1654        self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
1655            (flags,),
1656            0x5295b76c71fde733,
1657            fidl::encoding::DynamicFlags::empty(),
1658            _decode,
1659        )
1660    }
1661
1662    type GetFlagsResponseFut = fidl::client::QueryResponseFut<
1663        NodeGetFlagsResult,
1664        fdomain_client::fidl::FDomainResourceDialect,
1665    >;
1666    fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
1667        fn _decode(
1668            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1669        ) -> Result<NodeGetFlagsResult, fidl::Error> {
1670            let _response = fidl::client::decode_transaction_body::<
1671                fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
1672                fdomain_client::fidl::FDomainResourceDialect,
1673                0x176eb318f64ec23,
1674            >(_buf?)?
1675            .into_result_fdomain::<DirectoryMarker>("get_flags")?;
1676            Ok(_response.map(|x| x.flags))
1677        }
1678        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
1679            (),
1680            0x176eb318f64ec23,
1681            fidl::encoding::DynamicFlags::FLEXIBLE,
1682            _decode,
1683        )
1684    }
1685
1686    type SetFlagsResponseFut = fidl::client::QueryResponseFut<
1687        NodeSetFlagsResult,
1688        fdomain_client::fidl::FDomainResourceDialect,
1689    >;
1690    fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
1691        fn _decode(
1692            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1693        ) -> Result<NodeSetFlagsResult, fidl::Error> {
1694            let _response = fidl::client::decode_transaction_body::<
1695                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1696                fdomain_client::fidl::FDomainResourceDialect,
1697                0x55a8028685791ea8,
1698            >(_buf?)?
1699            .into_result_fdomain::<DirectoryMarker>("set_flags")?;
1700            Ok(_response.map(|x| x))
1701        }
1702        self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
1703            (flags,),
1704            0x55a8028685791ea8,
1705            fidl::encoding::DynamicFlags::FLEXIBLE,
1706            _decode,
1707        )
1708    }
1709
1710    type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
1711        (i32, Option<Box<FilesystemInfo>>),
1712        fdomain_client::fidl::FDomainResourceDialect,
1713    >;
1714    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
1715        fn _decode(
1716            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1717        ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
1718            let _response = fidl::client::decode_transaction_body::<
1719                NodeQueryFilesystemResponse,
1720                fdomain_client::fidl::FDomainResourceDialect,
1721                0x6f344a1c6b0a0610,
1722            >(_buf?)?;
1723            Ok((_response.s, _response.info))
1724        }
1725        self.client.send_query_and_decode::<
1726            fidl::encoding::EmptyPayload,
1727            (i32, Option<Box<FilesystemInfo>>),
1728        >(
1729            (),
1730            0x6f344a1c6b0a0610,
1731            fidl::encoding::DynamicFlags::empty(),
1732            _decode,
1733        )
1734    }
1735
1736    type GetAttributesResponseFut = fidl::client::QueryResponseFut<
1737        NodeGetAttributesResult,
1738        fdomain_client::fidl::FDomainResourceDialect,
1739    >;
1740    fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
1741        fn _decode(
1742            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1743        ) -> Result<NodeGetAttributesResult, fidl::Error> {
1744            let _response = fidl::client::decode_transaction_body::<
1745                fidl::encoding::ResultType<NodeAttributes2, i32>,
1746                fdomain_client::fidl::FDomainResourceDialect,
1747                0x3d4396a638ea053b,
1748            >(_buf?)?;
1749            Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
1750        }
1751        self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
1752            (query,),
1753            0x3d4396a638ea053b,
1754            fidl::encoding::DynamicFlags::empty(),
1755            _decode,
1756        )
1757    }
1758
1759    type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
1760        NodeUpdateAttributesResult,
1761        fdomain_client::fidl::FDomainResourceDialect,
1762    >;
1763    fn r#update_attributes(
1764        &self,
1765        mut payload: &MutableNodeAttributes,
1766    ) -> Self::UpdateAttributesResponseFut {
1767        fn _decode(
1768            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1769        ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
1770            let _response = fidl::client::decode_transaction_body::<
1771                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1772                fdomain_client::fidl::FDomainResourceDialect,
1773                0x3308c1da5a89bf08,
1774            >(_buf?)?;
1775            Ok(_response.map(|x| x))
1776        }
1777        self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
1778            payload,
1779            0x3308c1da5a89bf08,
1780            fidl::encoding::DynamicFlags::empty(),
1781            _decode,
1782        )
1783    }
1784
1785    type SyncResponseFut = fidl::client::QueryResponseFut<
1786        NodeSyncResult,
1787        fdomain_client::fidl::FDomainResourceDialect,
1788    >;
1789    fn r#sync(&self) -> Self::SyncResponseFut {
1790        fn _decode(
1791            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1792        ) -> Result<NodeSyncResult, fidl::Error> {
1793            let _response = fidl::client::decode_transaction_body::<
1794                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1795                fdomain_client::fidl::FDomainResourceDialect,
1796                0x2c5c27ca0ab5dc49,
1797            >(_buf?)?;
1798            Ok(_response.map(|x| x))
1799        }
1800        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
1801            (),
1802            0x2c5c27ca0ab5dc49,
1803            fidl::encoding::DynamicFlags::empty(),
1804            _decode,
1805        )
1806    }
1807
1808    fn r#list_extended_attributes(
1809        &self,
1810        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
1811    ) -> Result<(), fidl::Error> {
1812        self.client.send::<NodeListExtendedAttributesRequest>(
1813            (iterator,),
1814            0x4b61033de007fcd0,
1815            fidl::encoding::DynamicFlags::empty(),
1816        )
1817    }
1818
1819    type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1820        NodeGetExtendedAttributeResult,
1821        fdomain_client::fidl::FDomainResourceDialect,
1822    >;
1823    fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
1824        fn _decode(
1825            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1826        ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
1827            let _response = fidl::client::decode_transaction_body::<
1828                fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
1829                fdomain_client::fidl::FDomainResourceDialect,
1830                0x45ffa3ccfdeb76db,
1831            >(_buf?)?;
1832            Ok(_response.map(|x| x))
1833        }
1834        self.client.send_query_and_decode::<
1835            NodeGetExtendedAttributeRequest,
1836            NodeGetExtendedAttributeResult,
1837        >(
1838            (name,),
1839            0x45ffa3ccfdeb76db,
1840            fidl::encoding::DynamicFlags::empty(),
1841            _decode,
1842        )
1843    }
1844
1845    type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1846        NodeSetExtendedAttributeResult,
1847        fdomain_client::fidl::FDomainResourceDialect,
1848    >;
1849    fn r#set_extended_attribute(
1850        &self,
1851        mut name: &[u8],
1852        mut value: ExtendedAttributeValue,
1853        mut mode: SetExtendedAttributeMode,
1854    ) -> Self::SetExtendedAttributeResponseFut {
1855        fn _decode(
1856            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1857        ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
1858            let _response = fidl::client::decode_transaction_body::<
1859                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1860                fdomain_client::fidl::FDomainResourceDialect,
1861                0x4a951362f681f23c,
1862            >(_buf?)?;
1863            Ok(_response.map(|x| x))
1864        }
1865        self.client.send_query_and_decode::<
1866            NodeSetExtendedAttributeRequest,
1867            NodeSetExtendedAttributeResult,
1868        >(
1869            (name, &mut value, mode,),
1870            0x4a951362f681f23c,
1871            fidl::encoding::DynamicFlags::empty(),
1872            _decode,
1873        )
1874    }
1875
1876    type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1877        NodeRemoveExtendedAttributeResult,
1878        fdomain_client::fidl::FDomainResourceDialect,
1879    >;
1880    fn r#remove_extended_attribute(
1881        &self,
1882        mut name: &[u8],
1883    ) -> Self::RemoveExtendedAttributeResponseFut {
1884        fn _decode(
1885            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1886        ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
1887            let _response = fidl::client::decode_transaction_body::<
1888                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1889                fdomain_client::fidl::FDomainResourceDialect,
1890                0x7a0b9f3a9bf9032d,
1891            >(_buf?)?;
1892            Ok(_response.map(|x| x))
1893        }
1894        self.client.send_query_and_decode::<
1895            NodeRemoveExtendedAttributeRequest,
1896            NodeRemoveExtendedAttributeResult,
1897        >(
1898            (name,),
1899            0x7a0b9f3a9bf9032d,
1900            fidl::encoding::DynamicFlags::empty(),
1901            _decode,
1902        )
1903    }
1904
1905    fn r#deprecated_open(
1906        &self,
1907        mut flags: OpenFlags,
1908        mut mode: ModeType,
1909        mut path: &str,
1910        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1911    ) -> Result<(), fidl::Error> {
1912        self.client.send::<DirectoryDeprecatedOpenRequest>(
1913            (flags, mode, path, object),
1914            0x2c5044561d685ec0,
1915            fidl::encoding::DynamicFlags::FLEXIBLE,
1916        )
1917    }
1918
1919    fn r#open(
1920        &self,
1921        mut path: &str,
1922        mut flags: Flags,
1923        mut options: &Options,
1924        mut object: fdomain_client::Channel,
1925    ) -> Result<(), fidl::Error> {
1926        self.client.send::<DirectoryOpenRequest>(
1927            (path, flags, options, object),
1928            0x568ddcb9a9cbb6d9,
1929            fidl::encoding::DynamicFlags::empty(),
1930        )
1931    }
1932
1933    type ReadDirentsResponseFut = fidl::client::QueryResponseFut<
1934        (i32, Vec<u8>),
1935        fdomain_client::fidl::FDomainResourceDialect,
1936    >;
1937    fn r#read_dirents(&self, mut max_bytes: u64) -> Self::ReadDirentsResponseFut {
1938        fn _decode(
1939            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1940        ) -> Result<(i32, Vec<u8>), fidl::Error> {
1941            let _response = fidl::client::decode_transaction_body::<
1942                DirectoryReadDirentsResponse,
1943                fdomain_client::fidl::FDomainResourceDialect,
1944                0x3582806bf27faa0a,
1945            >(_buf?)?;
1946            Ok((_response.s, _response.dirents))
1947        }
1948        self.client.send_query_and_decode::<DirectoryReadDirentsRequest, (i32, Vec<u8>)>(
1949            (max_bytes,),
1950            0x3582806bf27faa0a,
1951            fidl::encoding::DynamicFlags::empty(),
1952            _decode,
1953        )
1954    }
1955
1956    type RewindResponseFut =
1957        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1958    fn r#rewind(&self) -> Self::RewindResponseFut {
1959        fn _decode(
1960            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1961        ) -> Result<i32, fidl::Error> {
1962            let _response = fidl::client::decode_transaction_body::<
1963                DirectoryRewindResponse,
1964                fdomain_client::fidl::FDomainResourceDialect,
1965                0x16b1202af0f34c71,
1966            >(_buf?)?;
1967            Ok(_response.s)
1968        }
1969        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
1970            (),
1971            0x16b1202af0f34c71,
1972            fidl::encoding::DynamicFlags::empty(),
1973            _decode,
1974        )
1975    }
1976
1977    type GetTokenResponseFut = fidl::client::QueryResponseFut<
1978        (i32, Option<fdomain_client::Handle>),
1979        fdomain_client::fidl::FDomainResourceDialect,
1980    >;
1981    fn r#get_token(&self) -> Self::GetTokenResponseFut {
1982        fn _decode(
1983            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1984        ) -> Result<(i32, Option<fdomain_client::Handle>), fidl::Error> {
1985            let _response = fidl::client::decode_transaction_body::<
1986                DirectoryGetTokenResponse,
1987                fdomain_client::fidl::FDomainResourceDialect,
1988                0x26ae9d18763c8655,
1989            >(_buf?)?;
1990            Ok((_response.s, _response.token))
1991        }
1992        self.client.send_query_and_decode::<
1993            fidl::encoding::EmptyPayload,
1994            (i32, Option<fdomain_client::Handle>),
1995        >(
1996            (),
1997            0x26ae9d18763c8655,
1998            fidl::encoding::DynamicFlags::empty(),
1999            _decode,
2000        )
2001    }
2002
2003    type LinkResponseFut =
2004        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
2005    fn r#link(
2006        &self,
2007        mut src: &str,
2008        mut dst_parent_token: fdomain_client::Handle,
2009        mut dst: &str,
2010    ) -> Self::LinkResponseFut {
2011        fn _decode(
2012            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2013        ) -> Result<i32, fidl::Error> {
2014            let _response = fidl::client::decode_transaction_body::<
2015                DirectoryLinkResponse,
2016                fdomain_client::fidl::FDomainResourceDialect,
2017                0x740604c0c7c930e7,
2018            >(_buf?)?;
2019            Ok(_response.s)
2020        }
2021        self.client.send_query_and_decode::<DirectoryLinkRequest, i32>(
2022            (src, dst_parent_token, dst),
2023            0x740604c0c7c930e7,
2024            fidl::encoding::DynamicFlags::empty(),
2025            _decode,
2026        )
2027    }
2028
2029    type UnlinkResponseFut = fidl::client::QueryResponseFut<
2030        DirectoryUnlinkResult,
2031        fdomain_client::fidl::FDomainResourceDialect,
2032    >;
2033    fn r#unlink(&self, mut name: &str, mut options: &UnlinkOptions) -> Self::UnlinkResponseFut {
2034        fn _decode(
2035            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2036        ) -> Result<DirectoryUnlinkResult, fidl::Error> {
2037            let _response = fidl::client::decode_transaction_body::<
2038                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2039                fdomain_client::fidl::FDomainResourceDialect,
2040                0x750a0326a78d7bed,
2041            >(_buf?)?;
2042            Ok(_response.map(|x| x))
2043        }
2044        self.client.send_query_and_decode::<DirectoryUnlinkRequest, DirectoryUnlinkResult>(
2045            (name, options),
2046            0x750a0326a78d7bed,
2047            fidl::encoding::DynamicFlags::empty(),
2048            _decode,
2049        )
2050    }
2051
2052    type RenameResponseFut = fidl::client::QueryResponseFut<
2053        DirectoryRenameResult,
2054        fdomain_client::fidl::FDomainResourceDialect,
2055    >;
2056    fn r#rename(
2057        &self,
2058        mut src: &str,
2059        mut dst_parent_token: fdomain_client::Event,
2060        mut dst: &str,
2061    ) -> Self::RenameResponseFut {
2062        fn _decode(
2063            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2064        ) -> Result<DirectoryRenameResult, fidl::Error> {
2065            let _response = fidl::client::decode_transaction_body::<
2066                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2067                fdomain_client::fidl::FDomainResourceDialect,
2068                0x7060e7723b9928de,
2069            >(_buf?)?;
2070            Ok(_response.map(|x| x))
2071        }
2072        self.client.send_query_and_decode::<DirectoryRenameRequest, DirectoryRenameResult>(
2073            (src, dst_parent_token, dst),
2074            0x7060e7723b9928de,
2075            fidl::encoding::DynamicFlags::empty(),
2076            _decode,
2077        )
2078    }
2079
2080    type CreateSymlinkResponseFut = fidl::client::QueryResponseFut<
2081        DirectoryCreateSymlinkResult,
2082        fdomain_client::fidl::FDomainResourceDialect,
2083    >;
2084    fn r#create_symlink(
2085        &self,
2086        mut name: &str,
2087        mut target: &[u8],
2088        mut connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
2089    ) -> Self::CreateSymlinkResponseFut {
2090        fn _decode(
2091            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2092        ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
2093            let _response = fidl::client::decode_transaction_body::<
2094                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2095                fdomain_client::fidl::FDomainResourceDialect,
2096                0x21ce0f19ec043889,
2097            >(_buf?)?;
2098            Ok(_response.map(|x| x))
2099        }
2100        self.client
2101            .send_query_and_decode::<DirectoryCreateSymlinkRequest, DirectoryCreateSymlinkResult>(
2102                (name, target, connection),
2103                0x21ce0f19ec043889,
2104                fidl::encoding::DynamicFlags::empty(),
2105                _decode,
2106            )
2107    }
2108
2109    type WatchResponseFut =
2110        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
2111    fn r#watch(
2112        &self,
2113        mut mask: WatchMask,
2114        mut options: u32,
2115        mut watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
2116    ) -> Self::WatchResponseFut {
2117        fn _decode(
2118            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2119        ) -> Result<i32, fidl::Error> {
2120            let _response = fidl::client::decode_transaction_body::<
2121                DirectoryWatchResponse,
2122                fdomain_client::fidl::FDomainResourceDialect,
2123                0x5717193a59d66d91,
2124            >(_buf?)?;
2125            Ok(_response.s)
2126        }
2127        self.client.send_query_and_decode::<DirectoryWatchRequest, i32>(
2128            (mask, options, watcher),
2129            0x5717193a59d66d91,
2130            fidl::encoding::DynamicFlags::empty(),
2131            _decode,
2132        )
2133    }
2134}
2135
2136pub struct DirectoryEventStream {
2137    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
2138}
2139
2140impl std::marker::Unpin for DirectoryEventStream {}
2141
2142impl futures::stream::FusedStream for DirectoryEventStream {
2143    fn is_terminated(&self) -> bool {
2144        self.event_receiver.is_terminated()
2145    }
2146}
2147
2148impl futures::Stream for DirectoryEventStream {
2149    type Item = Result<DirectoryEvent, fidl::Error>;
2150
2151    fn poll_next(
2152        mut self: std::pin::Pin<&mut Self>,
2153        cx: &mut std::task::Context<'_>,
2154    ) -> std::task::Poll<Option<Self::Item>> {
2155        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2156            &mut self.event_receiver,
2157            cx
2158        )?) {
2159            Some(buf) => std::task::Poll::Ready(Some(DirectoryEvent::decode(buf))),
2160            None => std::task::Poll::Ready(None),
2161        }
2162    }
2163}
2164
2165#[derive(Debug)]
2166pub enum DirectoryEvent {
2167    OnOpen_ {
2168        s: i32,
2169        info: Option<Box<NodeInfoDeprecated>>,
2170    },
2171    OnRepresentation {
2172        payload: Representation,
2173    },
2174    #[non_exhaustive]
2175    _UnknownEvent {
2176        /// Ordinal of the event that was sent.
2177        ordinal: u64,
2178    },
2179}
2180
2181impl DirectoryEvent {
2182    #[allow(irrefutable_let_patterns)]
2183    pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
2184        if let DirectoryEvent::OnOpen_ { s, info } = self {
2185            Some((s, info))
2186        } else {
2187            None
2188        }
2189    }
2190    #[allow(irrefutable_let_patterns)]
2191    pub fn into_on_representation(self) -> Option<Representation> {
2192        if let DirectoryEvent::OnRepresentation { payload } = self {
2193            Some((payload))
2194        } else {
2195            None
2196        }
2197    }
2198
2199    /// Decodes a message buffer as a [`DirectoryEvent`].
2200    fn decode(
2201        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2202    ) -> Result<DirectoryEvent, fidl::Error> {
2203        let (bytes, _handles) = buf.split_mut();
2204        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2205        debug_assert_eq!(tx_header.tx_id, 0);
2206        match tx_header.ordinal {
2207            0x7fc7bbb1dbfd1972 => {
2208                let mut out = fidl::new_empty!(
2209                    NodeOnOpenRequest,
2210                    fdomain_client::fidl::FDomainResourceDialect
2211                );
2212                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2213                Ok((DirectoryEvent::OnOpen_ { s: out.s, info: out.info }))
2214            }
2215            0x5cb40567d80a510c => {
2216                let mut out =
2217                    fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
2218                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
2219                Ok((DirectoryEvent::OnRepresentation { payload: out }))
2220            }
2221            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2222                Ok(DirectoryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
2223            }
2224            _ => Err(fidl::Error::UnknownOrdinal {
2225                ordinal: tx_header.ordinal,
2226                protocol_name:
2227                    <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2228            }),
2229        }
2230    }
2231}
2232
2233/// A Stream of incoming requests for fuchsia.io/Directory.
2234pub struct DirectoryRequestStream {
2235    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2236    is_terminated: bool,
2237}
2238
2239impl std::marker::Unpin for DirectoryRequestStream {}
2240
2241impl futures::stream::FusedStream for DirectoryRequestStream {
2242    fn is_terminated(&self) -> bool {
2243        self.is_terminated
2244    }
2245}
2246
2247impl fdomain_client::fidl::RequestStream for DirectoryRequestStream {
2248    type Protocol = DirectoryMarker;
2249    type ControlHandle = DirectoryControlHandle;
2250
2251    fn from_channel(channel: fdomain_client::Channel) -> Self {
2252        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2253    }
2254
2255    fn control_handle(&self) -> Self::ControlHandle {
2256        DirectoryControlHandle { inner: self.inner.clone() }
2257    }
2258
2259    fn into_inner(
2260        self,
2261    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
2262    {
2263        (self.inner, self.is_terminated)
2264    }
2265
2266    fn from_inner(
2267        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2268        is_terminated: bool,
2269    ) -> Self {
2270        Self { inner, is_terminated }
2271    }
2272}
2273
2274impl futures::Stream for DirectoryRequestStream {
2275    type Item = Result<DirectoryRequest, fidl::Error>;
2276
2277    fn poll_next(
2278        mut self: std::pin::Pin<&mut Self>,
2279        cx: &mut std::task::Context<'_>,
2280    ) -> std::task::Poll<Option<Self::Item>> {
2281        let this = &mut *self;
2282        if this.inner.check_shutdown(cx) {
2283            this.is_terminated = true;
2284            return std::task::Poll::Ready(None);
2285        }
2286        if this.is_terminated {
2287            panic!("polled DirectoryRequestStream after completion");
2288        }
2289        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
2290            |bytes, handles| {
2291                match this.inner.channel().read_etc(cx, bytes, handles) {
2292                    std::task::Poll::Ready(Ok(())) => {}
2293                    std::task::Poll::Pending => return std::task::Poll::Pending,
2294                    std::task::Poll::Ready(Err(None)) => {
2295                        this.is_terminated = true;
2296                        return std::task::Poll::Ready(None);
2297                    }
2298                    std::task::Poll::Ready(Err(Some(e))) => {
2299                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2300                            e.into(),
2301                        ))))
2302                    }
2303                }
2304
2305                // A message has been received from the channel
2306                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2307
2308                std::task::Poll::Ready(Some(match header.ordinal {
2309                    0x6ee9c0ad53ec87aa => {
2310                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2311                        let mut req = fidl::new_empty!(
2312                            AdvisoryLockingAdvisoryLockRequest,
2313                            fdomain_client::fidl::FDomainResourceDialect
2314                        );
2315                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
2316                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2317                        Ok(DirectoryRequest::AdvisoryLock {
2318                            request: req.request,
2319
2320                            responder: DirectoryAdvisoryLockResponder {
2321                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2322                                tx_id: header.tx_id,
2323                            },
2324                        })
2325                    }
2326                    0x20d8a7aba2168a79 => {
2327                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2328                        let mut req = fidl::new_empty!(
2329                            fdomain_fuchsia_unknown::CloneableCloneRequest,
2330                            fdomain_client::fidl::FDomainResourceDialect
2331                        );
2332                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
2333                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2334                        Ok(DirectoryRequest::Clone { request: req.request, control_handle })
2335                    }
2336                    0x5ac5d459ad7f657e => {
2337                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2338                        let mut req = fidl::new_empty!(
2339                            fidl::encoding::EmptyPayload,
2340                            fdomain_client::fidl::FDomainResourceDialect
2341                        );
2342                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2343                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2344                        Ok(DirectoryRequest::Close {
2345                            responder: DirectoryCloseResponder {
2346                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2347                                tx_id: header.tx_id,
2348                            },
2349                        })
2350                    }
2351                    0x2658edee9decfc06 => {
2352                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2353                        let mut req = fidl::new_empty!(
2354                            fidl::encoding::EmptyPayload,
2355                            fdomain_client::fidl::FDomainResourceDialect
2356                        );
2357                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2358                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2359                        Ok(DirectoryRequest::Query {
2360                            responder: DirectoryQueryResponder {
2361                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2362                                tx_id: header.tx_id,
2363                            },
2364                        })
2365                    }
2366                    0x5a61678f293ce16f => {
2367                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2368                        let mut req = fidl::new_empty!(
2369                            NodeDeprecatedCloneRequest,
2370                            fdomain_client::fidl::FDomainResourceDialect
2371                        );
2372                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
2373                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2374                        Ok(DirectoryRequest::DeprecatedClone {
2375                            flags: req.flags,
2376                            object: req.object,
2377
2378                            control_handle,
2379                        })
2380                    }
2381                    0x78985e216314dafd => {
2382                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2383                        let mut req = fidl::new_empty!(
2384                            fidl::encoding::EmptyPayload,
2385                            fdomain_client::fidl::FDomainResourceDialect
2386                        );
2387                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2388                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2389                        Ok(DirectoryRequest::DeprecatedGetAttr {
2390                            responder: DirectoryDeprecatedGetAttrResponder {
2391                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2392                                tx_id: header.tx_id,
2393                            },
2394                        })
2395                    }
2396                    0x4186c0f40d938f46 => {
2397                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2398                        let mut req = fidl::new_empty!(
2399                            NodeDeprecatedSetAttrRequest,
2400                            fdomain_client::fidl::FDomainResourceDialect
2401                        );
2402                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
2403                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2404                        Ok(DirectoryRequest::DeprecatedSetAttr {
2405                            flags: req.flags,
2406                            attributes: req.attributes,
2407
2408                            responder: DirectoryDeprecatedSetAttrResponder {
2409                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2410                                tx_id: header.tx_id,
2411                            },
2412                        })
2413                    }
2414                    0x5b88fffb8eda3aa1 => {
2415                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2416                        let mut req = fidl::new_empty!(
2417                            fidl::encoding::EmptyPayload,
2418                            fdomain_client::fidl::FDomainResourceDialect
2419                        );
2420                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2421                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2422                        Ok(DirectoryRequest::DeprecatedGetFlags {
2423                            responder: DirectoryDeprecatedGetFlagsResponder {
2424                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2425                                tx_id: header.tx_id,
2426                            },
2427                        })
2428                    }
2429                    0x5295b76c71fde733 => {
2430                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2431                        let mut req = fidl::new_empty!(
2432                            NodeDeprecatedSetFlagsRequest,
2433                            fdomain_client::fidl::FDomainResourceDialect
2434                        );
2435                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
2436                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2437                        Ok(DirectoryRequest::DeprecatedSetFlags {
2438                            flags: req.flags,
2439
2440                            responder: DirectoryDeprecatedSetFlagsResponder {
2441                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2442                                tx_id: header.tx_id,
2443                            },
2444                        })
2445                    }
2446                    0x176eb318f64ec23 => {
2447                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2448                        let mut req = fidl::new_empty!(
2449                            fidl::encoding::EmptyPayload,
2450                            fdomain_client::fidl::FDomainResourceDialect
2451                        );
2452                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2453                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2454                        Ok(DirectoryRequest::GetFlags {
2455                            responder: DirectoryGetFlagsResponder {
2456                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2457                                tx_id: header.tx_id,
2458                            },
2459                        })
2460                    }
2461                    0x55a8028685791ea8 => {
2462                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2463                        let mut req = fidl::new_empty!(
2464                            NodeSetFlagsRequest,
2465                            fdomain_client::fidl::FDomainResourceDialect
2466                        );
2467                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
2468                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2469                        Ok(DirectoryRequest::SetFlags {
2470                            flags: req.flags,
2471
2472                            responder: DirectorySetFlagsResponder {
2473                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2474                                tx_id: header.tx_id,
2475                            },
2476                        })
2477                    }
2478                    0x6f344a1c6b0a0610 => {
2479                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2480                        let mut req = fidl::new_empty!(
2481                            fidl::encoding::EmptyPayload,
2482                            fdomain_client::fidl::FDomainResourceDialect
2483                        );
2484                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2485                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2486                        Ok(DirectoryRequest::QueryFilesystem {
2487                            responder: DirectoryQueryFilesystemResponder {
2488                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2489                                tx_id: header.tx_id,
2490                            },
2491                        })
2492                    }
2493                    0x3d4396a638ea053b => {
2494                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2495                        let mut req = fidl::new_empty!(
2496                            NodeGetAttributesRequest,
2497                            fdomain_client::fidl::FDomainResourceDialect
2498                        );
2499                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
2500                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2501                        Ok(DirectoryRequest::GetAttributes {
2502                            query: req.query,
2503
2504                            responder: DirectoryGetAttributesResponder {
2505                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2506                                tx_id: header.tx_id,
2507                            },
2508                        })
2509                    }
2510                    0x3308c1da5a89bf08 => {
2511                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2512                        let mut req = fidl::new_empty!(
2513                            MutableNodeAttributes,
2514                            fdomain_client::fidl::FDomainResourceDialect
2515                        );
2516                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
2517                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2518                        Ok(DirectoryRequest::UpdateAttributes {
2519                            payload: req,
2520                            responder: DirectoryUpdateAttributesResponder {
2521                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2522                                tx_id: header.tx_id,
2523                            },
2524                        })
2525                    }
2526                    0x2c5c27ca0ab5dc49 => {
2527                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2528                        let mut req = fidl::new_empty!(
2529                            fidl::encoding::EmptyPayload,
2530                            fdomain_client::fidl::FDomainResourceDialect
2531                        );
2532                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2533                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2534                        Ok(DirectoryRequest::Sync {
2535                            responder: DirectorySyncResponder {
2536                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2537                                tx_id: header.tx_id,
2538                            },
2539                        })
2540                    }
2541                    0x4b61033de007fcd0 => {
2542                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2543                        let mut req = fidl::new_empty!(
2544                            NodeListExtendedAttributesRequest,
2545                            fdomain_client::fidl::FDomainResourceDialect
2546                        );
2547                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
2548                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2549                        Ok(DirectoryRequest::ListExtendedAttributes {
2550                            iterator: req.iterator,
2551
2552                            control_handle,
2553                        })
2554                    }
2555                    0x45ffa3ccfdeb76db => {
2556                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2557                        let mut req = fidl::new_empty!(
2558                            NodeGetExtendedAttributeRequest,
2559                            fdomain_client::fidl::FDomainResourceDialect
2560                        );
2561                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2562                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2563                        Ok(DirectoryRequest::GetExtendedAttribute {
2564                            name: req.name,
2565
2566                            responder: DirectoryGetExtendedAttributeResponder {
2567                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2568                                tx_id: header.tx_id,
2569                            },
2570                        })
2571                    }
2572                    0x4a951362f681f23c => {
2573                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2574                        let mut req = fidl::new_empty!(
2575                            NodeSetExtendedAttributeRequest,
2576                            fdomain_client::fidl::FDomainResourceDialect
2577                        );
2578                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2579                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2580                        Ok(DirectoryRequest::SetExtendedAttribute {
2581                            name: req.name,
2582                            value: req.value,
2583                            mode: req.mode,
2584
2585                            responder: DirectorySetExtendedAttributeResponder {
2586                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2587                                tx_id: header.tx_id,
2588                            },
2589                        })
2590                    }
2591                    0x7a0b9f3a9bf9032d => {
2592                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2593                        let mut req = fidl::new_empty!(
2594                            NodeRemoveExtendedAttributeRequest,
2595                            fdomain_client::fidl::FDomainResourceDialect
2596                        );
2597                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2598                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2599                        Ok(DirectoryRequest::RemoveExtendedAttribute {
2600                            name: req.name,
2601
2602                            responder: DirectoryRemoveExtendedAttributeResponder {
2603                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2604                                tx_id: header.tx_id,
2605                            },
2606                        })
2607                    }
2608                    0x2c5044561d685ec0 => {
2609                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2610                        let mut req = fidl::new_empty!(
2611                            DirectoryDeprecatedOpenRequest,
2612                            fdomain_client::fidl::FDomainResourceDialect
2613                        );
2614                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryDeprecatedOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2615                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2616                        Ok(DirectoryRequest::DeprecatedOpen {
2617                            flags: req.flags,
2618                            mode: req.mode,
2619                            path: req.path,
2620                            object: req.object,
2621
2622                            control_handle,
2623                        })
2624                    }
2625                    0x568ddcb9a9cbb6d9 => {
2626                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2627                        let mut req = fidl::new_empty!(
2628                            DirectoryOpenRequest,
2629                            fdomain_client::fidl::FDomainResourceDialect
2630                        );
2631                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2632                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2633                        Ok(DirectoryRequest::Open {
2634                            path: req.path,
2635                            flags: req.flags,
2636                            options: req.options,
2637                            object: req.object,
2638
2639                            control_handle,
2640                        })
2641                    }
2642                    0x3582806bf27faa0a => {
2643                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2644                        let mut req = fidl::new_empty!(
2645                            DirectoryReadDirentsRequest,
2646                            fdomain_client::fidl::FDomainResourceDialect
2647                        );
2648                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryReadDirentsRequest>(&header, _body_bytes, handles, &mut req)?;
2649                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2650                        Ok(DirectoryRequest::ReadDirents {
2651                            max_bytes: req.max_bytes,
2652
2653                            responder: DirectoryReadDirentsResponder {
2654                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2655                                tx_id: header.tx_id,
2656                            },
2657                        })
2658                    }
2659                    0x16b1202af0f34c71 => {
2660                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2661                        let mut req = fidl::new_empty!(
2662                            fidl::encoding::EmptyPayload,
2663                            fdomain_client::fidl::FDomainResourceDialect
2664                        );
2665                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2666                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2667                        Ok(DirectoryRequest::Rewind {
2668                            responder: DirectoryRewindResponder {
2669                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2670                                tx_id: header.tx_id,
2671                            },
2672                        })
2673                    }
2674                    0x26ae9d18763c8655 => {
2675                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2676                        let mut req = fidl::new_empty!(
2677                            fidl::encoding::EmptyPayload,
2678                            fdomain_client::fidl::FDomainResourceDialect
2679                        );
2680                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2681                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2682                        Ok(DirectoryRequest::GetToken {
2683                            responder: DirectoryGetTokenResponder {
2684                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2685                                tx_id: header.tx_id,
2686                            },
2687                        })
2688                    }
2689                    0x740604c0c7c930e7 => {
2690                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2691                        let mut req = fidl::new_empty!(
2692                            DirectoryLinkRequest,
2693                            fdomain_client::fidl::FDomainResourceDialect
2694                        );
2695                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryLinkRequest>(&header, _body_bytes, handles, &mut req)?;
2696                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2697                        Ok(DirectoryRequest::Link {
2698                            src: req.src,
2699                            dst_parent_token: req.dst_parent_token,
2700                            dst: req.dst,
2701
2702                            responder: DirectoryLinkResponder {
2703                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2704                                tx_id: header.tx_id,
2705                            },
2706                        })
2707                    }
2708                    0x750a0326a78d7bed => {
2709                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2710                        let mut req = fidl::new_empty!(
2711                            DirectoryUnlinkRequest,
2712                            fdomain_client::fidl::FDomainResourceDialect
2713                        );
2714                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryUnlinkRequest>(&header, _body_bytes, handles, &mut req)?;
2715                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2716                        Ok(DirectoryRequest::Unlink {
2717                            name: req.name,
2718                            options: req.options,
2719
2720                            responder: DirectoryUnlinkResponder {
2721                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2722                                tx_id: header.tx_id,
2723                            },
2724                        })
2725                    }
2726                    0x7060e7723b9928de => {
2727                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2728                        let mut req = fidl::new_empty!(
2729                            DirectoryRenameRequest,
2730                            fdomain_client::fidl::FDomainResourceDialect
2731                        );
2732                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryRenameRequest>(&header, _body_bytes, handles, &mut req)?;
2733                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2734                        Ok(DirectoryRequest::Rename {
2735                            src: req.src,
2736                            dst_parent_token: req.dst_parent_token,
2737                            dst: req.dst,
2738
2739                            responder: DirectoryRenameResponder {
2740                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2741                                tx_id: header.tx_id,
2742                            },
2743                        })
2744                    }
2745                    0x21ce0f19ec043889 => {
2746                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2747                        let mut req = fidl::new_empty!(
2748                            DirectoryCreateSymlinkRequest,
2749                            fdomain_client::fidl::FDomainResourceDialect
2750                        );
2751                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryCreateSymlinkRequest>(&header, _body_bytes, handles, &mut req)?;
2752                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2753                        Ok(DirectoryRequest::CreateSymlink {
2754                            name: req.name,
2755                            target: req.target,
2756                            connection: req.connection,
2757
2758                            responder: DirectoryCreateSymlinkResponder {
2759                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2760                                tx_id: header.tx_id,
2761                            },
2762                        })
2763                    }
2764                    0x5717193a59d66d91 => {
2765                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2766                        let mut req = fidl::new_empty!(
2767                            DirectoryWatchRequest,
2768                            fdomain_client::fidl::FDomainResourceDialect
2769                        );
2770                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryWatchRequest>(&header, _body_bytes, handles, &mut req)?;
2771                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2772                        Ok(DirectoryRequest::Watch {
2773                            mask: req.mask,
2774                            options: req.options,
2775                            watcher: req.watcher,
2776
2777                            responder: DirectoryWatchResponder {
2778                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2779                                tx_id: header.tx_id,
2780                            },
2781                        })
2782                    }
2783                    _ if header.tx_id == 0
2784                        && header
2785                            .dynamic_flags()
2786                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2787                    {
2788                        Ok(DirectoryRequest::_UnknownMethod {
2789                            ordinal: header.ordinal,
2790                            control_handle: DirectoryControlHandle { inner: this.inner.clone() },
2791                            method_type: fidl::MethodType::OneWay,
2792                        })
2793                    }
2794                    _ if header
2795                        .dynamic_flags()
2796                        .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2797                    {
2798                        this.inner.send_framework_err(
2799                            fidl::encoding::FrameworkErr::UnknownMethod,
2800                            header.tx_id,
2801                            header.ordinal,
2802                            header.dynamic_flags(),
2803                            (bytes, handles),
2804                        )?;
2805                        Ok(DirectoryRequest::_UnknownMethod {
2806                            ordinal: header.ordinal,
2807                            control_handle: DirectoryControlHandle { inner: this.inner.clone() },
2808                            method_type: fidl::MethodType::TwoWay,
2809                        })
2810                    }
2811                    _ => Err(fidl::Error::UnknownOrdinal {
2812                        ordinal: header.ordinal,
2813                        protocol_name:
2814                            <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2815                    }),
2816                }))
2817            },
2818        )
2819    }
2820}
2821
2822/// Directory defines a node which is capable of containing other Objects.
2823#[derive(Debug)]
2824pub enum DirectoryRequest {
2825    /// Acquires an advisory lock on the underlying file.
2826    ///
2827    /// The lock lasts until either this connection is closed or
2828    /// this method is called with |AdvisoryLockType.UNLOCK| to release the lock
2829    /// explicitly.
2830    ///
2831    /// Advisory locks are purely advisory. They do not prevent actual read or
2832    /// write operations from occurring on the file, either through this
2833    /// connection or through other connections.
2834    ///
2835    /// This method requires the following rights:
2836    ///
2837    /// * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
2838    /// * [`Rights.WRITE_BYTES`] if `request.type` is
2839    ///   [`AdvisoryLockType.WRITE`].
2840    ///
2841    /// # Errors
2842    ///
2843    /// * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
2844    ///   example, another connection might hold a conflicting lock type.
2845    /// * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
2846    /// * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
2847    ///   to acquire the given type of lock.
2848    AdvisoryLock {
2849        request: AdvisoryLockRequest,
2850        responder: DirectoryAdvisoryLockResponder,
2851    },
2852    Clone {
2853        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
2854        control_handle: DirectoryControlHandle,
2855    },
2856    /// Terminates the connection.
2857    ///
2858    /// After calling `Close`, the client must not send any other requests.
2859    ///
2860    /// Servers, after sending the status response, should close the connection
2861    /// regardless of status and without sending an epitaph.
2862    ///
2863    /// Closing the client end of the channel should be semantically equivalent
2864    /// to calling `Close` without knowing when the close has completed or its
2865    /// status.
2866    Close {
2867        responder: DirectoryCloseResponder,
2868    },
2869    Query {
2870        responder: DirectoryQueryResponder,
2871    },
2872    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
2873    DeprecatedClone {
2874        flags: OpenFlags,
2875        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
2876        control_handle: DirectoryControlHandle,
2877    },
2878    /// DEPRECATED - Use `Node.GetAttributes` instead.
2879    DeprecatedGetAttr {
2880        responder: DirectoryDeprecatedGetAttrResponder,
2881    },
2882    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
2883    DeprecatedSetAttr {
2884        flags: NodeAttributeFlags,
2885        attributes: NodeAttributes,
2886        responder: DirectoryDeprecatedSetAttrResponder,
2887    },
2888    /// [DEPRECATED - Use new GetFlags method instead.]
2889    DeprecatedGetFlags {
2890        responder: DirectoryDeprecatedGetFlagsResponder,
2891    },
2892    /// [DEPRECATED - Use new SetFlags method instead.]
2893    DeprecatedSetFlags {
2894        flags: OpenFlags,
2895        responder: DirectoryDeprecatedSetFlagsResponder,
2896    },
2897    /// Queries the flags that apply to this node after it has been opened/created. This method does
2898    /// not require any rights.
2899    ///
2900    /// Note that the final set of flags that apply to the connection may differ from those
2901    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
2902    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
2903    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
2904    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
2905    GetFlags {
2906        responder: DirectoryGetFlagsResponder,
2907    },
2908    /// Sets the flags that apply to this node after it has been opened. This method does not
2909    /// require any rights.
2910    ///
2911    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
2912    /// clear append mode.
2913    ///
2914    /// Errors:
2915    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
2916    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
2917    SetFlags {
2918        flags: Flags,
2919        responder: DirectorySetFlagsResponder,
2920    },
2921    /// Query the filesystem for filesystem-specific information.
2922    QueryFilesystem {
2923        responder: DirectoryQueryFilesystemResponder,
2924    },
2925    /// Acquires information about the node.
2926    ///
2927    /// The attributes of a node should be stable, independent of the
2928    /// specific protocol used to access it.
2929    ///
2930    /// If a particular attribute is not applicable or not supported,
2931    /// filesystems should leave the corresponding field absent.
2932    ///
2933    /// + `query` a bit-mask specifying which attributes to fetch. The server
2934    ///   should not return more than necessary.
2935    /// - `attributes` the returned attributes.
2936    ///
2937    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
2938    GetAttributes {
2939        query: NodeAttributesQuery,
2940        responder: DirectoryGetAttributesResponder,
2941    },
2942    /// Updates information about the node.
2943    ///
2944    /// + `attributes` the presence of a table field in `attributes` indicates
2945    /// the intent to update the corresponding attribute.
2946    ///
2947    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
2948    ///
2949    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
2950    UpdateAttributes {
2951        payload: MutableNodeAttributes,
2952        responder: DirectoryUpdateAttributesResponder,
2953    },
2954    /// Synchronizes updates to the node to the underlying media, if it exists.
2955    ///
2956    /// This method will return when the filesystem server has flushed the
2957    /// relevant updates to the underlying media, but does not guarantee the
2958    /// underlying media has persisted the information, nor that any information
2959    /// is committed to hardware. Clients may use `Sync` to ensure ordering
2960    /// between operations.
2961    ///
2962    /// This method does not require any rights.
2963    Sync {
2964        responder: DirectorySyncResponder,
2965    },
2966    /// Creates an iterator over all the extended attribute names associated
2967    /// with this node. If an error occurs it is returned as an epitaph on the
2968    /// iterator request channel, and then the channel is closed.
2969    ///
2970    /// GetExtendedAttributes can be used with any of these names to retrieve
2971    /// the associated value.
2972    ///
2973    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
2974    ListExtendedAttributes {
2975        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
2976        control_handle: DirectoryControlHandle,
2977    },
2978    /// Get the value associated with the given attribute `name` for this node.
2979    ///
2980    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
2981    /// particular structure is imposed on them.
2982    ///
2983    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
2984    GetExtendedAttribute {
2985        name: Vec<u8>,
2986        responder: DirectoryGetExtendedAttributeResponder,
2987    },
2988    /// Set the value for the given attribute `name` to `value` for this node.
2989    ///
2990    /// The attribute name may exist, in which case the attribute is updated.
2991    /// If the attribute doesn't exist, it is created. The name should have no
2992    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
2993    ///
2994    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
2995    SetExtendedAttribute {
2996        name: Vec<u8>,
2997        value: ExtendedAttributeValue,
2998        mode: SetExtendedAttributeMode,
2999        responder: DirectorySetExtendedAttributeResponder,
3000    },
3001    /// Remove the specified extended attribute.
3002    ///
3003    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
3004    ///
3005    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
3006    RemoveExtendedAttribute {
3007        name: Vec<u8>,
3008        responder: DirectoryRemoveExtendedAttributeResponder,
3009    },
3010    /// DEPRECATED - Use `fuchsia.io/Directory.Open` instead.
3011    DeprecatedOpen {
3012        flags: OpenFlags,
3013        mode: ModeType,
3014        path: String,
3015        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
3016        control_handle: DirectoryControlHandle,
3017    },
3018    /// Open (or create) a node relative to this directory. Any errors are communicated via an
3019    /// epitaph sent on the `object` channel.
3020    ///
3021    /// Errors:
3022    /// * `ZX_ERR_BAD_PATH` if `path` is invalid
3023    /// * See [`Flags`] for other errors which may be communicated based on `flags`
3024    Open {
3025        path: String,
3026        flags: Flags,
3027        options: Options,
3028        object: fdomain_client::Channel,
3029        control_handle: DirectoryControlHandle,
3030    },
3031    /// Reads a collection of variably sized dirents into a buffer.
3032    /// The number of dirents in a directory may be very large: akin to
3033    /// calling read multiple times on a file, directories have a seek
3034    /// offset which is updated on subsequent calls to ReadDirents.
3035    /// Each call to ReadDirents will only return whole dirent structures,
3036    /// they will not get split across ReadDirent calls. When the seek
3037    /// offset reaches the end, `dirents` will be empty.
3038    ///
3039    /// These dirents are of the form:
3040    /// ```
3041    /// struct dirent {
3042    ///   // Describes the inode of the entry.
3043    ///   uint64 ino;
3044    ///   // Describes the length of the dirent name in bytes.
3045    ///   uint8 size;
3046    ///   // Describes the type of the entry. Aligned with the
3047    ///   // POSIX d_type values. Use `DirentType` constants.
3048    ///   uint8 type;
3049    ///   // Unterminated name of entry.
3050    ///   char name[0];
3051    /// }
3052    /// ```
3053    ///
3054    /// This method does not require any rights, since one could always probe for
3055    /// directory contents by triggering name conflicts during file creation.
3056    ReadDirents {
3057        max_bytes: u64,
3058        responder: DirectoryReadDirentsResponder,
3059    },
3060    /// Resets the directory seek offset.
3061    ///
3062    /// This method does not require any rights, similar to ReadDirents.
3063    Rewind {
3064        responder: DirectoryRewindResponder,
3065    },
3066    /// Acquires a token to a Directory which can be used to identify access to it at a later point
3067    /// in time. The token will remain valid for as long as the connection requesting the token
3068    /// remains open.
3069    ///
3070    /// This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns
3071    /// `ZX_ERR_BAD_HANDLE`.
3072    GetToken {
3073        responder: DirectoryGetTokenResponder,
3074    },
3075    /// Creates a link to an object named src by the name dst, within a directory represented by
3076    /// token.
3077    ///
3078    /// `src` must be a resolved object name. Including "/" in the string will
3079    /// return `ZX_ERR_INVALID_ARGS`.
3080    ///
3081    /// `dst` must be a resolved object name. Including "/" in the string will
3082    /// return `ZX_ERR_INVALID_ARGS`.
3083    ///
3084    /// This method requires following rights: `OpenFlags.RIGHT_WRITABLE` and
3085    /// `OpenFlags.RIGHT_READABLE`, otherwise returns `ZX_ERR_BAD_HANDLE`.
3086    ///
3087    /// This will be atomic with respect to renaming or unlinking the source concurrently e.g. if
3088    /// there are two actors operating concurrently, and one actor performs a rename that affects
3089    /// the source within this directory, and the other does a link, each will appear to occur
3090    /// atomically in an unspecified order.
3091    Link {
3092        src: String,
3093        dst_parent_token: fdomain_client::Handle,
3094        dst: String,
3095        responder: DirectoryLinkResponder,
3096    },
3097    /// Removes a child node from the this directory's list of entries.
3098    ///
3099    /// Note: this does not guarantee that the underlying object is destroyed.
3100    /// Although the link will be removed from the containing directory,
3101    /// objects with multiple references (such as files which are still open)
3102    /// will not actually be destroyed until all references are closed.
3103    ///
3104    /// * error `ZX_ERR_ACCESS_DENIED` if the connection does not have
3105    ///   [`Rights.WRITE_BYTES`].
3106    /// * error `ZX_ERR_NOT_SUPPORTED` if the underlying filesystem does not
3107    ///   support writing.
3108    /// * error `ZX_ERR_BAD_PATH` if `name` is invalid.
3109    /// * error `ZX_ERR_NOT_EMPTY` if `name` refers to a non-empty directory.
3110    /// * error `ZX_ERR_UNAVAILABLE` if `name` refers to a mount point,
3111    ///   containing a remote channel.
3112    /// * error `ZX_ERR_NOT_DIR` if the options requested a directory but
3113    ///     something other than a directory was found.
3114    ///
3115    /// Other errors may be returned for filesystem-specific reasons.
3116    ///
3117    /// This method requires the following rights:
3118    ///
3119    /// * [`Rights.ENUMERATE`]
3120    /// * [`Rights.MODIFY_DIRECTORY`]
3121    Unlink {
3122        name: String,
3123        options: UnlinkOptions,
3124        responder: DirectoryUnlinkResponder,
3125    },
3126    /// Renames a node named `src` to the name `dst`, in a directory represented
3127    /// by `dst_parent_token`.
3128    ///
3129    /// `src` and `dst` must be valid node names.
3130    /// See [`Name`] for what constitutes a valid name.
3131    ///
3132    /// This method requires the following rights on both the current connection, and the connection
3133    /// identified by `dst_parent_token`:
3134    ///
3135    /// * [`Rights.ENUMERATE`]
3136    /// * [`Rights.MODIFY_DIRECTORY`]
3137    ///
3138    /// The following requirements are necessary to avoid rights escalations.
3139    ///
3140    /// If the source and destination directory differ, the source directory must also have the
3141    /// maximal set of abilities supported for files, which would typically be
3142    /// [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`], [`Rights.GET_ATTRIBUTES`] and
3143    /// [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also support the [`Rights.EXECUTE`]
3144    /// right.
3145    ///
3146    /// If `src` refers to a directory, and differs from the destination directory, then the source
3147    /// directory must have also have the [`Rights.CONNECT`] and [`Rights.TRAVERSE`] rights.
3148    ///
3149    /// * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.
3150    /// * error `ZX_ERR_ACCESS_DENIED` for insufficient rights.
3151    Rename {
3152        src: String,
3153        dst_parent_token: fdomain_client::Event,
3154        dst: String,
3155        responder: DirectoryRenameResponder,
3156    },
3157    /// Creates a symbolic link.
3158    ///
3159    /// `name` is the name to be given to the created symbolic link.
3160    /// `target` is the target of the symbolic link, which has no meaning on the server. The server
3161    /// will perform no validation of `target` except for a server chosen maximum length.
3162    /// `connection` is an optional server end of a channel that will speak the Symlink protocol
3163    /// on the successfully created node.
3164    ///
3165    /// * [`Rights.MODIFY_DIRECTORY`]
3166    ///
3167    /// * error `ZX_ERR_ALREADY_EXISTS` if `name` already exists.
3168    /// * error `ZX_ERR_BAD_PATH` if `target` exceeds the server length limit for symbolic links.
3169    /// * error `ZX_ERR_INVALID_ARGS` if `name` is not a valid [`Name`].
3170    /// * error `ZX_ERR_NOT_SUPPORTED` if creating symbolic links is not supported by the server.
3171    CreateSymlink {
3172        name: String,
3173        target: Vec<u8>,
3174        connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
3175        responder: DirectoryCreateSymlinkResponder,
3176    },
3177    /// Watches a directory, receiving events of added messages on the
3178    /// watcher request channel.
3179    ///
3180    /// Options must be zero; it is reserved.
3181    ///
3182    /// This method does not require any rights, similar to ReadDirents.
3183    Watch {
3184        mask: WatchMask,
3185        options: u32,
3186        watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
3187        responder: DirectoryWatchResponder,
3188    },
3189    /// An interaction was received which does not match any known method.
3190    #[non_exhaustive]
3191    _UnknownMethod {
3192        /// Ordinal of the method that was called.
3193        ordinal: u64,
3194        control_handle: DirectoryControlHandle,
3195        method_type: fidl::MethodType,
3196    },
3197}
3198
3199impl DirectoryRequest {
3200    #[allow(irrefutable_let_patterns)]
3201    pub fn into_advisory_lock(
3202        self,
3203    ) -> Option<(AdvisoryLockRequest, DirectoryAdvisoryLockResponder)> {
3204        if let DirectoryRequest::AdvisoryLock { request, responder } = self {
3205            Some((request, responder))
3206        } else {
3207            None
3208        }
3209    }
3210
3211    #[allow(irrefutable_let_patterns)]
3212    pub fn into_clone(
3213        self,
3214    ) -> Option<(
3215        fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
3216        DirectoryControlHandle,
3217    )> {
3218        if let DirectoryRequest::Clone { request, control_handle } = self {
3219            Some((request, control_handle))
3220        } else {
3221            None
3222        }
3223    }
3224
3225    #[allow(irrefutable_let_patterns)]
3226    pub fn into_close(self) -> Option<(DirectoryCloseResponder)> {
3227        if let DirectoryRequest::Close { responder } = self {
3228            Some((responder))
3229        } else {
3230            None
3231        }
3232    }
3233
3234    #[allow(irrefutable_let_patterns)]
3235    pub fn into_query(self) -> Option<(DirectoryQueryResponder)> {
3236        if let DirectoryRequest::Query { responder } = self {
3237            Some((responder))
3238        } else {
3239            None
3240        }
3241    }
3242
3243    #[allow(irrefutable_let_patterns)]
3244    pub fn into_deprecated_clone(
3245        self,
3246    ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, DirectoryControlHandle)>
3247    {
3248        if let DirectoryRequest::DeprecatedClone { flags, object, control_handle } = self {
3249            Some((flags, object, control_handle))
3250        } else {
3251            None
3252        }
3253    }
3254
3255    #[allow(irrefutable_let_patterns)]
3256    pub fn into_deprecated_get_attr(self) -> Option<(DirectoryDeprecatedGetAttrResponder)> {
3257        if let DirectoryRequest::DeprecatedGetAttr { responder } = self {
3258            Some((responder))
3259        } else {
3260            None
3261        }
3262    }
3263
3264    #[allow(irrefutable_let_patterns)]
3265    pub fn into_deprecated_set_attr(
3266        self,
3267    ) -> Option<(NodeAttributeFlags, NodeAttributes, DirectoryDeprecatedSetAttrResponder)> {
3268        if let DirectoryRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
3269            Some((flags, attributes, responder))
3270        } else {
3271            None
3272        }
3273    }
3274
3275    #[allow(irrefutable_let_patterns)]
3276    pub fn into_deprecated_get_flags(self) -> Option<(DirectoryDeprecatedGetFlagsResponder)> {
3277        if let DirectoryRequest::DeprecatedGetFlags { responder } = self {
3278            Some((responder))
3279        } else {
3280            None
3281        }
3282    }
3283
3284    #[allow(irrefutable_let_patterns)]
3285    pub fn into_deprecated_set_flags(
3286        self,
3287    ) -> Option<(OpenFlags, DirectoryDeprecatedSetFlagsResponder)> {
3288        if let DirectoryRequest::DeprecatedSetFlags { flags, responder } = self {
3289            Some((flags, responder))
3290        } else {
3291            None
3292        }
3293    }
3294
3295    #[allow(irrefutable_let_patterns)]
3296    pub fn into_get_flags(self) -> Option<(DirectoryGetFlagsResponder)> {
3297        if let DirectoryRequest::GetFlags { responder } = self {
3298            Some((responder))
3299        } else {
3300            None
3301        }
3302    }
3303
3304    #[allow(irrefutable_let_patterns)]
3305    pub fn into_set_flags(self) -> Option<(Flags, DirectorySetFlagsResponder)> {
3306        if let DirectoryRequest::SetFlags { flags, responder } = self {
3307            Some((flags, responder))
3308        } else {
3309            None
3310        }
3311    }
3312
3313    #[allow(irrefutable_let_patterns)]
3314    pub fn into_query_filesystem(self) -> Option<(DirectoryQueryFilesystemResponder)> {
3315        if let DirectoryRequest::QueryFilesystem { responder } = self {
3316            Some((responder))
3317        } else {
3318            None
3319        }
3320    }
3321
3322    #[allow(irrefutable_let_patterns)]
3323    pub fn into_get_attributes(
3324        self,
3325    ) -> Option<(NodeAttributesQuery, DirectoryGetAttributesResponder)> {
3326        if let DirectoryRequest::GetAttributes { query, responder } = self {
3327            Some((query, responder))
3328        } else {
3329            None
3330        }
3331    }
3332
3333    #[allow(irrefutable_let_patterns)]
3334    pub fn into_update_attributes(
3335        self,
3336    ) -> Option<(MutableNodeAttributes, DirectoryUpdateAttributesResponder)> {
3337        if let DirectoryRequest::UpdateAttributes { payload, responder } = self {
3338            Some((payload, responder))
3339        } else {
3340            None
3341        }
3342    }
3343
3344    #[allow(irrefutable_let_patterns)]
3345    pub fn into_sync(self) -> Option<(DirectorySyncResponder)> {
3346        if let DirectoryRequest::Sync { responder } = self {
3347            Some((responder))
3348        } else {
3349            None
3350        }
3351    }
3352
3353    #[allow(irrefutable_let_patterns)]
3354    pub fn into_list_extended_attributes(
3355        self,
3356    ) -> Option<(
3357        fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
3358        DirectoryControlHandle,
3359    )> {
3360        if let DirectoryRequest::ListExtendedAttributes { iterator, control_handle } = self {
3361            Some((iterator, control_handle))
3362        } else {
3363            None
3364        }
3365    }
3366
3367    #[allow(irrefutable_let_patterns)]
3368    pub fn into_get_extended_attribute(
3369        self,
3370    ) -> Option<(Vec<u8>, DirectoryGetExtendedAttributeResponder)> {
3371        if let DirectoryRequest::GetExtendedAttribute { name, responder } = self {
3372            Some((name, responder))
3373        } else {
3374            None
3375        }
3376    }
3377
3378    #[allow(irrefutable_let_patterns)]
3379    pub fn into_set_extended_attribute(
3380        self,
3381    ) -> Option<(
3382        Vec<u8>,
3383        ExtendedAttributeValue,
3384        SetExtendedAttributeMode,
3385        DirectorySetExtendedAttributeResponder,
3386    )> {
3387        if let DirectoryRequest::SetExtendedAttribute { name, value, mode, responder } = self {
3388            Some((name, value, mode, responder))
3389        } else {
3390            None
3391        }
3392    }
3393
3394    #[allow(irrefutable_let_patterns)]
3395    pub fn into_remove_extended_attribute(
3396        self,
3397    ) -> Option<(Vec<u8>, DirectoryRemoveExtendedAttributeResponder)> {
3398        if let DirectoryRequest::RemoveExtendedAttribute { name, responder } = self {
3399            Some((name, responder))
3400        } else {
3401            None
3402        }
3403    }
3404
3405    #[allow(irrefutable_let_patterns)]
3406    pub fn into_deprecated_open(
3407        self,
3408    ) -> Option<(
3409        OpenFlags,
3410        ModeType,
3411        String,
3412        fdomain_client::fidl::ServerEnd<NodeMarker>,
3413        DirectoryControlHandle,
3414    )> {
3415        if let DirectoryRequest::DeprecatedOpen { flags, mode, path, object, control_handle } = self
3416        {
3417            Some((flags, mode, path, object, control_handle))
3418        } else {
3419            None
3420        }
3421    }
3422
3423    #[allow(irrefutable_let_patterns)]
3424    pub fn into_open(
3425        self,
3426    ) -> Option<(String, Flags, Options, fdomain_client::Channel, DirectoryControlHandle)> {
3427        if let DirectoryRequest::Open { path, flags, options, object, control_handle } = self {
3428            Some((path, flags, options, object, control_handle))
3429        } else {
3430            None
3431        }
3432    }
3433
3434    #[allow(irrefutable_let_patterns)]
3435    pub fn into_read_dirents(self) -> Option<(u64, DirectoryReadDirentsResponder)> {
3436        if let DirectoryRequest::ReadDirents { max_bytes, responder } = self {
3437            Some((max_bytes, responder))
3438        } else {
3439            None
3440        }
3441    }
3442
3443    #[allow(irrefutable_let_patterns)]
3444    pub fn into_rewind(self) -> Option<(DirectoryRewindResponder)> {
3445        if let DirectoryRequest::Rewind { responder } = self {
3446            Some((responder))
3447        } else {
3448            None
3449        }
3450    }
3451
3452    #[allow(irrefutable_let_patterns)]
3453    pub fn into_get_token(self) -> Option<(DirectoryGetTokenResponder)> {
3454        if let DirectoryRequest::GetToken { responder } = self {
3455            Some((responder))
3456        } else {
3457            None
3458        }
3459    }
3460
3461    #[allow(irrefutable_let_patterns)]
3462    pub fn into_link(
3463        self,
3464    ) -> Option<(String, fdomain_client::Handle, String, DirectoryLinkResponder)> {
3465        if let DirectoryRequest::Link { src, dst_parent_token, dst, responder } = self {
3466            Some((src, dst_parent_token, dst, responder))
3467        } else {
3468            None
3469        }
3470    }
3471
3472    #[allow(irrefutable_let_patterns)]
3473    pub fn into_unlink(self) -> Option<(String, UnlinkOptions, DirectoryUnlinkResponder)> {
3474        if let DirectoryRequest::Unlink { name, options, responder } = self {
3475            Some((name, options, responder))
3476        } else {
3477            None
3478        }
3479    }
3480
3481    #[allow(irrefutable_let_patterns)]
3482    pub fn into_rename(
3483        self,
3484    ) -> Option<(String, fdomain_client::Event, String, DirectoryRenameResponder)> {
3485        if let DirectoryRequest::Rename { src, dst_parent_token, dst, responder } = self {
3486            Some((src, dst_parent_token, dst, responder))
3487        } else {
3488            None
3489        }
3490    }
3491
3492    #[allow(irrefutable_let_patterns)]
3493    pub fn into_create_symlink(
3494        self,
3495    ) -> Option<(
3496        String,
3497        Vec<u8>,
3498        Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
3499        DirectoryCreateSymlinkResponder,
3500    )> {
3501        if let DirectoryRequest::CreateSymlink { name, target, connection, responder } = self {
3502            Some((name, target, connection, responder))
3503        } else {
3504            None
3505        }
3506    }
3507
3508    #[allow(irrefutable_let_patterns)]
3509    pub fn into_watch(
3510        self,
3511    ) -> Option<(
3512        WatchMask,
3513        u32,
3514        fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
3515        DirectoryWatchResponder,
3516    )> {
3517        if let DirectoryRequest::Watch { mask, options, watcher, responder } = self {
3518            Some((mask, options, watcher, responder))
3519        } else {
3520            None
3521        }
3522    }
3523
3524    /// Name of the method defined in FIDL
3525    pub fn method_name(&self) -> &'static str {
3526        match *self {
3527            DirectoryRequest::AdvisoryLock { .. } => "advisory_lock",
3528            DirectoryRequest::Clone { .. } => "clone",
3529            DirectoryRequest::Close { .. } => "close",
3530            DirectoryRequest::Query { .. } => "query",
3531            DirectoryRequest::DeprecatedClone { .. } => "deprecated_clone",
3532            DirectoryRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
3533            DirectoryRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
3534            DirectoryRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
3535            DirectoryRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
3536            DirectoryRequest::GetFlags { .. } => "get_flags",
3537            DirectoryRequest::SetFlags { .. } => "set_flags",
3538            DirectoryRequest::QueryFilesystem { .. } => "query_filesystem",
3539            DirectoryRequest::GetAttributes { .. } => "get_attributes",
3540            DirectoryRequest::UpdateAttributes { .. } => "update_attributes",
3541            DirectoryRequest::Sync { .. } => "sync",
3542            DirectoryRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
3543            DirectoryRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
3544            DirectoryRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
3545            DirectoryRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
3546            DirectoryRequest::DeprecatedOpen { .. } => "deprecated_open",
3547            DirectoryRequest::Open { .. } => "open",
3548            DirectoryRequest::ReadDirents { .. } => "read_dirents",
3549            DirectoryRequest::Rewind { .. } => "rewind",
3550            DirectoryRequest::GetToken { .. } => "get_token",
3551            DirectoryRequest::Link { .. } => "link",
3552            DirectoryRequest::Unlink { .. } => "unlink",
3553            DirectoryRequest::Rename { .. } => "rename",
3554            DirectoryRequest::CreateSymlink { .. } => "create_symlink",
3555            DirectoryRequest::Watch { .. } => "watch",
3556            DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
3557                "unknown one-way method"
3558            }
3559            DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
3560                "unknown two-way method"
3561            }
3562        }
3563    }
3564}
3565
3566#[derive(Debug, Clone)]
3567pub struct DirectoryControlHandle {
3568    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3569}
3570
3571impl fdomain_client::fidl::ControlHandle for DirectoryControlHandle {
3572    fn shutdown(&self) {
3573        self.inner.shutdown()
3574    }
3575
3576    fn is_closed(&self) -> bool {
3577        self.inner.channel().is_closed()
3578    }
3579    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
3580        self.inner.channel().on_closed()
3581    }
3582}
3583
3584impl DirectoryControlHandle {
3585    pub fn send_on_open_(
3586        &self,
3587        mut s: i32,
3588        mut info: Option<NodeInfoDeprecated>,
3589    ) -> Result<(), fidl::Error> {
3590        self.inner.send::<NodeOnOpenRequest>(
3591            (s, info.as_mut()),
3592            0,
3593            0x7fc7bbb1dbfd1972,
3594            fidl::encoding::DynamicFlags::empty(),
3595        )
3596    }
3597
3598    pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
3599        self.inner.send::<Representation>(
3600            &mut payload,
3601            0,
3602            0x5cb40567d80a510c,
3603            fidl::encoding::DynamicFlags::empty(),
3604        )
3605    }
3606}
3607
3608#[must_use = "FIDL methods require a response to be sent"]
3609#[derive(Debug)]
3610pub struct DirectoryAdvisoryLockResponder {
3611    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3612    tx_id: u32,
3613}
3614
3615/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
3616/// if the responder is dropped without sending a response, so that the client
3617/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3618impl std::ops::Drop for DirectoryAdvisoryLockResponder {
3619    fn drop(&mut self) {
3620        self.control_handle.shutdown();
3621        // Safety: drops once, never accessed again
3622        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3623    }
3624}
3625
3626impl fdomain_client::fidl::Responder for DirectoryAdvisoryLockResponder {
3627    type ControlHandle = DirectoryControlHandle;
3628
3629    fn control_handle(&self) -> &DirectoryControlHandle {
3630        &self.control_handle
3631    }
3632
3633    fn drop_without_shutdown(mut self) {
3634        // Safety: drops once, never accessed again due to mem::forget
3635        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3636        // Prevent Drop from running (which would shut down the channel)
3637        std::mem::forget(self);
3638    }
3639}
3640
3641impl DirectoryAdvisoryLockResponder {
3642    /// Sends a response to the FIDL transaction.
3643    ///
3644    /// Sets the channel to shutdown if an error occurs.
3645    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3646        let _result = self.send_raw(result);
3647        if _result.is_err() {
3648            self.control_handle.shutdown();
3649        }
3650        self.drop_without_shutdown();
3651        _result
3652    }
3653
3654    /// Similar to "send" but does not shutdown the channel if an error occurs.
3655    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3656        let _result = self.send_raw(result);
3657        self.drop_without_shutdown();
3658        _result
3659    }
3660
3661    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3662        self.control_handle
3663            .inner
3664            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3665                result,
3666                self.tx_id,
3667                0x6ee9c0ad53ec87aa,
3668                fidl::encoding::DynamicFlags::empty(),
3669            )
3670    }
3671}
3672
3673#[must_use = "FIDL methods require a response to be sent"]
3674#[derive(Debug)]
3675pub struct DirectoryCloseResponder {
3676    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3677    tx_id: u32,
3678}
3679
3680/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
3681/// if the responder is dropped without sending a response, so that the client
3682/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3683impl std::ops::Drop for DirectoryCloseResponder {
3684    fn drop(&mut self) {
3685        self.control_handle.shutdown();
3686        // Safety: drops once, never accessed again
3687        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3688    }
3689}
3690
3691impl fdomain_client::fidl::Responder for DirectoryCloseResponder {
3692    type ControlHandle = DirectoryControlHandle;
3693
3694    fn control_handle(&self) -> &DirectoryControlHandle {
3695        &self.control_handle
3696    }
3697
3698    fn drop_without_shutdown(mut self) {
3699        // Safety: drops once, never accessed again due to mem::forget
3700        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3701        // Prevent Drop from running (which would shut down the channel)
3702        std::mem::forget(self);
3703    }
3704}
3705
3706impl DirectoryCloseResponder {
3707    /// Sends a response to the FIDL transaction.
3708    ///
3709    /// Sets the channel to shutdown if an error occurs.
3710    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3711        let _result = self.send_raw(result);
3712        if _result.is_err() {
3713            self.control_handle.shutdown();
3714        }
3715        self.drop_without_shutdown();
3716        _result
3717    }
3718
3719    /// Similar to "send" but does not shutdown the channel if an error occurs.
3720    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3721        let _result = self.send_raw(result);
3722        self.drop_without_shutdown();
3723        _result
3724    }
3725
3726    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3727        self.control_handle
3728            .inner
3729            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3730                result,
3731                self.tx_id,
3732                0x5ac5d459ad7f657e,
3733                fidl::encoding::DynamicFlags::empty(),
3734            )
3735    }
3736}
3737
3738#[must_use = "FIDL methods require a response to be sent"]
3739#[derive(Debug)]
3740pub struct DirectoryQueryResponder {
3741    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3742    tx_id: u32,
3743}
3744
3745/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
3746/// if the responder is dropped without sending a response, so that the client
3747/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3748impl std::ops::Drop for DirectoryQueryResponder {
3749    fn drop(&mut self) {
3750        self.control_handle.shutdown();
3751        // Safety: drops once, never accessed again
3752        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3753    }
3754}
3755
3756impl fdomain_client::fidl::Responder for DirectoryQueryResponder {
3757    type ControlHandle = DirectoryControlHandle;
3758
3759    fn control_handle(&self) -> &DirectoryControlHandle {
3760        &self.control_handle
3761    }
3762
3763    fn drop_without_shutdown(mut self) {
3764        // Safety: drops once, never accessed again due to mem::forget
3765        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3766        // Prevent Drop from running (which would shut down the channel)
3767        std::mem::forget(self);
3768    }
3769}
3770
3771impl DirectoryQueryResponder {
3772    /// Sends a response to the FIDL transaction.
3773    ///
3774    /// Sets the channel to shutdown if an error occurs.
3775    pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3776        let _result = self.send_raw(protocol);
3777        if _result.is_err() {
3778            self.control_handle.shutdown();
3779        }
3780        self.drop_without_shutdown();
3781        _result
3782    }
3783
3784    /// Similar to "send" but does not shutdown the channel if an error occurs.
3785    pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3786        let _result = self.send_raw(protocol);
3787        self.drop_without_shutdown();
3788        _result
3789    }
3790
3791    fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3792        self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
3793            (protocol,),
3794            self.tx_id,
3795            0x2658edee9decfc06,
3796            fidl::encoding::DynamicFlags::empty(),
3797        )
3798    }
3799}
3800
3801#[must_use = "FIDL methods require a response to be sent"]
3802#[derive(Debug)]
3803pub struct DirectoryDeprecatedGetAttrResponder {
3804    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3805    tx_id: u32,
3806}
3807
3808/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
3809/// if the responder is dropped without sending a response, so that the client
3810/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3811impl std::ops::Drop for DirectoryDeprecatedGetAttrResponder {
3812    fn drop(&mut self) {
3813        self.control_handle.shutdown();
3814        // Safety: drops once, never accessed again
3815        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3816    }
3817}
3818
3819impl fdomain_client::fidl::Responder for DirectoryDeprecatedGetAttrResponder {
3820    type ControlHandle = DirectoryControlHandle;
3821
3822    fn control_handle(&self) -> &DirectoryControlHandle {
3823        &self.control_handle
3824    }
3825
3826    fn drop_without_shutdown(mut self) {
3827        // Safety: drops once, never accessed again due to mem::forget
3828        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3829        // Prevent Drop from running (which would shut down the channel)
3830        std::mem::forget(self);
3831    }
3832}
3833
3834impl DirectoryDeprecatedGetAttrResponder {
3835    /// Sends a response to the FIDL transaction.
3836    ///
3837    /// Sets the channel to shutdown if an error occurs.
3838    pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
3839        let _result = self.send_raw(s, attributes);
3840        if _result.is_err() {
3841            self.control_handle.shutdown();
3842        }
3843        self.drop_without_shutdown();
3844        _result
3845    }
3846
3847    /// Similar to "send" but does not shutdown the channel if an error occurs.
3848    pub fn send_no_shutdown_on_err(
3849        self,
3850        mut s: i32,
3851        mut attributes: &NodeAttributes,
3852    ) -> Result<(), fidl::Error> {
3853        let _result = self.send_raw(s, attributes);
3854        self.drop_without_shutdown();
3855        _result
3856    }
3857
3858    fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
3859        self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
3860            (s, attributes),
3861            self.tx_id,
3862            0x78985e216314dafd,
3863            fidl::encoding::DynamicFlags::empty(),
3864        )
3865    }
3866}
3867
3868#[must_use = "FIDL methods require a response to be sent"]
3869#[derive(Debug)]
3870pub struct DirectoryDeprecatedSetAttrResponder {
3871    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3872    tx_id: u32,
3873}
3874
3875/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
3876/// if the responder is dropped without sending a response, so that the client
3877/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3878impl std::ops::Drop for DirectoryDeprecatedSetAttrResponder {
3879    fn drop(&mut self) {
3880        self.control_handle.shutdown();
3881        // Safety: drops once, never accessed again
3882        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3883    }
3884}
3885
3886impl fdomain_client::fidl::Responder for DirectoryDeprecatedSetAttrResponder {
3887    type ControlHandle = DirectoryControlHandle;
3888
3889    fn control_handle(&self) -> &DirectoryControlHandle {
3890        &self.control_handle
3891    }
3892
3893    fn drop_without_shutdown(mut self) {
3894        // Safety: drops once, never accessed again due to mem::forget
3895        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3896        // Prevent Drop from running (which would shut down the channel)
3897        std::mem::forget(self);
3898    }
3899}
3900
3901impl DirectoryDeprecatedSetAttrResponder {
3902    /// Sends a response to the FIDL transaction.
3903    ///
3904    /// Sets the channel to shutdown if an error occurs.
3905    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
3906        let _result = self.send_raw(s);
3907        if _result.is_err() {
3908            self.control_handle.shutdown();
3909        }
3910        self.drop_without_shutdown();
3911        _result
3912    }
3913
3914    /// Similar to "send" but does not shutdown the channel if an error occurs.
3915    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
3916        let _result = self.send_raw(s);
3917        self.drop_without_shutdown();
3918        _result
3919    }
3920
3921    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
3922        self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
3923            (s,),
3924            self.tx_id,
3925            0x4186c0f40d938f46,
3926            fidl::encoding::DynamicFlags::empty(),
3927        )
3928    }
3929}
3930
3931#[must_use = "FIDL methods require a response to be sent"]
3932#[derive(Debug)]
3933pub struct DirectoryDeprecatedGetFlagsResponder {
3934    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3935    tx_id: u32,
3936}
3937
3938/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
3939/// if the responder is dropped without sending a response, so that the client
3940/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3941impl std::ops::Drop for DirectoryDeprecatedGetFlagsResponder {
3942    fn drop(&mut self) {
3943        self.control_handle.shutdown();
3944        // Safety: drops once, never accessed again
3945        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3946    }
3947}
3948
3949impl fdomain_client::fidl::Responder for DirectoryDeprecatedGetFlagsResponder {
3950    type ControlHandle = DirectoryControlHandle;
3951
3952    fn control_handle(&self) -> &DirectoryControlHandle {
3953        &self.control_handle
3954    }
3955
3956    fn drop_without_shutdown(mut self) {
3957        // Safety: drops once, never accessed again due to mem::forget
3958        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3959        // Prevent Drop from running (which would shut down the channel)
3960        std::mem::forget(self);
3961    }
3962}
3963
3964impl DirectoryDeprecatedGetFlagsResponder {
3965    /// Sends a response to the FIDL transaction.
3966    ///
3967    /// Sets the channel to shutdown if an error occurs.
3968    pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
3969        let _result = self.send_raw(s, flags);
3970        if _result.is_err() {
3971            self.control_handle.shutdown();
3972        }
3973        self.drop_without_shutdown();
3974        _result
3975    }
3976
3977    /// Similar to "send" but does not shutdown the channel if an error occurs.
3978    pub fn send_no_shutdown_on_err(
3979        self,
3980        mut s: i32,
3981        mut flags: OpenFlags,
3982    ) -> Result<(), fidl::Error> {
3983        let _result = self.send_raw(s, flags);
3984        self.drop_without_shutdown();
3985        _result
3986    }
3987
3988    fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
3989        self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
3990            (s, flags),
3991            self.tx_id,
3992            0x5b88fffb8eda3aa1,
3993            fidl::encoding::DynamicFlags::empty(),
3994        )
3995    }
3996}
3997
3998#[must_use = "FIDL methods require a response to be sent"]
3999#[derive(Debug)]
4000pub struct DirectoryDeprecatedSetFlagsResponder {
4001    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4002    tx_id: u32,
4003}
4004
4005/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4006/// if the responder is dropped without sending a response, so that the client
4007/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4008impl std::ops::Drop for DirectoryDeprecatedSetFlagsResponder {
4009    fn drop(&mut self) {
4010        self.control_handle.shutdown();
4011        // Safety: drops once, never accessed again
4012        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4013    }
4014}
4015
4016impl fdomain_client::fidl::Responder for DirectoryDeprecatedSetFlagsResponder {
4017    type ControlHandle = DirectoryControlHandle;
4018
4019    fn control_handle(&self) -> &DirectoryControlHandle {
4020        &self.control_handle
4021    }
4022
4023    fn drop_without_shutdown(mut self) {
4024        // Safety: drops once, never accessed again due to mem::forget
4025        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4026        // Prevent Drop from running (which would shut down the channel)
4027        std::mem::forget(self);
4028    }
4029}
4030
4031impl DirectoryDeprecatedSetFlagsResponder {
4032    /// Sends a response to the FIDL transaction.
4033    ///
4034    /// Sets the channel to shutdown if an error occurs.
4035    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4036        let _result = self.send_raw(s);
4037        if _result.is_err() {
4038            self.control_handle.shutdown();
4039        }
4040        self.drop_without_shutdown();
4041        _result
4042    }
4043
4044    /// Similar to "send" but does not shutdown the channel if an error occurs.
4045    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4046        let _result = self.send_raw(s);
4047        self.drop_without_shutdown();
4048        _result
4049    }
4050
4051    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4052        self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
4053            (s,),
4054            self.tx_id,
4055            0x5295b76c71fde733,
4056            fidl::encoding::DynamicFlags::empty(),
4057        )
4058    }
4059}
4060
4061#[must_use = "FIDL methods require a response to be sent"]
4062#[derive(Debug)]
4063pub struct DirectoryGetFlagsResponder {
4064    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4065    tx_id: u32,
4066}
4067
4068/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4069/// if the responder is dropped without sending a response, so that the client
4070/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4071impl std::ops::Drop for DirectoryGetFlagsResponder {
4072    fn drop(&mut self) {
4073        self.control_handle.shutdown();
4074        // Safety: drops once, never accessed again
4075        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4076    }
4077}
4078
4079impl fdomain_client::fidl::Responder for DirectoryGetFlagsResponder {
4080    type ControlHandle = DirectoryControlHandle;
4081
4082    fn control_handle(&self) -> &DirectoryControlHandle {
4083        &self.control_handle
4084    }
4085
4086    fn drop_without_shutdown(mut self) {
4087        // Safety: drops once, never accessed again due to mem::forget
4088        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4089        // Prevent Drop from running (which would shut down the channel)
4090        std::mem::forget(self);
4091    }
4092}
4093
4094impl DirectoryGetFlagsResponder {
4095    /// Sends a response to the FIDL transaction.
4096    ///
4097    /// Sets the channel to shutdown if an error occurs.
4098    pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4099        let _result = self.send_raw(result);
4100        if _result.is_err() {
4101            self.control_handle.shutdown();
4102        }
4103        self.drop_without_shutdown();
4104        _result
4105    }
4106
4107    /// Similar to "send" but does not shutdown the channel if an error occurs.
4108    pub fn send_no_shutdown_on_err(
4109        self,
4110        mut result: Result<Flags, i32>,
4111    ) -> Result<(), fidl::Error> {
4112        let _result = self.send_raw(result);
4113        self.drop_without_shutdown();
4114        _result
4115    }
4116
4117    fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4118        self.control_handle
4119            .inner
4120            .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
4121                fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
4122                self.tx_id,
4123                0x176eb318f64ec23,
4124                fidl::encoding::DynamicFlags::FLEXIBLE,
4125            )
4126    }
4127}
4128
4129#[must_use = "FIDL methods require a response to be sent"]
4130#[derive(Debug)]
4131pub struct DirectorySetFlagsResponder {
4132    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4133    tx_id: u32,
4134}
4135
4136/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4137/// if the responder is dropped without sending a response, so that the client
4138/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4139impl std::ops::Drop for DirectorySetFlagsResponder {
4140    fn drop(&mut self) {
4141        self.control_handle.shutdown();
4142        // Safety: drops once, never accessed again
4143        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4144    }
4145}
4146
4147impl fdomain_client::fidl::Responder for DirectorySetFlagsResponder {
4148    type ControlHandle = DirectoryControlHandle;
4149
4150    fn control_handle(&self) -> &DirectoryControlHandle {
4151        &self.control_handle
4152    }
4153
4154    fn drop_without_shutdown(mut self) {
4155        // Safety: drops once, never accessed again due to mem::forget
4156        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4157        // Prevent Drop from running (which would shut down the channel)
4158        std::mem::forget(self);
4159    }
4160}
4161
4162impl DirectorySetFlagsResponder {
4163    /// Sends a response to the FIDL transaction.
4164    ///
4165    /// Sets the channel to shutdown if an error occurs.
4166    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4167        let _result = self.send_raw(result);
4168        if _result.is_err() {
4169            self.control_handle.shutdown();
4170        }
4171        self.drop_without_shutdown();
4172        _result
4173    }
4174
4175    /// Similar to "send" but does not shutdown the channel if an error occurs.
4176    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4177        let _result = self.send_raw(result);
4178        self.drop_without_shutdown();
4179        _result
4180    }
4181
4182    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4183        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4184            fidl::encoding::EmptyStruct,
4185            i32,
4186        >>(
4187            fidl::encoding::FlexibleResult::new(result),
4188            self.tx_id,
4189            0x55a8028685791ea8,
4190            fidl::encoding::DynamicFlags::FLEXIBLE,
4191        )
4192    }
4193}
4194
4195#[must_use = "FIDL methods require a response to be sent"]
4196#[derive(Debug)]
4197pub struct DirectoryQueryFilesystemResponder {
4198    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4199    tx_id: u32,
4200}
4201
4202/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4203/// if the responder is dropped without sending a response, so that the client
4204/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4205impl std::ops::Drop for DirectoryQueryFilesystemResponder {
4206    fn drop(&mut self) {
4207        self.control_handle.shutdown();
4208        // Safety: drops once, never accessed again
4209        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4210    }
4211}
4212
4213impl fdomain_client::fidl::Responder for DirectoryQueryFilesystemResponder {
4214    type ControlHandle = DirectoryControlHandle;
4215
4216    fn control_handle(&self) -> &DirectoryControlHandle {
4217        &self.control_handle
4218    }
4219
4220    fn drop_without_shutdown(mut self) {
4221        // Safety: drops once, never accessed again due to mem::forget
4222        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4223        // Prevent Drop from running (which would shut down the channel)
4224        std::mem::forget(self);
4225    }
4226}
4227
4228impl DirectoryQueryFilesystemResponder {
4229    /// Sends a response to the FIDL transaction.
4230    ///
4231    /// Sets the channel to shutdown if an error occurs.
4232    pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
4233        let _result = self.send_raw(s, info);
4234        if _result.is_err() {
4235            self.control_handle.shutdown();
4236        }
4237        self.drop_without_shutdown();
4238        _result
4239    }
4240
4241    /// Similar to "send" but does not shutdown the channel if an error occurs.
4242    pub fn send_no_shutdown_on_err(
4243        self,
4244        mut s: i32,
4245        mut info: Option<&FilesystemInfo>,
4246    ) -> Result<(), fidl::Error> {
4247        let _result = self.send_raw(s, info);
4248        self.drop_without_shutdown();
4249        _result
4250    }
4251
4252    fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
4253        self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
4254            (s, info),
4255            self.tx_id,
4256            0x6f344a1c6b0a0610,
4257            fidl::encoding::DynamicFlags::empty(),
4258        )
4259    }
4260}
4261
4262#[must_use = "FIDL methods require a response to be sent"]
4263#[derive(Debug)]
4264pub struct DirectoryGetAttributesResponder {
4265    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4266    tx_id: u32,
4267}
4268
4269/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4270/// if the responder is dropped without sending a response, so that the client
4271/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4272impl std::ops::Drop for DirectoryGetAttributesResponder {
4273    fn drop(&mut self) {
4274        self.control_handle.shutdown();
4275        // Safety: drops once, never accessed again
4276        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4277    }
4278}
4279
4280impl fdomain_client::fidl::Responder for DirectoryGetAttributesResponder {
4281    type ControlHandle = DirectoryControlHandle;
4282
4283    fn control_handle(&self) -> &DirectoryControlHandle {
4284        &self.control_handle
4285    }
4286
4287    fn drop_without_shutdown(mut self) {
4288        // Safety: drops once, never accessed again due to mem::forget
4289        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4290        // Prevent Drop from running (which would shut down the channel)
4291        std::mem::forget(self);
4292    }
4293}
4294
4295impl DirectoryGetAttributesResponder {
4296    /// Sends a response to the FIDL transaction.
4297    ///
4298    /// Sets the channel to shutdown if an error occurs.
4299    pub fn send(
4300        self,
4301        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4302    ) -> Result<(), fidl::Error> {
4303        let _result = self.send_raw(result);
4304        if _result.is_err() {
4305            self.control_handle.shutdown();
4306        }
4307        self.drop_without_shutdown();
4308        _result
4309    }
4310
4311    /// Similar to "send" but does not shutdown the channel if an error occurs.
4312    pub fn send_no_shutdown_on_err(
4313        self,
4314        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4315    ) -> Result<(), fidl::Error> {
4316        let _result = self.send_raw(result);
4317        self.drop_without_shutdown();
4318        _result
4319    }
4320
4321    fn send_raw(
4322        &self,
4323        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4324    ) -> Result<(), fidl::Error> {
4325        self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
4326            result,
4327            self.tx_id,
4328            0x3d4396a638ea053b,
4329            fidl::encoding::DynamicFlags::empty(),
4330        )
4331    }
4332}
4333
4334#[must_use = "FIDL methods require a response to be sent"]
4335#[derive(Debug)]
4336pub struct DirectoryUpdateAttributesResponder {
4337    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4338    tx_id: u32,
4339}
4340
4341/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4342/// if the responder is dropped without sending a response, so that the client
4343/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4344impl std::ops::Drop for DirectoryUpdateAttributesResponder {
4345    fn drop(&mut self) {
4346        self.control_handle.shutdown();
4347        // Safety: drops once, never accessed again
4348        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4349    }
4350}
4351
4352impl fdomain_client::fidl::Responder for DirectoryUpdateAttributesResponder {
4353    type ControlHandle = DirectoryControlHandle;
4354
4355    fn control_handle(&self) -> &DirectoryControlHandle {
4356        &self.control_handle
4357    }
4358
4359    fn drop_without_shutdown(mut self) {
4360        // Safety: drops once, never accessed again due to mem::forget
4361        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4362        // Prevent Drop from running (which would shut down the channel)
4363        std::mem::forget(self);
4364    }
4365}
4366
4367impl DirectoryUpdateAttributesResponder {
4368    /// Sends a response to the FIDL transaction.
4369    ///
4370    /// Sets the channel to shutdown if an error occurs.
4371    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4372        let _result = self.send_raw(result);
4373        if _result.is_err() {
4374            self.control_handle.shutdown();
4375        }
4376        self.drop_without_shutdown();
4377        _result
4378    }
4379
4380    /// Similar to "send" but does not shutdown the channel if an error occurs.
4381    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4382        let _result = self.send_raw(result);
4383        self.drop_without_shutdown();
4384        _result
4385    }
4386
4387    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4388        self.control_handle
4389            .inner
4390            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4391                result,
4392                self.tx_id,
4393                0x3308c1da5a89bf08,
4394                fidl::encoding::DynamicFlags::empty(),
4395            )
4396    }
4397}
4398
4399#[must_use = "FIDL methods require a response to be sent"]
4400#[derive(Debug)]
4401pub struct DirectorySyncResponder {
4402    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4403    tx_id: u32,
4404}
4405
4406/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4407/// if the responder is dropped without sending a response, so that the client
4408/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4409impl std::ops::Drop for DirectorySyncResponder {
4410    fn drop(&mut self) {
4411        self.control_handle.shutdown();
4412        // Safety: drops once, never accessed again
4413        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4414    }
4415}
4416
4417impl fdomain_client::fidl::Responder for DirectorySyncResponder {
4418    type ControlHandle = DirectoryControlHandle;
4419
4420    fn control_handle(&self) -> &DirectoryControlHandle {
4421        &self.control_handle
4422    }
4423
4424    fn drop_without_shutdown(mut self) {
4425        // Safety: drops once, never accessed again due to mem::forget
4426        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4427        // Prevent Drop from running (which would shut down the channel)
4428        std::mem::forget(self);
4429    }
4430}
4431
4432impl DirectorySyncResponder {
4433    /// Sends a response to the FIDL transaction.
4434    ///
4435    /// Sets the channel to shutdown if an error occurs.
4436    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4437        let _result = self.send_raw(result);
4438        if _result.is_err() {
4439            self.control_handle.shutdown();
4440        }
4441        self.drop_without_shutdown();
4442        _result
4443    }
4444
4445    /// Similar to "send" but does not shutdown the channel if an error occurs.
4446    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4447        let _result = self.send_raw(result);
4448        self.drop_without_shutdown();
4449        _result
4450    }
4451
4452    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4453        self.control_handle
4454            .inner
4455            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4456                result,
4457                self.tx_id,
4458                0x2c5c27ca0ab5dc49,
4459                fidl::encoding::DynamicFlags::empty(),
4460            )
4461    }
4462}
4463
4464#[must_use = "FIDL methods require a response to be sent"]
4465#[derive(Debug)]
4466pub struct DirectoryGetExtendedAttributeResponder {
4467    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4468    tx_id: u32,
4469}
4470
4471/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4472/// if the responder is dropped without sending a response, so that the client
4473/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4474impl std::ops::Drop for DirectoryGetExtendedAttributeResponder {
4475    fn drop(&mut self) {
4476        self.control_handle.shutdown();
4477        // Safety: drops once, never accessed again
4478        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4479    }
4480}
4481
4482impl fdomain_client::fidl::Responder for DirectoryGetExtendedAttributeResponder {
4483    type ControlHandle = DirectoryControlHandle;
4484
4485    fn control_handle(&self) -> &DirectoryControlHandle {
4486        &self.control_handle
4487    }
4488
4489    fn drop_without_shutdown(mut self) {
4490        // Safety: drops once, never accessed again due to mem::forget
4491        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4492        // Prevent Drop from running (which would shut down the channel)
4493        std::mem::forget(self);
4494    }
4495}
4496
4497impl DirectoryGetExtendedAttributeResponder {
4498    /// Sends a response to the FIDL transaction.
4499    ///
4500    /// Sets the channel to shutdown if an error occurs.
4501    pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
4502        let _result = self.send_raw(result);
4503        if _result.is_err() {
4504            self.control_handle.shutdown();
4505        }
4506        self.drop_without_shutdown();
4507        _result
4508    }
4509
4510    /// Similar to "send" but does not shutdown the channel if an error occurs.
4511    pub fn send_no_shutdown_on_err(
4512        self,
4513        mut result: Result<ExtendedAttributeValue, i32>,
4514    ) -> Result<(), fidl::Error> {
4515        let _result = self.send_raw(result);
4516        self.drop_without_shutdown();
4517        _result
4518    }
4519
4520    fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
4521        self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
4522            result.as_mut().map_err(|e| *e),
4523            self.tx_id,
4524            0x45ffa3ccfdeb76db,
4525            fidl::encoding::DynamicFlags::empty(),
4526        )
4527    }
4528}
4529
4530#[must_use = "FIDL methods require a response to be sent"]
4531#[derive(Debug)]
4532pub struct DirectorySetExtendedAttributeResponder {
4533    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4534    tx_id: u32,
4535}
4536
4537/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4538/// if the responder is dropped without sending a response, so that the client
4539/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4540impl std::ops::Drop for DirectorySetExtendedAttributeResponder {
4541    fn drop(&mut self) {
4542        self.control_handle.shutdown();
4543        // Safety: drops once, never accessed again
4544        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4545    }
4546}
4547
4548impl fdomain_client::fidl::Responder for DirectorySetExtendedAttributeResponder {
4549    type ControlHandle = DirectoryControlHandle;
4550
4551    fn control_handle(&self) -> &DirectoryControlHandle {
4552        &self.control_handle
4553    }
4554
4555    fn drop_without_shutdown(mut self) {
4556        // Safety: drops once, never accessed again due to mem::forget
4557        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4558        // Prevent Drop from running (which would shut down the channel)
4559        std::mem::forget(self);
4560    }
4561}
4562
4563impl DirectorySetExtendedAttributeResponder {
4564    /// Sends a response to the FIDL transaction.
4565    ///
4566    /// Sets the channel to shutdown if an error occurs.
4567    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4568        let _result = self.send_raw(result);
4569        if _result.is_err() {
4570            self.control_handle.shutdown();
4571        }
4572        self.drop_without_shutdown();
4573        _result
4574    }
4575
4576    /// Similar to "send" but does not shutdown the channel if an error occurs.
4577    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4578        let _result = self.send_raw(result);
4579        self.drop_without_shutdown();
4580        _result
4581    }
4582
4583    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4584        self.control_handle
4585            .inner
4586            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4587                result,
4588                self.tx_id,
4589                0x4a951362f681f23c,
4590                fidl::encoding::DynamicFlags::empty(),
4591            )
4592    }
4593}
4594
4595#[must_use = "FIDL methods require a response to be sent"]
4596#[derive(Debug)]
4597pub struct DirectoryRemoveExtendedAttributeResponder {
4598    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4599    tx_id: u32,
4600}
4601
4602/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4603/// if the responder is dropped without sending a response, so that the client
4604/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4605impl std::ops::Drop for DirectoryRemoveExtendedAttributeResponder {
4606    fn drop(&mut self) {
4607        self.control_handle.shutdown();
4608        // Safety: drops once, never accessed again
4609        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4610    }
4611}
4612
4613impl fdomain_client::fidl::Responder for DirectoryRemoveExtendedAttributeResponder {
4614    type ControlHandle = DirectoryControlHandle;
4615
4616    fn control_handle(&self) -> &DirectoryControlHandle {
4617        &self.control_handle
4618    }
4619
4620    fn drop_without_shutdown(mut self) {
4621        // Safety: drops once, never accessed again due to mem::forget
4622        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4623        // Prevent Drop from running (which would shut down the channel)
4624        std::mem::forget(self);
4625    }
4626}
4627
4628impl DirectoryRemoveExtendedAttributeResponder {
4629    /// Sends a response to the FIDL transaction.
4630    ///
4631    /// Sets the channel to shutdown if an error occurs.
4632    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4633        let _result = self.send_raw(result);
4634        if _result.is_err() {
4635            self.control_handle.shutdown();
4636        }
4637        self.drop_without_shutdown();
4638        _result
4639    }
4640
4641    /// Similar to "send" but does not shutdown the channel if an error occurs.
4642    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4643        let _result = self.send_raw(result);
4644        self.drop_without_shutdown();
4645        _result
4646    }
4647
4648    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4649        self.control_handle
4650            .inner
4651            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4652                result,
4653                self.tx_id,
4654                0x7a0b9f3a9bf9032d,
4655                fidl::encoding::DynamicFlags::empty(),
4656            )
4657    }
4658}
4659
4660#[must_use = "FIDL methods require a response to be sent"]
4661#[derive(Debug)]
4662pub struct DirectoryReadDirentsResponder {
4663    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4664    tx_id: u32,
4665}
4666
4667/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4668/// if the responder is dropped without sending a response, so that the client
4669/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4670impl std::ops::Drop for DirectoryReadDirentsResponder {
4671    fn drop(&mut self) {
4672        self.control_handle.shutdown();
4673        // Safety: drops once, never accessed again
4674        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4675    }
4676}
4677
4678impl fdomain_client::fidl::Responder for DirectoryReadDirentsResponder {
4679    type ControlHandle = DirectoryControlHandle;
4680
4681    fn control_handle(&self) -> &DirectoryControlHandle {
4682        &self.control_handle
4683    }
4684
4685    fn drop_without_shutdown(mut self) {
4686        // Safety: drops once, never accessed again due to mem::forget
4687        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4688        // Prevent Drop from running (which would shut down the channel)
4689        std::mem::forget(self);
4690    }
4691}
4692
4693impl DirectoryReadDirentsResponder {
4694    /// Sends a response to the FIDL transaction.
4695    ///
4696    /// Sets the channel to shutdown if an error occurs.
4697    pub fn send(self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
4698        let _result = self.send_raw(s, dirents);
4699        if _result.is_err() {
4700            self.control_handle.shutdown();
4701        }
4702        self.drop_without_shutdown();
4703        _result
4704    }
4705
4706    /// Similar to "send" but does not shutdown the channel if an error occurs.
4707    pub fn send_no_shutdown_on_err(
4708        self,
4709        mut s: i32,
4710        mut dirents: &[u8],
4711    ) -> Result<(), fidl::Error> {
4712        let _result = self.send_raw(s, dirents);
4713        self.drop_without_shutdown();
4714        _result
4715    }
4716
4717    fn send_raw(&self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
4718        self.control_handle.inner.send::<DirectoryReadDirentsResponse>(
4719            (s, dirents),
4720            self.tx_id,
4721            0x3582806bf27faa0a,
4722            fidl::encoding::DynamicFlags::empty(),
4723        )
4724    }
4725}
4726
4727#[must_use = "FIDL methods require a response to be sent"]
4728#[derive(Debug)]
4729pub struct DirectoryRewindResponder {
4730    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4731    tx_id: u32,
4732}
4733
4734/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4735/// if the responder is dropped without sending a response, so that the client
4736/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4737impl std::ops::Drop for DirectoryRewindResponder {
4738    fn drop(&mut self) {
4739        self.control_handle.shutdown();
4740        // Safety: drops once, never accessed again
4741        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4742    }
4743}
4744
4745impl fdomain_client::fidl::Responder for DirectoryRewindResponder {
4746    type ControlHandle = DirectoryControlHandle;
4747
4748    fn control_handle(&self) -> &DirectoryControlHandle {
4749        &self.control_handle
4750    }
4751
4752    fn drop_without_shutdown(mut self) {
4753        // Safety: drops once, never accessed again due to mem::forget
4754        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4755        // Prevent Drop from running (which would shut down the channel)
4756        std::mem::forget(self);
4757    }
4758}
4759
4760impl DirectoryRewindResponder {
4761    /// Sends a response to the FIDL transaction.
4762    ///
4763    /// Sets the channel to shutdown if an error occurs.
4764    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4765        let _result = self.send_raw(s);
4766        if _result.is_err() {
4767            self.control_handle.shutdown();
4768        }
4769        self.drop_without_shutdown();
4770        _result
4771    }
4772
4773    /// Similar to "send" but does not shutdown the channel if an error occurs.
4774    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4775        let _result = self.send_raw(s);
4776        self.drop_without_shutdown();
4777        _result
4778    }
4779
4780    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4781        self.control_handle.inner.send::<DirectoryRewindResponse>(
4782            (s,),
4783            self.tx_id,
4784            0x16b1202af0f34c71,
4785            fidl::encoding::DynamicFlags::empty(),
4786        )
4787    }
4788}
4789
4790#[must_use = "FIDL methods require a response to be sent"]
4791#[derive(Debug)]
4792pub struct DirectoryGetTokenResponder {
4793    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4794    tx_id: u32,
4795}
4796
4797/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4798/// if the responder is dropped without sending a response, so that the client
4799/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4800impl std::ops::Drop for DirectoryGetTokenResponder {
4801    fn drop(&mut self) {
4802        self.control_handle.shutdown();
4803        // Safety: drops once, never accessed again
4804        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4805    }
4806}
4807
4808impl fdomain_client::fidl::Responder for DirectoryGetTokenResponder {
4809    type ControlHandle = DirectoryControlHandle;
4810
4811    fn control_handle(&self) -> &DirectoryControlHandle {
4812        &self.control_handle
4813    }
4814
4815    fn drop_without_shutdown(mut self) {
4816        // Safety: drops once, never accessed again due to mem::forget
4817        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4818        // Prevent Drop from running (which would shut down the channel)
4819        std::mem::forget(self);
4820    }
4821}
4822
4823impl DirectoryGetTokenResponder {
4824    /// Sends a response to the FIDL transaction.
4825    ///
4826    /// Sets the channel to shutdown if an error occurs.
4827    pub fn send(
4828        self,
4829        mut s: i32,
4830        mut token: Option<fdomain_client::Handle>,
4831    ) -> Result<(), fidl::Error> {
4832        let _result = self.send_raw(s, token);
4833        if _result.is_err() {
4834            self.control_handle.shutdown();
4835        }
4836        self.drop_without_shutdown();
4837        _result
4838    }
4839
4840    /// Similar to "send" but does not shutdown the channel if an error occurs.
4841    pub fn send_no_shutdown_on_err(
4842        self,
4843        mut s: i32,
4844        mut token: Option<fdomain_client::Handle>,
4845    ) -> Result<(), fidl::Error> {
4846        let _result = self.send_raw(s, token);
4847        self.drop_without_shutdown();
4848        _result
4849    }
4850
4851    fn send_raw(
4852        &self,
4853        mut s: i32,
4854        mut token: Option<fdomain_client::Handle>,
4855    ) -> Result<(), fidl::Error> {
4856        self.control_handle.inner.send::<DirectoryGetTokenResponse>(
4857            (s, token),
4858            self.tx_id,
4859            0x26ae9d18763c8655,
4860            fidl::encoding::DynamicFlags::empty(),
4861        )
4862    }
4863}
4864
4865#[must_use = "FIDL methods require a response to be sent"]
4866#[derive(Debug)]
4867pub struct DirectoryLinkResponder {
4868    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4869    tx_id: u32,
4870}
4871
4872/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4873/// if the responder is dropped without sending a response, so that the client
4874/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4875impl std::ops::Drop for DirectoryLinkResponder {
4876    fn drop(&mut self) {
4877        self.control_handle.shutdown();
4878        // Safety: drops once, never accessed again
4879        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4880    }
4881}
4882
4883impl fdomain_client::fidl::Responder for DirectoryLinkResponder {
4884    type ControlHandle = DirectoryControlHandle;
4885
4886    fn control_handle(&self) -> &DirectoryControlHandle {
4887        &self.control_handle
4888    }
4889
4890    fn drop_without_shutdown(mut self) {
4891        // Safety: drops once, never accessed again due to mem::forget
4892        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4893        // Prevent Drop from running (which would shut down the channel)
4894        std::mem::forget(self);
4895    }
4896}
4897
4898impl DirectoryLinkResponder {
4899    /// Sends a response to the FIDL transaction.
4900    ///
4901    /// Sets the channel to shutdown if an error occurs.
4902    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4903        let _result = self.send_raw(s);
4904        if _result.is_err() {
4905            self.control_handle.shutdown();
4906        }
4907        self.drop_without_shutdown();
4908        _result
4909    }
4910
4911    /// Similar to "send" but does not shutdown the channel if an error occurs.
4912    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4913        let _result = self.send_raw(s);
4914        self.drop_without_shutdown();
4915        _result
4916    }
4917
4918    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4919        self.control_handle.inner.send::<DirectoryLinkResponse>(
4920            (s,),
4921            self.tx_id,
4922            0x740604c0c7c930e7,
4923            fidl::encoding::DynamicFlags::empty(),
4924        )
4925    }
4926}
4927
4928#[must_use = "FIDL methods require a response to be sent"]
4929#[derive(Debug)]
4930pub struct DirectoryUnlinkResponder {
4931    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4932    tx_id: u32,
4933}
4934
4935/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4936/// if the responder is dropped without sending a response, so that the client
4937/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4938impl std::ops::Drop for DirectoryUnlinkResponder {
4939    fn drop(&mut self) {
4940        self.control_handle.shutdown();
4941        // Safety: drops once, never accessed again
4942        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4943    }
4944}
4945
4946impl fdomain_client::fidl::Responder for DirectoryUnlinkResponder {
4947    type ControlHandle = DirectoryControlHandle;
4948
4949    fn control_handle(&self) -> &DirectoryControlHandle {
4950        &self.control_handle
4951    }
4952
4953    fn drop_without_shutdown(mut self) {
4954        // Safety: drops once, never accessed again due to mem::forget
4955        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4956        // Prevent Drop from running (which would shut down the channel)
4957        std::mem::forget(self);
4958    }
4959}
4960
4961impl DirectoryUnlinkResponder {
4962    /// Sends a response to the FIDL transaction.
4963    ///
4964    /// Sets the channel to shutdown if an error occurs.
4965    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4966        let _result = self.send_raw(result);
4967        if _result.is_err() {
4968            self.control_handle.shutdown();
4969        }
4970        self.drop_without_shutdown();
4971        _result
4972    }
4973
4974    /// Similar to "send" but does not shutdown the channel if an error occurs.
4975    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4976        let _result = self.send_raw(result);
4977        self.drop_without_shutdown();
4978        _result
4979    }
4980
4981    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4982        self.control_handle
4983            .inner
4984            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4985                result,
4986                self.tx_id,
4987                0x750a0326a78d7bed,
4988                fidl::encoding::DynamicFlags::empty(),
4989            )
4990    }
4991}
4992
4993#[must_use = "FIDL methods require a response to be sent"]
4994#[derive(Debug)]
4995pub struct DirectoryRenameResponder {
4996    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4997    tx_id: u32,
4998}
4999
5000/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
5001/// if the responder is dropped without sending a response, so that the client
5002/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5003impl std::ops::Drop for DirectoryRenameResponder {
5004    fn drop(&mut self) {
5005        self.control_handle.shutdown();
5006        // Safety: drops once, never accessed again
5007        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5008    }
5009}
5010
5011impl fdomain_client::fidl::Responder for DirectoryRenameResponder {
5012    type ControlHandle = DirectoryControlHandle;
5013
5014    fn control_handle(&self) -> &DirectoryControlHandle {
5015        &self.control_handle
5016    }
5017
5018    fn drop_without_shutdown(mut self) {
5019        // Safety: drops once, never accessed again due to mem::forget
5020        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5021        // Prevent Drop from running (which would shut down the channel)
5022        std::mem::forget(self);
5023    }
5024}
5025
5026impl DirectoryRenameResponder {
5027    /// Sends a response to the FIDL transaction.
5028    ///
5029    /// Sets the channel to shutdown if an error occurs.
5030    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5031        let _result = self.send_raw(result);
5032        if _result.is_err() {
5033            self.control_handle.shutdown();
5034        }
5035        self.drop_without_shutdown();
5036        _result
5037    }
5038
5039    /// Similar to "send" but does not shutdown the channel if an error occurs.
5040    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5041        let _result = self.send_raw(result);
5042        self.drop_without_shutdown();
5043        _result
5044    }
5045
5046    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5047        self.control_handle
5048            .inner
5049            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5050                result,
5051                self.tx_id,
5052                0x7060e7723b9928de,
5053                fidl::encoding::DynamicFlags::empty(),
5054            )
5055    }
5056}
5057
5058#[must_use = "FIDL methods require a response to be sent"]
5059#[derive(Debug)]
5060pub struct DirectoryCreateSymlinkResponder {
5061    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5062    tx_id: u32,
5063}
5064
5065/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
5066/// if the responder is dropped without sending a response, so that the client
5067/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5068impl std::ops::Drop for DirectoryCreateSymlinkResponder {
5069    fn drop(&mut self) {
5070        self.control_handle.shutdown();
5071        // Safety: drops once, never accessed again
5072        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5073    }
5074}
5075
5076impl fdomain_client::fidl::Responder for DirectoryCreateSymlinkResponder {
5077    type ControlHandle = DirectoryControlHandle;
5078
5079    fn control_handle(&self) -> &DirectoryControlHandle {
5080        &self.control_handle
5081    }
5082
5083    fn drop_without_shutdown(mut self) {
5084        // Safety: drops once, never accessed again due to mem::forget
5085        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5086        // Prevent Drop from running (which would shut down the channel)
5087        std::mem::forget(self);
5088    }
5089}
5090
5091impl DirectoryCreateSymlinkResponder {
5092    /// Sends a response to the FIDL transaction.
5093    ///
5094    /// Sets the channel to shutdown if an error occurs.
5095    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5096        let _result = self.send_raw(result);
5097        if _result.is_err() {
5098            self.control_handle.shutdown();
5099        }
5100        self.drop_without_shutdown();
5101        _result
5102    }
5103
5104    /// Similar to "send" but does not shutdown the channel if an error occurs.
5105    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5106        let _result = self.send_raw(result);
5107        self.drop_without_shutdown();
5108        _result
5109    }
5110
5111    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5112        self.control_handle
5113            .inner
5114            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5115                result,
5116                self.tx_id,
5117                0x21ce0f19ec043889,
5118                fidl::encoding::DynamicFlags::empty(),
5119            )
5120    }
5121}
5122
5123#[must_use = "FIDL methods require a response to be sent"]
5124#[derive(Debug)]
5125pub struct DirectoryWatchResponder {
5126    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5127    tx_id: u32,
5128}
5129
5130/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
5131/// if the responder is dropped without sending a response, so that the client
5132/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5133impl std::ops::Drop for DirectoryWatchResponder {
5134    fn drop(&mut self) {
5135        self.control_handle.shutdown();
5136        // Safety: drops once, never accessed again
5137        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5138    }
5139}
5140
5141impl fdomain_client::fidl::Responder for DirectoryWatchResponder {
5142    type ControlHandle = DirectoryControlHandle;
5143
5144    fn control_handle(&self) -> &DirectoryControlHandle {
5145        &self.control_handle
5146    }
5147
5148    fn drop_without_shutdown(mut self) {
5149        // Safety: drops once, never accessed again due to mem::forget
5150        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5151        // Prevent Drop from running (which would shut down the channel)
5152        std::mem::forget(self);
5153    }
5154}
5155
5156impl DirectoryWatchResponder {
5157    /// Sends a response to the FIDL transaction.
5158    ///
5159    /// Sets the channel to shutdown if an error occurs.
5160    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5161        let _result = self.send_raw(s);
5162        if _result.is_err() {
5163            self.control_handle.shutdown();
5164        }
5165        self.drop_without_shutdown();
5166        _result
5167    }
5168
5169    /// Similar to "send" but does not shutdown the channel if an error occurs.
5170    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5171        let _result = self.send_raw(s);
5172        self.drop_without_shutdown();
5173        _result
5174    }
5175
5176    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5177        self.control_handle.inner.send::<DirectoryWatchResponse>(
5178            (s,),
5179            self.tx_id,
5180            0x5717193a59d66d91,
5181            fidl::encoding::DynamicFlags::empty(),
5182        )
5183    }
5184}
5185
5186#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5187pub struct DirectoryWatcherMarker;
5188
5189impl fdomain_client::fidl::ProtocolMarker for DirectoryWatcherMarker {
5190    type Proxy = DirectoryWatcherProxy;
5191    type RequestStream = DirectoryWatcherRequestStream;
5192
5193    const DEBUG_NAME: &'static str = "(anonymous) DirectoryWatcher";
5194}
5195
5196pub trait DirectoryWatcherProxyInterface: Send + Sync {}
5197
5198#[derive(Debug, Clone)]
5199pub struct DirectoryWatcherProxy {
5200    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5201}
5202
5203impl fdomain_client::fidl::Proxy for DirectoryWatcherProxy {
5204    type Protocol = DirectoryWatcherMarker;
5205
5206    fn from_channel(inner: fdomain_client::Channel) -> Self {
5207        Self::new(inner)
5208    }
5209
5210    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5211        self.client.into_channel().map_err(|client| Self { client })
5212    }
5213
5214    fn as_channel(&self) -> &fdomain_client::Channel {
5215        self.client.as_channel()
5216    }
5217}
5218
5219impl DirectoryWatcherProxy {
5220    /// Create a new Proxy for fuchsia.io/DirectoryWatcher.
5221    pub fn new(channel: fdomain_client::Channel) -> Self {
5222        let protocol_name =
5223            <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5224        Self { client: fidl::client::Client::new(channel, protocol_name) }
5225    }
5226
5227    /// Get a Stream of events from the remote end of the protocol.
5228    ///
5229    /// # Panics
5230    ///
5231    /// Panics if the event stream was already taken.
5232    pub fn take_event_stream(&self) -> DirectoryWatcherEventStream {
5233        DirectoryWatcherEventStream { event_receiver: self.client.take_event_receiver() }
5234    }
5235}
5236
5237impl DirectoryWatcherProxyInterface for DirectoryWatcherProxy {}
5238
5239pub struct DirectoryWatcherEventStream {
5240    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5241}
5242
5243impl std::marker::Unpin for DirectoryWatcherEventStream {}
5244
5245impl futures::stream::FusedStream for DirectoryWatcherEventStream {
5246    fn is_terminated(&self) -> bool {
5247        self.event_receiver.is_terminated()
5248    }
5249}
5250
5251impl futures::Stream for DirectoryWatcherEventStream {
5252    type Item = Result<DirectoryWatcherEvent, fidl::Error>;
5253
5254    fn poll_next(
5255        mut self: std::pin::Pin<&mut Self>,
5256        cx: &mut std::task::Context<'_>,
5257    ) -> std::task::Poll<Option<Self::Item>> {
5258        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5259            &mut self.event_receiver,
5260            cx
5261        )?) {
5262            Some(buf) => std::task::Poll::Ready(Some(DirectoryWatcherEvent::decode(buf))),
5263            None => std::task::Poll::Ready(None),
5264        }
5265    }
5266}
5267
5268#[derive(Debug)]
5269pub enum DirectoryWatcherEvent {}
5270
5271impl DirectoryWatcherEvent {
5272    /// Decodes a message buffer as a [`DirectoryWatcherEvent`].
5273    fn decode(
5274        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5275    ) -> Result<DirectoryWatcherEvent, fidl::Error> {
5276        let (bytes, _handles) = buf.split_mut();
5277        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5278        debug_assert_eq!(tx_header.tx_id, 0);
5279        match tx_header.ordinal {
5280            _ => Err(fidl::Error::UnknownOrdinal {
5281                ordinal: tx_header.ordinal,
5282                protocol_name:
5283                    <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5284            }),
5285        }
5286    }
5287}
5288
5289/// A Stream of incoming requests for fuchsia.io/DirectoryWatcher.
5290pub struct DirectoryWatcherRequestStream {
5291    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5292    is_terminated: bool,
5293}
5294
5295impl std::marker::Unpin for DirectoryWatcherRequestStream {}
5296
5297impl futures::stream::FusedStream for DirectoryWatcherRequestStream {
5298    fn is_terminated(&self) -> bool {
5299        self.is_terminated
5300    }
5301}
5302
5303impl fdomain_client::fidl::RequestStream for DirectoryWatcherRequestStream {
5304    type Protocol = DirectoryWatcherMarker;
5305    type ControlHandle = DirectoryWatcherControlHandle;
5306
5307    fn from_channel(channel: fdomain_client::Channel) -> Self {
5308        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5309    }
5310
5311    fn control_handle(&self) -> Self::ControlHandle {
5312        DirectoryWatcherControlHandle { inner: self.inner.clone() }
5313    }
5314
5315    fn into_inner(
5316        self,
5317    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5318    {
5319        (self.inner, self.is_terminated)
5320    }
5321
5322    fn from_inner(
5323        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5324        is_terminated: bool,
5325    ) -> Self {
5326        Self { inner, is_terminated }
5327    }
5328}
5329
5330impl futures::Stream for DirectoryWatcherRequestStream {
5331    type Item = Result<DirectoryWatcherRequest, fidl::Error>;
5332
5333    fn poll_next(
5334        mut self: std::pin::Pin<&mut Self>,
5335        cx: &mut std::task::Context<'_>,
5336    ) -> std::task::Poll<Option<Self::Item>> {
5337        let this = &mut *self;
5338        if this.inner.check_shutdown(cx) {
5339            this.is_terminated = true;
5340            return std::task::Poll::Ready(None);
5341        }
5342        if this.is_terminated {
5343            panic!("polled DirectoryWatcherRequestStream after completion");
5344        }
5345        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5346            |bytes, handles| {
5347                match this.inner.channel().read_etc(cx, bytes, handles) {
5348                    std::task::Poll::Ready(Ok(())) => {}
5349                    std::task::Poll::Pending => return std::task::Poll::Pending,
5350                    std::task::Poll::Ready(Err(None)) => {
5351                        this.is_terminated = true;
5352                        return std::task::Poll::Ready(None);
5353                    }
5354                    std::task::Poll::Ready(Err(Some(e))) => {
5355                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5356                            e.into(),
5357                        ))))
5358                    }
5359                }
5360
5361                // A message has been received from the channel
5362                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5363
5364                std::task::Poll::Ready(Some(match header.ordinal {
5365                _ => Err(fidl::Error::UnknownOrdinal {
5366                    ordinal: header.ordinal,
5367                    protocol_name: <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5368                }),
5369            }))
5370            },
5371        )
5372    }
5373}
5374
5375/// DirectoryWatcher transmits messages from a filesystem server
5376/// about events happening in the filesystem. Clients can register
5377/// new watchers using the `Directory.Watch` method, where they can
5378/// filter which events they want to receive notifications for.
5379///
5380/// The DirectoryWatcher will send messages of the form:
5381/// ```
5382/// struct {
5383///   uint8 event;
5384///   uint8 len;
5385///   char name[];
5386/// };
5387/// ```
5388/// Where names are NOT null-terminated. The name is the relative
5389/// path to the entry the event is refering to. It will be empty if
5390/// the event isn't referencing a particular entry (e.g. for the
5391/// `IDLE` event).
5392#[derive(Debug)]
5393pub enum DirectoryWatcherRequest {}
5394
5395impl DirectoryWatcherRequest {
5396    /// Name of the method defined in FIDL
5397    pub fn method_name(&self) -> &'static str {
5398        match *self {}
5399    }
5400}
5401
5402#[derive(Debug, Clone)]
5403pub struct DirectoryWatcherControlHandle {
5404    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5405}
5406
5407impl fdomain_client::fidl::ControlHandle for DirectoryWatcherControlHandle {
5408    fn shutdown(&self) {
5409        self.inner.shutdown()
5410    }
5411
5412    fn is_closed(&self) -> bool {
5413        self.inner.channel().is_closed()
5414    }
5415    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5416        self.inner.channel().on_closed()
5417    }
5418}
5419
5420impl DirectoryWatcherControlHandle {}
5421
5422#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5423pub struct ExtendedAttributeIteratorMarker;
5424
5425impl fdomain_client::fidl::ProtocolMarker for ExtendedAttributeIteratorMarker {
5426    type Proxy = ExtendedAttributeIteratorProxy;
5427    type RequestStream = ExtendedAttributeIteratorRequestStream;
5428
5429    const DEBUG_NAME: &'static str = "(anonymous) ExtendedAttributeIterator";
5430}
5431pub type ExtendedAttributeIteratorGetNextResult = Result<(Vec<Vec<u8>>, bool), i32>;
5432
5433pub trait ExtendedAttributeIteratorProxyInterface: Send + Sync {
5434    type GetNextResponseFut: std::future::Future<Output = Result<ExtendedAttributeIteratorGetNextResult, fidl::Error>>
5435        + Send;
5436    fn r#get_next(&self) -> Self::GetNextResponseFut;
5437}
5438
5439#[derive(Debug, Clone)]
5440pub struct ExtendedAttributeIteratorProxy {
5441    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5442}
5443
5444impl fdomain_client::fidl::Proxy for ExtendedAttributeIteratorProxy {
5445    type Protocol = ExtendedAttributeIteratorMarker;
5446
5447    fn from_channel(inner: fdomain_client::Channel) -> Self {
5448        Self::new(inner)
5449    }
5450
5451    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5452        self.client.into_channel().map_err(|client| Self { client })
5453    }
5454
5455    fn as_channel(&self) -> &fdomain_client::Channel {
5456        self.client.as_channel()
5457    }
5458}
5459
5460impl ExtendedAttributeIteratorProxy {
5461    /// Create a new Proxy for fuchsia.io/ExtendedAttributeIterator.
5462    pub fn new(channel: fdomain_client::Channel) -> Self {
5463        let protocol_name =
5464            <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5465        Self { client: fidl::client::Client::new(channel, protocol_name) }
5466    }
5467
5468    /// Get a Stream of events from the remote end of the protocol.
5469    ///
5470    /// # Panics
5471    ///
5472    /// Panics if the event stream was already taken.
5473    pub fn take_event_stream(&self) -> ExtendedAttributeIteratorEventStream {
5474        ExtendedAttributeIteratorEventStream { event_receiver: self.client.take_event_receiver() }
5475    }
5476
5477    /// Get the next chunk of extended attribute names. If this is the last
5478    /// chunk, last will be true, and the channel will be closed after the
5479    /// call.
5480    pub fn r#get_next(
5481        &self,
5482    ) -> fidl::client::QueryResponseFut<
5483        ExtendedAttributeIteratorGetNextResult,
5484        fdomain_client::fidl::FDomainResourceDialect,
5485    > {
5486        ExtendedAttributeIteratorProxyInterface::r#get_next(self)
5487    }
5488}
5489
5490impl ExtendedAttributeIteratorProxyInterface for ExtendedAttributeIteratorProxy {
5491    type GetNextResponseFut = fidl::client::QueryResponseFut<
5492        ExtendedAttributeIteratorGetNextResult,
5493        fdomain_client::fidl::FDomainResourceDialect,
5494    >;
5495    fn r#get_next(&self) -> Self::GetNextResponseFut {
5496        fn _decode(
5497            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5498        ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
5499            let _response = fidl::client::decode_transaction_body::<
5500                fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
5501                fdomain_client::fidl::FDomainResourceDialect,
5502                0x3ba664a1c2e45a7,
5503            >(_buf?)?;
5504            Ok(_response.map(|x| (x.attributes, x.last)))
5505        }
5506        self.client.send_query_and_decode::<
5507            fidl::encoding::EmptyPayload,
5508            ExtendedAttributeIteratorGetNextResult,
5509        >(
5510            (),
5511            0x3ba664a1c2e45a7,
5512            fidl::encoding::DynamicFlags::empty(),
5513            _decode,
5514        )
5515    }
5516}
5517
5518pub struct ExtendedAttributeIteratorEventStream {
5519    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5520}
5521
5522impl std::marker::Unpin for ExtendedAttributeIteratorEventStream {}
5523
5524impl futures::stream::FusedStream for ExtendedAttributeIteratorEventStream {
5525    fn is_terminated(&self) -> bool {
5526        self.event_receiver.is_terminated()
5527    }
5528}
5529
5530impl futures::Stream for ExtendedAttributeIteratorEventStream {
5531    type Item = Result<ExtendedAttributeIteratorEvent, fidl::Error>;
5532
5533    fn poll_next(
5534        mut self: std::pin::Pin<&mut Self>,
5535        cx: &mut std::task::Context<'_>,
5536    ) -> std::task::Poll<Option<Self::Item>> {
5537        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5538            &mut self.event_receiver,
5539            cx
5540        )?) {
5541            Some(buf) => std::task::Poll::Ready(Some(ExtendedAttributeIteratorEvent::decode(buf))),
5542            None => std::task::Poll::Ready(None),
5543        }
5544    }
5545}
5546
5547#[derive(Debug)]
5548pub enum ExtendedAttributeIteratorEvent {}
5549
5550impl ExtendedAttributeIteratorEvent {
5551    /// Decodes a message buffer as a [`ExtendedAttributeIteratorEvent`].
5552    fn decode(
5553        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5554    ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
5555        let (bytes, _handles) = buf.split_mut();
5556        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5557        debug_assert_eq!(tx_header.tx_id, 0);
5558        match tx_header.ordinal {
5559            _ => Err(fidl::Error::UnknownOrdinal {
5560                ordinal: tx_header.ordinal,
5561                protocol_name: <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5562            })
5563        }
5564    }
5565}
5566
5567/// A Stream of incoming requests for fuchsia.io/ExtendedAttributeIterator.
5568pub struct ExtendedAttributeIteratorRequestStream {
5569    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5570    is_terminated: bool,
5571}
5572
5573impl std::marker::Unpin for ExtendedAttributeIteratorRequestStream {}
5574
5575impl futures::stream::FusedStream for ExtendedAttributeIteratorRequestStream {
5576    fn is_terminated(&self) -> bool {
5577        self.is_terminated
5578    }
5579}
5580
5581impl fdomain_client::fidl::RequestStream for ExtendedAttributeIteratorRequestStream {
5582    type Protocol = ExtendedAttributeIteratorMarker;
5583    type ControlHandle = ExtendedAttributeIteratorControlHandle;
5584
5585    fn from_channel(channel: fdomain_client::Channel) -> Self {
5586        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5587    }
5588
5589    fn control_handle(&self) -> Self::ControlHandle {
5590        ExtendedAttributeIteratorControlHandle { inner: self.inner.clone() }
5591    }
5592
5593    fn into_inner(
5594        self,
5595    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5596    {
5597        (self.inner, self.is_terminated)
5598    }
5599
5600    fn from_inner(
5601        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5602        is_terminated: bool,
5603    ) -> Self {
5604        Self { inner, is_terminated }
5605    }
5606}
5607
5608impl futures::Stream for ExtendedAttributeIteratorRequestStream {
5609    type Item = Result<ExtendedAttributeIteratorRequest, fidl::Error>;
5610
5611    fn poll_next(
5612        mut self: std::pin::Pin<&mut Self>,
5613        cx: &mut std::task::Context<'_>,
5614    ) -> std::task::Poll<Option<Self::Item>> {
5615        let this = &mut *self;
5616        if this.inner.check_shutdown(cx) {
5617            this.is_terminated = true;
5618            return std::task::Poll::Ready(None);
5619        }
5620        if this.is_terminated {
5621            panic!("polled ExtendedAttributeIteratorRequestStream after completion");
5622        }
5623        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5624            |bytes, handles| {
5625                match this.inner.channel().read_etc(cx, bytes, handles) {
5626                    std::task::Poll::Ready(Ok(())) => {}
5627                    std::task::Poll::Pending => return std::task::Poll::Pending,
5628                    std::task::Poll::Ready(Err(None)) => {
5629                        this.is_terminated = true;
5630                        return std::task::Poll::Ready(None);
5631                    }
5632                    std::task::Poll::Ready(Err(Some(e))) => {
5633                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5634                            e.into(),
5635                        ))))
5636                    }
5637                }
5638
5639                // A message has been received from the channel
5640                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5641
5642                std::task::Poll::Ready(Some(match header.ordinal {
5643                0x3ba664a1c2e45a7 => {
5644                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5645                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
5646                    fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5647                    let control_handle = ExtendedAttributeIteratorControlHandle {
5648                        inner: this.inner.clone(),
5649                    };
5650                    Ok(ExtendedAttributeIteratorRequest::GetNext {
5651                        responder: ExtendedAttributeIteratorGetNextResponder {
5652                            control_handle: std::mem::ManuallyDrop::new(control_handle),
5653                            tx_id: header.tx_id,
5654                        },
5655                    })
5656                }
5657                _ => Err(fidl::Error::UnknownOrdinal {
5658                    ordinal: header.ordinal,
5659                    protocol_name: <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5660                }),
5661            }))
5662            },
5663        )
5664    }
5665}
5666
5667#[derive(Debug)]
5668pub enum ExtendedAttributeIteratorRequest {
5669    /// Get the next chunk of extended attribute names. If this is the last
5670    /// chunk, last will be true, and the channel will be closed after the
5671    /// call.
5672    GetNext { responder: ExtendedAttributeIteratorGetNextResponder },
5673}
5674
5675impl ExtendedAttributeIteratorRequest {
5676    #[allow(irrefutable_let_patterns)]
5677    pub fn into_get_next(self) -> Option<(ExtendedAttributeIteratorGetNextResponder)> {
5678        if let ExtendedAttributeIteratorRequest::GetNext { responder } = self {
5679            Some((responder))
5680        } else {
5681            None
5682        }
5683    }
5684
5685    /// Name of the method defined in FIDL
5686    pub fn method_name(&self) -> &'static str {
5687        match *self {
5688            ExtendedAttributeIteratorRequest::GetNext { .. } => "get_next",
5689        }
5690    }
5691}
5692
5693#[derive(Debug, Clone)]
5694pub struct ExtendedAttributeIteratorControlHandle {
5695    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5696}
5697
5698impl fdomain_client::fidl::ControlHandle for ExtendedAttributeIteratorControlHandle {
5699    fn shutdown(&self) {
5700        self.inner.shutdown()
5701    }
5702
5703    fn is_closed(&self) -> bool {
5704        self.inner.channel().is_closed()
5705    }
5706    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5707        self.inner.channel().on_closed()
5708    }
5709}
5710
5711impl ExtendedAttributeIteratorControlHandle {}
5712
5713#[must_use = "FIDL methods require a response to be sent"]
5714#[derive(Debug)]
5715pub struct ExtendedAttributeIteratorGetNextResponder {
5716    control_handle: std::mem::ManuallyDrop<ExtendedAttributeIteratorControlHandle>,
5717    tx_id: u32,
5718}
5719
5720/// Set the the channel to be shutdown (see [`ExtendedAttributeIteratorControlHandle::shutdown`])
5721/// if the responder is dropped without sending a response, so that the client
5722/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5723impl std::ops::Drop for ExtendedAttributeIteratorGetNextResponder {
5724    fn drop(&mut self) {
5725        self.control_handle.shutdown();
5726        // Safety: drops once, never accessed again
5727        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5728    }
5729}
5730
5731impl fdomain_client::fidl::Responder for ExtendedAttributeIteratorGetNextResponder {
5732    type ControlHandle = ExtendedAttributeIteratorControlHandle;
5733
5734    fn control_handle(&self) -> &ExtendedAttributeIteratorControlHandle {
5735        &self.control_handle
5736    }
5737
5738    fn drop_without_shutdown(mut self) {
5739        // Safety: drops once, never accessed again due to mem::forget
5740        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5741        // Prevent Drop from running (which would shut down the channel)
5742        std::mem::forget(self);
5743    }
5744}
5745
5746impl ExtendedAttributeIteratorGetNextResponder {
5747    /// Sends a response to the FIDL transaction.
5748    ///
5749    /// Sets the channel to shutdown if an error occurs.
5750    pub fn send(self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
5751        let _result = self.send_raw(result);
5752        if _result.is_err() {
5753            self.control_handle.shutdown();
5754        }
5755        self.drop_without_shutdown();
5756        _result
5757    }
5758
5759    /// Similar to "send" but does not shutdown the channel if an error occurs.
5760    pub fn send_no_shutdown_on_err(
5761        self,
5762        mut result: Result<(&[Vec<u8>], bool), i32>,
5763    ) -> Result<(), fidl::Error> {
5764        let _result = self.send_raw(result);
5765        self.drop_without_shutdown();
5766        _result
5767    }
5768
5769    fn send_raw(&self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
5770        self.control_handle.inner.send::<fidl::encoding::ResultType<
5771            ExtendedAttributeIteratorGetNextResponse,
5772            i32,
5773        >>(
5774            result,
5775            self.tx_id,
5776            0x3ba664a1c2e45a7,
5777            fidl::encoding::DynamicFlags::empty(),
5778        )
5779    }
5780}
5781
5782#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5783pub struct FileMarker;
5784
5785impl fdomain_client::fidl::ProtocolMarker for FileMarker {
5786    type Proxy = FileProxy;
5787    type RequestStream = FileRequestStream;
5788
5789    const DEBUG_NAME: &'static str = "fuchsia.io.File";
5790}
5791impl fdomain_client::fidl::DiscoverableProtocolMarker for FileMarker {}
5792pub type FileSeekResult = Result<u64, i32>;
5793pub type FileReadAtResult = Result<Vec<u8>, i32>;
5794pub type FileWriteAtResult = Result<u64, i32>;
5795pub type FileResizeResult = Result<(), i32>;
5796pub type FileGetBackingMemoryResult = Result<fdomain_client::Vmo, i32>;
5797pub type FileAllocateResult = Result<(), i32>;
5798pub type FileEnableVerityResult = Result<(), i32>;
5799
5800pub trait FileProxyInterface: Send + Sync {
5801    type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
5802        + Send;
5803    fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
5804    type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
5805        + Send;
5806    fn r#link_into(
5807        &self,
5808        dst_parent_token: fdomain_client::Event,
5809        dst: &str,
5810    ) -> Self::LinkIntoResponseFut;
5811    fn r#clone(
5812        &self,
5813        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
5814    ) -> Result<(), fidl::Error>;
5815    type CloseResponseFut: std::future::Future<
5816            Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
5817        > + Send;
5818    fn r#close(&self) -> Self::CloseResponseFut;
5819    type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
5820    fn r#query(&self) -> Self::QueryResponseFut;
5821    fn r#deprecated_clone(
5822        &self,
5823        flags: OpenFlags,
5824        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
5825    ) -> Result<(), fidl::Error>;
5826    type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
5827        + Send;
5828    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
5829    type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
5830    fn r#deprecated_set_attr(
5831        &self,
5832        flags: NodeAttributeFlags,
5833        attributes: &NodeAttributes,
5834    ) -> Self::DeprecatedSetAttrResponseFut;
5835    type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
5836        + Send;
5837    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
5838    type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
5839        + Send;
5840    fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
5841    type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
5842        + Send;
5843    fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
5844    type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
5845        + Send;
5846    fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
5847    type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
5848        + Send;
5849    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
5850    type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
5851        + Send;
5852    fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
5853    type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
5854        + Send;
5855    fn r#update_attributes(
5856        &self,
5857        payload: &MutableNodeAttributes,
5858    ) -> Self::UpdateAttributesResponseFut;
5859    type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
5860    fn r#sync(&self) -> Self::SyncResponseFut;
5861    fn r#list_extended_attributes(
5862        &self,
5863        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
5864    ) -> Result<(), fidl::Error>;
5865    type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
5866        + Send;
5867    fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
5868    type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
5869        + Send;
5870    fn r#set_extended_attribute(
5871        &self,
5872        name: &[u8],
5873        value: ExtendedAttributeValue,
5874        mode: SetExtendedAttributeMode,
5875    ) -> Self::SetExtendedAttributeResponseFut;
5876    type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
5877        + Send;
5878    fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
5879    type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
5880        + Send;
5881    fn r#read(&self, count: u64) -> Self::ReadResponseFut;
5882    type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
5883        + Send;
5884    fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
5885    type DescribeResponseFut: std::future::Future<Output = Result<FileInfo, fidl::Error>> + Send;
5886    fn r#describe(&self) -> Self::DescribeResponseFut;
5887    type SeekResponseFut: std::future::Future<Output = Result<FileSeekResult, fidl::Error>> + Send;
5888    fn r#seek(&self, origin: SeekOrigin, offset: i64) -> Self::SeekResponseFut;
5889    type ReadAtResponseFut: std::future::Future<Output = Result<FileReadAtResult, fidl::Error>>
5890        + Send;
5891    fn r#read_at(&self, count: u64, offset: u64) -> Self::ReadAtResponseFut;
5892    type WriteAtResponseFut: std::future::Future<Output = Result<FileWriteAtResult, fidl::Error>>
5893        + Send;
5894    fn r#write_at(&self, data: &[u8], offset: u64) -> Self::WriteAtResponseFut;
5895    type ResizeResponseFut: std::future::Future<Output = Result<FileResizeResult, fidl::Error>>
5896        + Send;
5897    fn r#resize(&self, length: u64) -> Self::ResizeResponseFut;
5898    type GetBackingMemoryResponseFut: std::future::Future<Output = Result<FileGetBackingMemoryResult, fidl::Error>>
5899        + Send;
5900    fn r#get_backing_memory(&self, flags: VmoFlags) -> Self::GetBackingMemoryResponseFut;
5901    type AllocateResponseFut: std::future::Future<Output = Result<FileAllocateResult, fidl::Error>>
5902        + Send;
5903    fn r#allocate(&self, offset: u64, length: u64, mode: AllocateMode)
5904        -> Self::AllocateResponseFut;
5905    type EnableVerityResponseFut: std::future::Future<Output = Result<FileEnableVerityResult, fidl::Error>>
5906        + Send;
5907    fn r#enable_verity(&self, options: &VerificationOptions) -> Self::EnableVerityResponseFut;
5908}
5909
5910#[derive(Debug, Clone)]
5911pub struct FileProxy {
5912    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5913}
5914
5915impl fdomain_client::fidl::Proxy for FileProxy {
5916    type Protocol = FileMarker;
5917
5918    fn from_channel(inner: fdomain_client::Channel) -> Self {
5919        Self::new(inner)
5920    }
5921
5922    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5923        self.client.into_channel().map_err(|client| Self { client })
5924    }
5925
5926    fn as_channel(&self) -> &fdomain_client::Channel {
5927        self.client.as_channel()
5928    }
5929}
5930
5931impl FileProxy {
5932    /// Create a new Proxy for fuchsia.io/File.
5933    pub fn new(channel: fdomain_client::Channel) -> Self {
5934        let protocol_name = <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5935        Self { client: fidl::client::Client::new(channel, protocol_name) }
5936    }
5937
5938    /// Get a Stream of events from the remote end of the protocol.
5939    ///
5940    /// # Panics
5941    ///
5942    /// Panics if the event stream was already taken.
5943    pub fn take_event_stream(&self) -> FileEventStream {
5944        FileEventStream { event_receiver: self.client.take_event_receiver() }
5945    }
5946
5947    /// Acquires an advisory lock on the underlying file.
5948    ///
5949    /// The lock lasts until either this connection is closed or
5950    /// this method is called with |AdvisoryLockType.UNLOCK| to release the lock
5951    /// explicitly.
5952    ///
5953    /// Advisory locks are purely advisory. They do not prevent actual read or
5954    /// write operations from occurring on the file, either through this
5955    /// connection or through other connections.
5956    ///
5957    /// This method requires the following rights:
5958    ///
5959    /// * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
5960    /// * [`Rights.WRITE_BYTES`] if `request.type` is
5961    ///   [`AdvisoryLockType.WRITE`].
5962    ///
5963    /// # Errors
5964    ///
5965    /// * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
5966    ///   example, another connection might hold a conflicting lock type.
5967    /// * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
5968    /// * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
5969    ///   to acquire the given type of lock.
5970    pub fn r#advisory_lock(
5971        &self,
5972        mut request: &AdvisoryLockRequest,
5973    ) -> fidl::client::QueryResponseFut<
5974        AdvisoryLockingAdvisoryLockResult,
5975        fdomain_client::fidl::FDomainResourceDialect,
5976    > {
5977        FileProxyInterface::r#advisory_lock(self, request)
5978    }
5979
5980    /// Creates a link to this this object with name `dst` in the directory represented by
5981    /// `dst_parent_token`.
5982    ///
5983    /// `dst` must be a resolved object name. Including "/" in the string will return
5984    /// `ZX_ERR_INVALID_ARGS`.
5985    ///
5986    /// This method requires the maximal set of rights supported by the filesystem for this object.
5987    /// For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],
5988    /// [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also
5989    /// support the [`Rights.EXECUTE`] right. Insufficient rights will result in
5990    /// `ZX_ERR_ACCESS_DENIED`.
5991    ///
5992    /// If this object has no links and is *NOT* an unnamed temporary object (objects opened with
5993    /// `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.
5994    ///
5995    /// For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,
5996    /// the object will be permanently linked to the filesystem. Requires that the unnamed temporary
5997    /// object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.
5998    ///
5999    /// This method does not have the same atomicity properties has the `Directory::Link` method,
6000    /// which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`
6001    /// because `LinkInto` will not prevent the source from being renamed or unlinked.
6002    pub fn r#link_into(
6003        &self,
6004        mut dst_parent_token: fdomain_client::Event,
6005        mut dst: &str,
6006    ) -> fidl::client::QueryResponseFut<
6007        LinkableLinkIntoResult,
6008        fdomain_client::fidl::FDomainResourceDialect,
6009    > {
6010        FileProxyInterface::r#link_into(self, dst_parent_token, dst)
6011    }
6012
6013    pub fn r#clone(
6014        &self,
6015        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
6016    ) -> Result<(), fidl::Error> {
6017        FileProxyInterface::r#clone(self, request)
6018    }
6019
6020    /// Terminates the connection.
6021    ///
6022    /// After calling `Close`, the client must not send any other requests.
6023    ///
6024    /// Servers, after sending the status response, should close the connection
6025    /// regardless of status and without sending an epitaph.
6026    ///
6027    /// Closing the client end of the channel should be semantically equivalent
6028    /// to calling `Close` without knowing when the close has completed or its
6029    /// status.
6030    pub fn r#close(
6031        &self,
6032    ) -> fidl::client::QueryResponseFut<
6033        fdomain_fuchsia_unknown::CloseableCloseResult,
6034        fdomain_client::fidl::FDomainResourceDialect,
6035    > {
6036        FileProxyInterface::r#close(self)
6037    }
6038
6039    pub fn r#query(
6040        &self,
6041    ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
6042        FileProxyInterface::r#query(self)
6043    }
6044
6045    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
6046    pub fn r#deprecated_clone(
6047        &self,
6048        mut flags: OpenFlags,
6049        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
6050    ) -> Result<(), fidl::Error> {
6051        FileProxyInterface::r#deprecated_clone(self, flags, object)
6052    }
6053
6054    /// DEPRECATED - Use `Node.GetAttributes` instead.
6055    pub fn r#deprecated_get_attr(
6056        &self,
6057    ) -> fidl::client::QueryResponseFut<
6058        (i32, NodeAttributes),
6059        fdomain_client::fidl::FDomainResourceDialect,
6060    > {
6061        FileProxyInterface::r#deprecated_get_attr(self)
6062    }
6063
6064    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
6065    pub fn r#deprecated_set_attr(
6066        &self,
6067        mut flags: NodeAttributeFlags,
6068        mut attributes: &NodeAttributes,
6069    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
6070        FileProxyInterface::r#deprecated_set_attr(self, flags, attributes)
6071    }
6072
6073    /// [DEPRECATED - Use new GetFlags method instead.]
6074    pub fn r#deprecated_get_flags(
6075        &self,
6076    ) -> fidl::client::QueryResponseFut<
6077        (i32, OpenFlags),
6078        fdomain_client::fidl::FDomainResourceDialect,
6079    > {
6080        FileProxyInterface::r#deprecated_get_flags(self)
6081    }
6082
6083    /// [DEPRECATED - Use new SetFlags method instead.]
6084    pub fn r#deprecated_set_flags(
6085        &self,
6086        mut flags: OpenFlags,
6087    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
6088        FileProxyInterface::r#deprecated_set_flags(self, flags)
6089    }
6090
6091    /// Queries the flags that apply to this node after it has been opened/created. This method does
6092    /// not require any rights.
6093    ///
6094    /// Note that the final set of flags that apply to the connection may differ from those
6095    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
6096    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
6097    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
6098    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
6099    pub fn r#get_flags(
6100        &self,
6101    ) -> fidl::client::QueryResponseFut<
6102        NodeGetFlagsResult,
6103        fdomain_client::fidl::FDomainResourceDialect,
6104    > {
6105        FileProxyInterface::r#get_flags(self)
6106    }
6107
6108    /// Sets the flags that apply to this node after it has been opened. This method does not
6109    /// require any rights.
6110    ///
6111    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
6112    /// clear append mode.
6113    ///
6114    /// Errors:
6115    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
6116    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
6117    pub fn r#set_flags(
6118        &self,
6119        mut flags: Flags,
6120    ) -> fidl::client::QueryResponseFut<
6121        NodeSetFlagsResult,
6122        fdomain_client::fidl::FDomainResourceDialect,
6123    > {
6124        FileProxyInterface::r#set_flags(self, flags)
6125    }
6126
6127    /// Query the filesystem for filesystem-specific information.
6128    pub fn r#query_filesystem(
6129        &self,
6130    ) -> fidl::client::QueryResponseFut<
6131        (i32, Option<Box<FilesystemInfo>>),
6132        fdomain_client::fidl::FDomainResourceDialect,
6133    > {
6134        FileProxyInterface::r#query_filesystem(self)
6135    }
6136
6137    /// Acquires information about the node.
6138    ///
6139    /// The attributes of a node should be stable, independent of the
6140    /// specific protocol used to access it.
6141    ///
6142    /// If a particular attribute is not applicable or not supported,
6143    /// filesystems should leave the corresponding field absent.
6144    ///
6145    /// + `query` a bit-mask specifying which attributes to fetch. The server
6146    ///   should not return more than necessary.
6147    /// - `attributes` the returned attributes.
6148    ///
6149    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
6150    pub fn r#get_attributes(
6151        &self,
6152        mut query: NodeAttributesQuery,
6153    ) -> fidl::client::QueryResponseFut<
6154        NodeGetAttributesResult,
6155        fdomain_client::fidl::FDomainResourceDialect,
6156    > {
6157        FileProxyInterface::r#get_attributes(self, query)
6158    }
6159
6160    /// Updates information about the node.
6161    ///
6162    /// + `attributes` the presence of a table field in `attributes` indicates
6163    /// the intent to update the corresponding attribute.
6164    ///
6165    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
6166    ///
6167    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
6168    pub fn r#update_attributes(
6169        &self,
6170        mut payload: &MutableNodeAttributes,
6171    ) -> fidl::client::QueryResponseFut<
6172        NodeUpdateAttributesResult,
6173        fdomain_client::fidl::FDomainResourceDialect,
6174    > {
6175        FileProxyInterface::r#update_attributes(self, payload)
6176    }
6177
6178    /// Synchronizes updates to the node to the underlying media, if it exists.
6179    ///
6180    /// This method will return when the filesystem server has flushed the
6181    /// relevant updates to the underlying media, but does not guarantee the
6182    /// underlying media has persisted the information, nor that any information
6183    /// is committed to hardware. Clients may use `Sync` to ensure ordering
6184    /// between operations.
6185    ///
6186    /// This method does not require any rights.
6187    pub fn r#sync(
6188        &self,
6189    ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
6190    {
6191        FileProxyInterface::r#sync(self)
6192    }
6193
6194    /// Creates an iterator over all the extended attribute names associated
6195    /// with this node. If an error occurs it is returned as an epitaph on the
6196    /// iterator request channel, and then the channel is closed.
6197    ///
6198    /// GetExtendedAttributes can be used with any of these names to retrieve
6199    /// the associated value.
6200    ///
6201    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
6202    pub fn r#list_extended_attributes(
6203        &self,
6204        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
6205    ) -> Result<(), fidl::Error> {
6206        FileProxyInterface::r#list_extended_attributes(self, iterator)
6207    }
6208
6209    /// Get the value associated with the given attribute `name` for this node.
6210    ///
6211    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
6212    /// particular structure is imposed on them.
6213    ///
6214    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
6215    pub fn r#get_extended_attribute(
6216        &self,
6217        mut name: &[u8],
6218    ) -> fidl::client::QueryResponseFut<
6219        NodeGetExtendedAttributeResult,
6220        fdomain_client::fidl::FDomainResourceDialect,
6221    > {
6222        FileProxyInterface::r#get_extended_attribute(self, name)
6223    }
6224
6225    /// Set the value for the given attribute `name` to `value` for this node.
6226    ///
6227    /// The attribute name may exist, in which case the attribute is updated.
6228    /// If the attribute doesn't exist, it is created. The name should have no
6229    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
6230    ///
6231    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
6232    pub fn r#set_extended_attribute(
6233        &self,
6234        mut name: &[u8],
6235        mut value: ExtendedAttributeValue,
6236        mut mode: SetExtendedAttributeMode,
6237    ) -> fidl::client::QueryResponseFut<
6238        NodeSetExtendedAttributeResult,
6239        fdomain_client::fidl::FDomainResourceDialect,
6240    > {
6241        FileProxyInterface::r#set_extended_attribute(self, name, value, mode)
6242    }
6243
6244    /// Remove the specified extended attribute.
6245    ///
6246    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
6247    ///
6248    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
6249    pub fn r#remove_extended_attribute(
6250        &self,
6251        mut name: &[u8],
6252    ) -> fidl::client::QueryResponseFut<
6253        NodeRemoveExtendedAttributeResult,
6254        fdomain_client::fidl::FDomainResourceDialect,
6255    > {
6256        FileProxyInterface::r#remove_extended_attribute(self, name)
6257    }
6258
6259    /// Reads up to 'count' bytes at the seek offset.
6260    /// The seek offset is moved forward by the number of bytes read.
6261    ///
6262    /// ## Invariants
6263    ///
6264    /// * The returned `data.length` will never be greater than `count`.
6265    /// * If `data.length` is less than `count`, it means that the seek offset
6266    ///   has reached the end of file as part of this operation.
6267    /// * If `data.length` is zero while `count` is not, it means that the
6268    ///   seek offset is already at or beyond the end of file, and no data could
6269    ///   be read.
6270    /// * If `count` is zero, the server should perform all the checks ensuring
6271    ///   read access without actually read anything, and return an empty
6272    ///   `data` vector.
6273    ///
6274    /// This method requires the [`Rights.READ_BYTES`] right.
6275    ///
6276    /// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.
6277    pub fn r#read(
6278        &self,
6279        mut count: u64,
6280    ) -> fidl::client::QueryResponseFut<
6281        ReadableReadResult,
6282        fdomain_client::fidl::FDomainResourceDialect,
6283    > {
6284        FileProxyInterface::r#read(self, count)
6285    }
6286
6287    /// Writes data at the seek offset.
6288    /// The seek offset is moved forward by the number of bytes written.
6289    /// If the file is in append mode, the seek offset is first set to the end
6290    /// of the file, followed by the write, in one atomic step.
6291    ///
6292    /// The file size may grow if the seek offset plus `data.length` is beyond
6293    /// the current end of file.
6294    ///
6295    /// + request `data` the byte buffer to write to the file.
6296    /// - response `actual_count` the number of bytes written.
6297    ///
6298    /// ## Invariants
6299    ///
6300    /// * The returned `actual_count` will never be greater than `data.length`.
6301    /// * If the server is unable to write all the data due to e.g. not enough
6302    ///   space, `actual_count` may be less than `data.length`.  If no bytes
6303    ///   could be written, an error is returned.
6304    /// * If `data.length` is zero, the server should perform all the checks
6305    ///   ensuring write access without mutating the file and return a
6306    ///   successful write of zero bytes.  The seek offset is still updated if
6307    ///   in append mode.
6308    ///
6309    /// This method requires the [`Rights.WRITE_BYTES`] right.
6310    pub fn r#write(
6311        &self,
6312        mut data: &[u8],
6313    ) -> fidl::client::QueryResponseFut<
6314        WritableWriteResult,
6315        fdomain_client::fidl::FDomainResourceDialect,
6316    > {
6317        FileProxyInterface::r#write(self, data)
6318    }
6319
6320    pub fn r#describe(
6321        &self,
6322    ) -> fidl::client::QueryResponseFut<FileInfo, fdomain_client::fidl::FDomainResourceDialect>
6323    {
6324        FileProxyInterface::r#describe(self)
6325    }
6326
6327    /// Moves the offset at which the next invocation of [`Read`] or [`Write`]
6328    /// will occur. The seek offset is specific to each file connection.
6329    ///
6330    /// + request `origin` the reference point where `offset` will be based on.
6331    /// + request `offset` the number of bytes to seek.
6332    /// - response `offset_from_start` the adjusted seek offset, from the start
6333    ///   of the file.
6334    ///
6335    /// This method does not require any rights.
6336    pub fn r#seek(
6337        &self,
6338        mut origin: SeekOrigin,
6339        mut offset: i64,
6340    ) -> fidl::client::QueryResponseFut<FileSeekResult, fdomain_client::fidl::FDomainResourceDialect>
6341    {
6342        FileProxyInterface::r#seek(self, origin, offset)
6343    }
6344
6345    /// Reads up to 'count' bytes at the provided offset.
6346    /// Does not affect the seek offset.
6347    ///
6348    /// ## Invariants
6349    ///
6350    /// * The returned `data.length` will never be greater than `count`.
6351    /// * If `data.length` is less than `count`, it means that `ReadAt` has hit
6352    ///   the end of file as part of this operation.
6353    /// * If `data.length` is zero while `count` is not, it means that `offset`
6354    ///   is at or past the end of file, and no data can be read.
6355    /// * If `count` is zero, the server should perform all the checks ensuring
6356    ///   read access without actually reading anything, and return an empty
6357    ///   `data` vector.
6358    ///
6359    /// This method requires the [`Rights.READ_BYTES`] right.
6360    ///
6361    /// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.
6362    pub fn r#read_at(
6363        &self,
6364        mut count: u64,
6365        mut offset: u64,
6366    ) -> fidl::client::QueryResponseFut<
6367        FileReadAtResult,
6368        fdomain_client::fidl::FDomainResourceDialect,
6369    > {
6370        FileProxyInterface::r#read_at(self, count, offset)
6371    }
6372
6373    /// Writes data at the provided offset.
6374    /// Does not affect the seek offset.
6375    ///
6376    /// The file size may grow if `offset` plus `data.length` is past the
6377    /// current end of file.
6378    ///
6379    /// + request `data` the byte buffer to write to the file.
6380    /// + request `offset` the offset from start of the file to begin writing.
6381    /// - response `actual_count` the number of bytes written.
6382    ///
6383    /// ## Invariants
6384    ///
6385    /// * The returned `actual_count` will never be greater than `data.length`.
6386    /// * If the server is unable to write all the data due to e.g. not enough
6387    ///   space, `actual_count` may be less than `data.length`.  If no bytes
6388    ///   could be written, an error is returned.
6389    /// * If `data.length` is zero, the server should perform all the checks
6390    ///   ensuring write access without mutating the file, and will return a
6391    ///   successful write of zero bytes.
6392    ///
6393    /// This method requires the [`Rights.WRITE_BYTES`] right.
6394    pub fn r#write_at(
6395        &self,
6396        mut data: &[u8],
6397        mut offset: u64,
6398    ) -> fidl::client::QueryResponseFut<
6399        FileWriteAtResult,
6400        fdomain_client::fidl::FDomainResourceDialect,
6401    > {
6402        FileProxyInterface::r#write_at(self, data, offset)
6403    }
6404
6405    /// Shrinks or grows the file size to 'length' bytes.
6406    ///
6407    /// If file size is reduced by this operation, the extra trailing data'
6408    /// is discarded.
6409    /// If file size is increased by this operation, the extended area appears
6410    /// as if it was zeroed.
6411    ///
6412    /// This method requires the [`Rights.WRITE_BYTES`] right.
6413    pub fn r#resize(
6414        &self,
6415        mut length: u64,
6416    ) -> fidl::client::QueryResponseFut<
6417        FileResizeResult,
6418        fdomain_client::fidl::FDomainResourceDialect,
6419    > {
6420        FileProxyInterface::r#resize(self, length)
6421    }
6422
6423    /// Acquires a [`zx.Handle:VMO`] representing this file, if there is one,
6424    /// with the requested access rights.
6425    ///
6426    /// Implementations are not required to implement files backed by VMOs so
6427    /// this request may fail. Additionally, implementations may only support
6428    /// a certain subset of the flags. Clients should be prepared with fallback
6429    /// behavior if this request fails.
6430    ///
6431    /// If a client specifies neither `PRIVATE_CLONE` nor `SHARED_BUFFER`, the
6432    /// implementation is free to choose the semantics of the returned VMO.
6433    ///
6434    /// + request `flags` a [`VmoFlags`] indicating the desired mode of access.
6435    /// - response `vmo` the requested [`zx.Handle:VMO`].
6436    /// * error a [`zx.Status`] value indicating the failure.
6437    ///
6438    /// This method requires the following rights:
6439    ///
6440    /// * [`Rights.READ_BYTES`] if `flags` includes [`VmoFlags.READ`].
6441    /// * [`Rights.WRITE_BYTES`] if `flags` includes [`VmoFlags.WRITE`].
6442    /// * [`Rights.EXECUTE`] if `flags` includes [`VmoFlags.EXECUTE`].
6443    pub fn r#get_backing_memory(
6444        &self,
6445        mut flags: VmoFlags,
6446    ) -> fidl::client::QueryResponseFut<
6447        FileGetBackingMemoryResult,
6448        fdomain_client::fidl::FDomainResourceDialect,
6449    > {
6450        FileProxyInterface::r#get_backing_memory(self, flags)
6451    }
6452
6453    /// Pre-allocate on-disk space for this file.
6454    pub fn r#allocate(
6455        &self,
6456        mut offset: u64,
6457        mut length: u64,
6458        mut mode: AllocateMode,
6459    ) -> fidl::client::QueryResponseFut<
6460        FileAllocateResult,
6461        fdomain_client::fidl::FDomainResourceDialect,
6462    > {
6463        FileProxyInterface::r#allocate(self, offset, length, mode)
6464    }
6465
6466    /// Enables verification for the file (permanently) which involves computing a merkle tree for
6467    /// the file. Forces a flush prior to building the merkle tree to ensure cached data is
6468    /// captured. Future reads will be verified against the computed merkle tree and writes will be
6469    /// rejected. This method can take some time to complete as it depends on the size of the file.
6470    /// This method can be aborted by closing the connection that this method was issued on.
6471    ///
6472    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
6473    /// Returns `ZX_ERR_NOT_SUPPORTED` if the filesystem does not support verity.
6474    /// Returns `ZX_ERR_ALREADY_EXISTS` if the file was already fsverity-enabled.
6475    /// Also returns any error that might arise from reading the file, or from flushing the file,
6476    /// such as `ZX_ERR_IO`.
6477    pub fn r#enable_verity(
6478        &self,
6479        mut options: &VerificationOptions,
6480    ) -> fidl::client::QueryResponseFut<
6481        FileEnableVerityResult,
6482        fdomain_client::fidl::FDomainResourceDialect,
6483    > {
6484        FileProxyInterface::r#enable_verity(self, options)
6485    }
6486}
6487
6488impl FileProxyInterface for FileProxy {
6489    type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
6490        AdvisoryLockingAdvisoryLockResult,
6491        fdomain_client::fidl::FDomainResourceDialect,
6492    >;
6493    fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
6494        fn _decode(
6495            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6496        ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
6497            let _response = fidl::client::decode_transaction_body::<
6498                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6499                fdomain_client::fidl::FDomainResourceDialect,
6500                0x6ee9c0ad53ec87aa,
6501            >(_buf?)?;
6502            Ok(_response.map(|x| x))
6503        }
6504        self.client.send_query_and_decode::<
6505            AdvisoryLockingAdvisoryLockRequest,
6506            AdvisoryLockingAdvisoryLockResult,
6507        >(
6508            (request,),
6509            0x6ee9c0ad53ec87aa,
6510            fidl::encoding::DynamicFlags::empty(),
6511            _decode,
6512        )
6513    }
6514
6515    type LinkIntoResponseFut = fidl::client::QueryResponseFut<
6516        LinkableLinkIntoResult,
6517        fdomain_client::fidl::FDomainResourceDialect,
6518    >;
6519    fn r#link_into(
6520        &self,
6521        mut dst_parent_token: fdomain_client::Event,
6522        mut dst: &str,
6523    ) -> Self::LinkIntoResponseFut {
6524        fn _decode(
6525            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6526        ) -> Result<LinkableLinkIntoResult, fidl::Error> {
6527            let _response = fidl::client::decode_transaction_body::<
6528                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6529                fdomain_client::fidl::FDomainResourceDialect,
6530                0x54f3949246a03e74,
6531            >(_buf?)?;
6532            Ok(_response.map(|x| x))
6533        }
6534        self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
6535            (dst_parent_token, dst),
6536            0x54f3949246a03e74,
6537            fidl::encoding::DynamicFlags::empty(),
6538            _decode,
6539        )
6540    }
6541
6542    fn r#clone(
6543        &self,
6544        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
6545    ) -> Result<(), fidl::Error> {
6546        self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
6547            (request,),
6548            0x20d8a7aba2168a79,
6549            fidl::encoding::DynamicFlags::empty(),
6550        )
6551    }
6552
6553    type CloseResponseFut = fidl::client::QueryResponseFut<
6554        fdomain_fuchsia_unknown::CloseableCloseResult,
6555        fdomain_client::fidl::FDomainResourceDialect,
6556    >;
6557    fn r#close(&self) -> Self::CloseResponseFut {
6558        fn _decode(
6559            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6560        ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
6561            let _response = fidl::client::decode_transaction_body::<
6562                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6563                fdomain_client::fidl::FDomainResourceDialect,
6564                0x5ac5d459ad7f657e,
6565            >(_buf?)?;
6566            Ok(_response.map(|x| x))
6567        }
6568        self.client.send_query_and_decode::<
6569            fidl::encoding::EmptyPayload,
6570            fdomain_fuchsia_unknown::CloseableCloseResult,
6571        >(
6572            (),
6573            0x5ac5d459ad7f657e,
6574            fidl::encoding::DynamicFlags::empty(),
6575            _decode,
6576        )
6577    }
6578
6579    type QueryResponseFut =
6580        fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
6581    fn r#query(&self) -> Self::QueryResponseFut {
6582        fn _decode(
6583            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6584        ) -> Result<Vec<u8>, fidl::Error> {
6585            let _response = fidl::client::decode_transaction_body::<
6586                fdomain_fuchsia_unknown::QueryableQueryResponse,
6587                fdomain_client::fidl::FDomainResourceDialect,
6588                0x2658edee9decfc06,
6589            >(_buf?)?;
6590            Ok(_response.protocol)
6591        }
6592        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
6593            (),
6594            0x2658edee9decfc06,
6595            fidl::encoding::DynamicFlags::empty(),
6596            _decode,
6597        )
6598    }
6599
6600    fn r#deprecated_clone(
6601        &self,
6602        mut flags: OpenFlags,
6603        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
6604    ) -> Result<(), fidl::Error> {
6605        self.client.send::<NodeDeprecatedCloneRequest>(
6606            (flags, object),
6607            0x5a61678f293ce16f,
6608            fidl::encoding::DynamicFlags::FLEXIBLE,
6609        )
6610    }
6611
6612    type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
6613        (i32, NodeAttributes),
6614        fdomain_client::fidl::FDomainResourceDialect,
6615    >;
6616    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
6617        fn _decode(
6618            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6619        ) -> Result<(i32, NodeAttributes), fidl::Error> {
6620            let _response = fidl::client::decode_transaction_body::<
6621                NodeDeprecatedGetAttrResponse,
6622                fdomain_client::fidl::FDomainResourceDialect,
6623                0x78985e216314dafd,
6624            >(_buf?)?;
6625            Ok((_response.s, _response.attributes))
6626        }
6627        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
6628            (),
6629            0x78985e216314dafd,
6630            fidl::encoding::DynamicFlags::empty(),
6631            _decode,
6632        )
6633    }
6634
6635    type DeprecatedSetAttrResponseFut =
6636        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
6637    fn r#deprecated_set_attr(
6638        &self,
6639        mut flags: NodeAttributeFlags,
6640        mut attributes: &NodeAttributes,
6641    ) -> Self::DeprecatedSetAttrResponseFut {
6642        fn _decode(
6643            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6644        ) -> Result<i32, fidl::Error> {
6645            let _response = fidl::client::decode_transaction_body::<
6646                NodeDeprecatedSetAttrResponse,
6647                fdomain_client::fidl::FDomainResourceDialect,
6648                0x4186c0f40d938f46,
6649            >(_buf?)?;
6650            Ok(_response.s)
6651        }
6652        self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
6653            (flags, attributes),
6654            0x4186c0f40d938f46,
6655            fidl::encoding::DynamicFlags::empty(),
6656            _decode,
6657        )
6658    }
6659
6660    type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
6661        (i32, OpenFlags),
6662        fdomain_client::fidl::FDomainResourceDialect,
6663    >;
6664    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
6665        fn _decode(
6666            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6667        ) -> Result<(i32, OpenFlags), fidl::Error> {
6668            let _response = fidl::client::decode_transaction_body::<
6669                NodeDeprecatedGetFlagsResponse,
6670                fdomain_client::fidl::FDomainResourceDialect,
6671                0x5b88fffb8eda3aa1,
6672            >(_buf?)?;
6673            Ok((_response.s, _response.flags))
6674        }
6675        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
6676            (),
6677            0x5b88fffb8eda3aa1,
6678            fidl::encoding::DynamicFlags::empty(),
6679            _decode,
6680        )
6681    }
6682
6683    type DeprecatedSetFlagsResponseFut =
6684        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
6685    fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
6686        fn _decode(
6687            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6688        ) -> Result<i32, fidl::Error> {
6689            let _response = fidl::client::decode_transaction_body::<
6690                NodeDeprecatedSetFlagsResponse,
6691                fdomain_client::fidl::FDomainResourceDialect,
6692                0x5295b76c71fde733,
6693            >(_buf?)?;
6694            Ok(_response.s)
6695        }
6696        self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
6697            (flags,),
6698            0x5295b76c71fde733,
6699            fidl::encoding::DynamicFlags::empty(),
6700            _decode,
6701        )
6702    }
6703
6704    type GetFlagsResponseFut = fidl::client::QueryResponseFut<
6705        NodeGetFlagsResult,
6706        fdomain_client::fidl::FDomainResourceDialect,
6707    >;
6708    fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
6709        fn _decode(
6710            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6711        ) -> Result<NodeGetFlagsResult, fidl::Error> {
6712            let _response = fidl::client::decode_transaction_body::<
6713                fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
6714                fdomain_client::fidl::FDomainResourceDialect,
6715                0x176eb318f64ec23,
6716            >(_buf?)?
6717            .into_result_fdomain::<FileMarker>("get_flags")?;
6718            Ok(_response.map(|x| x.flags))
6719        }
6720        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
6721            (),
6722            0x176eb318f64ec23,
6723            fidl::encoding::DynamicFlags::FLEXIBLE,
6724            _decode,
6725        )
6726    }
6727
6728    type SetFlagsResponseFut = fidl::client::QueryResponseFut<
6729        NodeSetFlagsResult,
6730        fdomain_client::fidl::FDomainResourceDialect,
6731    >;
6732    fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
6733        fn _decode(
6734            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6735        ) -> Result<NodeSetFlagsResult, fidl::Error> {
6736            let _response = fidl::client::decode_transaction_body::<
6737                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
6738                fdomain_client::fidl::FDomainResourceDialect,
6739                0x55a8028685791ea8,
6740            >(_buf?)?
6741            .into_result_fdomain::<FileMarker>("set_flags")?;
6742            Ok(_response.map(|x| x))
6743        }
6744        self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
6745            (flags,),
6746            0x55a8028685791ea8,
6747            fidl::encoding::DynamicFlags::FLEXIBLE,
6748            _decode,
6749        )
6750    }
6751
6752    type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
6753        (i32, Option<Box<FilesystemInfo>>),
6754        fdomain_client::fidl::FDomainResourceDialect,
6755    >;
6756    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
6757        fn _decode(
6758            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6759        ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
6760            let _response = fidl::client::decode_transaction_body::<
6761                NodeQueryFilesystemResponse,
6762                fdomain_client::fidl::FDomainResourceDialect,
6763                0x6f344a1c6b0a0610,
6764            >(_buf?)?;
6765            Ok((_response.s, _response.info))
6766        }
6767        self.client.send_query_and_decode::<
6768            fidl::encoding::EmptyPayload,
6769            (i32, Option<Box<FilesystemInfo>>),
6770        >(
6771            (),
6772            0x6f344a1c6b0a0610,
6773            fidl::encoding::DynamicFlags::empty(),
6774            _decode,
6775        )
6776    }
6777
6778    type GetAttributesResponseFut = fidl::client::QueryResponseFut<
6779        NodeGetAttributesResult,
6780        fdomain_client::fidl::FDomainResourceDialect,
6781    >;
6782    fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
6783        fn _decode(
6784            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6785        ) -> Result<NodeGetAttributesResult, fidl::Error> {
6786            let _response = fidl::client::decode_transaction_body::<
6787                fidl::encoding::ResultType<NodeAttributes2, i32>,
6788                fdomain_client::fidl::FDomainResourceDialect,
6789                0x3d4396a638ea053b,
6790            >(_buf?)?;
6791            Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
6792        }
6793        self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
6794            (query,),
6795            0x3d4396a638ea053b,
6796            fidl::encoding::DynamicFlags::empty(),
6797            _decode,
6798        )
6799    }
6800
6801    type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
6802        NodeUpdateAttributesResult,
6803        fdomain_client::fidl::FDomainResourceDialect,
6804    >;
6805    fn r#update_attributes(
6806        &self,
6807        mut payload: &MutableNodeAttributes,
6808    ) -> Self::UpdateAttributesResponseFut {
6809        fn _decode(
6810            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6811        ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
6812            let _response = fidl::client::decode_transaction_body::<
6813                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6814                fdomain_client::fidl::FDomainResourceDialect,
6815                0x3308c1da5a89bf08,
6816            >(_buf?)?;
6817            Ok(_response.map(|x| x))
6818        }
6819        self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
6820            payload,
6821            0x3308c1da5a89bf08,
6822            fidl::encoding::DynamicFlags::empty(),
6823            _decode,
6824        )
6825    }
6826
6827    type SyncResponseFut = fidl::client::QueryResponseFut<
6828        NodeSyncResult,
6829        fdomain_client::fidl::FDomainResourceDialect,
6830    >;
6831    fn r#sync(&self) -> Self::SyncResponseFut {
6832        fn _decode(
6833            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6834        ) -> Result<NodeSyncResult, fidl::Error> {
6835            let _response = fidl::client::decode_transaction_body::<
6836                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6837                fdomain_client::fidl::FDomainResourceDialect,
6838                0x2c5c27ca0ab5dc49,
6839            >(_buf?)?;
6840            Ok(_response.map(|x| x))
6841        }
6842        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
6843            (),
6844            0x2c5c27ca0ab5dc49,
6845            fidl::encoding::DynamicFlags::empty(),
6846            _decode,
6847        )
6848    }
6849
6850    fn r#list_extended_attributes(
6851        &self,
6852        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
6853    ) -> Result<(), fidl::Error> {
6854        self.client.send::<NodeListExtendedAttributesRequest>(
6855            (iterator,),
6856            0x4b61033de007fcd0,
6857            fidl::encoding::DynamicFlags::empty(),
6858        )
6859    }
6860
6861    type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6862        NodeGetExtendedAttributeResult,
6863        fdomain_client::fidl::FDomainResourceDialect,
6864    >;
6865    fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
6866        fn _decode(
6867            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6868        ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
6869            let _response = fidl::client::decode_transaction_body::<
6870                fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
6871                fdomain_client::fidl::FDomainResourceDialect,
6872                0x45ffa3ccfdeb76db,
6873            >(_buf?)?;
6874            Ok(_response.map(|x| x))
6875        }
6876        self.client.send_query_and_decode::<
6877            NodeGetExtendedAttributeRequest,
6878            NodeGetExtendedAttributeResult,
6879        >(
6880            (name,),
6881            0x45ffa3ccfdeb76db,
6882            fidl::encoding::DynamicFlags::empty(),
6883            _decode,
6884        )
6885    }
6886
6887    type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6888        NodeSetExtendedAttributeResult,
6889        fdomain_client::fidl::FDomainResourceDialect,
6890    >;
6891    fn r#set_extended_attribute(
6892        &self,
6893        mut name: &[u8],
6894        mut value: ExtendedAttributeValue,
6895        mut mode: SetExtendedAttributeMode,
6896    ) -> Self::SetExtendedAttributeResponseFut {
6897        fn _decode(
6898            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6899        ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
6900            let _response = fidl::client::decode_transaction_body::<
6901                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6902                fdomain_client::fidl::FDomainResourceDialect,
6903                0x4a951362f681f23c,
6904            >(_buf?)?;
6905            Ok(_response.map(|x| x))
6906        }
6907        self.client.send_query_and_decode::<
6908            NodeSetExtendedAttributeRequest,
6909            NodeSetExtendedAttributeResult,
6910        >(
6911            (name, &mut value, mode,),
6912            0x4a951362f681f23c,
6913            fidl::encoding::DynamicFlags::empty(),
6914            _decode,
6915        )
6916    }
6917
6918    type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6919        NodeRemoveExtendedAttributeResult,
6920        fdomain_client::fidl::FDomainResourceDialect,
6921    >;
6922    fn r#remove_extended_attribute(
6923        &self,
6924        mut name: &[u8],
6925    ) -> Self::RemoveExtendedAttributeResponseFut {
6926        fn _decode(
6927            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6928        ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
6929            let _response = fidl::client::decode_transaction_body::<
6930                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6931                fdomain_client::fidl::FDomainResourceDialect,
6932                0x7a0b9f3a9bf9032d,
6933            >(_buf?)?;
6934            Ok(_response.map(|x| x))
6935        }
6936        self.client.send_query_and_decode::<
6937            NodeRemoveExtendedAttributeRequest,
6938            NodeRemoveExtendedAttributeResult,
6939        >(
6940            (name,),
6941            0x7a0b9f3a9bf9032d,
6942            fidl::encoding::DynamicFlags::empty(),
6943            _decode,
6944        )
6945    }
6946
6947    type ReadResponseFut = fidl::client::QueryResponseFut<
6948        ReadableReadResult,
6949        fdomain_client::fidl::FDomainResourceDialect,
6950    >;
6951    fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
6952        fn _decode(
6953            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6954        ) -> Result<ReadableReadResult, fidl::Error> {
6955            let _response = fidl::client::decode_transaction_body::<
6956                fidl::encoding::ResultType<ReadableReadResponse, i32>,
6957                fdomain_client::fidl::FDomainResourceDialect,
6958                0x57e419a298c8ede,
6959            >(_buf?)?;
6960            Ok(_response.map(|x| x.data))
6961        }
6962        self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
6963            (count,),
6964            0x57e419a298c8ede,
6965            fidl::encoding::DynamicFlags::empty(),
6966            _decode,
6967        )
6968    }
6969
6970    type WriteResponseFut = fidl::client::QueryResponseFut<
6971        WritableWriteResult,
6972        fdomain_client::fidl::FDomainResourceDialect,
6973    >;
6974    fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
6975        fn _decode(
6976            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6977        ) -> Result<WritableWriteResult, fidl::Error> {
6978            let _response = fidl::client::decode_transaction_body::<
6979                fidl::encoding::ResultType<WritableWriteResponse, i32>,
6980                fdomain_client::fidl::FDomainResourceDialect,
6981                0x6a31437832469f82,
6982            >(_buf?)?;
6983            Ok(_response.map(|x| x.actual_count))
6984        }
6985        self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
6986            (data,),
6987            0x6a31437832469f82,
6988            fidl::encoding::DynamicFlags::empty(),
6989            _decode,
6990        )
6991    }
6992
6993    type DescribeResponseFut =
6994        fidl::client::QueryResponseFut<FileInfo, fdomain_client::fidl::FDomainResourceDialect>;
6995    fn r#describe(&self) -> Self::DescribeResponseFut {
6996        fn _decode(
6997            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6998        ) -> Result<FileInfo, fidl::Error> {
6999            let _response = fidl::client::decode_transaction_body::<
7000                FileInfo,
7001                fdomain_client::fidl::FDomainResourceDialect,
7002                0x68b5ac00c62906bc,
7003            >(_buf?)?;
7004            Ok(_response)
7005        }
7006        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, FileInfo>(
7007            (),
7008            0x68b5ac00c62906bc,
7009            fidl::encoding::DynamicFlags::empty(),
7010            _decode,
7011        )
7012    }
7013
7014    type SeekResponseFut = fidl::client::QueryResponseFut<
7015        FileSeekResult,
7016        fdomain_client::fidl::FDomainResourceDialect,
7017    >;
7018    fn r#seek(&self, mut origin: SeekOrigin, mut offset: i64) -> Self::SeekResponseFut {
7019        fn _decode(
7020            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7021        ) -> Result<FileSeekResult, fidl::Error> {
7022            let _response = fidl::client::decode_transaction_body::<
7023                fidl::encoding::ResultType<FileSeekResponse, i32>,
7024                fdomain_client::fidl::FDomainResourceDialect,
7025                0x78079168162c5207,
7026            >(_buf?)?;
7027            Ok(_response.map(|x| x.offset_from_start))
7028        }
7029        self.client.send_query_and_decode::<FileSeekRequest, FileSeekResult>(
7030            (origin, offset),
7031            0x78079168162c5207,
7032            fidl::encoding::DynamicFlags::empty(),
7033            _decode,
7034        )
7035    }
7036
7037    type ReadAtResponseFut = fidl::client::QueryResponseFut<
7038        FileReadAtResult,
7039        fdomain_client::fidl::FDomainResourceDialect,
7040    >;
7041    fn r#read_at(&self, mut count: u64, mut offset: u64) -> Self::ReadAtResponseFut {
7042        fn _decode(
7043            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7044        ) -> Result<FileReadAtResult, fidl::Error> {
7045            let _response = fidl::client::decode_transaction_body::<
7046                fidl::encoding::ResultType<FileReadAtResponse, i32>,
7047                fdomain_client::fidl::FDomainResourceDialect,
7048                0x1607a293a60d723e,
7049            >(_buf?)?;
7050            Ok(_response.map(|x| x.data))
7051        }
7052        self.client.send_query_and_decode::<FileReadAtRequest, FileReadAtResult>(
7053            (count, offset),
7054            0x1607a293a60d723e,
7055            fidl::encoding::DynamicFlags::empty(),
7056            _decode,
7057        )
7058    }
7059
7060    type WriteAtResponseFut = fidl::client::QueryResponseFut<
7061        FileWriteAtResult,
7062        fdomain_client::fidl::FDomainResourceDialect,
7063    >;
7064    fn r#write_at(&self, mut data: &[u8], mut offset: u64) -> Self::WriteAtResponseFut {
7065        fn _decode(
7066            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7067        ) -> Result<FileWriteAtResult, fidl::Error> {
7068            let _response = fidl::client::decode_transaction_body::<
7069                fidl::encoding::ResultType<FileWriteAtResponse, i32>,
7070                fdomain_client::fidl::FDomainResourceDialect,
7071                0x793eefc0045e792b,
7072            >(_buf?)?;
7073            Ok(_response.map(|x| x.actual_count))
7074        }
7075        self.client.send_query_and_decode::<FileWriteAtRequest, FileWriteAtResult>(
7076            (data, offset),
7077            0x793eefc0045e792b,
7078            fidl::encoding::DynamicFlags::empty(),
7079            _decode,
7080        )
7081    }
7082
7083    type ResizeResponseFut = fidl::client::QueryResponseFut<
7084        FileResizeResult,
7085        fdomain_client::fidl::FDomainResourceDialect,
7086    >;
7087    fn r#resize(&self, mut length: u64) -> Self::ResizeResponseFut {
7088        fn _decode(
7089            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7090        ) -> Result<FileResizeResult, fidl::Error> {
7091            let _response = fidl::client::decode_transaction_body::<
7092                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7093                fdomain_client::fidl::FDomainResourceDialect,
7094                0x2b80825f0535743a,
7095            >(_buf?)?;
7096            Ok(_response.map(|x| x))
7097        }
7098        self.client.send_query_and_decode::<FileResizeRequest, FileResizeResult>(
7099            (length,),
7100            0x2b80825f0535743a,
7101            fidl::encoding::DynamicFlags::empty(),
7102            _decode,
7103        )
7104    }
7105
7106    type GetBackingMemoryResponseFut = fidl::client::QueryResponseFut<
7107        FileGetBackingMemoryResult,
7108        fdomain_client::fidl::FDomainResourceDialect,
7109    >;
7110    fn r#get_backing_memory(&self, mut flags: VmoFlags) -> Self::GetBackingMemoryResponseFut {
7111        fn _decode(
7112            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7113        ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
7114            let _response = fidl::client::decode_transaction_body::<
7115                fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
7116                fdomain_client::fidl::FDomainResourceDialect,
7117                0xa6a9e654cbf62b,
7118            >(_buf?)?;
7119            Ok(_response.map(|x| x.vmo))
7120        }
7121        self.client
7122            .send_query_and_decode::<FileGetBackingMemoryRequest, FileGetBackingMemoryResult>(
7123                (flags,),
7124                0xa6a9e654cbf62b,
7125                fidl::encoding::DynamicFlags::empty(),
7126                _decode,
7127            )
7128    }
7129
7130    type AllocateResponseFut = fidl::client::QueryResponseFut<
7131        FileAllocateResult,
7132        fdomain_client::fidl::FDomainResourceDialect,
7133    >;
7134    fn r#allocate(
7135        &self,
7136        mut offset: u64,
7137        mut length: u64,
7138        mut mode: AllocateMode,
7139    ) -> Self::AllocateResponseFut {
7140        fn _decode(
7141            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7142        ) -> Result<FileAllocateResult, fidl::Error> {
7143            let _response = fidl::client::decode_transaction_body::<
7144                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7145                fdomain_client::fidl::FDomainResourceDialect,
7146                0x77fa0c330b57fd2e,
7147            >(_buf?)?
7148            .into_result_fdomain::<FileMarker>("allocate")?;
7149            Ok(_response.map(|x| x))
7150        }
7151        self.client.send_query_and_decode::<FileAllocateRequest, FileAllocateResult>(
7152            (offset, length, mode),
7153            0x77fa0c330b57fd2e,
7154            fidl::encoding::DynamicFlags::FLEXIBLE,
7155            _decode,
7156        )
7157    }
7158
7159    type EnableVerityResponseFut = fidl::client::QueryResponseFut<
7160        FileEnableVerityResult,
7161        fdomain_client::fidl::FDomainResourceDialect,
7162    >;
7163    fn r#enable_verity(&self, mut options: &VerificationOptions) -> Self::EnableVerityResponseFut {
7164        fn _decode(
7165            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7166        ) -> Result<FileEnableVerityResult, fidl::Error> {
7167            let _response = fidl::client::decode_transaction_body::<
7168                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7169                fdomain_client::fidl::FDomainResourceDialect,
7170                0x2c421ec3faaeb8bb,
7171            >(_buf?)?
7172            .into_result_fdomain::<FileMarker>("enable_verity")?;
7173            Ok(_response.map(|x| x))
7174        }
7175        self.client.send_query_and_decode::<FileEnableVerityRequest, FileEnableVerityResult>(
7176            (options,),
7177            0x2c421ec3faaeb8bb,
7178            fidl::encoding::DynamicFlags::FLEXIBLE,
7179            _decode,
7180        )
7181    }
7182}
7183
7184pub struct FileEventStream {
7185    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
7186}
7187
7188impl std::marker::Unpin for FileEventStream {}
7189
7190impl futures::stream::FusedStream for FileEventStream {
7191    fn is_terminated(&self) -> bool {
7192        self.event_receiver.is_terminated()
7193    }
7194}
7195
7196impl futures::Stream for FileEventStream {
7197    type Item = Result<FileEvent, fidl::Error>;
7198
7199    fn poll_next(
7200        mut self: std::pin::Pin<&mut Self>,
7201        cx: &mut std::task::Context<'_>,
7202    ) -> std::task::Poll<Option<Self::Item>> {
7203        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7204            &mut self.event_receiver,
7205            cx
7206        )?) {
7207            Some(buf) => std::task::Poll::Ready(Some(FileEvent::decode(buf))),
7208            None => std::task::Poll::Ready(None),
7209        }
7210    }
7211}
7212
7213#[derive(Debug)]
7214pub enum FileEvent {
7215    OnOpen_ {
7216        s: i32,
7217        info: Option<Box<NodeInfoDeprecated>>,
7218    },
7219    OnRepresentation {
7220        payload: Representation,
7221    },
7222    #[non_exhaustive]
7223    _UnknownEvent {
7224        /// Ordinal of the event that was sent.
7225        ordinal: u64,
7226    },
7227}
7228
7229impl FileEvent {
7230    #[allow(irrefutable_let_patterns)]
7231    pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
7232        if let FileEvent::OnOpen_ { s, info } = self {
7233            Some((s, info))
7234        } else {
7235            None
7236        }
7237    }
7238    #[allow(irrefutable_let_patterns)]
7239    pub fn into_on_representation(self) -> Option<Representation> {
7240        if let FileEvent::OnRepresentation { payload } = self {
7241            Some((payload))
7242        } else {
7243            None
7244        }
7245    }
7246
7247    /// Decodes a message buffer as a [`FileEvent`].
7248    fn decode(
7249        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7250    ) -> Result<FileEvent, fidl::Error> {
7251        let (bytes, _handles) = buf.split_mut();
7252        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7253        debug_assert_eq!(tx_header.tx_id, 0);
7254        match tx_header.ordinal {
7255            0x7fc7bbb1dbfd1972 => {
7256                let mut out = fidl::new_empty!(
7257                    NodeOnOpenRequest,
7258                    fdomain_client::fidl::FDomainResourceDialect
7259                );
7260                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
7261                Ok((FileEvent::OnOpen_ { s: out.s, info: out.info }))
7262            }
7263            0x5cb40567d80a510c => {
7264                let mut out =
7265                    fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
7266                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
7267                Ok((FileEvent::OnRepresentation { payload: out }))
7268            }
7269            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7270                Ok(FileEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7271            }
7272            _ => Err(fidl::Error::UnknownOrdinal {
7273                ordinal: tx_header.ordinal,
7274                protocol_name: <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7275            }),
7276        }
7277    }
7278}
7279
7280/// A Stream of incoming requests for fuchsia.io/File.
7281pub struct FileRequestStream {
7282    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7283    is_terminated: bool,
7284}
7285
7286impl std::marker::Unpin for FileRequestStream {}
7287
7288impl futures::stream::FusedStream for FileRequestStream {
7289    fn is_terminated(&self) -> bool {
7290        self.is_terminated
7291    }
7292}
7293
7294impl fdomain_client::fidl::RequestStream for FileRequestStream {
7295    type Protocol = FileMarker;
7296    type ControlHandle = FileControlHandle;
7297
7298    fn from_channel(channel: fdomain_client::Channel) -> Self {
7299        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7300    }
7301
7302    fn control_handle(&self) -> Self::ControlHandle {
7303        FileControlHandle { inner: self.inner.clone() }
7304    }
7305
7306    fn into_inner(
7307        self,
7308    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7309    {
7310        (self.inner, self.is_terminated)
7311    }
7312
7313    fn from_inner(
7314        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7315        is_terminated: bool,
7316    ) -> Self {
7317        Self { inner, is_terminated }
7318    }
7319}
7320
7321impl futures::Stream for FileRequestStream {
7322    type Item = Result<FileRequest, fidl::Error>;
7323
7324    fn poll_next(
7325        mut self: std::pin::Pin<&mut Self>,
7326        cx: &mut std::task::Context<'_>,
7327    ) -> std::task::Poll<Option<Self::Item>> {
7328        let this = &mut *self;
7329        if this.inner.check_shutdown(cx) {
7330            this.is_terminated = true;
7331            return std::task::Poll::Ready(None);
7332        }
7333        if this.is_terminated {
7334            panic!("polled FileRequestStream after completion");
7335        }
7336        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7337            |bytes, handles| {
7338                match this.inner.channel().read_etc(cx, bytes, handles) {
7339                    std::task::Poll::Ready(Ok(())) => {}
7340                    std::task::Poll::Pending => return std::task::Poll::Pending,
7341                    std::task::Poll::Ready(Err(None)) => {
7342                        this.is_terminated = true;
7343                        return std::task::Poll::Ready(None);
7344                    }
7345                    std::task::Poll::Ready(Err(Some(e))) => {
7346                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7347                            e.into(),
7348                        ))))
7349                    }
7350                }
7351
7352                // A message has been received from the channel
7353                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7354
7355                std::task::Poll::Ready(Some(match header.ordinal {
7356                    0x6ee9c0ad53ec87aa => {
7357                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7358                        let mut req = fidl::new_empty!(
7359                            AdvisoryLockingAdvisoryLockRequest,
7360                            fdomain_client::fidl::FDomainResourceDialect
7361                        );
7362                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
7363                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7364                        Ok(FileRequest::AdvisoryLock {
7365                            request: req.request,
7366
7367                            responder: FileAdvisoryLockResponder {
7368                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7369                                tx_id: header.tx_id,
7370                            },
7371                        })
7372                    }
7373                    0x54f3949246a03e74 => {
7374                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7375                        let mut req = fidl::new_empty!(
7376                            LinkableLinkIntoRequest,
7377                            fdomain_client::fidl::FDomainResourceDialect
7378                        );
7379                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
7380                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7381                        Ok(FileRequest::LinkInto {
7382                            dst_parent_token: req.dst_parent_token,
7383                            dst: req.dst,
7384
7385                            responder: FileLinkIntoResponder {
7386                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7387                                tx_id: header.tx_id,
7388                            },
7389                        })
7390                    }
7391                    0x20d8a7aba2168a79 => {
7392                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7393                        let mut req = fidl::new_empty!(
7394                            fdomain_fuchsia_unknown::CloneableCloneRequest,
7395                            fdomain_client::fidl::FDomainResourceDialect
7396                        );
7397                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
7398                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7399                        Ok(FileRequest::Clone { request: req.request, control_handle })
7400                    }
7401                    0x5ac5d459ad7f657e => {
7402                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7403                        let mut req = fidl::new_empty!(
7404                            fidl::encoding::EmptyPayload,
7405                            fdomain_client::fidl::FDomainResourceDialect
7406                        );
7407                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7408                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7409                        Ok(FileRequest::Close {
7410                            responder: FileCloseResponder {
7411                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7412                                tx_id: header.tx_id,
7413                            },
7414                        })
7415                    }
7416                    0x2658edee9decfc06 => {
7417                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7418                        let mut req = fidl::new_empty!(
7419                            fidl::encoding::EmptyPayload,
7420                            fdomain_client::fidl::FDomainResourceDialect
7421                        );
7422                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7423                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7424                        Ok(FileRequest::Query {
7425                            responder: FileQueryResponder {
7426                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7427                                tx_id: header.tx_id,
7428                            },
7429                        })
7430                    }
7431                    0x5a61678f293ce16f => {
7432                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7433                        let mut req = fidl::new_empty!(
7434                            NodeDeprecatedCloneRequest,
7435                            fdomain_client::fidl::FDomainResourceDialect
7436                        );
7437                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
7438                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7439                        Ok(FileRequest::DeprecatedClone {
7440                            flags: req.flags,
7441                            object: req.object,
7442
7443                            control_handle,
7444                        })
7445                    }
7446                    0x78985e216314dafd => {
7447                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7448                        let mut req = fidl::new_empty!(
7449                            fidl::encoding::EmptyPayload,
7450                            fdomain_client::fidl::FDomainResourceDialect
7451                        );
7452                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7453                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7454                        Ok(FileRequest::DeprecatedGetAttr {
7455                            responder: FileDeprecatedGetAttrResponder {
7456                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7457                                tx_id: header.tx_id,
7458                            },
7459                        })
7460                    }
7461                    0x4186c0f40d938f46 => {
7462                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7463                        let mut req = fidl::new_empty!(
7464                            NodeDeprecatedSetAttrRequest,
7465                            fdomain_client::fidl::FDomainResourceDialect
7466                        );
7467                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
7468                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7469                        Ok(FileRequest::DeprecatedSetAttr {
7470                            flags: req.flags,
7471                            attributes: req.attributes,
7472
7473                            responder: FileDeprecatedSetAttrResponder {
7474                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7475                                tx_id: header.tx_id,
7476                            },
7477                        })
7478                    }
7479                    0x5b88fffb8eda3aa1 => {
7480                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7481                        let mut req = fidl::new_empty!(
7482                            fidl::encoding::EmptyPayload,
7483                            fdomain_client::fidl::FDomainResourceDialect
7484                        );
7485                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7486                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7487                        Ok(FileRequest::DeprecatedGetFlags {
7488                            responder: FileDeprecatedGetFlagsResponder {
7489                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7490                                tx_id: header.tx_id,
7491                            },
7492                        })
7493                    }
7494                    0x5295b76c71fde733 => {
7495                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7496                        let mut req = fidl::new_empty!(
7497                            NodeDeprecatedSetFlagsRequest,
7498                            fdomain_client::fidl::FDomainResourceDialect
7499                        );
7500                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
7501                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7502                        Ok(FileRequest::DeprecatedSetFlags {
7503                            flags: req.flags,
7504
7505                            responder: FileDeprecatedSetFlagsResponder {
7506                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7507                                tx_id: header.tx_id,
7508                            },
7509                        })
7510                    }
7511                    0x176eb318f64ec23 => {
7512                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7513                        let mut req = fidl::new_empty!(
7514                            fidl::encoding::EmptyPayload,
7515                            fdomain_client::fidl::FDomainResourceDialect
7516                        );
7517                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7518                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7519                        Ok(FileRequest::GetFlags {
7520                            responder: FileGetFlagsResponder {
7521                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7522                                tx_id: header.tx_id,
7523                            },
7524                        })
7525                    }
7526                    0x55a8028685791ea8 => {
7527                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7528                        let mut req = fidl::new_empty!(
7529                            NodeSetFlagsRequest,
7530                            fdomain_client::fidl::FDomainResourceDialect
7531                        );
7532                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
7533                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7534                        Ok(FileRequest::SetFlags {
7535                            flags: req.flags,
7536
7537                            responder: FileSetFlagsResponder {
7538                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7539                                tx_id: header.tx_id,
7540                            },
7541                        })
7542                    }
7543                    0x6f344a1c6b0a0610 => {
7544                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7545                        let mut req = fidl::new_empty!(
7546                            fidl::encoding::EmptyPayload,
7547                            fdomain_client::fidl::FDomainResourceDialect
7548                        );
7549                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7550                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7551                        Ok(FileRequest::QueryFilesystem {
7552                            responder: FileQueryFilesystemResponder {
7553                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7554                                tx_id: header.tx_id,
7555                            },
7556                        })
7557                    }
7558                    0x3d4396a638ea053b => {
7559                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7560                        let mut req = fidl::new_empty!(
7561                            NodeGetAttributesRequest,
7562                            fdomain_client::fidl::FDomainResourceDialect
7563                        );
7564                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
7565                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7566                        Ok(FileRequest::GetAttributes {
7567                            query: req.query,
7568
7569                            responder: FileGetAttributesResponder {
7570                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7571                                tx_id: header.tx_id,
7572                            },
7573                        })
7574                    }
7575                    0x3308c1da5a89bf08 => {
7576                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7577                        let mut req = fidl::new_empty!(
7578                            MutableNodeAttributes,
7579                            fdomain_client::fidl::FDomainResourceDialect
7580                        );
7581                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
7582                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7583                        Ok(FileRequest::UpdateAttributes {
7584                            payload: req,
7585                            responder: FileUpdateAttributesResponder {
7586                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7587                                tx_id: header.tx_id,
7588                            },
7589                        })
7590                    }
7591                    0x2c5c27ca0ab5dc49 => {
7592                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7593                        let mut req = fidl::new_empty!(
7594                            fidl::encoding::EmptyPayload,
7595                            fdomain_client::fidl::FDomainResourceDialect
7596                        );
7597                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7598                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7599                        Ok(FileRequest::Sync {
7600                            responder: FileSyncResponder {
7601                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7602                                tx_id: header.tx_id,
7603                            },
7604                        })
7605                    }
7606                    0x4b61033de007fcd0 => {
7607                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7608                        let mut req = fidl::new_empty!(
7609                            NodeListExtendedAttributesRequest,
7610                            fdomain_client::fidl::FDomainResourceDialect
7611                        );
7612                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
7613                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7614                        Ok(FileRequest::ListExtendedAttributes {
7615                            iterator: req.iterator,
7616
7617                            control_handle,
7618                        })
7619                    }
7620                    0x45ffa3ccfdeb76db => {
7621                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7622                        let mut req = fidl::new_empty!(
7623                            NodeGetExtendedAttributeRequest,
7624                            fdomain_client::fidl::FDomainResourceDialect
7625                        );
7626                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7627                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7628                        Ok(FileRequest::GetExtendedAttribute {
7629                            name: req.name,
7630
7631                            responder: FileGetExtendedAttributeResponder {
7632                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7633                                tx_id: header.tx_id,
7634                            },
7635                        })
7636                    }
7637                    0x4a951362f681f23c => {
7638                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7639                        let mut req = fidl::new_empty!(
7640                            NodeSetExtendedAttributeRequest,
7641                            fdomain_client::fidl::FDomainResourceDialect
7642                        );
7643                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7644                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7645                        Ok(FileRequest::SetExtendedAttribute {
7646                            name: req.name,
7647                            value: req.value,
7648                            mode: req.mode,
7649
7650                            responder: FileSetExtendedAttributeResponder {
7651                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7652                                tx_id: header.tx_id,
7653                            },
7654                        })
7655                    }
7656                    0x7a0b9f3a9bf9032d => {
7657                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7658                        let mut req = fidl::new_empty!(
7659                            NodeRemoveExtendedAttributeRequest,
7660                            fdomain_client::fidl::FDomainResourceDialect
7661                        );
7662                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7663                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7664                        Ok(FileRequest::RemoveExtendedAttribute {
7665                            name: req.name,
7666
7667                            responder: FileRemoveExtendedAttributeResponder {
7668                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7669                                tx_id: header.tx_id,
7670                            },
7671                        })
7672                    }
7673                    0x57e419a298c8ede => {
7674                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7675                        let mut req = fidl::new_empty!(
7676                            ReadableReadRequest,
7677                            fdomain_client::fidl::FDomainResourceDialect
7678                        );
7679                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
7680                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7681                        Ok(FileRequest::Read {
7682                            count: req.count,
7683
7684                            responder: FileReadResponder {
7685                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7686                                tx_id: header.tx_id,
7687                            },
7688                        })
7689                    }
7690                    0x6a31437832469f82 => {
7691                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7692                        let mut req = fidl::new_empty!(
7693                            WritableWriteRequest,
7694                            fdomain_client::fidl::FDomainResourceDialect
7695                        );
7696                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
7697                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7698                        Ok(FileRequest::Write {
7699                            data: req.data,
7700
7701                            responder: FileWriteResponder {
7702                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7703                                tx_id: header.tx_id,
7704                            },
7705                        })
7706                    }
7707                    0x68b5ac00c62906bc => {
7708                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7709                        let mut req = fidl::new_empty!(
7710                            fidl::encoding::EmptyPayload,
7711                            fdomain_client::fidl::FDomainResourceDialect
7712                        );
7713                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7714                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7715                        Ok(FileRequest::Describe {
7716                            responder: FileDescribeResponder {
7717                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7718                                tx_id: header.tx_id,
7719                            },
7720                        })
7721                    }
7722                    0x78079168162c5207 => {
7723                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7724                        let mut req = fidl::new_empty!(
7725                            FileSeekRequest,
7726                            fdomain_client::fidl::FDomainResourceDialect
7727                        );
7728                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileSeekRequest>(&header, _body_bytes, handles, &mut req)?;
7729                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7730                        Ok(FileRequest::Seek {
7731                            origin: req.origin,
7732                            offset: req.offset,
7733
7734                            responder: FileSeekResponder {
7735                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7736                                tx_id: header.tx_id,
7737                            },
7738                        })
7739                    }
7740                    0x1607a293a60d723e => {
7741                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7742                        let mut req = fidl::new_empty!(
7743                            FileReadAtRequest,
7744                            fdomain_client::fidl::FDomainResourceDialect
7745                        );
7746                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileReadAtRequest>(&header, _body_bytes, handles, &mut req)?;
7747                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7748                        Ok(FileRequest::ReadAt {
7749                            count: req.count,
7750                            offset: req.offset,
7751
7752                            responder: FileReadAtResponder {
7753                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7754                                tx_id: header.tx_id,
7755                            },
7756                        })
7757                    }
7758                    0x793eefc0045e792b => {
7759                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7760                        let mut req = fidl::new_empty!(
7761                            FileWriteAtRequest,
7762                            fdomain_client::fidl::FDomainResourceDialect
7763                        );
7764                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileWriteAtRequest>(&header, _body_bytes, handles, &mut req)?;
7765                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7766                        Ok(FileRequest::WriteAt {
7767                            data: req.data,
7768                            offset: req.offset,
7769
7770                            responder: FileWriteAtResponder {
7771                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7772                                tx_id: header.tx_id,
7773                            },
7774                        })
7775                    }
7776                    0x2b80825f0535743a => {
7777                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7778                        let mut req = fidl::new_empty!(
7779                            FileResizeRequest,
7780                            fdomain_client::fidl::FDomainResourceDialect
7781                        );
7782                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileResizeRequest>(&header, _body_bytes, handles, &mut req)?;
7783                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7784                        Ok(FileRequest::Resize {
7785                            length: req.length,
7786
7787                            responder: FileResizeResponder {
7788                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7789                                tx_id: header.tx_id,
7790                            },
7791                        })
7792                    }
7793                    0xa6a9e654cbf62b => {
7794                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7795                        let mut req = fidl::new_empty!(
7796                            FileGetBackingMemoryRequest,
7797                            fdomain_client::fidl::FDomainResourceDialect
7798                        );
7799                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileGetBackingMemoryRequest>(&header, _body_bytes, handles, &mut req)?;
7800                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7801                        Ok(FileRequest::GetBackingMemory {
7802                            flags: req.flags,
7803
7804                            responder: FileGetBackingMemoryResponder {
7805                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7806                                tx_id: header.tx_id,
7807                            },
7808                        })
7809                    }
7810                    0x77fa0c330b57fd2e => {
7811                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7812                        let mut req = fidl::new_empty!(
7813                            FileAllocateRequest,
7814                            fdomain_client::fidl::FDomainResourceDialect
7815                        );
7816                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileAllocateRequest>(&header, _body_bytes, handles, &mut req)?;
7817                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7818                        Ok(FileRequest::Allocate {
7819                            offset: req.offset,
7820                            length: req.length,
7821                            mode: req.mode,
7822
7823                            responder: FileAllocateResponder {
7824                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7825                                tx_id: header.tx_id,
7826                            },
7827                        })
7828                    }
7829                    0x2c421ec3faaeb8bb => {
7830                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7831                        let mut req = fidl::new_empty!(
7832                            FileEnableVerityRequest,
7833                            fdomain_client::fidl::FDomainResourceDialect
7834                        );
7835                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileEnableVerityRequest>(&header, _body_bytes, handles, &mut req)?;
7836                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7837                        Ok(FileRequest::EnableVerity {
7838                            options: req.options,
7839
7840                            responder: FileEnableVerityResponder {
7841                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7842                                tx_id: header.tx_id,
7843                            },
7844                        })
7845                    }
7846                    _ if header.tx_id == 0
7847                        && header
7848                            .dynamic_flags()
7849                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7850                    {
7851                        Ok(FileRequest::_UnknownMethod {
7852                            ordinal: header.ordinal,
7853                            control_handle: FileControlHandle { inner: this.inner.clone() },
7854                            method_type: fidl::MethodType::OneWay,
7855                        })
7856                    }
7857                    _ if header
7858                        .dynamic_flags()
7859                        .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7860                    {
7861                        this.inner.send_framework_err(
7862                            fidl::encoding::FrameworkErr::UnknownMethod,
7863                            header.tx_id,
7864                            header.ordinal,
7865                            header.dynamic_flags(),
7866                            (bytes, handles),
7867                        )?;
7868                        Ok(FileRequest::_UnknownMethod {
7869                            ordinal: header.ordinal,
7870                            control_handle: FileControlHandle { inner: this.inner.clone() },
7871                            method_type: fidl::MethodType::TwoWay,
7872                        })
7873                    }
7874                    _ => Err(fidl::Error::UnknownOrdinal {
7875                        ordinal: header.ordinal,
7876                        protocol_name:
7877                            <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7878                    }),
7879                }))
7880            },
7881        )
7882    }
7883}
7884
7885/// A [`Node`] which contains a sequence of bytes of definite length.
7886///
7887/// NOTE: cloned connections do not share their seek offset with their source
7888/// connection.
7889#[derive(Debug)]
7890pub enum FileRequest {
7891    /// Acquires an advisory lock on the underlying file.
7892    ///
7893    /// The lock lasts until either this connection is closed or
7894    /// this method is called with |AdvisoryLockType.UNLOCK| to release the lock
7895    /// explicitly.
7896    ///
7897    /// Advisory locks are purely advisory. They do not prevent actual read or
7898    /// write operations from occurring on the file, either through this
7899    /// connection or through other connections.
7900    ///
7901    /// This method requires the following rights:
7902    ///
7903    /// * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
7904    /// * [`Rights.WRITE_BYTES`] if `request.type` is
7905    ///   [`AdvisoryLockType.WRITE`].
7906    ///
7907    /// # Errors
7908    ///
7909    /// * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
7910    ///   example, another connection might hold a conflicting lock type.
7911    /// * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
7912    /// * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
7913    ///   to acquire the given type of lock.
7914    AdvisoryLock {
7915        request: AdvisoryLockRequest,
7916        responder: FileAdvisoryLockResponder,
7917    },
7918    /// Creates a link to this this object with name `dst` in the directory represented by
7919    /// `dst_parent_token`.
7920    ///
7921    /// `dst` must be a resolved object name. Including "/" in the string will return
7922    /// `ZX_ERR_INVALID_ARGS`.
7923    ///
7924    /// This method requires the maximal set of rights supported by the filesystem for this object.
7925    /// For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],
7926    /// [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also
7927    /// support the [`Rights.EXECUTE`] right. Insufficient rights will result in
7928    /// `ZX_ERR_ACCESS_DENIED`.
7929    ///
7930    /// If this object has no links and is *NOT* an unnamed temporary object (objects opened with
7931    /// `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.
7932    ///
7933    /// For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,
7934    /// the object will be permanently linked to the filesystem. Requires that the unnamed temporary
7935    /// object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.
7936    ///
7937    /// This method does not have the same atomicity properties has the `Directory::Link` method,
7938    /// which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`
7939    /// because `LinkInto` will not prevent the source from being renamed or unlinked.
7940    LinkInto {
7941        dst_parent_token: fdomain_client::Event,
7942        dst: String,
7943        responder: FileLinkIntoResponder,
7944    },
7945    Clone {
7946        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
7947        control_handle: FileControlHandle,
7948    },
7949    /// Terminates the connection.
7950    ///
7951    /// After calling `Close`, the client must not send any other requests.
7952    ///
7953    /// Servers, after sending the status response, should close the connection
7954    /// regardless of status and without sending an epitaph.
7955    ///
7956    /// Closing the client end of the channel should be semantically equivalent
7957    /// to calling `Close` without knowing when the close has completed or its
7958    /// status.
7959    Close {
7960        responder: FileCloseResponder,
7961    },
7962    Query {
7963        responder: FileQueryResponder,
7964    },
7965    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
7966    DeprecatedClone {
7967        flags: OpenFlags,
7968        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
7969        control_handle: FileControlHandle,
7970    },
7971    /// DEPRECATED - Use `Node.GetAttributes` instead.
7972    DeprecatedGetAttr {
7973        responder: FileDeprecatedGetAttrResponder,
7974    },
7975    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
7976    DeprecatedSetAttr {
7977        flags: NodeAttributeFlags,
7978        attributes: NodeAttributes,
7979        responder: FileDeprecatedSetAttrResponder,
7980    },
7981    /// [DEPRECATED - Use new GetFlags method instead.]
7982    DeprecatedGetFlags {
7983        responder: FileDeprecatedGetFlagsResponder,
7984    },
7985    /// [DEPRECATED - Use new SetFlags method instead.]
7986    DeprecatedSetFlags {
7987        flags: OpenFlags,
7988        responder: FileDeprecatedSetFlagsResponder,
7989    },
7990    /// Queries the flags that apply to this node after it has been opened/created. This method does
7991    /// not require any rights.
7992    ///
7993    /// Note that the final set of flags that apply to the connection may differ from those
7994    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
7995    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
7996    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
7997    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
7998    GetFlags {
7999        responder: FileGetFlagsResponder,
8000    },
8001    /// Sets the flags that apply to this node after it has been opened. This method does not
8002    /// require any rights.
8003    ///
8004    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
8005    /// clear append mode.
8006    ///
8007    /// Errors:
8008    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
8009    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
8010    SetFlags {
8011        flags: Flags,
8012        responder: FileSetFlagsResponder,
8013    },
8014    /// Query the filesystem for filesystem-specific information.
8015    QueryFilesystem {
8016        responder: FileQueryFilesystemResponder,
8017    },
8018    /// Acquires information about the node.
8019    ///
8020    /// The attributes of a node should be stable, independent of the
8021    /// specific protocol used to access it.
8022    ///
8023    /// If a particular attribute is not applicable or not supported,
8024    /// filesystems should leave the corresponding field absent.
8025    ///
8026    /// + `query` a bit-mask specifying which attributes to fetch. The server
8027    ///   should not return more than necessary.
8028    /// - `attributes` the returned attributes.
8029    ///
8030    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
8031    GetAttributes {
8032        query: NodeAttributesQuery,
8033        responder: FileGetAttributesResponder,
8034    },
8035    /// Updates information about the node.
8036    ///
8037    /// + `attributes` the presence of a table field in `attributes` indicates
8038    /// the intent to update the corresponding attribute.
8039    ///
8040    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
8041    ///
8042    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
8043    UpdateAttributes {
8044        payload: MutableNodeAttributes,
8045        responder: FileUpdateAttributesResponder,
8046    },
8047    /// Synchronizes updates to the node to the underlying media, if it exists.
8048    ///
8049    /// This method will return when the filesystem server has flushed the
8050    /// relevant updates to the underlying media, but does not guarantee the
8051    /// underlying media has persisted the information, nor that any information
8052    /// is committed to hardware. Clients may use `Sync` to ensure ordering
8053    /// between operations.
8054    ///
8055    /// This method does not require any rights.
8056    Sync {
8057        responder: FileSyncResponder,
8058    },
8059    /// Creates an iterator over all the extended attribute names associated
8060    /// with this node. If an error occurs it is returned as an epitaph on the
8061    /// iterator request channel, and then the channel is closed.
8062    ///
8063    /// GetExtendedAttributes can be used with any of these names to retrieve
8064    /// the associated value.
8065    ///
8066    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
8067    ListExtendedAttributes {
8068        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
8069        control_handle: FileControlHandle,
8070    },
8071    /// Get the value associated with the given attribute `name` for this node.
8072    ///
8073    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
8074    /// particular structure is imposed on them.
8075    ///
8076    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
8077    GetExtendedAttribute {
8078        name: Vec<u8>,
8079        responder: FileGetExtendedAttributeResponder,
8080    },
8081    /// Set the value for the given attribute `name` to `value` for this node.
8082    ///
8083    /// The attribute name may exist, in which case the attribute is updated.
8084    /// If the attribute doesn't exist, it is created. The name should have no
8085    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
8086    ///
8087    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
8088    SetExtendedAttribute {
8089        name: Vec<u8>,
8090        value: ExtendedAttributeValue,
8091        mode: SetExtendedAttributeMode,
8092        responder: FileSetExtendedAttributeResponder,
8093    },
8094    /// Remove the specified extended attribute.
8095    ///
8096    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
8097    ///
8098    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
8099    RemoveExtendedAttribute {
8100        name: Vec<u8>,
8101        responder: FileRemoveExtendedAttributeResponder,
8102    },
8103    /// Reads up to 'count' bytes at the seek offset.
8104    /// The seek offset is moved forward by the number of bytes read.
8105    ///
8106    /// ## Invariants
8107    ///
8108    /// * The returned `data.length` will never be greater than `count`.
8109    /// * If `data.length` is less than `count`, it means that the seek offset
8110    ///   has reached the end of file as part of this operation.
8111    /// * If `data.length` is zero while `count` is not, it means that the
8112    ///   seek offset is already at or beyond the end of file, and no data could
8113    ///   be read.
8114    /// * If `count` is zero, the server should perform all the checks ensuring
8115    ///   read access without actually read anything, and return an empty
8116    ///   `data` vector.
8117    ///
8118    /// This method requires the [`Rights.READ_BYTES`] right.
8119    ///
8120    /// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.
8121    Read {
8122        count: u64,
8123        responder: FileReadResponder,
8124    },
8125    /// Writes data at the seek offset.
8126    /// The seek offset is moved forward by the number of bytes written.
8127    /// If the file is in append mode, the seek offset is first set to the end
8128    /// of the file, followed by the write, in one atomic step.
8129    ///
8130    /// The file size may grow if the seek offset plus `data.length` is beyond
8131    /// the current end of file.
8132    ///
8133    /// + request `data` the byte buffer to write to the file.
8134    /// - response `actual_count` the number of bytes written.
8135    ///
8136    /// ## Invariants
8137    ///
8138    /// * The returned `actual_count` will never be greater than `data.length`.
8139    /// * If the server is unable to write all the data due to e.g. not enough
8140    ///   space, `actual_count` may be less than `data.length`.  If no bytes
8141    ///   could be written, an error is returned.
8142    /// * If `data.length` is zero, the server should perform all the checks
8143    ///   ensuring write access without mutating the file and return a
8144    ///   successful write of zero bytes.  The seek offset is still updated if
8145    ///   in append mode.
8146    ///
8147    /// This method requires the [`Rights.WRITE_BYTES`] right.
8148    Write {
8149        data: Vec<u8>,
8150        responder: FileWriteResponder,
8151    },
8152    Describe {
8153        responder: FileDescribeResponder,
8154    },
8155    /// Moves the offset at which the next invocation of [`Read`] or [`Write`]
8156    /// will occur. The seek offset is specific to each file connection.
8157    ///
8158    /// + request `origin` the reference point where `offset` will be based on.
8159    /// + request `offset` the number of bytes to seek.
8160    /// - response `offset_from_start` the adjusted seek offset, from the start
8161    ///   of the file.
8162    ///
8163    /// This method does not require any rights.
8164    Seek {
8165        origin: SeekOrigin,
8166        offset: i64,
8167        responder: FileSeekResponder,
8168    },
8169    /// Reads up to 'count' bytes at the provided offset.
8170    /// Does not affect the seek offset.
8171    ///
8172    /// ## Invariants
8173    ///
8174    /// * The returned `data.length` will never be greater than `count`.
8175    /// * If `data.length` is less than `count`, it means that `ReadAt` has hit
8176    ///   the end of file as part of this operation.
8177    /// * If `data.length` is zero while `count` is not, it means that `offset`
8178    ///   is at or past the end of file, and no data can be read.
8179    /// * If `count` is zero, the server should perform all the checks ensuring
8180    ///   read access without actually reading anything, and return an empty
8181    ///   `data` vector.
8182    ///
8183    /// This method requires the [`Rights.READ_BYTES`] right.
8184    ///
8185    /// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.
8186    ReadAt {
8187        count: u64,
8188        offset: u64,
8189        responder: FileReadAtResponder,
8190    },
8191    /// Writes data at the provided offset.
8192    /// Does not affect the seek offset.
8193    ///
8194    /// The file size may grow if `offset` plus `data.length` is past the
8195    /// current end of file.
8196    ///
8197    /// + request `data` the byte buffer to write to the file.
8198    /// + request `offset` the offset from start of the file to begin writing.
8199    /// - response `actual_count` the number of bytes written.
8200    ///
8201    /// ## Invariants
8202    ///
8203    /// * The returned `actual_count` will never be greater than `data.length`.
8204    /// * If the server is unable to write all the data due to e.g. not enough
8205    ///   space, `actual_count` may be less than `data.length`.  If no bytes
8206    ///   could be written, an error is returned.
8207    /// * If `data.length` is zero, the server should perform all the checks
8208    ///   ensuring write access without mutating the file, and will return a
8209    ///   successful write of zero bytes.
8210    ///
8211    /// This method requires the [`Rights.WRITE_BYTES`] right.
8212    WriteAt {
8213        data: Vec<u8>,
8214        offset: u64,
8215        responder: FileWriteAtResponder,
8216    },
8217    /// Shrinks or grows the file size to 'length' bytes.
8218    ///
8219    /// If file size is reduced by this operation, the extra trailing data'
8220    /// is discarded.
8221    /// If file size is increased by this operation, the extended area appears
8222    /// as if it was zeroed.
8223    ///
8224    /// This method requires the [`Rights.WRITE_BYTES`] right.
8225    Resize {
8226        length: u64,
8227        responder: FileResizeResponder,
8228    },
8229    /// Acquires a [`zx.Handle:VMO`] representing this file, if there is one,
8230    /// with the requested access rights.
8231    ///
8232    /// Implementations are not required to implement files backed by VMOs so
8233    /// this request may fail. Additionally, implementations may only support
8234    /// a certain subset of the flags. Clients should be prepared with fallback
8235    /// behavior if this request fails.
8236    ///
8237    /// If a client specifies neither `PRIVATE_CLONE` nor `SHARED_BUFFER`, the
8238    /// implementation is free to choose the semantics of the returned VMO.
8239    ///
8240    /// + request `flags` a [`VmoFlags`] indicating the desired mode of access.
8241    /// - response `vmo` the requested [`zx.Handle:VMO`].
8242    /// * error a [`zx.Status`] value indicating the failure.
8243    ///
8244    /// This method requires the following rights:
8245    ///
8246    /// * [`Rights.READ_BYTES`] if `flags` includes [`VmoFlags.READ`].
8247    /// * [`Rights.WRITE_BYTES`] if `flags` includes [`VmoFlags.WRITE`].
8248    /// * [`Rights.EXECUTE`] if `flags` includes [`VmoFlags.EXECUTE`].
8249    GetBackingMemory {
8250        flags: VmoFlags,
8251        responder: FileGetBackingMemoryResponder,
8252    },
8253    /// Pre-allocate on-disk space for this file.
8254    Allocate {
8255        offset: u64,
8256        length: u64,
8257        mode: AllocateMode,
8258        responder: FileAllocateResponder,
8259    },
8260    /// Enables verification for the file (permanently) which involves computing a merkle tree for
8261    /// the file. Forces a flush prior to building the merkle tree to ensure cached data is
8262    /// captured. Future reads will be verified against the computed merkle tree and writes will be
8263    /// rejected. This method can take some time to complete as it depends on the size of the file.
8264    /// This method can be aborted by closing the connection that this method was issued on.
8265    ///
8266    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
8267    /// Returns `ZX_ERR_NOT_SUPPORTED` if the filesystem does not support verity.
8268    /// Returns `ZX_ERR_ALREADY_EXISTS` if the file was already fsverity-enabled.
8269    /// Also returns any error that might arise from reading the file, or from flushing the file,
8270    /// such as `ZX_ERR_IO`.
8271    EnableVerity {
8272        options: VerificationOptions,
8273        responder: FileEnableVerityResponder,
8274    },
8275    /// An interaction was received which does not match any known method.
8276    #[non_exhaustive]
8277    _UnknownMethod {
8278        /// Ordinal of the method that was called.
8279        ordinal: u64,
8280        control_handle: FileControlHandle,
8281        method_type: fidl::MethodType,
8282    },
8283}
8284
8285impl FileRequest {
8286    #[allow(irrefutable_let_patterns)]
8287    pub fn into_advisory_lock(self) -> Option<(AdvisoryLockRequest, FileAdvisoryLockResponder)> {
8288        if let FileRequest::AdvisoryLock { request, responder } = self {
8289            Some((request, responder))
8290        } else {
8291            None
8292        }
8293    }
8294
8295    #[allow(irrefutable_let_patterns)]
8296    pub fn into_link_into(self) -> Option<(fdomain_client::Event, String, FileLinkIntoResponder)> {
8297        if let FileRequest::LinkInto { dst_parent_token, dst, responder } = self {
8298            Some((dst_parent_token, dst, responder))
8299        } else {
8300            None
8301        }
8302    }
8303
8304    #[allow(irrefutable_let_patterns)]
8305    pub fn into_clone(
8306        self,
8307    ) -> Option<(
8308        fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
8309        FileControlHandle,
8310    )> {
8311        if let FileRequest::Clone { request, control_handle } = self {
8312            Some((request, control_handle))
8313        } else {
8314            None
8315        }
8316    }
8317
8318    #[allow(irrefutable_let_patterns)]
8319    pub fn into_close(self) -> Option<(FileCloseResponder)> {
8320        if let FileRequest::Close { responder } = self {
8321            Some((responder))
8322        } else {
8323            None
8324        }
8325    }
8326
8327    #[allow(irrefutable_let_patterns)]
8328    pub fn into_query(self) -> Option<(FileQueryResponder)> {
8329        if let FileRequest::Query { responder } = self {
8330            Some((responder))
8331        } else {
8332            None
8333        }
8334    }
8335
8336    #[allow(irrefutable_let_patterns)]
8337    pub fn into_deprecated_clone(
8338        self,
8339    ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, FileControlHandle)> {
8340        if let FileRequest::DeprecatedClone { flags, object, control_handle } = self {
8341            Some((flags, object, control_handle))
8342        } else {
8343            None
8344        }
8345    }
8346
8347    #[allow(irrefutable_let_patterns)]
8348    pub fn into_deprecated_get_attr(self) -> Option<(FileDeprecatedGetAttrResponder)> {
8349        if let FileRequest::DeprecatedGetAttr { responder } = self {
8350            Some((responder))
8351        } else {
8352            None
8353        }
8354    }
8355
8356    #[allow(irrefutable_let_patterns)]
8357    pub fn into_deprecated_set_attr(
8358        self,
8359    ) -> Option<(NodeAttributeFlags, NodeAttributes, FileDeprecatedSetAttrResponder)> {
8360        if let FileRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
8361            Some((flags, attributes, responder))
8362        } else {
8363            None
8364        }
8365    }
8366
8367    #[allow(irrefutable_let_patterns)]
8368    pub fn into_deprecated_get_flags(self) -> Option<(FileDeprecatedGetFlagsResponder)> {
8369        if let FileRequest::DeprecatedGetFlags { responder } = self {
8370            Some((responder))
8371        } else {
8372            None
8373        }
8374    }
8375
8376    #[allow(irrefutable_let_patterns)]
8377    pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, FileDeprecatedSetFlagsResponder)> {
8378        if let FileRequest::DeprecatedSetFlags { flags, responder } = self {
8379            Some((flags, responder))
8380        } else {
8381            None
8382        }
8383    }
8384
8385    #[allow(irrefutable_let_patterns)]
8386    pub fn into_get_flags(self) -> Option<(FileGetFlagsResponder)> {
8387        if let FileRequest::GetFlags { responder } = self {
8388            Some((responder))
8389        } else {
8390            None
8391        }
8392    }
8393
8394    #[allow(irrefutable_let_patterns)]
8395    pub fn into_set_flags(self) -> Option<(Flags, FileSetFlagsResponder)> {
8396        if let FileRequest::SetFlags { flags, responder } = self {
8397            Some((flags, responder))
8398        } else {
8399            None
8400        }
8401    }
8402
8403    #[allow(irrefutable_let_patterns)]
8404    pub fn into_query_filesystem(self) -> Option<(FileQueryFilesystemResponder)> {
8405        if let FileRequest::QueryFilesystem { responder } = self {
8406            Some((responder))
8407        } else {
8408            None
8409        }
8410    }
8411
8412    #[allow(irrefutable_let_patterns)]
8413    pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, FileGetAttributesResponder)> {
8414        if let FileRequest::GetAttributes { query, responder } = self {
8415            Some((query, responder))
8416        } else {
8417            None
8418        }
8419    }
8420
8421    #[allow(irrefutable_let_patterns)]
8422    pub fn into_update_attributes(
8423        self,
8424    ) -> Option<(MutableNodeAttributes, FileUpdateAttributesResponder)> {
8425        if let FileRequest::UpdateAttributes { payload, responder } = self {
8426            Some((payload, responder))
8427        } else {
8428            None
8429        }
8430    }
8431
8432    #[allow(irrefutable_let_patterns)]
8433    pub fn into_sync(self) -> Option<(FileSyncResponder)> {
8434        if let FileRequest::Sync { responder } = self {
8435            Some((responder))
8436        } else {
8437            None
8438        }
8439    }
8440
8441    #[allow(irrefutable_let_patterns)]
8442    pub fn into_list_extended_attributes(
8443        self,
8444    ) -> Option<(fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>, FileControlHandle)>
8445    {
8446        if let FileRequest::ListExtendedAttributes { iterator, control_handle } = self {
8447            Some((iterator, control_handle))
8448        } else {
8449            None
8450        }
8451    }
8452
8453    #[allow(irrefutable_let_patterns)]
8454    pub fn into_get_extended_attribute(
8455        self,
8456    ) -> Option<(Vec<u8>, FileGetExtendedAttributeResponder)> {
8457        if let FileRequest::GetExtendedAttribute { name, responder } = self {
8458            Some((name, responder))
8459        } else {
8460            None
8461        }
8462    }
8463
8464    #[allow(irrefutable_let_patterns)]
8465    pub fn into_set_extended_attribute(
8466        self,
8467    ) -> Option<(
8468        Vec<u8>,
8469        ExtendedAttributeValue,
8470        SetExtendedAttributeMode,
8471        FileSetExtendedAttributeResponder,
8472    )> {
8473        if let FileRequest::SetExtendedAttribute { name, value, mode, responder } = self {
8474            Some((name, value, mode, responder))
8475        } else {
8476            None
8477        }
8478    }
8479
8480    #[allow(irrefutable_let_patterns)]
8481    pub fn into_remove_extended_attribute(
8482        self,
8483    ) -> Option<(Vec<u8>, FileRemoveExtendedAttributeResponder)> {
8484        if let FileRequest::RemoveExtendedAttribute { name, responder } = self {
8485            Some((name, responder))
8486        } else {
8487            None
8488        }
8489    }
8490
8491    #[allow(irrefutable_let_patterns)]
8492    pub fn into_read(self) -> Option<(u64, FileReadResponder)> {
8493        if let FileRequest::Read { count, responder } = self {
8494            Some((count, responder))
8495        } else {
8496            None
8497        }
8498    }
8499
8500    #[allow(irrefutable_let_patterns)]
8501    pub fn into_write(self) -> Option<(Vec<u8>, FileWriteResponder)> {
8502        if let FileRequest::Write { data, responder } = self {
8503            Some((data, responder))
8504        } else {
8505            None
8506        }
8507    }
8508
8509    #[allow(irrefutable_let_patterns)]
8510    pub fn into_describe(self) -> Option<(FileDescribeResponder)> {
8511        if let FileRequest::Describe { responder } = self {
8512            Some((responder))
8513        } else {
8514            None
8515        }
8516    }
8517
8518    #[allow(irrefutable_let_patterns)]
8519    pub fn into_seek(self) -> Option<(SeekOrigin, i64, FileSeekResponder)> {
8520        if let FileRequest::Seek { origin, offset, responder } = self {
8521            Some((origin, offset, responder))
8522        } else {
8523            None
8524        }
8525    }
8526
8527    #[allow(irrefutable_let_patterns)]
8528    pub fn into_read_at(self) -> Option<(u64, u64, FileReadAtResponder)> {
8529        if let FileRequest::ReadAt { count, offset, responder } = self {
8530            Some((count, offset, responder))
8531        } else {
8532            None
8533        }
8534    }
8535
8536    #[allow(irrefutable_let_patterns)]
8537    pub fn into_write_at(self) -> Option<(Vec<u8>, u64, FileWriteAtResponder)> {
8538        if let FileRequest::WriteAt { data, offset, responder } = self {
8539            Some((data, offset, responder))
8540        } else {
8541            None
8542        }
8543    }
8544
8545    #[allow(irrefutable_let_patterns)]
8546    pub fn into_resize(self) -> Option<(u64, FileResizeResponder)> {
8547        if let FileRequest::Resize { length, responder } = self {
8548            Some((length, responder))
8549        } else {
8550            None
8551        }
8552    }
8553
8554    #[allow(irrefutable_let_patterns)]
8555    pub fn into_get_backing_memory(self) -> Option<(VmoFlags, FileGetBackingMemoryResponder)> {
8556        if let FileRequest::GetBackingMemory { flags, responder } = self {
8557            Some((flags, responder))
8558        } else {
8559            None
8560        }
8561    }
8562
8563    #[allow(irrefutable_let_patterns)]
8564    pub fn into_allocate(self) -> Option<(u64, u64, AllocateMode, FileAllocateResponder)> {
8565        if let FileRequest::Allocate { offset, length, mode, responder } = self {
8566            Some((offset, length, mode, responder))
8567        } else {
8568            None
8569        }
8570    }
8571
8572    #[allow(irrefutable_let_patterns)]
8573    pub fn into_enable_verity(self) -> Option<(VerificationOptions, FileEnableVerityResponder)> {
8574        if let FileRequest::EnableVerity { options, responder } = self {
8575            Some((options, responder))
8576        } else {
8577            None
8578        }
8579    }
8580
8581    /// Name of the method defined in FIDL
8582    pub fn method_name(&self) -> &'static str {
8583        match *self {
8584            FileRequest::AdvisoryLock { .. } => "advisory_lock",
8585            FileRequest::LinkInto { .. } => "link_into",
8586            FileRequest::Clone { .. } => "clone",
8587            FileRequest::Close { .. } => "close",
8588            FileRequest::Query { .. } => "query",
8589            FileRequest::DeprecatedClone { .. } => "deprecated_clone",
8590            FileRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
8591            FileRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
8592            FileRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
8593            FileRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
8594            FileRequest::GetFlags { .. } => "get_flags",
8595            FileRequest::SetFlags { .. } => "set_flags",
8596            FileRequest::QueryFilesystem { .. } => "query_filesystem",
8597            FileRequest::GetAttributes { .. } => "get_attributes",
8598            FileRequest::UpdateAttributes { .. } => "update_attributes",
8599            FileRequest::Sync { .. } => "sync",
8600            FileRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
8601            FileRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
8602            FileRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
8603            FileRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
8604            FileRequest::Read { .. } => "read",
8605            FileRequest::Write { .. } => "write",
8606            FileRequest::Describe { .. } => "describe",
8607            FileRequest::Seek { .. } => "seek",
8608            FileRequest::ReadAt { .. } => "read_at",
8609            FileRequest::WriteAt { .. } => "write_at",
8610            FileRequest::Resize { .. } => "resize",
8611            FileRequest::GetBackingMemory { .. } => "get_backing_memory",
8612            FileRequest::Allocate { .. } => "allocate",
8613            FileRequest::EnableVerity { .. } => "enable_verity",
8614            FileRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
8615                "unknown one-way method"
8616            }
8617            FileRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
8618                "unknown two-way method"
8619            }
8620        }
8621    }
8622}
8623
8624#[derive(Debug, Clone)]
8625pub struct FileControlHandle {
8626    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8627}
8628
8629impl fdomain_client::fidl::ControlHandle for FileControlHandle {
8630    fn shutdown(&self) {
8631        self.inner.shutdown()
8632    }
8633
8634    fn is_closed(&self) -> bool {
8635        self.inner.channel().is_closed()
8636    }
8637    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
8638        self.inner.channel().on_closed()
8639    }
8640}
8641
8642impl FileControlHandle {
8643    pub fn send_on_open_(
8644        &self,
8645        mut s: i32,
8646        mut info: Option<NodeInfoDeprecated>,
8647    ) -> Result<(), fidl::Error> {
8648        self.inner.send::<NodeOnOpenRequest>(
8649            (s, info.as_mut()),
8650            0,
8651            0x7fc7bbb1dbfd1972,
8652            fidl::encoding::DynamicFlags::empty(),
8653        )
8654    }
8655
8656    pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
8657        self.inner.send::<Representation>(
8658            &mut payload,
8659            0,
8660            0x5cb40567d80a510c,
8661            fidl::encoding::DynamicFlags::empty(),
8662        )
8663    }
8664}
8665
8666#[must_use = "FIDL methods require a response to be sent"]
8667#[derive(Debug)]
8668pub struct FileAdvisoryLockResponder {
8669    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8670    tx_id: u32,
8671}
8672
8673/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
8674/// if the responder is dropped without sending a response, so that the client
8675/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8676impl std::ops::Drop for FileAdvisoryLockResponder {
8677    fn drop(&mut self) {
8678        self.control_handle.shutdown();
8679        // Safety: drops once, never accessed again
8680        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8681    }
8682}
8683
8684impl fdomain_client::fidl::Responder for FileAdvisoryLockResponder {
8685    type ControlHandle = FileControlHandle;
8686
8687    fn control_handle(&self) -> &FileControlHandle {
8688        &self.control_handle
8689    }
8690
8691    fn drop_without_shutdown(mut self) {
8692        // Safety: drops once, never accessed again due to mem::forget
8693        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8694        // Prevent Drop from running (which would shut down the channel)
8695        std::mem::forget(self);
8696    }
8697}
8698
8699impl FileAdvisoryLockResponder {
8700    /// Sends a response to the FIDL transaction.
8701    ///
8702    /// Sets the channel to shutdown if an error occurs.
8703    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8704        let _result = self.send_raw(result);
8705        if _result.is_err() {
8706            self.control_handle.shutdown();
8707        }
8708        self.drop_without_shutdown();
8709        _result
8710    }
8711
8712    /// Similar to "send" but does not shutdown the channel if an error occurs.
8713    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8714        let _result = self.send_raw(result);
8715        self.drop_without_shutdown();
8716        _result
8717    }
8718
8719    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8720        self.control_handle
8721            .inner
8722            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8723                result,
8724                self.tx_id,
8725                0x6ee9c0ad53ec87aa,
8726                fidl::encoding::DynamicFlags::empty(),
8727            )
8728    }
8729}
8730
8731#[must_use = "FIDL methods require a response to be sent"]
8732#[derive(Debug)]
8733pub struct FileLinkIntoResponder {
8734    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8735    tx_id: u32,
8736}
8737
8738/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
8739/// if the responder is dropped without sending a response, so that the client
8740/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8741impl std::ops::Drop for FileLinkIntoResponder {
8742    fn drop(&mut self) {
8743        self.control_handle.shutdown();
8744        // Safety: drops once, never accessed again
8745        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8746    }
8747}
8748
8749impl fdomain_client::fidl::Responder for FileLinkIntoResponder {
8750    type ControlHandle = FileControlHandle;
8751
8752    fn control_handle(&self) -> &FileControlHandle {
8753        &self.control_handle
8754    }
8755
8756    fn drop_without_shutdown(mut self) {
8757        // Safety: drops once, never accessed again due to mem::forget
8758        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8759        // Prevent Drop from running (which would shut down the channel)
8760        std::mem::forget(self);
8761    }
8762}
8763
8764impl FileLinkIntoResponder {
8765    /// Sends a response to the FIDL transaction.
8766    ///
8767    /// Sets the channel to shutdown if an error occurs.
8768    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8769        let _result = self.send_raw(result);
8770        if _result.is_err() {
8771            self.control_handle.shutdown();
8772        }
8773        self.drop_without_shutdown();
8774        _result
8775    }
8776
8777    /// Similar to "send" but does not shutdown the channel if an error occurs.
8778    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8779        let _result = self.send_raw(result);
8780        self.drop_without_shutdown();
8781        _result
8782    }
8783
8784    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8785        self.control_handle
8786            .inner
8787            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8788                result,
8789                self.tx_id,
8790                0x54f3949246a03e74,
8791                fidl::encoding::DynamicFlags::empty(),
8792            )
8793    }
8794}
8795
8796#[must_use = "FIDL methods require a response to be sent"]
8797#[derive(Debug)]
8798pub struct FileCloseResponder {
8799    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8800    tx_id: u32,
8801}
8802
8803/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
8804/// if the responder is dropped without sending a response, so that the client
8805/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8806impl std::ops::Drop for FileCloseResponder {
8807    fn drop(&mut self) {
8808        self.control_handle.shutdown();
8809        // Safety: drops once, never accessed again
8810        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8811    }
8812}
8813
8814impl fdomain_client::fidl::Responder for FileCloseResponder {
8815    type ControlHandle = FileControlHandle;
8816
8817    fn control_handle(&self) -> &FileControlHandle {
8818        &self.control_handle
8819    }
8820
8821    fn drop_without_shutdown(mut self) {
8822        // Safety: drops once, never accessed again due to mem::forget
8823        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8824        // Prevent Drop from running (which would shut down the channel)
8825        std::mem::forget(self);
8826    }
8827}
8828
8829impl FileCloseResponder {
8830    /// Sends a response to the FIDL transaction.
8831    ///
8832    /// Sets the channel to shutdown if an error occurs.
8833    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8834        let _result = self.send_raw(result);
8835        if _result.is_err() {
8836            self.control_handle.shutdown();
8837        }
8838        self.drop_without_shutdown();
8839        _result
8840    }
8841
8842    /// Similar to "send" but does not shutdown the channel if an error occurs.
8843    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8844        let _result = self.send_raw(result);
8845        self.drop_without_shutdown();
8846        _result
8847    }
8848
8849    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8850        self.control_handle
8851            .inner
8852            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8853                result,
8854                self.tx_id,
8855                0x5ac5d459ad7f657e,
8856                fidl::encoding::DynamicFlags::empty(),
8857            )
8858    }
8859}
8860
8861#[must_use = "FIDL methods require a response to be sent"]
8862#[derive(Debug)]
8863pub struct FileQueryResponder {
8864    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8865    tx_id: u32,
8866}
8867
8868/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
8869/// if the responder is dropped without sending a response, so that the client
8870/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8871impl std::ops::Drop for FileQueryResponder {
8872    fn drop(&mut self) {
8873        self.control_handle.shutdown();
8874        // Safety: drops once, never accessed again
8875        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8876    }
8877}
8878
8879impl fdomain_client::fidl::Responder for FileQueryResponder {
8880    type ControlHandle = FileControlHandle;
8881
8882    fn control_handle(&self) -> &FileControlHandle {
8883        &self.control_handle
8884    }
8885
8886    fn drop_without_shutdown(mut self) {
8887        // Safety: drops once, never accessed again due to mem::forget
8888        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8889        // Prevent Drop from running (which would shut down the channel)
8890        std::mem::forget(self);
8891    }
8892}
8893
8894impl FileQueryResponder {
8895    /// Sends a response to the FIDL transaction.
8896    ///
8897    /// Sets the channel to shutdown if an error occurs.
8898    pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8899        let _result = self.send_raw(protocol);
8900        if _result.is_err() {
8901            self.control_handle.shutdown();
8902        }
8903        self.drop_without_shutdown();
8904        _result
8905    }
8906
8907    /// Similar to "send" but does not shutdown the channel if an error occurs.
8908    pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8909        let _result = self.send_raw(protocol);
8910        self.drop_without_shutdown();
8911        _result
8912    }
8913
8914    fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8915        self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
8916            (protocol,),
8917            self.tx_id,
8918            0x2658edee9decfc06,
8919            fidl::encoding::DynamicFlags::empty(),
8920        )
8921    }
8922}
8923
8924#[must_use = "FIDL methods require a response to be sent"]
8925#[derive(Debug)]
8926pub struct FileDeprecatedGetAttrResponder {
8927    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8928    tx_id: u32,
8929}
8930
8931/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
8932/// if the responder is dropped without sending a response, so that the client
8933/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8934impl std::ops::Drop for FileDeprecatedGetAttrResponder {
8935    fn drop(&mut self) {
8936        self.control_handle.shutdown();
8937        // Safety: drops once, never accessed again
8938        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8939    }
8940}
8941
8942impl fdomain_client::fidl::Responder for FileDeprecatedGetAttrResponder {
8943    type ControlHandle = FileControlHandle;
8944
8945    fn control_handle(&self) -> &FileControlHandle {
8946        &self.control_handle
8947    }
8948
8949    fn drop_without_shutdown(mut self) {
8950        // Safety: drops once, never accessed again due to mem::forget
8951        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8952        // Prevent Drop from running (which would shut down the channel)
8953        std::mem::forget(self);
8954    }
8955}
8956
8957impl FileDeprecatedGetAttrResponder {
8958    /// Sends a response to the FIDL transaction.
8959    ///
8960    /// Sets the channel to shutdown if an error occurs.
8961    pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
8962        let _result = self.send_raw(s, attributes);
8963        if _result.is_err() {
8964            self.control_handle.shutdown();
8965        }
8966        self.drop_without_shutdown();
8967        _result
8968    }
8969
8970    /// Similar to "send" but does not shutdown the channel if an error occurs.
8971    pub fn send_no_shutdown_on_err(
8972        self,
8973        mut s: i32,
8974        mut attributes: &NodeAttributes,
8975    ) -> Result<(), fidl::Error> {
8976        let _result = self.send_raw(s, attributes);
8977        self.drop_without_shutdown();
8978        _result
8979    }
8980
8981    fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
8982        self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
8983            (s, attributes),
8984            self.tx_id,
8985            0x78985e216314dafd,
8986            fidl::encoding::DynamicFlags::empty(),
8987        )
8988    }
8989}
8990
8991#[must_use = "FIDL methods require a response to be sent"]
8992#[derive(Debug)]
8993pub struct FileDeprecatedSetAttrResponder {
8994    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8995    tx_id: u32,
8996}
8997
8998/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
8999/// if the responder is dropped without sending a response, so that the client
9000/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9001impl std::ops::Drop for FileDeprecatedSetAttrResponder {
9002    fn drop(&mut self) {
9003        self.control_handle.shutdown();
9004        // Safety: drops once, never accessed again
9005        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9006    }
9007}
9008
9009impl fdomain_client::fidl::Responder for FileDeprecatedSetAttrResponder {
9010    type ControlHandle = FileControlHandle;
9011
9012    fn control_handle(&self) -> &FileControlHandle {
9013        &self.control_handle
9014    }
9015
9016    fn drop_without_shutdown(mut self) {
9017        // Safety: drops once, never accessed again due to mem::forget
9018        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9019        // Prevent Drop from running (which would shut down the channel)
9020        std::mem::forget(self);
9021    }
9022}
9023
9024impl FileDeprecatedSetAttrResponder {
9025    /// Sends a response to the FIDL transaction.
9026    ///
9027    /// Sets the channel to shutdown if an error occurs.
9028    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
9029        let _result = self.send_raw(s);
9030        if _result.is_err() {
9031            self.control_handle.shutdown();
9032        }
9033        self.drop_without_shutdown();
9034        _result
9035    }
9036
9037    /// Similar to "send" but does not shutdown the channel if an error occurs.
9038    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
9039        let _result = self.send_raw(s);
9040        self.drop_without_shutdown();
9041        _result
9042    }
9043
9044    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
9045        self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
9046            (s,),
9047            self.tx_id,
9048            0x4186c0f40d938f46,
9049            fidl::encoding::DynamicFlags::empty(),
9050        )
9051    }
9052}
9053
9054#[must_use = "FIDL methods require a response to be sent"]
9055#[derive(Debug)]
9056pub struct FileDeprecatedGetFlagsResponder {
9057    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9058    tx_id: u32,
9059}
9060
9061/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9062/// if the responder is dropped without sending a response, so that the client
9063/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9064impl std::ops::Drop for FileDeprecatedGetFlagsResponder {
9065    fn drop(&mut self) {
9066        self.control_handle.shutdown();
9067        // Safety: drops once, never accessed again
9068        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9069    }
9070}
9071
9072impl fdomain_client::fidl::Responder for FileDeprecatedGetFlagsResponder {
9073    type ControlHandle = FileControlHandle;
9074
9075    fn control_handle(&self) -> &FileControlHandle {
9076        &self.control_handle
9077    }
9078
9079    fn drop_without_shutdown(mut self) {
9080        // Safety: drops once, never accessed again due to mem::forget
9081        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9082        // Prevent Drop from running (which would shut down the channel)
9083        std::mem::forget(self);
9084    }
9085}
9086
9087impl FileDeprecatedGetFlagsResponder {
9088    /// Sends a response to the FIDL transaction.
9089    ///
9090    /// Sets the channel to shutdown if an error occurs.
9091    pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
9092        let _result = self.send_raw(s, flags);
9093        if _result.is_err() {
9094            self.control_handle.shutdown();
9095        }
9096        self.drop_without_shutdown();
9097        _result
9098    }
9099
9100    /// Similar to "send" but does not shutdown the channel if an error occurs.
9101    pub fn send_no_shutdown_on_err(
9102        self,
9103        mut s: i32,
9104        mut flags: OpenFlags,
9105    ) -> Result<(), fidl::Error> {
9106        let _result = self.send_raw(s, flags);
9107        self.drop_without_shutdown();
9108        _result
9109    }
9110
9111    fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
9112        self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
9113            (s, flags),
9114            self.tx_id,
9115            0x5b88fffb8eda3aa1,
9116            fidl::encoding::DynamicFlags::empty(),
9117        )
9118    }
9119}
9120
9121#[must_use = "FIDL methods require a response to be sent"]
9122#[derive(Debug)]
9123pub struct FileDeprecatedSetFlagsResponder {
9124    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9125    tx_id: u32,
9126}
9127
9128/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9129/// if the responder is dropped without sending a response, so that the client
9130/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9131impl std::ops::Drop for FileDeprecatedSetFlagsResponder {
9132    fn drop(&mut self) {
9133        self.control_handle.shutdown();
9134        // Safety: drops once, never accessed again
9135        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9136    }
9137}
9138
9139impl fdomain_client::fidl::Responder for FileDeprecatedSetFlagsResponder {
9140    type ControlHandle = FileControlHandle;
9141
9142    fn control_handle(&self) -> &FileControlHandle {
9143        &self.control_handle
9144    }
9145
9146    fn drop_without_shutdown(mut self) {
9147        // Safety: drops once, never accessed again due to mem::forget
9148        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9149        // Prevent Drop from running (which would shut down the channel)
9150        std::mem::forget(self);
9151    }
9152}
9153
9154impl FileDeprecatedSetFlagsResponder {
9155    /// Sends a response to the FIDL transaction.
9156    ///
9157    /// Sets the channel to shutdown if an error occurs.
9158    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
9159        let _result = self.send_raw(s);
9160        if _result.is_err() {
9161            self.control_handle.shutdown();
9162        }
9163        self.drop_without_shutdown();
9164        _result
9165    }
9166
9167    /// Similar to "send" but does not shutdown the channel if an error occurs.
9168    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
9169        let _result = self.send_raw(s);
9170        self.drop_without_shutdown();
9171        _result
9172    }
9173
9174    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
9175        self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
9176            (s,),
9177            self.tx_id,
9178            0x5295b76c71fde733,
9179            fidl::encoding::DynamicFlags::empty(),
9180        )
9181    }
9182}
9183
9184#[must_use = "FIDL methods require a response to be sent"]
9185#[derive(Debug)]
9186pub struct FileGetFlagsResponder {
9187    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9188    tx_id: u32,
9189}
9190
9191/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9192/// if the responder is dropped without sending a response, so that the client
9193/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9194impl std::ops::Drop for FileGetFlagsResponder {
9195    fn drop(&mut self) {
9196        self.control_handle.shutdown();
9197        // Safety: drops once, never accessed again
9198        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9199    }
9200}
9201
9202impl fdomain_client::fidl::Responder for FileGetFlagsResponder {
9203    type ControlHandle = FileControlHandle;
9204
9205    fn control_handle(&self) -> &FileControlHandle {
9206        &self.control_handle
9207    }
9208
9209    fn drop_without_shutdown(mut self) {
9210        // Safety: drops once, never accessed again due to mem::forget
9211        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9212        // Prevent Drop from running (which would shut down the channel)
9213        std::mem::forget(self);
9214    }
9215}
9216
9217impl FileGetFlagsResponder {
9218    /// Sends a response to the FIDL transaction.
9219    ///
9220    /// Sets the channel to shutdown if an error occurs.
9221    pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
9222        let _result = self.send_raw(result);
9223        if _result.is_err() {
9224            self.control_handle.shutdown();
9225        }
9226        self.drop_without_shutdown();
9227        _result
9228    }
9229
9230    /// Similar to "send" but does not shutdown the channel if an error occurs.
9231    pub fn send_no_shutdown_on_err(
9232        self,
9233        mut result: Result<Flags, i32>,
9234    ) -> Result<(), fidl::Error> {
9235        let _result = self.send_raw(result);
9236        self.drop_without_shutdown();
9237        _result
9238    }
9239
9240    fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
9241        self.control_handle
9242            .inner
9243            .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
9244                fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
9245                self.tx_id,
9246                0x176eb318f64ec23,
9247                fidl::encoding::DynamicFlags::FLEXIBLE,
9248            )
9249    }
9250}
9251
9252#[must_use = "FIDL methods require a response to be sent"]
9253#[derive(Debug)]
9254pub struct FileSetFlagsResponder {
9255    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9256    tx_id: u32,
9257}
9258
9259/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9260/// if the responder is dropped without sending a response, so that the client
9261/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9262impl std::ops::Drop for FileSetFlagsResponder {
9263    fn drop(&mut self) {
9264        self.control_handle.shutdown();
9265        // Safety: drops once, never accessed again
9266        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9267    }
9268}
9269
9270impl fdomain_client::fidl::Responder for FileSetFlagsResponder {
9271    type ControlHandle = FileControlHandle;
9272
9273    fn control_handle(&self) -> &FileControlHandle {
9274        &self.control_handle
9275    }
9276
9277    fn drop_without_shutdown(mut self) {
9278        // Safety: drops once, never accessed again due to mem::forget
9279        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9280        // Prevent Drop from running (which would shut down the channel)
9281        std::mem::forget(self);
9282    }
9283}
9284
9285impl FileSetFlagsResponder {
9286    /// Sends a response to the FIDL transaction.
9287    ///
9288    /// Sets the channel to shutdown if an error occurs.
9289    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9290        let _result = self.send_raw(result);
9291        if _result.is_err() {
9292            self.control_handle.shutdown();
9293        }
9294        self.drop_without_shutdown();
9295        _result
9296    }
9297
9298    /// Similar to "send" but does not shutdown the channel if an error occurs.
9299    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9300        let _result = self.send_raw(result);
9301        self.drop_without_shutdown();
9302        _result
9303    }
9304
9305    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9306        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
9307            fidl::encoding::EmptyStruct,
9308            i32,
9309        >>(
9310            fidl::encoding::FlexibleResult::new(result),
9311            self.tx_id,
9312            0x55a8028685791ea8,
9313            fidl::encoding::DynamicFlags::FLEXIBLE,
9314        )
9315    }
9316}
9317
9318#[must_use = "FIDL methods require a response to be sent"]
9319#[derive(Debug)]
9320pub struct FileQueryFilesystemResponder {
9321    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9322    tx_id: u32,
9323}
9324
9325/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9326/// if the responder is dropped without sending a response, so that the client
9327/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9328impl std::ops::Drop for FileQueryFilesystemResponder {
9329    fn drop(&mut self) {
9330        self.control_handle.shutdown();
9331        // Safety: drops once, never accessed again
9332        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9333    }
9334}
9335
9336impl fdomain_client::fidl::Responder for FileQueryFilesystemResponder {
9337    type ControlHandle = FileControlHandle;
9338
9339    fn control_handle(&self) -> &FileControlHandle {
9340        &self.control_handle
9341    }
9342
9343    fn drop_without_shutdown(mut self) {
9344        // Safety: drops once, never accessed again due to mem::forget
9345        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9346        // Prevent Drop from running (which would shut down the channel)
9347        std::mem::forget(self);
9348    }
9349}
9350
9351impl FileQueryFilesystemResponder {
9352    /// Sends a response to the FIDL transaction.
9353    ///
9354    /// Sets the channel to shutdown if an error occurs.
9355    pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
9356        let _result = self.send_raw(s, info);
9357        if _result.is_err() {
9358            self.control_handle.shutdown();
9359        }
9360        self.drop_without_shutdown();
9361        _result
9362    }
9363
9364    /// Similar to "send" but does not shutdown the channel if an error occurs.
9365    pub fn send_no_shutdown_on_err(
9366        self,
9367        mut s: i32,
9368        mut info: Option<&FilesystemInfo>,
9369    ) -> Result<(), fidl::Error> {
9370        let _result = self.send_raw(s, info);
9371        self.drop_without_shutdown();
9372        _result
9373    }
9374
9375    fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
9376        self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
9377            (s, info),
9378            self.tx_id,
9379            0x6f344a1c6b0a0610,
9380            fidl::encoding::DynamicFlags::empty(),
9381        )
9382    }
9383}
9384
9385#[must_use = "FIDL methods require a response to be sent"]
9386#[derive(Debug)]
9387pub struct FileGetAttributesResponder {
9388    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9389    tx_id: u32,
9390}
9391
9392/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9393/// if the responder is dropped without sending a response, so that the client
9394/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9395impl std::ops::Drop for FileGetAttributesResponder {
9396    fn drop(&mut self) {
9397        self.control_handle.shutdown();
9398        // Safety: drops once, never accessed again
9399        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9400    }
9401}
9402
9403impl fdomain_client::fidl::Responder for FileGetAttributesResponder {
9404    type ControlHandle = FileControlHandle;
9405
9406    fn control_handle(&self) -> &FileControlHandle {
9407        &self.control_handle
9408    }
9409
9410    fn drop_without_shutdown(mut self) {
9411        // Safety: drops once, never accessed again due to mem::forget
9412        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9413        // Prevent Drop from running (which would shut down the channel)
9414        std::mem::forget(self);
9415    }
9416}
9417
9418impl FileGetAttributesResponder {
9419    /// Sends a response to the FIDL transaction.
9420    ///
9421    /// Sets the channel to shutdown if an error occurs.
9422    pub fn send(
9423        self,
9424        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9425    ) -> Result<(), fidl::Error> {
9426        let _result = self.send_raw(result);
9427        if _result.is_err() {
9428            self.control_handle.shutdown();
9429        }
9430        self.drop_without_shutdown();
9431        _result
9432    }
9433
9434    /// Similar to "send" but does not shutdown the channel if an error occurs.
9435    pub fn send_no_shutdown_on_err(
9436        self,
9437        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9438    ) -> Result<(), fidl::Error> {
9439        let _result = self.send_raw(result);
9440        self.drop_without_shutdown();
9441        _result
9442    }
9443
9444    fn send_raw(
9445        &self,
9446        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9447    ) -> Result<(), fidl::Error> {
9448        self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
9449            result,
9450            self.tx_id,
9451            0x3d4396a638ea053b,
9452            fidl::encoding::DynamicFlags::empty(),
9453        )
9454    }
9455}
9456
9457#[must_use = "FIDL methods require a response to be sent"]
9458#[derive(Debug)]
9459pub struct FileUpdateAttributesResponder {
9460    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9461    tx_id: u32,
9462}
9463
9464/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9465/// if the responder is dropped without sending a response, so that the client
9466/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9467impl std::ops::Drop for FileUpdateAttributesResponder {
9468    fn drop(&mut self) {
9469        self.control_handle.shutdown();
9470        // Safety: drops once, never accessed again
9471        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9472    }
9473}
9474
9475impl fdomain_client::fidl::Responder for FileUpdateAttributesResponder {
9476    type ControlHandle = FileControlHandle;
9477
9478    fn control_handle(&self) -> &FileControlHandle {
9479        &self.control_handle
9480    }
9481
9482    fn drop_without_shutdown(mut self) {
9483        // Safety: drops once, never accessed again due to mem::forget
9484        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9485        // Prevent Drop from running (which would shut down the channel)
9486        std::mem::forget(self);
9487    }
9488}
9489
9490impl FileUpdateAttributesResponder {
9491    /// Sends a response to the FIDL transaction.
9492    ///
9493    /// Sets the channel to shutdown if an error occurs.
9494    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9495        let _result = self.send_raw(result);
9496        if _result.is_err() {
9497            self.control_handle.shutdown();
9498        }
9499        self.drop_without_shutdown();
9500        _result
9501    }
9502
9503    /// Similar to "send" but does not shutdown the channel if an error occurs.
9504    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9505        let _result = self.send_raw(result);
9506        self.drop_without_shutdown();
9507        _result
9508    }
9509
9510    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9511        self.control_handle
9512            .inner
9513            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9514                result,
9515                self.tx_id,
9516                0x3308c1da5a89bf08,
9517                fidl::encoding::DynamicFlags::empty(),
9518            )
9519    }
9520}
9521
9522#[must_use = "FIDL methods require a response to be sent"]
9523#[derive(Debug)]
9524pub struct FileSyncResponder {
9525    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9526    tx_id: u32,
9527}
9528
9529/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9530/// if the responder is dropped without sending a response, so that the client
9531/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9532impl std::ops::Drop for FileSyncResponder {
9533    fn drop(&mut self) {
9534        self.control_handle.shutdown();
9535        // Safety: drops once, never accessed again
9536        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9537    }
9538}
9539
9540impl fdomain_client::fidl::Responder for FileSyncResponder {
9541    type ControlHandle = FileControlHandle;
9542
9543    fn control_handle(&self) -> &FileControlHandle {
9544        &self.control_handle
9545    }
9546
9547    fn drop_without_shutdown(mut self) {
9548        // Safety: drops once, never accessed again due to mem::forget
9549        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9550        // Prevent Drop from running (which would shut down the channel)
9551        std::mem::forget(self);
9552    }
9553}
9554
9555impl FileSyncResponder {
9556    /// Sends a response to the FIDL transaction.
9557    ///
9558    /// Sets the channel to shutdown if an error occurs.
9559    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9560        let _result = self.send_raw(result);
9561        if _result.is_err() {
9562            self.control_handle.shutdown();
9563        }
9564        self.drop_without_shutdown();
9565        _result
9566    }
9567
9568    /// Similar to "send" but does not shutdown the channel if an error occurs.
9569    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9570        let _result = self.send_raw(result);
9571        self.drop_without_shutdown();
9572        _result
9573    }
9574
9575    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9576        self.control_handle
9577            .inner
9578            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9579                result,
9580                self.tx_id,
9581                0x2c5c27ca0ab5dc49,
9582                fidl::encoding::DynamicFlags::empty(),
9583            )
9584    }
9585}
9586
9587#[must_use = "FIDL methods require a response to be sent"]
9588#[derive(Debug)]
9589pub struct FileGetExtendedAttributeResponder {
9590    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9591    tx_id: u32,
9592}
9593
9594/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9595/// if the responder is dropped without sending a response, so that the client
9596/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9597impl std::ops::Drop for FileGetExtendedAttributeResponder {
9598    fn drop(&mut self) {
9599        self.control_handle.shutdown();
9600        // Safety: drops once, never accessed again
9601        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9602    }
9603}
9604
9605impl fdomain_client::fidl::Responder for FileGetExtendedAttributeResponder {
9606    type ControlHandle = FileControlHandle;
9607
9608    fn control_handle(&self) -> &FileControlHandle {
9609        &self.control_handle
9610    }
9611
9612    fn drop_without_shutdown(mut self) {
9613        // Safety: drops once, never accessed again due to mem::forget
9614        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9615        // Prevent Drop from running (which would shut down the channel)
9616        std::mem::forget(self);
9617    }
9618}
9619
9620impl FileGetExtendedAttributeResponder {
9621    /// Sends a response to the FIDL transaction.
9622    ///
9623    /// Sets the channel to shutdown if an error occurs.
9624    pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
9625        let _result = self.send_raw(result);
9626        if _result.is_err() {
9627            self.control_handle.shutdown();
9628        }
9629        self.drop_without_shutdown();
9630        _result
9631    }
9632
9633    /// Similar to "send" but does not shutdown the channel if an error occurs.
9634    pub fn send_no_shutdown_on_err(
9635        self,
9636        mut result: Result<ExtendedAttributeValue, i32>,
9637    ) -> Result<(), fidl::Error> {
9638        let _result = self.send_raw(result);
9639        self.drop_without_shutdown();
9640        _result
9641    }
9642
9643    fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
9644        self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
9645            result.as_mut().map_err(|e| *e),
9646            self.tx_id,
9647            0x45ffa3ccfdeb76db,
9648            fidl::encoding::DynamicFlags::empty(),
9649        )
9650    }
9651}
9652
9653#[must_use = "FIDL methods require a response to be sent"]
9654#[derive(Debug)]
9655pub struct FileSetExtendedAttributeResponder {
9656    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9657    tx_id: u32,
9658}
9659
9660/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9661/// if the responder is dropped without sending a response, so that the client
9662/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9663impl std::ops::Drop for FileSetExtendedAttributeResponder {
9664    fn drop(&mut self) {
9665        self.control_handle.shutdown();
9666        // Safety: drops once, never accessed again
9667        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9668    }
9669}
9670
9671impl fdomain_client::fidl::Responder for FileSetExtendedAttributeResponder {
9672    type ControlHandle = FileControlHandle;
9673
9674    fn control_handle(&self) -> &FileControlHandle {
9675        &self.control_handle
9676    }
9677
9678    fn drop_without_shutdown(mut self) {
9679        // Safety: drops once, never accessed again due to mem::forget
9680        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9681        // Prevent Drop from running (which would shut down the channel)
9682        std::mem::forget(self);
9683    }
9684}
9685
9686impl FileSetExtendedAttributeResponder {
9687    /// Sends a response to the FIDL transaction.
9688    ///
9689    /// Sets the channel to shutdown if an error occurs.
9690    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9691        let _result = self.send_raw(result);
9692        if _result.is_err() {
9693            self.control_handle.shutdown();
9694        }
9695        self.drop_without_shutdown();
9696        _result
9697    }
9698
9699    /// Similar to "send" but does not shutdown the channel if an error occurs.
9700    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9701        let _result = self.send_raw(result);
9702        self.drop_without_shutdown();
9703        _result
9704    }
9705
9706    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9707        self.control_handle
9708            .inner
9709            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9710                result,
9711                self.tx_id,
9712                0x4a951362f681f23c,
9713                fidl::encoding::DynamicFlags::empty(),
9714            )
9715    }
9716}
9717
9718#[must_use = "FIDL methods require a response to be sent"]
9719#[derive(Debug)]
9720pub struct FileRemoveExtendedAttributeResponder {
9721    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9722    tx_id: u32,
9723}
9724
9725/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9726/// if the responder is dropped without sending a response, so that the client
9727/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9728impl std::ops::Drop for FileRemoveExtendedAttributeResponder {
9729    fn drop(&mut self) {
9730        self.control_handle.shutdown();
9731        // Safety: drops once, never accessed again
9732        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9733    }
9734}
9735
9736impl fdomain_client::fidl::Responder for FileRemoveExtendedAttributeResponder {
9737    type ControlHandle = FileControlHandle;
9738
9739    fn control_handle(&self) -> &FileControlHandle {
9740        &self.control_handle
9741    }
9742
9743    fn drop_without_shutdown(mut self) {
9744        // Safety: drops once, never accessed again due to mem::forget
9745        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9746        // Prevent Drop from running (which would shut down the channel)
9747        std::mem::forget(self);
9748    }
9749}
9750
9751impl FileRemoveExtendedAttributeResponder {
9752    /// Sends a response to the FIDL transaction.
9753    ///
9754    /// Sets the channel to shutdown if an error occurs.
9755    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9756        let _result = self.send_raw(result);
9757        if _result.is_err() {
9758            self.control_handle.shutdown();
9759        }
9760        self.drop_without_shutdown();
9761        _result
9762    }
9763
9764    /// Similar to "send" but does not shutdown the channel if an error occurs.
9765    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9766        let _result = self.send_raw(result);
9767        self.drop_without_shutdown();
9768        _result
9769    }
9770
9771    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9772        self.control_handle
9773            .inner
9774            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9775                result,
9776                self.tx_id,
9777                0x7a0b9f3a9bf9032d,
9778                fidl::encoding::DynamicFlags::empty(),
9779            )
9780    }
9781}
9782
9783#[must_use = "FIDL methods require a response to be sent"]
9784#[derive(Debug)]
9785pub struct FileReadResponder {
9786    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9787    tx_id: u32,
9788}
9789
9790/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9791/// if the responder is dropped without sending a response, so that the client
9792/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9793impl std::ops::Drop for FileReadResponder {
9794    fn drop(&mut self) {
9795        self.control_handle.shutdown();
9796        // Safety: drops once, never accessed again
9797        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9798    }
9799}
9800
9801impl fdomain_client::fidl::Responder for FileReadResponder {
9802    type ControlHandle = FileControlHandle;
9803
9804    fn control_handle(&self) -> &FileControlHandle {
9805        &self.control_handle
9806    }
9807
9808    fn drop_without_shutdown(mut self) {
9809        // Safety: drops once, never accessed again due to mem::forget
9810        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9811        // Prevent Drop from running (which would shut down the channel)
9812        std::mem::forget(self);
9813    }
9814}
9815
9816impl FileReadResponder {
9817    /// Sends a response to the FIDL transaction.
9818    ///
9819    /// Sets the channel to shutdown if an error occurs.
9820    pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
9821        let _result = self.send_raw(result);
9822        if _result.is_err() {
9823            self.control_handle.shutdown();
9824        }
9825        self.drop_without_shutdown();
9826        _result
9827    }
9828
9829    /// Similar to "send" but does not shutdown the channel if an error occurs.
9830    pub fn send_no_shutdown_on_err(
9831        self,
9832        mut result: Result<&[u8], i32>,
9833    ) -> Result<(), fidl::Error> {
9834        let _result = self.send_raw(result);
9835        self.drop_without_shutdown();
9836        _result
9837    }
9838
9839    fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
9840        self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
9841            result.map(|data| (data,)),
9842            self.tx_id,
9843            0x57e419a298c8ede,
9844            fidl::encoding::DynamicFlags::empty(),
9845        )
9846    }
9847}
9848
9849#[must_use = "FIDL methods require a response to be sent"]
9850#[derive(Debug)]
9851pub struct FileWriteResponder {
9852    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9853    tx_id: u32,
9854}
9855
9856/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9857/// if the responder is dropped without sending a response, so that the client
9858/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9859impl std::ops::Drop for FileWriteResponder {
9860    fn drop(&mut self) {
9861        self.control_handle.shutdown();
9862        // Safety: drops once, never accessed again
9863        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9864    }
9865}
9866
9867impl fdomain_client::fidl::Responder for FileWriteResponder {
9868    type ControlHandle = FileControlHandle;
9869
9870    fn control_handle(&self) -> &FileControlHandle {
9871        &self.control_handle
9872    }
9873
9874    fn drop_without_shutdown(mut self) {
9875        // Safety: drops once, never accessed again due to mem::forget
9876        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9877        // Prevent Drop from running (which would shut down the channel)
9878        std::mem::forget(self);
9879    }
9880}
9881
9882impl FileWriteResponder {
9883    /// Sends a response to the FIDL transaction.
9884    ///
9885    /// Sets the channel to shutdown if an error occurs.
9886    pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9887        let _result = self.send_raw(result);
9888        if _result.is_err() {
9889            self.control_handle.shutdown();
9890        }
9891        self.drop_without_shutdown();
9892        _result
9893    }
9894
9895    /// Similar to "send" but does not shutdown the channel if an error occurs.
9896    pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9897        let _result = self.send_raw(result);
9898        self.drop_without_shutdown();
9899        _result
9900    }
9901
9902    fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9903        self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
9904            result.map(|actual_count| (actual_count,)),
9905            self.tx_id,
9906            0x6a31437832469f82,
9907            fidl::encoding::DynamicFlags::empty(),
9908        )
9909    }
9910}
9911
9912#[must_use = "FIDL methods require a response to be sent"]
9913#[derive(Debug)]
9914pub struct FileDescribeResponder {
9915    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9916    tx_id: u32,
9917}
9918
9919/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9920/// if the responder is dropped without sending a response, so that the client
9921/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9922impl std::ops::Drop for FileDescribeResponder {
9923    fn drop(&mut self) {
9924        self.control_handle.shutdown();
9925        // Safety: drops once, never accessed again
9926        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9927    }
9928}
9929
9930impl fdomain_client::fidl::Responder for FileDescribeResponder {
9931    type ControlHandle = FileControlHandle;
9932
9933    fn control_handle(&self) -> &FileControlHandle {
9934        &self.control_handle
9935    }
9936
9937    fn drop_without_shutdown(mut self) {
9938        // Safety: drops once, never accessed again due to mem::forget
9939        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9940        // Prevent Drop from running (which would shut down the channel)
9941        std::mem::forget(self);
9942    }
9943}
9944
9945impl FileDescribeResponder {
9946    /// Sends a response to the FIDL transaction.
9947    ///
9948    /// Sets the channel to shutdown if an error occurs.
9949    pub fn send(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9950        let _result = self.send_raw(payload);
9951        if _result.is_err() {
9952            self.control_handle.shutdown();
9953        }
9954        self.drop_without_shutdown();
9955        _result
9956    }
9957
9958    /// Similar to "send" but does not shutdown the channel if an error occurs.
9959    pub fn send_no_shutdown_on_err(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9960        let _result = self.send_raw(payload);
9961        self.drop_without_shutdown();
9962        _result
9963    }
9964
9965    fn send_raw(&self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9966        self.control_handle.inner.send::<FileInfo>(
9967            &mut payload,
9968            self.tx_id,
9969            0x68b5ac00c62906bc,
9970            fidl::encoding::DynamicFlags::empty(),
9971        )
9972    }
9973}
9974
9975#[must_use = "FIDL methods require a response to be sent"]
9976#[derive(Debug)]
9977pub struct FileSeekResponder {
9978    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9979    tx_id: u32,
9980}
9981
9982/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9983/// if the responder is dropped without sending a response, so that the client
9984/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9985impl std::ops::Drop for FileSeekResponder {
9986    fn drop(&mut self) {
9987        self.control_handle.shutdown();
9988        // Safety: drops once, never accessed again
9989        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9990    }
9991}
9992
9993impl fdomain_client::fidl::Responder for FileSeekResponder {
9994    type ControlHandle = FileControlHandle;
9995
9996    fn control_handle(&self) -> &FileControlHandle {
9997        &self.control_handle
9998    }
9999
10000    fn drop_without_shutdown(mut self) {
10001        // Safety: drops once, never accessed again due to mem::forget
10002        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10003        // Prevent Drop from running (which would shut down the channel)
10004        std::mem::forget(self);
10005    }
10006}
10007
10008impl FileSeekResponder {
10009    /// Sends a response to the FIDL transaction.
10010    ///
10011    /// Sets the channel to shutdown if an error occurs.
10012    pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10013        let _result = self.send_raw(result);
10014        if _result.is_err() {
10015            self.control_handle.shutdown();
10016        }
10017        self.drop_without_shutdown();
10018        _result
10019    }
10020
10021    /// Similar to "send" but does not shutdown the channel if an error occurs.
10022    pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10023        let _result = self.send_raw(result);
10024        self.drop_without_shutdown();
10025        _result
10026    }
10027
10028    fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10029        self.control_handle.inner.send::<fidl::encoding::ResultType<FileSeekResponse, i32>>(
10030            result.map(|offset_from_start| (offset_from_start,)),
10031            self.tx_id,
10032            0x78079168162c5207,
10033            fidl::encoding::DynamicFlags::empty(),
10034        )
10035    }
10036}
10037
10038#[must_use = "FIDL methods require a response to be sent"]
10039#[derive(Debug)]
10040pub struct FileReadAtResponder {
10041    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10042    tx_id: u32,
10043}
10044
10045/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
10046/// if the responder is dropped without sending a response, so that the client
10047/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
10048impl std::ops::Drop for FileReadAtResponder {
10049    fn drop(&mut self) {
10050        self.control_handle.shutdown();
10051        // Safety: drops once, never accessed again
10052        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10053    }
10054}
10055
10056impl fdomain_client::fidl::Responder for FileReadAtResponder {
10057    type ControlHandle = FileControlHandle;
10058
10059    fn control_handle(&self) -> &FileControlHandle {
10060        &self.control_handle
10061    }
10062
10063    fn drop_without_shutdown(mut self) {
10064        // Safety: drops once, never accessed again due to mem::forget
10065        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10066        // Prevent Drop from running (which would shut down the channel)
10067        std::mem::forget(self);
10068    }
10069}
10070
10071impl FileReadAtResponder {
10072    /// Sends a response to the FIDL transaction.
10073    ///
10074    /// Sets the channel to shutdown if an error occurs.
10075    pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
10076        let _result = self.send_raw(result);
10077        if _result.is_err() {
10078            self.control_handle.shutdown();
10079        }
10080        self.drop_without_shutdown();
10081        _result
10082    }
10083
10084    /// Similar to "send" but does not shutdown the channel if an error occurs.
10085    pub fn send_no_shutdown_on_err(
10086        self,
10087        mut result: Result<&[u8], i32>,
10088    ) -> Result<(), fidl::Error> {
10089        let _result = self.send_raw(result);
10090        self.drop_without_shutdown();
10091        _result
10092    }
10093
10094    fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
10095        self.control_handle.inner.send::<fidl::encoding::ResultType<FileReadAtResponse, i32>>(
10096            result.map(|data| (data,)),
10097            self.tx_id,
10098            0x1607a293a60d723e,
10099            fidl::encoding::DynamicFlags::empty(),
10100        )
10101    }
10102}
10103
10104#[must_use = "FIDL methods require a response to be sent"]
10105#[derive(Debug)]
10106pub struct FileWriteAtResponder {
10107    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10108    tx_id: u32,
10109}
10110
10111/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
10112/// if the responder is dropped without sending a response, so that the client
10113/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
10114impl std::ops::Drop for FileWriteAtResponder {
10115    fn drop(&mut self) {
10116        self.control_handle.shutdown();
10117        // Safety: drops once, never accessed again
10118        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10119    }
10120}
10121
10122impl fdomain_client::fidl::Responder for FileWriteAtResponder {
10123    type ControlHandle = FileControlHandle;
10124
10125    fn control_handle(&self) -> &FileControlHandle {
10126        &self.control_handle
10127    }
10128
10129    fn drop_without_shutdown(mut self) {
10130        // Safety: drops once, never accessed again due to mem::forget
10131        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10132        // Prevent Drop from running (which would shut down the channel)
10133        std::mem::forget(self);
10134    }
10135}
10136
10137impl FileWriteAtResponder {
10138    /// Sends a response to the FIDL transaction.
10139    ///
10140    /// Sets the channel to shutdown if an error occurs.
10141    pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10142        let _result = self.send_raw(result);
10143        if _result.is_err() {
10144            self.control_handle.shutdown();
10145        }
10146        self.drop_without_shutdown();
10147        _result
10148    }
10149
10150    /// Similar to "send" but does not shutdown the channel if an error occurs.
10151    pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10152        let _result = self.send_raw(result);
10153        self.drop_without_shutdown();
10154        _result
10155    }
10156
10157    fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10158        self.control_handle.inner.send::<fidl::encoding::ResultType<FileWriteAtResponse, i32>>(
10159            result.map(|actual_count| (actual_count,)),
10160            self.tx_id,
10161            0x793eefc0045e792b,
10162            fidl::encoding::DynamicFlags::empty(),
10163        )
10164    }
10165}
10166
10167#[must_use = "FIDL methods require a response to be sent"]
10168#[derive(Debug)]
10169pub struct FileResizeResponder {
10170    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10171    tx_id: u32,
10172}
10173
10174/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
10175/// if the responder is dropped without sending a response, so that the client
10176/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
10177impl std::ops::Drop for FileResizeResponder {
10178    fn drop(&mut self) {
10179        self.control_handle.shutdown();
10180        // Safety: drops once, never accessed again
10181        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10182    }
10183}
10184
10185impl fdomain_client::fidl::Responder for FileResizeResponder {
10186    type ControlHandle = FileControlHandle;
10187
10188    fn control_handle(&self) -> &FileControlHandle {
10189        &self.control_handle
10190    }
10191
10192    fn drop_without_shutdown(mut self) {
10193        // Safety: drops once, never accessed again due to mem::forget
10194        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10195        // Prevent Drop from running (which would shut down the channel)
10196        std::mem::forget(self);
10197    }
10198}
10199
10200impl FileResizeResponder {
10201    /// Sends a response to the FIDL transaction.
10202    ///
10203    /// Sets the channel to shutdown if an error occurs.
10204    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10205        let _result = self.send_raw(result);
10206        if _result.is_err() {
10207            self.control_handle.shutdown();
10208        }
10209        self.drop_without_shutdown();
10210        _result
10211    }
10212
10213    /// Similar to "send" but does not shutdown the channel if an error occurs.
10214    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10215        let _result = self.send_raw(result);
10216        self.drop_without_shutdown();
10217        _result
10218    }
10219
10220    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10221        self.control_handle
10222            .inner
10223            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10224                result,
10225                self.tx_id,
10226                0x2b80825f0535743a,
10227                fidl::encoding::DynamicFlags::empty(),
10228            )
10229    }
10230}
10231
10232#[must_use = "FIDL methods require a response to be sent"]
10233#[derive(Debug)]
10234pub struct FileGetBackingMemoryResponder {
10235    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10236    tx_id: u32,
10237}
10238
10239/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
10240/// if the responder is dropped without sending a response, so that the client
10241/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
10242impl std::ops::Drop for FileGetBackingMemoryResponder {
10243    fn drop(&mut self) {
10244        self.control_handle.shutdown();
10245        // Safety: drops once, never accessed again
10246        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10247    }
10248}
10249
10250impl fdomain_client::fidl::Responder for FileGetBackingMemoryResponder {
10251    type ControlHandle = FileControlHandle;
10252
10253    fn control_handle(&self) -> &FileControlHandle {
10254        &self.control_handle
10255    }
10256
10257    fn drop_without_shutdown(mut self) {
10258        // Safety: drops once, never accessed again due to mem::forget
10259        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10260        // Prevent Drop from running (which would shut down the channel)
10261        std::mem::forget(self);
10262    }
10263}
10264
10265impl FileGetBackingMemoryResponder {
10266    /// Sends a response to the FIDL transaction.
10267    ///
10268    /// Sets the channel to shutdown if an error occurs.
10269    pub fn send(self, mut result: Result<fdomain_client::Vmo, i32>) -> Result<(), fidl::Error> {
10270        let _result = self.send_raw(result);
10271        if _result.is_err() {
10272            self.control_handle.shutdown();
10273        }
10274        self.drop_without_shutdown();
10275        _result
10276    }
10277
10278    /// Similar to "send" but does not shutdown the channel if an error occurs.
10279    pub fn send_no_shutdown_on_err(
10280        self,
10281        mut result: Result<fdomain_client::Vmo, i32>,
10282    ) -> Result<(), fidl::Error> {
10283        let _result = self.send_raw(result);
10284        self.drop_without_shutdown();
10285        _result
10286    }
10287
10288    fn send_raw(&self, mut result: Result<fdomain_client::Vmo, i32>) -> Result<(), fidl::Error> {
10289        self.control_handle
10290            .inner
10291            .send::<fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>>(
10292                result.map(|vmo| (vmo,)),
10293                self.tx_id,
10294                0xa6a9e654cbf62b,
10295                fidl::encoding::DynamicFlags::empty(),
10296            )
10297    }
10298}
10299
10300#[must_use = "FIDL methods require a response to be sent"]
10301#[derive(Debug)]
10302pub struct FileAllocateResponder {
10303    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10304    tx_id: u32,
10305}
10306
10307/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
10308/// if the responder is dropped without sending a response, so that the client
10309/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
10310impl std::ops::Drop for FileAllocateResponder {
10311    fn drop(&mut self) {
10312        self.control_handle.shutdown();
10313        // Safety: drops once, never accessed again
10314        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10315    }
10316}
10317
10318impl fdomain_client::fidl::Responder for FileAllocateResponder {
10319    type ControlHandle = FileControlHandle;
10320
10321    fn control_handle(&self) -> &FileControlHandle {
10322        &self.control_handle
10323    }
10324
10325    fn drop_without_shutdown(mut self) {
10326        // Safety: drops once, never accessed again due to mem::forget
10327        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10328        // Prevent Drop from running (which would shut down the channel)
10329        std::mem::forget(self);
10330    }
10331}
10332
10333impl FileAllocateResponder {
10334    /// Sends a response to the FIDL transaction.
10335    ///
10336    /// Sets the channel to shutdown if an error occurs.
10337    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10338        let _result = self.send_raw(result);
10339        if _result.is_err() {
10340            self.control_handle.shutdown();
10341        }
10342        self.drop_without_shutdown();
10343        _result
10344    }
10345
10346    /// Similar to "send" but does not shutdown the channel if an error occurs.
10347    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10348        let _result = self.send_raw(result);
10349        self.drop_without_shutdown();
10350        _result
10351    }
10352
10353    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10354        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
10355            fidl::encoding::EmptyStruct,
10356            i32,
10357        >>(
10358            fidl::encoding::FlexibleResult::new(result),
10359            self.tx_id,
10360            0x77fa0c330b57fd2e,
10361            fidl::encoding::DynamicFlags::FLEXIBLE,
10362        )
10363    }
10364}
10365
10366#[must_use = "FIDL methods require a response to be sent"]
10367#[derive(Debug)]
10368pub struct FileEnableVerityResponder {
10369    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10370    tx_id: u32,
10371}
10372
10373/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
10374/// if the responder is dropped without sending a response, so that the client
10375/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
10376impl std::ops::Drop for FileEnableVerityResponder {
10377    fn drop(&mut self) {
10378        self.control_handle.shutdown();
10379        // Safety: drops once, never accessed again
10380        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10381    }
10382}
10383
10384impl fdomain_client::fidl::Responder for FileEnableVerityResponder {
10385    type ControlHandle = FileControlHandle;
10386
10387    fn control_handle(&self) -> &FileControlHandle {
10388        &self.control_handle
10389    }
10390
10391    fn drop_without_shutdown(mut self) {
10392        // Safety: drops once, never accessed again due to mem::forget
10393        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10394        // Prevent Drop from running (which would shut down the channel)
10395        std::mem::forget(self);
10396    }
10397}
10398
10399impl FileEnableVerityResponder {
10400    /// Sends a response to the FIDL transaction.
10401    ///
10402    /// Sets the channel to shutdown if an error occurs.
10403    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10404        let _result = self.send_raw(result);
10405        if _result.is_err() {
10406            self.control_handle.shutdown();
10407        }
10408        self.drop_without_shutdown();
10409        _result
10410    }
10411
10412    /// Similar to "send" but does not shutdown the channel if an error occurs.
10413    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10414        let _result = self.send_raw(result);
10415        self.drop_without_shutdown();
10416        _result
10417    }
10418
10419    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10420        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
10421            fidl::encoding::EmptyStruct,
10422            i32,
10423        >>(
10424            fidl::encoding::FlexibleResult::new(result),
10425            self.tx_id,
10426            0x2c421ec3faaeb8bb,
10427            fidl::encoding::DynamicFlags::FLEXIBLE,
10428        )
10429    }
10430}
10431
10432#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
10433pub struct LinkableMarker;
10434
10435impl fdomain_client::fidl::ProtocolMarker for LinkableMarker {
10436    type Proxy = LinkableProxy;
10437    type RequestStream = LinkableRequestStream;
10438
10439    const DEBUG_NAME: &'static str = "(anonymous) Linkable";
10440}
10441pub type LinkableLinkIntoResult = Result<(), i32>;
10442
10443pub trait LinkableProxyInterface: Send + Sync {
10444    type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
10445        + Send;
10446    fn r#link_into(
10447        &self,
10448        dst_parent_token: fdomain_client::Event,
10449        dst: &str,
10450    ) -> Self::LinkIntoResponseFut;
10451}
10452
10453#[derive(Debug, Clone)]
10454pub struct LinkableProxy {
10455    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
10456}
10457
10458impl fdomain_client::fidl::Proxy for LinkableProxy {
10459    type Protocol = LinkableMarker;
10460
10461    fn from_channel(inner: fdomain_client::Channel) -> Self {
10462        Self::new(inner)
10463    }
10464
10465    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
10466        self.client.into_channel().map_err(|client| Self { client })
10467    }
10468
10469    fn as_channel(&self) -> &fdomain_client::Channel {
10470        self.client.as_channel()
10471    }
10472}
10473
10474impl LinkableProxy {
10475    /// Create a new Proxy for fuchsia.io/Linkable.
10476    pub fn new(channel: fdomain_client::Channel) -> Self {
10477        let protocol_name = <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
10478        Self { client: fidl::client::Client::new(channel, protocol_name) }
10479    }
10480
10481    /// Get a Stream of events from the remote end of the protocol.
10482    ///
10483    /// # Panics
10484    ///
10485    /// Panics if the event stream was already taken.
10486    pub fn take_event_stream(&self) -> LinkableEventStream {
10487        LinkableEventStream { event_receiver: self.client.take_event_receiver() }
10488    }
10489
10490    /// Creates a link to this this object with name `dst` in the directory represented by
10491    /// `dst_parent_token`.
10492    ///
10493    /// `dst` must be a resolved object name. Including "/" in the string will return
10494    /// `ZX_ERR_INVALID_ARGS`.
10495    ///
10496    /// This method requires the maximal set of rights supported by the filesystem for this object.
10497    /// For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],
10498    /// [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also
10499    /// support the [`Rights.EXECUTE`] right. Insufficient rights will result in
10500    /// `ZX_ERR_ACCESS_DENIED`.
10501    ///
10502    /// If this object has no links and is *NOT* an unnamed temporary object (objects opened with
10503    /// `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.
10504    ///
10505    /// For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,
10506    /// the object will be permanently linked to the filesystem. Requires that the unnamed temporary
10507    /// object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.
10508    ///
10509    /// This method does not have the same atomicity properties has the `Directory::Link` method,
10510    /// which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`
10511    /// because `LinkInto` will not prevent the source from being renamed or unlinked.
10512    pub fn r#link_into(
10513        &self,
10514        mut dst_parent_token: fdomain_client::Event,
10515        mut dst: &str,
10516    ) -> fidl::client::QueryResponseFut<
10517        LinkableLinkIntoResult,
10518        fdomain_client::fidl::FDomainResourceDialect,
10519    > {
10520        LinkableProxyInterface::r#link_into(self, dst_parent_token, dst)
10521    }
10522}
10523
10524impl LinkableProxyInterface for LinkableProxy {
10525    type LinkIntoResponseFut = fidl::client::QueryResponseFut<
10526        LinkableLinkIntoResult,
10527        fdomain_client::fidl::FDomainResourceDialect,
10528    >;
10529    fn r#link_into(
10530        &self,
10531        mut dst_parent_token: fdomain_client::Event,
10532        mut dst: &str,
10533    ) -> Self::LinkIntoResponseFut {
10534        fn _decode(
10535            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
10536        ) -> Result<LinkableLinkIntoResult, fidl::Error> {
10537            let _response = fidl::client::decode_transaction_body::<
10538                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
10539                fdomain_client::fidl::FDomainResourceDialect,
10540                0x54f3949246a03e74,
10541            >(_buf?)?;
10542            Ok(_response.map(|x| x))
10543        }
10544        self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
10545            (dst_parent_token, dst),
10546            0x54f3949246a03e74,
10547            fidl::encoding::DynamicFlags::empty(),
10548            _decode,
10549        )
10550    }
10551}
10552
10553pub struct LinkableEventStream {
10554    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
10555}
10556
10557impl std::marker::Unpin for LinkableEventStream {}
10558
10559impl futures::stream::FusedStream for LinkableEventStream {
10560    fn is_terminated(&self) -> bool {
10561        self.event_receiver.is_terminated()
10562    }
10563}
10564
10565impl futures::Stream for LinkableEventStream {
10566    type Item = Result<LinkableEvent, fidl::Error>;
10567
10568    fn poll_next(
10569        mut self: std::pin::Pin<&mut Self>,
10570        cx: &mut std::task::Context<'_>,
10571    ) -> std::task::Poll<Option<Self::Item>> {
10572        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
10573            &mut self.event_receiver,
10574            cx
10575        )?) {
10576            Some(buf) => std::task::Poll::Ready(Some(LinkableEvent::decode(buf))),
10577            None => std::task::Poll::Ready(None),
10578        }
10579    }
10580}
10581
10582#[derive(Debug)]
10583pub enum LinkableEvent {}
10584
10585impl LinkableEvent {
10586    /// Decodes a message buffer as a [`LinkableEvent`].
10587    fn decode(
10588        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
10589    ) -> Result<LinkableEvent, fidl::Error> {
10590        let (bytes, _handles) = buf.split_mut();
10591        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10592        debug_assert_eq!(tx_header.tx_id, 0);
10593        match tx_header.ordinal {
10594            _ => Err(fidl::Error::UnknownOrdinal {
10595                ordinal: tx_header.ordinal,
10596                protocol_name: <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
10597            }),
10598        }
10599    }
10600}
10601
10602/// A Stream of incoming requests for fuchsia.io/Linkable.
10603pub struct LinkableRequestStream {
10604    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10605    is_terminated: bool,
10606}
10607
10608impl std::marker::Unpin for LinkableRequestStream {}
10609
10610impl futures::stream::FusedStream for LinkableRequestStream {
10611    fn is_terminated(&self) -> bool {
10612        self.is_terminated
10613    }
10614}
10615
10616impl fdomain_client::fidl::RequestStream for LinkableRequestStream {
10617    type Protocol = LinkableMarker;
10618    type ControlHandle = LinkableControlHandle;
10619
10620    fn from_channel(channel: fdomain_client::Channel) -> Self {
10621        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
10622    }
10623
10624    fn control_handle(&self) -> Self::ControlHandle {
10625        LinkableControlHandle { inner: self.inner.clone() }
10626    }
10627
10628    fn into_inner(
10629        self,
10630    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
10631    {
10632        (self.inner, self.is_terminated)
10633    }
10634
10635    fn from_inner(
10636        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10637        is_terminated: bool,
10638    ) -> Self {
10639        Self { inner, is_terminated }
10640    }
10641}
10642
10643impl futures::Stream for LinkableRequestStream {
10644    type Item = Result<LinkableRequest, fidl::Error>;
10645
10646    fn poll_next(
10647        mut self: std::pin::Pin<&mut Self>,
10648        cx: &mut std::task::Context<'_>,
10649    ) -> std::task::Poll<Option<Self::Item>> {
10650        let this = &mut *self;
10651        if this.inner.check_shutdown(cx) {
10652            this.is_terminated = true;
10653            return std::task::Poll::Ready(None);
10654        }
10655        if this.is_terminated {
10656            panic!("polled LinkableRequestStream after completion");
10657        }
10658        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
10659            |bytes, handles| {
10660                match this.inner.channel().read_etc(cx, bytes, handles) {
10661                    std::task::Poll::Ready(Ok(())) => {}
10662                    std::task::Poll::Pending => return std::task::Poll::Pending,
10663                    std::task::Poll::Ready(Err(None)) => {
10664                        this.is_terminated = true;
10665                        return std::task::Poll::Ready(None);
10666                    }
10667                    std::task::Poll::Ready(Err(Some(e))) => {
10668                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
10669                            e.into(),
10670                        ))))
10671                    }
10672                }
10673
10674                // A message has been received from the channel
10675                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10676
10677                std::task::Poll::Ready(Some(match header.ordinal {
10678                    0x54f3949246a03e74 => {
10679                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
10680                        let mut req = fidl::new_empty!(
10681                            LinkableLinkIntoRequest,
10682                            fdomain_client::fidl::FDomainResourceDialect
10683                        );
10684                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
10685                        let control_handle = LinkableControlHandle { inner: this.inner.clone() };
10686                        Ok(LinkableRequest::LinkInto {
10687                            dst_parent_token: req.dst_parent_token,
10688                            dst: req.dst,
10689
10690                            responder: LinkableLinkIntoResponder {
10691                                control_handle: std::mem::ManuallyDrop::new(control_handle),
10692                                tx_id: header.tx_id,
10693                            },
10694                        })
10695                    }
10696                    _ => Err(fidl::Error::UnknownOrdinal {
10697                        ordinal: header.ordinal,
10698                        protocol_name:
10699                            <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
10700                    }),
10701                }))
10702            },
10703        )
10704    }
10705}
10706
10707#[derive(Debug)]
10708pub enum LinkableRequest {
10709    /// Creates a link to this this object with name `dst` in the directory represented by
10710    /// `dst_parent_token`.
10711    ///
10712    /// `dst` must be a resolved object name. Including "/" in the string will return
10713    /// `ZX_ERR_INVALID_ARGS`.
10714    ///
10715    /// This method requires the maximal set of rights supported by the filesystem for this object.
10716    /// For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],
10717    /// [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also
10718    /// support the [`Rights.EXECUTE`] right. Insufficient rights will result in
10719    /// `ZX_ERR_ACCESS_DENIED`.
10720    ///
10721    /// If this object has no links and is *NOT* an unnamed temporary object (objects opened with
10722    /// `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.
10723    ///
10724    /// For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,
10725    /// the object will be permanently linked to the filesystem. Requires that the unnamed temporary
10726    /// object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.
10727    ///
10728    /// This method does not have the same atomicity properties has the `Directory::Link` method,
10729    /// which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`
10730    /// because `LinkInto` will not prevent the source from being renamed or unlinked.
10731    LinkInto {
10732        dst_parent_token: fdomain_client::Event,
10733        dst: String,
10734        responder: LinkableLinkIntoResponder,
10735    },
10736}
10737
10738impl LinkableRequest {
10739    #[allow(irrefutable_let_patterns)]
10740    pub fn into_link_into(
10741        self,
10742    ) -> Option<(fdomain_client::Event, String, LinkableLinkIntoResponder)> {
10743        if let LinkableRequest::LinkInto { dst_parent_token, dst, responder } = self {
10744            Some((dst_parent_token, dst, responder))
10745        } else {
10746            None
10747        }
10748    }
10749
10750    /// Name of the method defined in FIDL
10751    pub fn method_name(&self) -> &'static str {
10752        match *self {
10753            LinkableRequest::LinkInto { .. } => "link_into",
10754        }
10755    }
10756}
10757
10758#[derive(Debug, Clone)]
10759pub struct LinkableControlHandle {
10760    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10761}
10762
10763impl fdomain_client::fidl::ControlHandle for LinkableControlHandle {
10764    fn shutdown(&self) {
10765        self.inner.shutdown()
10766    }
10767
10768    fn is_closed(&self) -> bool {
10769        self.inner.channel().is_closed()
10770    }
10771    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
10772        self.inner.channel().on_closed()
10773    }
10774}
10775
10776impl LinkableControlHandle {}
10777
10778#[must_use = "FIDL methods require a response to be sent"]
10779#[derive(Debug)]
10780pub struct LinkableLinkIntoResponder {
10781    control_handle: std::mem::ManuallyDrop<LinkableControlHandle>,
10782    tx_id: u32,
10783}
10784
10785/// Set the the channel to be shutdown (see [`LinkableControlHandle::shutdown`])
10786/// if the responder is dropped without sending a response, so that the client
10787/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
10788impl std::ops::Drop for LinkableLinkIntoResponder {
10789    fn drop(&mut self) {
10790        self.control_handle.shutdown();
10791        // Safety: drops once, never accessed again
10792        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10793    }
10794}
10795
10796impl fdomain_client::fidl::Responder for LinkableLinkIntoResponder {
10797    type ControlHandle = LinkableControlHandle;
10798
10799    fn control_handle(&self) -> &LinkableControlHandle {
10800        &self.control_handle
10801    }
10802
10803    fn drop_without_shutdown(mut self) {
10804        // Safety: drops once, never accessed again due to mem::forget
10805        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10806        // Prevent Drop from running (which would shut down the channel)
10807        std::mem::forget(self);
10808    }
10809}
10810
10811impl LinkableLinkIntoResponder {
10812    /// Sends a response to the FIDL transaction.
10813    ///
10814    /// Sets the channel to shutdown if an error occurs.
10815    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10816        let _result = self.send_raw(result);
10817        if _result.is_err() {
10818            self.control_handle.shutdown();
10819        }
10820        self.drop_without_shutdown();
10821        _result
10822    }
10823
10824    /// Similar to "send" but does not shutdown the channel if an error occurs.
10825    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10826        let _result = self.send_raw(result);
10827        self.drop_without_shutdown();
10828        _result
10829    }
10830
10831    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10832        self.control_handle
10833            .inner
10834            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10835                result,
10836                self.tx_id,
10837                0x54f3949246a03e74,
10838                fidl::encoding::DynamicFlags::empty(),
10839            )
10840    }
10841}
10842
10843#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
10844pub struct NodeMarker;
10845
10846impl fdomain_client::fidl::ProtocolMarker for NodeMarker {
10847    type Proxy = NodeProxy;
10848    type RequestStream = NodeRequestStream;
10849
10850    const DEBUG_NAME: &'static str = "fuchsia.io.Node";
10851}
10852impl fdomain_client::fidl::DiscoverableProtocolMarker for NodeMarker {}
10853pub type NodeGetFlagsResult = Result<Flags, i32>;
10854pub type NodeSetFlagsResult = Result<(), i32>;
10855pub type NodeGetAttributesResult = Result<(MutableNodeAttributes, ImmutableNodeAttributes), i32>;
10856pub type NodeUpdateAttributesResult = Result<(), i32>;
10857pub type NodeSyncResult = Result<(), i32>;
10858pub type NodeGetExtendedAttributeResult = Result<ExtendedAttributeValue, i32>;
10859pub type NodeSetExtendedAttributeResult = Result<(), i32>;
10860pub type NodeRemoveExtendedAttributeResult = Result<(), i32>;
10861
10862pub trait NodeProxyInterface: Send + Sync {
10863    fn r#clone(
10864        &self,
10865        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
10866    ) -> Result<(), fidl::Error>;
10867    type CloseResponseFut: std::future::Future<
10868            Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
10869        > + Send;
10870    fn r#close(&self) -> Self::CloseResponseFut;
10871    type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
10872    fn r#query(&self) -> Self::QueryResponseFut;
10873    fn r#deprecated_clone(
10874        &self,
10875        flags: OpenFlags,
10876        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
10877    ) -> Result<(), fidl::Error>;
10878    type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
10879        + Send;
10880    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
10881    type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
10882    fn r#deprecated_set_attr(
10883        &self,
10884        flags: NodeAttributeFlags,
10885        attributes: &NodeAttributes,
10886    ) -> Self::DeprecatedSetAttrResponseFut;
10887    type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
10888        + Send;
10889    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
10890    type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
10891        + Send;
10892    fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
10893    type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
10894        + Send;
10895    fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
10896    type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
10897        + Send;
10898    fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
10899    type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
10900        + Send;
10901    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
10902    type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
10903        + Send;
10904    fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
10905    type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
10906        + Send;
10907    fn r#update_attributes(
10908        &self,
10909        payload: &MutableNodeAttributes,
10910    ) -> Self::UpdateAttributesResponseFut;
10911    type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
10912    fn r#sync(&self) -> Self::SyncResponseFut;
10913    fn r#list_extended_attributes(
10914        &self,
10915        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
10916    ) -> Result<(), fidl::Error>;
10917    type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
10918        + Send;
10919    fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
10920    type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
10921        + Send;
10922    fn r#set_extended_attribute(
10923        &self,
10924        name: &[u8],
10925        value: ExtendedAttributeValue,
10926        mode: SetExtendedAttributeMode,
10927    ) -> Self::SetExtendedAttributeResponseFut;
10928    type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
10929        + Send;
10930    fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
10931}
10932
10933#[derive(Debug, Clone)]
10934pub struct NodeProxy {
10935    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
10936}
10937
10938impl fdomain_client::fidl::Proxy for NodeProxy {
10939    type Protocol = NodeMarker;
10940
10941    fn from_channel(inner: fdomain_client::Channel) -> Self {
10942        Self::new(inner)
10943    }
10944
10945    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
10946        self.client.into_channel().map_err(|client| Self { client })
10947    }
10948
10949    fn as_channel(&self) -> &fdomain_client::Channel {
10950        self.client.as_channel()
10951    }
10952}
10953
10954impl NodeProxy {
10955    /// Create a new Proxy for fuchsia.io/Node.
10956    pub fn new(channel: fdomain_client::Channel) -> Self {
10957        let protocol_name = <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
10958        Self { client: fidl::client::Client::new(channel, protocol_name) }
10959    }
10960
10961    /// Get a Stream of events from the remote end of the protocol.
10962    ///
10963    /// # Panics
10964    ///
10965    /// Panics if the event stream was already taken.
10966    pub fn take_event_stream(&self) -> NodeEventStream {
10967        NodeEventStream { event_receiver: self.client.take_event_receiver() }
10968    }
10969
10970    pub fn r#clone(
10971        &self,
10972        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
10973    ) -> Result<(), fidl::Error> {
10974        NodeProxyInterface::r#clone(self, request)
10975    }
10976
10977    /// Terminates the connection.
10978    ///
10979    /// After calling `Close`, the client must not send any other requests.
10980    ///
10981    /// Servers, after sending the status response, should close the connection
10982    /// regardless of status and without sending an epitaph.
10983    ///
10984    /// Closing the client end of the channel should be semantically equivalent
10985    /// to calling `Close` without knowing when the close has completed or its
10986    /// status.
10987    pub fn r#close(
10988        &self,
10989    ) -> fidl::client::QueryResponseFut<
10990        fdomain_fuchsia_unknown::CloseableCloseResult,
10991        fdomain_client::fidl::FDomainResourceDialect,
10992    > {
10993        NodeProxyInterface::r#close(self)
10994    }
10995
10996    pub fn r#query(
10997        &self,
10998    ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
10999        NodeProxyInterface::r#query(self)
11000    }
11001
11002    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
11003    pub fn r#deprecated_clone(
11004        &self,
11005        mut flags: OpenFlags,
11006        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
11007    ) -> Result<(), fidl::Error> {
11008        NodeProxyInterface::r#deprecated_clone(self, flags, object)
11009    }
11010
11011    /// DEPRECATED - Use `Node.GetAttributes` instead.
11012    pub fn r#deprecated_get_attr(
11013        &self,
11014    ) -> fidl::client::QueryResponseFut<
11015        (i32, NodeAttributes),
11016        fdomain_client::fidl::FDomainResourceDialect,
11017    > {
11018        NodeProxyInterface::r#deprecated_get_attr(self)
11019    }
11020
11021    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
11022    pub fn r#deprecated_set_attr(
11023        &self,
11024        mut flags: NodeAttributeFlags,
11025        mut attributes: &NodeAttributes,
11026    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
11027        NodeProxyInterface::r#deprecated_set_attr(self, flags, attributes)
11028    }
11029
11030    /// [DEPRECATED - Use new GetFlags method instead.]
11031    pub fn r#deprecated_get_flags(
11032        &self,
11033    ) -> fidl::client::QueryResponseFut<
11034        (i32, OpenFlags),
11035        fdomain_client::fidl::FDomainResourceDialect,
11036    > {
11037        NodeProxyInterface::r#deprecated_get_flags(self)
11038    }
11039
11040    /// [DEPRECATED - Use new SetFlags method instead.]
11041    pub fn r#deprecated_set_flags(
11042        &self,
11043        mut flags: OpenFlags,
11044    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
11045        NodeProxyInterface::r#deprecated_set_flags(self, flags)
11046    }
11047
11048    /// Queries the flags that apply to this node after it has been opened/created. This method does
11049    /// not require any rights.
11050    ///
11051    /// Note that the final set of flags that apply to the connection may differ from those
11052    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
11053    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
11054    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
11055    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
11056    pub fn r#get_flags(
11057        &self,
11058    ) -> fidl::client::QueryResponseFut<
11059        NodeGetFlagsResult,
11060        fdomain_client::fidl::FDomainResourceDialect,
11061    > {
11062        NodeProxyInterface::r#get_flags(self)
11063    }
11064
11065    /// Sets the flags that apply to this node after it has been opened. This method does not
11066    /// require any rights.
11067    ///
11068    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
11069    /// clear append mode.
11070    ///
11071    /// Errors:
11072    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
11073    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
11074    pub fn r#set_flags(
11075        &self,
11076        mut flags: Flags,
11077    ) -> fidl::client::QueryResponseFut<
11078        NodeSetFlagsResult,
11079        fdomain_client::fidl::FDomainResourceDialect,
11080    > {
11081        NodeProxyInterface::r#set_flags(self, flags)
11082    }
11083
11084    /// Query the filesystem for filesystem-specific information.
11085    pub fn r#query_filesystem(
11086        &self,
11087    ) -> fidl::client::QueryResponseFut<
11088        (i32, Option<Box<FilesystemInfo>>),
11089        fdomain_client::fidl::FDomainResourceDialect,
11090    > {
11091        NodeProxyInterface::r#query_filesystem(self)
11092    }
11093
11094    /// Acquires information about the node.
11095    ///
11096    /// The attributes of a node should be stable, independent of the
11097    /// specific protocol used to access it.
11098    ///
11099    /// If a particular attribute is not applicable or not supported,
11100    /// filesystems should leave the corresponding field absent.
11101    ///
11102    /// + `query` a bit-mask specifying which attributes to fetch. The server
11103    ///   should not return more than necessary.
11104    /// - `attributes` the returned attributes.
11105    ///
11106    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
11107    pub fn r#get_attributes(
11108        &self,
11109        mut query: NodeAttributesQuery,
11110    ) -> fidl::client::QueryResponseFut<
11111        NodeGetAttributesResult,
11112        fdomain_client::fidl::FDomainResourceDialect,
11113    > {
11114        NodeProxyInterface::r#get_attributes(self, query)
11115    }
11116
11117    /// Updates information about the node.
11118    ///
11119    /// + `attributes` the presence of a table field in `attributes` indicates
11120    /// the intent to update the corresponding attribute.
11121    ///
11122    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
11123    ///
11124    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
11125    pub fn r#update_attributes(
11126        &self,
11127        mut payload: &MutableNodeAttributes,
11128    ) -> fidl::client::QueryResponseFut<
11129        NodeUpdateAttributesResult,
11130        fdomain_client::fidl::FDomainResourceDialect,
11131    > {
11132        NodeProxyInterface::r#update_attributes(self, payload)
11133    }
11134
11135    /// Synchronizes updates to the node to the underlying media, if it exists.
11136    ///
11137    /// This method will return when the filesystem server has flushed the
11138    /// relevant updates to the underlying media, but does not guarantee the
11139    /// underlying media has persisted the information, nor that any information
11140    /// is committed to hardware. Clients may use `Sync` to ensure ordering
11141    /// between operations.
11142    ///
11143    /// This method does not require any rights.
11144    pub fn r#sync(
11145        &self,
11146    ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
11147    {
11148        NodeProxyInterface::r#sync(self)
11149    }
11150
11151    /// Creates an iterator over all the extended attribute names associated
11152    /// with this node. If an error occurs it is returned as an epitaph on the
11153    /// iterator request channel, and then the channel is closed.
11154    ///
11155    /// GetExtendedAttributes can be used with any of these names to retrieve
11156    /// the associated value.
11157    ///
11158    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
11159    pub fn r#list_extended_attributes(
11160        &self,
11161        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
11162    ) -> Result<(), fidl::Error> {
11163        NodeProxyInterface::r#list_extended_attributes(self, iterator)
11164    }
11165
11166    /// Get the value associated with the given attribute `name` for this node.
11167    ///
11168    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
11169    /// particular structure is imposed on them.
11170    ///
11171    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
11172    pub fn r#get_extended_attribute(
11173        &self,
11174        mut name: &[u8],
11175    ) -> fidl::client::QueryResponseFut<
11176        NodeGetExtendedAttributeResult,
11177        fdomain_client::fidl::FDomainResourceDialect,
11178    > {
11179        NodeProxyInterface::r#get_extended_attribute(self, name)
11180    }
11181
11182    /// Set the value for the given attribute `name` to `value` for this node.
11183    ///
11184    /// The attribute name may exist, in which case the attribute is updated.
11185    /// If the attribute doesn't exist, it is created. The name should have no
11186    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
11187    ///
11188    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
11189    pub fn r#set_extended_attribute(
11190        &self,
11191        mut name: &[u8],
11192        mut value: ExtendedAttributeValue,
11193        mut mode: SetExtendedAttributeMode,
11194    ) -> fidl::client::QueryResponseFut<
11195        NodeSetExtendedAttributeResult,
11196        fdomain_client::fidl::FDomainResourceDialect,
11197    > {
11198        NodeProxyInterface::r#set_extended_attribute(self, name, value, mode)
11199    }
11200
11201    /// Remove the specified extended attribute.
11202    ///
11203    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
11204    ///
11205    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
11206    pub fn r#remove_extended_attribute(
11207        &self,
11208        mut name: &[u8],
11209    ) -> fidl::client::QueryResponseFut<
11210        NodeRemoveExtendedAttributeResult,
11211        fdomain_client::fidl::FDomainResourceDialect,
11212    > {
11213        NodeProxyInterface::r#remove_extended_attribute(self, name)
11214    }
11215}
11216
11217impl NodeProxyInterface for NodeProxy {
11218    fn r#clone(
11219        &self,
11220        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
11221    ) -> Result<(), fidl::Error> {
11222        self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
11223            (request,),
11224            0x20d8a7aba2168a79,
11225            fidl::encoding::DynamicFlags::empty(),
11226        )
11227    }
11228
11229    type CloseResponseFut = fidl::client::QueryResponseFut<
11230        fdomain_fuchsia_unknown::CloseableCloseResult,
11231        fdomain_client::fidl::FDomainResourceDialect,
11232    >;
11233    fn r#close(&self) -> Self::CloseResponseFut {
11234        fn _decode(
11235            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11236        ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
11237            let _response = fidl::client::decode_transaction_body::<
11238                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11239                fdomain_client::fidl::FDomainResourceDialect,
11240                0x5ac5d459ad7f657e,
11241            >(_buf?)?;
11242            Ok(_response.map(|x| x))
11243        }
11244        self.client.send_query_and_decode::<
11245            fidl::encoding::EmptyPayload,
11246            fdomain_fuchsia_unknown::CloseableCloseResult,
11247        >(
11248            (),
11249            0x5ac5d459ad7f657e,
11250            fidl::encoding::DynamicFlags::empty(),
11251            _decode,
11252        )
11253    }
11254
11255    type QueryResponseFut =
11256        fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
11257    fn r#query(&self) -> Self::QueryResponseFut {
11258        fn _decode(
11259            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11260        ) -> Result<Vec<u8>, fidl::Error> {
11261            let _response = fidl::client::decode_transaction_body::<
11262                fdomain_fuchsia_unknown::QueryableQueryResponse,
11263                fdomain_client::fidl::FDomainResourceDialect,
11264                0x2658edee9decfc06,
11265            >(_buf?)?;
11266            Ok(_response.protocol)
11267        }
11268        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
11269            (),
11270            0x2658edee9decfc06,
11271            fidl::encoding::DynamicFlags::empty(),
11272            _decode,
11273        )
11274    }
11275
11276    fn r#deprecated_clone(
11277        &self,
11278        mut flags: OpenFlags,
11279        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
11280    ) -> Result<(), fidl::Error> {
11281        self.client.send::<NodeDeprecatedCloneRequest>(
11282            (flags, object),
11283            0x5a61678f293ce16f,
11284            fidl::encoding::DynamicFlags::FLEXIBLE,
11285        )
11286    }
11287
11288    type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
11289        (i32, NodeAttributes),
11290        fdomain_client::fidl::FDomainResourceDialect,
11291    >;
11292    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
11293        fn _decode(
11294            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11295        ) -> Result<(i32, NodeAttributes), fidl::Error> {
11296            let _response = fidl::client::decode_transaction_body::<
11297                NodeDeprecatedGetAttrResponse,
11298                fdomain_client::fidl::FDomainResourceDialect,
11299                0x78985e216314dafd,
11300            >(_buf?)?;
11301            Ok((_response.s, _response.attributes))
11302        }
11303        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
11304            (),
11305            0x78985e216314dafd,
11306            fidl::encoding::DynamicFlags::empty(),
11307            _decode,
11308        )
11309    }
11310
11311    type DeprecatedSetAttrResponseFut =
11312        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
11313    fn r#deprecated_set_attr(
11314        &self,
11315        mut flags: NodeAttributeFlags,
11316        mut attributes: &NodeAttributes,
11317    ) -> Self::DeprecatedSetAttrResponseFut {
11318        fn _decode(
11319            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11320        ) -> Result<i32, fidl::Error> {
11321            let _response = fidl::client::decode_transaction_body::<
11322                NodeDeprecatedSetAttrResponse,
11323                fdomain_client::fidl::FDomainResourceDialect,
11324                0x4186c0f40d938f46,
11325            >(_buf?)?;
11326            Ok(_response.s)
11327        }
11328        self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
11329            (flags, attributes),
11330            0x4186c0f40d938f46,
11331            fidl::encoding::DynamicFlags::empty(),
11332            _decode,
11333        )
11334    }
11335
11336    type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
11337        (i32, OpenFlags),
11338        fdomain_client::fidl::FDomainResourceDialect,
11339    >;
11340    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
11341        fn _decode(
11342            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11343        ) -> Result<(i32, OpenFlags), fidl::Error> {
11344            let _response = fidl::client::decode_transaction_body::<
11345                NodeDeprecatedGetFlagsResponse,
11346                fdomain_client::fidl::FDomainResourceDialect,
11347                0x5b88fffb8eda3aa1,
11348            >(_buf?)?;
11349            Ok((_response.s, _response.flags))
11350        }
11351        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
11352            (),
11353            0x5b88fffb8eda3aa1,
11354            fidl::encoding::DynamicFlags::empty(),
11355            _decode,
11356        )
11357    }
11358
11359    type DeprecatedSetFlagsResponseFut =
11360        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
11361    fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
11362        fn _decode(
11363            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11364        ) -> Result<i32, fidl::Error> {
11365            let _response = fidl::client::decode_transaction_body::<
11366                NodeDeprecatedSetFlagsResponse,
11367                fdomain_client::fidl::FDomainResourceDialect,
11368                0x5295b76c71fde733,
11369            >(_buf?)?;
11370            Ok(_response.s)
11371        }
11372        self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
11373            (flags,),
11374            0x5295b76c71fde733,
11375            fidl::encoding::DynamicFlags::empty(),
11376            _decode,
11377        )
11378    }
11379
11380    type GetFlagsResponseFut = fidl::client::QueryResponseFut<
11381        NodeGetFlagsResult,
11382        fdomain_client::fidl::FDomainResourceDialect,
11383    >;
11384    fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
11385        fn _decode(
11386            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11387        ) -> Result<NodeGetFlagsResult, fidl::Error> {
11388            let _response = fidl::client::decode_transaction_body::<
11389                fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
11390                fdomain_client::fidl::FDomainResourceDialect,
11391                0x176eb318f64ec23,
11392            >(_buf?)?
11393            .into_result_fdomain::<NodeMarker>("get_flags")?;
11394            Ok(_response.map(|x| x.flags))
11395        }
11396        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
11397            (),
11398            0x176eb318f64ec23,
11399            fidl::encoding::DynamicFlags::FLEXIBLE,
11400            _decode,
11401        )
11402    }
11403
11404    type SetFlagsResponseFut = fidl::client::QueryResponseFut<
11405        NodeSetFlagsResult,
11406        fdomain_client::fidl::FDomainResourceDialect,
11407    >;
11408    fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
11409        fn _decode(
11410            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11411        ) -> Result<NodeSetFlagsResult, fidl::Error> {
11412            let _response = fidl::client::decode_transaction_body::<
11413                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
11414                fdomain_client::fidl::FDomainResourceDialect,
11415                0x55a8028685791ea8,
11416            >(_buf?)?
11417            .into_result_fdomain::<NodeMarker>("set_flags")?;
11418            Ok(_response.map(|x| x))
11419        }
11420        self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
11421            (flags,),
11422            0x55a8028685791ea8,
11423            fidl::encoding::DynamicFlags::FLEXIBLE,
11424            _decode,
11425        )
11426    }
11427
11428    type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
11429        (i32, Option<Box<FilesystemInfo>>),
11430        fdomain_client::fidl::FDomainResourceDialect,
11431    >;
11432    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
11433        fn _decode(
11434            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11435        ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
11436            let _response = fidl::client::decode_transaction_body::<
11437                NodeQueryFilesystemResponse,
11438                fdomain_client::fidl::FDomainResourceDialect,
11439                0x6f344a1c6b0a0610,
11440            >(_buf?)?;
11441            Ok((_response.s, _response.info))
11442        }
11443        self.client.send_query_and_decode::<
11444            fidl::encoding::EmptyPayload,
11445            (i32, Option<Box<FilesystemInfo>>),
11446        >(
11447            (),
11448            0x6f344a1c6b0a0610,
11449            fidl::encoding::DynamicFlags::empty(),
11450            _decode,
11451        )
11452    }
11453
11454    type GetAttributesResponseFut = fidl::client::QueryResponseFut<
11455        NodeGetAttributesResult,
11456        fdomain_client::fidl::FDomainResourceDialect,
11457    >;
11458    fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
11459        fn _decode(
11460            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11461        ) -> Result<NodeGetAttributesResult, fidl::Error> {
11462            let _response = fidl::client::decode_transaction_body::<
11463                fidl::encoding::ResultType<NodeAttributes2, i32>,
11464                fdomain_client::fidl::FDomainResourceDialect,
11465                0x3d4396a638ea053b,
11466            >(_buf?)?;
11467            Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
11468        }
11469        self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
11470            (query,),
11471            0x3d4396a638ea053b,
11472            fidl::encoding::DynamicFlags::empty(),
11473            _decode,
11474        )
11475    }
11476
11477    type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
11478        NodeUpdateAttributesResult,
11479        fdomain_client::fidl::FDomainResourceDialect,
11480    >;
11481    fn r#update_attributes(
11482        &self,
11483        mut payload: &MutableNodeAttributes,
11484    ) -> Self::UpdateAttributesResponseFut {
11485        fn _decode(
11486            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11487        ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
11488            let _response = fidl::client::decode_transaction_body::<
11489                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11490                fdomain_client::fidl::FDomainResourceDialect,
11491                0x3308c1da5a89bf08,
11492            >(_buf?)?;
11493            Ok(_response.map(|x| x))
11494        }
11495        self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
11496            payload,
11497            0x3308c1da5a89bf08,
11498            fidl::encoding::DynamicFlags::empty(),
11499            _decode,
11500        )
11501    }
11502
11503    type SyncResponseFut = fidl::client::QueryResponseFut<
11504        NodeSyncResult,
11505        fdomain_client::fidl::FDomainResourceDialect,
11506    >;
11507    fn r#sync(&self) -> Self::SyncResponseFut {
11508        fn _decode(
11509            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11510        ) -> Result<NodeSyncResult, fidl::Error> {
11511            let _response = fidl::client::decode_transaction_body::<
11512                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11513                fdomain_client::fidl::FDomainResourceDialect,
11514                0x2c5c27ca0ab5dc49,
11515            >(_buf?)?;
11516            Ok(_response.map(|x| x))
11517        }
11518        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
11519            (),
11520            0x2c5c27ca0ab5dc49,
11521            fidl::encoding::DynamicFlags::empty(),
11522            _decode,
11523        )
11524    }
11525
11526    fn r#list_extended_attributes(
11527        &self,
11528        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
11529    ) -> Result<(), fidl::Error> {
11530        self.client.send::<NodeListExtendedAttributesRequest>(
11531            (iterator,),
11532            0x4b61033de007fcd0,
11533            fidl::encoding::DynamicFlags::empty(),
11534        )
11535    }
11536
11537    type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11538        NodeGetExtendedAttributeResult,
11539        fdomain_client::fidl::FDomainResourceDialect,
11540    >;
11541    fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
11542        fn _decode(
11543            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11544        ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
11545            let _response = fidl::client::decode_transaction_body::<
11546                fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
11547                fdomain_client::fidl::FDomainResourceDialect,
11548                0x45ffa3ccfdeb76db,
11549            >(_buf?)?;
11550            Ok(_response.map(|x| x))
11551        }
11552        self.client.send_query_and_decode::<
11553            NodeGetExtendedAttributeRequest,
11554            NodeGetExtendedAttributeResult,
11555        >(
11556            (name,),
11557            0x45ffa3ccfdeb76db,
11558            fidl::encoding::DynamicFlags::empty(),
11559            _decode,
11560        )
11561    }
11562
11563    type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11564        NodeSetExtendedAttributeResult,
11565        fdomain_client::fidl::FDomainResourceDialect,
11566    >;
11567    fn r#set_extended_attribute(
11568        &self,
11569        mut name: &[u8],
11570        mut value: ExtendedAttributeValue,
11571        mut mode: SetExtendedAttributeMode,
11572    ) -> Self::SetExtendedAttributeResponseFut {
11573        fn _decode(
11574            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11575        ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
11576            let _response = fidl::client::decode_transaction_body::<
11577                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11578                fdomain_client::fidl::FDomainResourceDialect,
11579                0x4a951362f681f23c,
11580            >(_buf?)?;
11581            Ok(_response.map(|x| x))
11582        }
11583        self.client.send_query_and_decode::<
11584            NodeSetExtendedAttributeRequest,
11585            NodeSetExtendedAttributeResult,
11586        >(
11587            (name, &mut value, mode,),
11588            0x4a951362f681f23c,
11589            fidl::encoding::DynamicFlags::empty(),
11590            _decode,
11591        )
11592    }
11593
11594    type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11595        NodeRemoveExtendedAttributeResult,
11596        fdomain_client::fidl::FDomainResourceDialect,
11597    >;
11598    fn r#remove_extended_attribute(
11599        &self,
11600        mut name: &[u8],
11601    ) -> Self::RemoveExtendedAttributeResponseFut {
11602        fn _decode(
11603            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11604        ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
11605            let _response = fidl::client::decode_transaction_body::<
11606                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11607                fdomain_client::fidl::FDomainResourceDialect,
11608                0x7a0b9f3a9bf9032d,
11609            >(_buf?)?;
11610            Ok(_response.map(|x| x))
11611        }
11612        self.client.send_query_and_decode::<
11613            NodeRemoveExtendedAttributeRequest,
11614            NodeRemoveExtendedAttributeResult,
11615        >(
11616            (name,),
11617            0x7a0b9f3a9bf9032d,
11618            fidl::encoding::DynamicFlags::empty(),
11619            _decode,
11620        )
11621    }
11622}
11623
11624pub struct NodeEventStream {
11625    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
11626}
11627
11628impl std::marker::Unpin for NodeEventStream {}
11629
11630impl futures::stream::FusedStream for NodeEventStream {
11631    fn is_terminated(&self) -> bool {
11632        self.event_receiver.is_terminated()
11633    }
11634}
11635
11636impl futures::Stream for NodeEventStream {
11637    type Item = Result<NodeEvent, fidl::Error>;
11638
11639    fn poll_next(
11640        mut self: std::pin::Pin<&mut Self>,
11641        cx: &mut std::task::Context<'_>,
11642    ) -> std::task::Poll<Option<Self::Item>> {
11643        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
11644            &mut self.event_receiver,
11645            cx
11646        )?) {
11647            Some(buf) => std::task::Poll::Ready(Some(NodeEvent::decode(buf))),
11648            None => std::task::Poll::Ready(None),
11649        }
11650    }
11651}
11652
11653#[derive(Debug)]
11654pub enum NodeEvent {
11655    OnOpen_ {
11656        s: i32,
11657        info: Option<Box<NodeInfoDeprecated>>,
11658    },
11659    OnRepresentation {
11660        payload: Representation,
11661    },
11662    #[non_exhaustive]
11663    _UnknownEvent {
11664        /// Ordinal of the event that was sent.
11665        ordinal: u64,
11666    },
11667}
11668
11669impl NodeEvent {
11670    #[allow(irrefutable_let_patterns)]
11671    pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
11672        if let NodeEvent::OnOpen_ { s, info } = self {
11673            Some((s, info))
11674        } else {
11675            None
11676        }
11677    }
11678    #[allow(irrefutable_let_patterns)]
11679    pub fn into_on_representation(self) -> Option<Representation> {
11680        if let NodeEvent::OnRepresentation { payload } = self {
11681            Some((payload))
11682        } else {
11683            None
11684        }
11685    }
11686
11687    /// Decodes a message buffer as a [`NodeEvent`].
11688    fn decode(
11689        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
11690    ) -> Result<NodeEvent, fidl::Error> {
11691        let (bytes, _handles) = buf.split_mut();
11692        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
11693        debug_assert_eq!(tx_header.tx_id, 0);
11694        match tx_header.ordinal {
11695            0x7fc7bbb1dbfd1972 => {
11696                let mut out = fidl::new_empty!(
11697                    NodeOnOpenRequest,
11698                    fdomain_client::fidl::FDomainResourceDialect
11699                );
11700                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
11701                Ok((NodeEvent::OnOpen_ { s: out.s, info: out.info }))
11702            }
11703            0x5cb40567d80a510c => {
11704                let mut out =
11705                    fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
11706                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
11707                Ok((NodeEvent::OnRepresentation { payload: out }))
11708            }
11709            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
11710                Ok(NodeEvent::_UnknownEvent { ordinal: tx_header.ordinal })
11711            }
11712            _ => Err(fidl::Error::UnknownOrdinal {
11713                ordinal: tx_header.ordinal,
11714                protocol_name: <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
11715            }),
11716        }
11717    }
11718}
11719
11720/// A Stream of incoming requests for fuchsia.io/Node.
11721pub struct NodeRequestStream {
11722    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
11723    is_terminated: bool,
11724}
11725
11726impl std::marker::Unpin for NodeRequestStream {}
11727
11728impl futures::stream::FusedStream for NodeRequestStream {
11729    fn is_terminated(&self) -> bool {
11730        self.is_terminated
11731    }
11732}
11733
11734impl fdomain_client::fidl::RequestStream for NodeRequestStream {
11735    type Protocol = NodeMarker;
11736    type ControlHandle = NodeControlHandle;
11737
11738    fn from_channel(channel: fdomain_client::Channel) -> Self {
11739        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
11740    }
11741
11742    fn control_handle(&self) -> Self::ControlHandle {
11743        NodeControlHandle { inner: self.inner.clone() }
11744    }
11745
11746    fn into_inner(
11747        self,
11748    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
11749    {
11750        (self.inner, self.is_terminated)
11751    }
11752
11753    fn from_inner(
11754        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
11755        is_terminated: bool,
11756    ) -> Self {
11757        Self { inner, is_terminated }
11758    }
11759}
11760
11761impl futures::Stream for NodeRequestStream {
11762    type Item = Result<NodeRequest, fidl::Error>;
11763
11764    fn poll_next(
11765        mut self: std::pin::Pin<&mut Self>,
11766        cx: &mut std::task::Context<'_>,
11767    ) -> std::task::Poll<Option<Self::Item>> {
11768        let this = &mut *self;
11769        if this.inner.check_shutdown(cx) {
11770            this.is_terminated = true;
11771            return std::task::Poll::Ready(None);
11772        }
11773        if this.is_terminated {
11774            panic!("polled NodeRequestStream after completion");
11775        }
11776        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
11777            |bytes, handles| {
11778                match this.inner.channel().read_etc(cx, bytes, handles) {
11779                    std::task::Poll::Ready(Ok(())) => {}
11780                    std::task::Poll::Pending => return std::task::Poll::Pending,
11781                    std::task::Poll::Ready(Err(None)) => {
11782                        this.is_terminated = true;
11783                        return std::task::Poll::Ready(None);
11784                    }
11785                    std::task::Poll::Ready(Err(Some(e))) => {
11786                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
11787                            e.into(),
11788                        ))))
11789                    }
11790                }
11791
11792                // A message has been received from the channel
11793                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
11794
11795                std::task::Poll::Ready(Some(match header.ordinal {
11796                    0x20d8a7aba2168a79 => {
11797                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11798                        let mut req = fidl::new_empty!(
11799                            fdomain_fuchsia_unknown::CloneableCloneRequest,
11800                            fdomain_client::fidl::FDomainResourceDialect
11801                        );
11802                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
11803                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11804                        Ok(NodeRequest::Clone { request: req.request, control_handle })
11805                    }
11806                    0x5ac5d459ad7f657e => {
11807                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11808                        let mut req = fidl::new_empty!(
11809                            fidl::encoding::EmptyPayload,
11810                            fdomain_client::fidl::FDomainResourceDialect
11811                        );
11812                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11813                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11814                        Ok(NodeRequest::Close {
11815                            responder: NodeCloseResponder {
11816                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11817                                tx_id: header.tx_id,
11818                            },
11819                        })
11820                    }
11821                    0x2658edee9decfc06 => {
11822                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11823                        let mut req = fidl::new_empty!(
11824                            fidl::encoding::EmptyPayload,
11825                            fdomain_client::fidl::FDomainResourceDialect
11826                        );
11827                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11828                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11829                        Ok(NodeRequest::Query {
11830                            responder: NodeQueryResponder {
11831                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11832                                tx_id: header.tx_id,
11833                            },
11834                        })
11835                    }
11836                    0x5a61678f293ce16f => {
11837                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11838                        let mut req = fidl::new_empty!(
11839                            NodeDeprecatedCloneRequest,
11840                            fdomain_client::fidl::FDomainResourceDialect
11841                        );
11842                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
11843                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11844                        Ok(NodeRequest::DeprecatedClone {
11845                            flags: req.flags,
11846                            object: req.object,
11847
11848                            control_handle,
11849                        })
11850                    }
11851                    0x78985e216314dafd => {
11852                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11853                        let mut req = fidl::new_empty!(
11854                            fidl::encoding::EmptyPayload,
11855                            fdomain_client::fidl::FDomainResourceDialect
11856                        );
11857                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11858                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11859                        Ok(NodeRequest::DeprecatedGetAttr {
11860                            responder: NodeDeprecatedGetAttrResponder {
11861                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11862                                tx_id: header.tx_id,
11863                            },
11864                        })
11865                    }
11866                    0x4186c0f40d938f46 => {
11867                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11868                        let mut req = fidl::new_empty!(
11869                            NodeDeprecatedSetAttrRequest,
11870                            fdomain_client::fidl::FDomainResourceDialect
11871                        );
11872                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
11873                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11874                        Ok(NodeRequest::DeprecatedSetAttr {
11875                            flags: req.flags,
11876                            attributes: req.attributes,
11877
11878                            responder: NodeDeprecatedSetAttrResponder {
11879                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11880                                tx_id: header.tx_id,
11881                            },
11882                        })
11883                    }
11884                    0x5b88fffb8eda3aa1 => {
11885                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11886                        let mut req = fidl::new_empty!(
11887                            fidl::encoding::EmptyPayload,
11888                            fdomain_client::fidl::FDomainResourceDialect
11889                        );
11890                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11891                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11892                        Ok(NodeRequest::DeprecatedGetFlags {
11893                            responder: NodeDeprecatedGetFlagsResponder {
11894                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11895                                tx_id: header.tx_id,
11896                            },
11897                        })
11898                    }
11899                    0x5295b76c71fde733 => {
11900                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11901                        let mut req = fidl::new_empty!(
11902                            NodeDeprecatedSetFlagsRequest,
11903                            fdomain_client::fidl::FDomainResourceDialect
11904                        );
11905                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
11906                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11907                        Ok(NodeRequest::DeprecatedSetFlags {
11908                            flags: req.flags,
11909
11910                            responder: NodeDeprecatedSetFlagsResponder {
11911                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11912                                tx_id: header.tx_id,
11913                            },
11914                        })
11915                    }
11916                    0x176eb318f64ec23 => {
11917                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11918                        let mut req = fidl::new_empty!(
11919                            fidl::encoding::EmptyPayload,
11920                            fdomain_client::fidl::FDomainResourceDialect
11921                        );
11922                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11923                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11924                        Ok(NodeRequest::GetFlags {
11925                            responder: NodeGetFlagsResponder {
11926                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11927                                tx_id: header.tx_id,
11928                            },
11929                        })
11930                    }
11931                    0x55a8028685791ea8 => {
11932                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11933                        let mut req = fidl::new_empty!(
11934                            NodeSetFlagsRequest,
11935                            fdomain_client::fidl::FDomainResourceDialect
11936                        );
11937                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
11938                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11939                        Ok(NodeRequest::SetFlags {
11940                            flags: req.flags,
11941
11942                            responder: NodeSetFlagsResponder {
11943                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11944                                tx_id: header.tx_id,
11945                            },
11946                        })
11947                    }
11948                    0x6f344a1c6b0a0610 => {
11949                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11950                        let mut req = fidl::new_empty!(
11951                            fidl::encoding::EmptyPayload,
11952                            fdomain_client::fidl::FDomainResourceDialect
11953                        );
11954                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11955                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11956                        Ok(NodeRequest::QueryFilesystem {
11957                            responder: NodeQueryFilesystemResponder {
11958                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11959                                tx_id: header.tx_id,
11960                            },
11961                        })
11962                    }
11963                    0x3d4396a638ea053b => {
11964                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11965                        let mut req = fidl::new_empty!(
11966                            NodeGetAttributesRequest,
11967                            fdomain_client::fidl::FDomainResourceDialect
11968                        );
11969                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
11970                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11971                        Ok(NodeRequest::GetAttributes {
11972                            query: req.query,
11973
11974                            responder: NodeGetAttributesResponder {
11975                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11976                                tx_id: header.tx_id,
11977                            },
11978                        })
11979                    }
11980                    0x3308c1da5a89bf08 => {
11981                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11982                        let mut req = fidl::new_empty!(
11983                            MutableNodeAttributes,
11984                            fdomain_client::fidl::FDomainResourceDialect
11985                        );
11986                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
11987                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11988                        Ok(NodeRequest::UpdateAttributes {
11989                            payload: req,
11990                            responder: NodeUpdateAttributesResponder {
11991                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11992                                tx_id: header.tx_id,
11993                            },
11994                        })
11995                    }
11996                    0x2c5c27ca0ab5dc49 => {
11997                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11998                        let mut req = fidl::new_empty!(
11999                            fidl::encoding::EmptyPayload,
12000                            fdomain_client::fidl::FDomainResourceDialect
12001                        );
12002                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
12003                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
12004                        Ok(NodeRequest::Sync {
12005                            responder: NodeSyncResponder {
12006                                control_handle: std::mem::ManuallyDrop::new(control_handle),
12007                                tx_id: header.tx_id,
12008                            },
12009                        })
12010                    }
12011                    0x4b61033de007fcd0 => {
12012                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
12013                        let mut req = fidl::new_empty!(
12014                            NodeListExtendedAttributesRequest,
12015                            fdomain_client::fidl::FDomainResourceDialect
12016                        );
12017                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
12018                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
12019                        Ok(NodeRequest::ListExtendedAttributes {
12020                            iterator: req.iterator,
12021
12022                            control_handle,
12023                        })
12024                    }
12025                    0x45ffa3ccfdeb76db => {
12026                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12027                        let mut req = fidl::new_empty!(
12028                            NodeGetExtendedAttributeRequest,
12029                            fdomain_client::fidl::FDomainResourceDialect
12030                        );
12031                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
12032                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
12033                        Ok(NodeRequest::GetExtendedAttribute {
12034                            name: req.name,
12035
12036                            responder: NodeGetExtendedAttributeResponder {
12037                                control_handle: std::mem::ManuallyDrop::new(control_handle),
12038                                tx_id: header.tx_id,
12039                            },
12040                        })
12041                    }
12042                    0x4a951362f681f23c => {
12043                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12044                        let mut req = fidl::new_empty!(
12045                            NodeSetExtendedAttributeRequest,
12046                            fdomain_client::fidl::FDomainResourceDialect
12047                        );
12048                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
12049                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
12050                        Ok(NodeRequest::SetExtendedAttribute {
12051                            name: req.name,
12052                            value: req.value,
12053                            mode: req.mode,
12054
12055                            responder: NodeSetExtendedAttributeResponder {
12056                                control_handle: std::mem::ManuallyDrop::new(control_handle),
12057                                tx_id: header.tx_id,
12058                            },
12059                        })
12060                    }
12061                    0x7a0b9f3a9bf9032d => {
12062                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12063                        let mut req = fidl::new_empty!(
12064                            NodeRemoveExtendedAttributeRequest,
12065                            fdomain_client::fidl::FDomainResourceDialect
12066                        );
12067                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
12068                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
12069                        Ok(NodeRequest::RemoveExtendedAttribute {
12070                            name: req.name,
12071
12072                            responder: NodeRemoveExtendedAttributeResponder {
12073                                control_handle: std::mem::ManuallyDrop::new(control_handle),
12074                                tx_id: header.tx_id,
12075                            },
12076                        })
12077                    }
12078                    _ if header.tx_id == 0
12079                        && header
12080                            .dynamic_flags()
12081                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
12082                    {
12083                        Ok(NodeRequest::_UnknownMethod {
12084                            ordinal: header.ordinal,
12085                            control_handle: NodeControlHandle { inner: this.inner.clone() },
12086                            method_type: fidl::MethodType::OneWay,
12087                        })
12088                    }
12089                    _ if header
12090                        .dynamic_flags()
12091                        .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
12092                    {
12093                        this.inner.send_framework_err(
12094                            fidl::encoding::FrameworkErr::UnknownMethod,
12095                            header.tx_id,
12096                            header.ordinal,
12097                            header.dynamic_flags(),
12098                            (bytes, handles),
12099                        )?;
12100                        Ok(NodeRequest::_UnknownMethod {
12101                            ordinal: header.ordinal,
12102                            control_handle: NodeControlHandle { inner: this.inner.clone() },
12103                            method_type: fidl::MethodType::TwoWay,
12104                        })
12105                    }
12106                    _ => Err(fidl::Error::UnknownOrdinal {
12107                        ordinal: header.ordinal,
12108                        protocol_name:
12109                            <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
12110                    }),
12111                }))
12112            },
12113        )
12114    }
12115}
12116
12117/// Node defines the minimal interface for entities which can be accessed in a filesystem.
12118#[derive(Debug)]
12119pub enum NodeRequest {
12120    Clone {
12121        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
12122        control_handle: NodeControlHandle,
12123    },
12124    /// Terminates the connection.
12125    ///
12126    /// After calling `Close`, the client must not send any other requests.
12127    ///
12128    /// Servers, after sending the status response, should close the connection
12129    /// regardless of status and without sending an epitaph.
12130    ///
12131    /// Closing the client end of the channel should be semantically equivalent
12132    /// to calling `Close` without knowing when the close has completed or its
12133    /// status.
12134    Close {
12135        responder: NodeCloseResponder,
12136    },
12137    Query {
12138        responder: NodeQueryResponder,
12139    },
12140    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
12141    DeprecatedClone {
12142        flags: OpenFlags,
12143        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
12144        control_handle: NodeControlHandle,
12145    },
12146    /// DEPRECATED - Use `Node.GetAttributes` instead.
12147    DeprecatedGetAttr {
12148        responder: NodeDeprecatedGetAttrResponder,
12149    },
12150    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
12151    DeprecatedSetAttr {
12152        flags: NodeAttributeFlags,
12153        attributes: NodeAttributes,
12154        responder: NodeDeprecatedSetAttrResponder,
12155    },
12156    /// [DEPRECATED - Use new GetFlags method instead.]
12157    DeprecatedGetFlags {
12158        responder: NodeDeprecatedGetFlagsResponder,
12159    },
12160    /// [DEPRECATED - Use new SetFlags method instead.]
12161    DeprecatedSetFlags {
12162        flags: OpenFlags,
12163        responder: NodeDeprecatedSetFlagsResponder,
12164    },
12165    /// Queries the flags that apply to this node after it has been opened/created. This method does
12166    /// not require any rights.
12167    ///
12168    /// Note that the final set of flags that apply to the connection may differ from those
12169    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
12170    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
12171    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
12172    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
12173    GetFlags {
12174        responder: NodeGetFlagsResponder,
12175    },
12176    /// Sets the flags that apply to this node after it has been opened. This method does not
12177    /// require any rights.
12178    ///
12179    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
12180    /// clear append mode.
12181    ///
12182    /// Errors:
12183    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
12184    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
12185    SetFlags {
12186        flags: Flags,
12187        responder: NodeSetFlagsResponder,
12188    },
12189    /// Query the filesystem for filesystem-specific information.
12190    QueryFilesystem {
12191        responder: NodeQueryFilesystemResponder,
12192    },
12193    /// Acquires information about the node.
12194    ///
12195    /// The attributes of a node should be stable, independent of the
12196    /// specific protocol used to access it.
12197    ///
12198    /// If a particular attribute is not applicable or not supported,
12199    /// filesystems should leave the corresponding field absent.
12200    ///
12201    /// + `query` a bit-mask specifying which attributes to fetch. The server
12202    ///   should not return more than necessary.
12203    /// - `attributes` the returned attributes.
12204    ///
12205    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
12206    GetAttributes {
12207        query: NodeAttributesQuery,
12208        responder: NodeGetAttributesResponder,
12209    },
12210    /// Updates information about the node.
12211    ///
12212    /// + `attributes` the presence of a table field in `attributes` indicates
12213    /// the intent to update the corresponding attribute.
12214    ///
12215    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
12216    ///
12217    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
12218    UpdateAttributes {
12219        payload: MutableNodeAttributes,
12220        responder: NodeUpdateAttributesResponder,
12221    },
12222    /// Synchronizes updates to the node to the underlying media, if it exists.
12223    ///
12224    /// This method will return when the filesystem server has flushed the
12225    /// relevant updates to the underlying media, but does not guarantee the
12226    /// underlying media has persisted the information, nor that any information
12227    /// is committed to hardware. Clients may use `Sync` to ensure ordering
12228    /// between operations.
12229    ///
12230    /// This method does not require any rights.
12231    Sync {
12232        responder: NodeSyncResponder,
12233    },
12234    /// Creates an iterator over all the extended attribute names associated
12235    /// with this node. If an error occurs it is returned as an epitaph on the
12236    /// iterator request channel, and then the channel is closed.
12237    ///
12238    /// GetExtendedAttributes can be used with any of these names to retrieve
12239    /// the associated value.
12240    ///
12241    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
12242    ListExtendedAttributes {
12243        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
12244        control_handle: NodeControlHandle,
12245    },
12246    /// Get the value associated with the given attribute `name` for this node.
12247    ///
12248    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
12249    /// particular structure is imposed on them.
12250    ///
12251    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
12252    GetExtendedAttribute {
12253        name: Vec<u8>,
12254        responder: NodeGetExtendedAttributeResponder,
12255    },
12256    /// Set the value for the given attribute `name` to `value` for this node.
12257    ///
12258    /// The attribute name may exist, in which case the attribute is updated.
12259    /// If the attribute doesn't exist, it is created. The name should have no
12260    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
12261    ///
12262    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
12263    SetExtendedAttribute {
12264        name: Vec<u8>,
12265        value: ExtendedAttributeValue,
12266        mode: SetExtendedAttributeMode,
12267        responder: NodeSetExtendedAttributeResponder,
12268    },
12269    /// Remove the specified extended attribute.
12270    ///
12271    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
12272    ///
12273    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
12274    RemoveExtendedAttribute {
12275        name: Vec<u8>,
12276        responder: NodeRemoveExtendedAttributeResponder,
12277    },
12278    /// An interaction was received which does not match any known method.
12279    #[non_exhaustive]
12280    _UnknownMethod {
12281        /// Ordinal of the method that was called.
12282        ordinal: u64,
12283        control_handle: NodeControlHandle,
12284        method_type: fidl::MethodType,
12285    },
12286}
12287
12288impl NodeRequest {
12289    #[allow(irrefutable_let_patterns)]
12290    pub fn into_clone(
12291        self,
12292    ) -> Option<(
12293        fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
12294        NodeControlHandle,
12295    )> {
12296        if let NodeRequest::Clone { request, control_handle } = self {
12297            Some((request, control_handle))
12298        } else {
12299            None
12300        }
12301    }
12302
12303    #[allow(irrefutable_let_patterns)]
12304    pub fn into_close(self) -> Option<(NodeCloseResponder)> {
12305        if let NodeRequest::Close { responder } = self {
12306            Some((responder))
12307        } else {
12308            None
12309        }
12310    }
12311
12312    #[allow(irrefutable_let_patterns)]
12313    pub fn into_query(self) -> Option<(NodeQueryResponder)> {
12314        if let NodeRequest::Query { responder } = self {
12315            Some((responder))
12316        } else {
12317            None
12318        }
12319    }
12320
12321    #[allow(irrefutable_let_patterns)]
12322    pub fn into_deprecated_clone(
12323        self,
12324    ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, NodeControlHandle)> {
12325        if let NodeRequest::DeprecatedClone { flags, object, control_handle } = self {
12326            Some((flags, object, control_handle))
12327        } else {
12328            None
12329        }
12330    }
12331
12332    #[allow(irrefutable_let_patterns)]
12333    pub fn into_deprecated_get_attr(self) -> Option<(NodeDeprecatedGetAttrResponder)> {
12334        if let NodeRequest::DeprecatedGetAttr { responder } = self {
12335            Some((responder))
12336        } else {
12337            None
12338        }
12339    }
12340
12341    #[allow(irrefutable_let_patterns)]
12342    pub fn into_deprecated_set_attr(
12343        self,
12344    ) -> Option<(NodeAttributeFlags, NodeAttributes, NodeDeprecatedSetAttrResponder)> {
12345        if let NodeRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
12346            Some((flags, attributes, responder))
12347        } else {
12348            None
12349        }
12350    }
12351
12352    #[allow(irrefutable_let_patterns)]
12353    pub fn into_deprecated_get_flags(self) -> Option<(NodeDeprecatedGetFlagsResponder)> {
12354        if let NodeRequest::DeprecatedGetFlags { responder } = self {
12355            Some((responder))
12356        } else {
12357            None
12358        }
12359    }
12360
12361    #[allow(irrefutable_let_patterns)]
12362    pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, NodeDeprecatedSetFlagsResponder)> {
12363        if let NodeRequest::DeprecatedSetFlags { flags, responder } = self {
12364            Some((flags, responder))
12365        } else {
12366            None
12367        }
12368    }
12369
12370    #[allow(irrefutable_let_patterns)]
12371    pub fn into_get_flags(self) -> Option<(NodeGetFlagsResponder)> {
12372        if let NodeRequest::GetFlags { responder } = self {
12373            Some((responder))
12374        } else {
12375            None
12376        }
12377    }
12378
12379    #[allow(irrefutable_let_patterns)]
12380    pub fn into_set_flags(self) -> Option<(Flags, NodeSetFlagsResponder)> {
12381        if let NodeRequest::SetFlags { flags, responder } = self {
12382            Some((flags, responder))
12383        } else {
12384            None
12385        }
12386    }
12387
12388    #[allow(irrefutable_let_patterns)]
12389    pub fn into_query_filesystem(self) -> Option<(NodeQueryFilesystemResponder)> {
12390        if let NodeRequest::QueryFilesystem { responder } = self {
12391            Some((responder))
12392        } else {
12393            None
12394        }
12395    }
12396
12397    #[allow(irrefutable_let_patterns)]
12398    pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, NodeGetAttributesResponder)> {
12399        if let NodeRequest::GetAttributes { query, responder } = self {
12400            Some((query, responder))
12401        } else {
12402            None
12403        }
12404    }
12405
12406    #[allow(irrefutable_let_patterns)]
12407    pub fn into_update_attributes(
12408        self,
12409    ) -> Option<(MutableNodeAttributes, NodeUpdateAttributesResponder)> {
12410        if let NodeRequest::UpdateAttributes { payload, responder } = self {
12411            Some((payload, responder))
12412        } else {
12413            None
12414        }
12415    }
12416
12417    #[allow(irrefutable_let_patterns)]
12418    pub fn into_sync(self) -> Option<(NodeSyncResponder)> {
12419        if let NodeRequest::Sync { responder } = self {
12420            Some((responder))
12421        } else {
12422            None
12423        }
12424    }
12425
12426    #[allow(irrefutable_let_patterns)]
12427    pub fn into_list_extended_attributes(
12428        self,
12429    ) -> Option<(fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>, NodeControlHandle)>
12430    {
12431        if let NodeRequest::ListExtendedAttributes { iterator, control_handle } = self {
12432            Some((iterator, control_handle))
12433        } else {
12434            None
12435        }
12436    }
12437
12438    #[allow(irrefutable_let_patterns)]
12439    pub fn into_get_extended_attribute(
12440        self,
12441    ) -> Option<(Vec<u8>, NodeGetExtendedAttributeResponder)> {
12442        if let NodeRequest::GetExtendedAttribute { name, responder } = self {
12443            Some((name, responder))
12444        } else {
12445            None
12446        }
12447    }
12448
12449    #[allow(irrefutable_let_patterns)]
12450    pub fn into_set_extended_attribute(
12451        self,
12452    ) -> Option<(
12453        Vec<u8>,
12454        ExtendedAttributeValue,
12455        SetExtendedAttributeMode,
12456        NodeSetExtendedAttributeResponder,
12457    )> {
12458        if let NodeRequest::SetExtendedAttribute { name, value, mode, responder } = self {
12459            Some((name, value, mode, responder))
12460        } else {
12461            None
12462        }
12463    }
12464
12465    #[allow(irrefutable_let_patterns)]
12466    pub fn into_remove_extended_attribute(
12467        self,
12468    ) -> Option<(Vec<u8>, NodeRemoveExtendedAttributeResponder)> {
12469        if let NodeRequest::RemoveExtendedAttribute { name, responder } = self {
12470            Some((name, responder))
12471        } else {
12472            None
12473        }
12474    }
12475
12476    /// Name of the method defined in FIDL
12477    pub fn method_name(&self) -> &'static str {
12478        match *self {
12479            NodeRequest::Clone { .. } => "clone",
12480            NodeRequest::Close { .. } => "close",
12481            NodeRequest::Query { .. } => "query",
12482            NodeRequest::DeprecatedClone { .. } => "deprecated_clone",
12483            NodeRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
12484            NodeRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
12485            NodeRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
12486            NodeRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
12487            NodeRequest::GetFlags { .. } => "get_flags",
12488            NodeRequest::SetFlags { .. } => "set_flags",
12489            NodeRequest::QueryFilesystem { .. } => "query_filesystem",
12490            NodeRequest::GetAttributes { .. } => "get_attributes",
12491            NodeRequest::UpdateAttributes { .. } => "update_attributes",
12492            NodeRequest::Sync { .. } => "sync",
12493            NodeRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
12494            NodeRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
12495            NodeRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
12496            NodeRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
12497            NodeRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
12498                "unknown one-way method"
12499            }
12500            NodeRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
12501                "unknown two-way method"
12502            }
12503        }
12504    }
12505}
12506
12507#[derive(Debug, Clone)]
12508pub struct NodeControlHandle {
12509    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
12510}
12511
12512impl fdomain_client::fidl::ControlHandle for NodeControlHandle {
12513    fn shutdown(&self) {
12514        self.inner.shutdown()
12515    }
12516
12517    fn is_closed(&self) -> bool {
12518        self.inner.channel().is_closed()
12519    }
12520    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
12521        self.inner.channel().on_closed()
12522    }
12523}
12524
12525impl NodeControlHandle {
12526    pub fn send_on_open_(
12527        &self,
12528        mut s: i32,
12529        mut info: Option<NodeInfoDeprecated>,
12530    ) -> Result<(), fidl::Error> {
12531        self.inner.send::<NodeOnOpenRequest>(
12532            (s, info.as_mut()),
12533            0,
12534            0x7fc7bbb1dbfd1972,
12535            fidl::encoding::DynamicFlags::empty(),
12536        )
12537    }
12538
12539    pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
12540        self.inner.send::<Representation>(
12541            &mut payload,
12542            0,
12543            0x5cb40567d80a510c,
12544            fidl::encoding::DynamicFlags::empty(),
12545        )
12546    }
12547}
12548
12549#[must_use = "FIDL methods require a response to be sent"]
12550#[derive(Debug)]
12551pub struct NodeCloseResponder {
12552    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12553    tx_id: u32,
12554}
12555
12556/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
12557/// if the responder is dropped without sending a response, so that the client
12558/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
12559impl std::ops::Drop for NodeCloseResponder {
12560    fn drop(&mut self) {
12561        self.control_handle.shutdown();
12562        // Safety: drops once, never accessed again
12563        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12564    }
12565}
12566
12567impl fdomain_client::fidl::Responder for NodeCloseResponder {
12568    type ControlHandle = NodeControlHandle;
12569
12570    fn control_handle(&self) -> &NodeControlHandle {
12571        &self.control_handle
12572    }
12573
12574    fn drop_without_shutdown(mut self) {
12575        // Safety: drops once, never accessed again due to mem::forget
12576        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12577        // Prevent Drop from running (which would shut down the channel)
12578        std::mem::forget(self);
12579    }
12580}
12581
12582impl NodeCloseResponder {
12583    /// Sends a response to the FIDL transaction.
12584    ///
12585    /// Sets the channel to shutdown if an error occurs.
12586    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12587        let _result = self.send_raw(result);
12588        if _result.is_err() {
12589            self.control_handle.shutdown();
12590        }
12591        self.drop_without_shutdown();
12592        _result
12593    }
12594
12595    /// Similar to "send" but does not shutdown the channel if an error occurs.
12596    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12597        let _result = self.send_raw(result);
12598        self.drop_without_shutdown();
12599        _result
12600    }
12601
12602    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12603        self.control_handle
12604            .inner
12605            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12606                result,
12607                self.tx_id,
12608                0x5ac5d459ad7f657e,
12609                fidl::encoding::DynamicFlags::empty(),
12610            )
12611    }
12612}
12613
12614#[must_use = "FIDL methods require a response to be sent"]
12615#[derive(Debug)]
12616pub struct NodeQueryResponder {
12617    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12618    tx_id: u32,
12619}
12620
12621/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
12622/// if the responder is dropped without sending a response, so that the client
12623/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
12624impl std::ops::Drop for NodeQueryResponder {
12625    fn drop(&mut self) {
12626        self.control_handle.shutdown();
12627        // Safety: drops once, never accessed again
12628        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12629    }
12630}
12631
12632impl fdomain_client::fidl::Responder for NodeQueryResponder {
12633    type ControlHandle = NodeControlHandle;
12634
12635    fn control_handle(&self) -> &NodeControlHandle {
12636        &self.control_handle
12637    }
12638
12639    fn drop_without_shutdown(mut self) {
12640        // Safety: drops once, never accessed again due to mem::forget
12641        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12642        // Prevent Drop from running (which would shut down the channel)
12643        std::mem::forget(self);
12644    }
12645}
12646
12647impl NodeQueryResponder {
12648    /// Sends a response to the FIDL transaction.
12649    ///
12650    /// Sets the channel to shutdown if an error occurs.
12651    pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12652        let _result = self.send_raw(protocol);
12653        if _result.is_err() {
12654            self.control_handle.shutdown();
12655        }
12656        self.drop_without_shutdown();
12657        _result
12658    }
12659
12660    /// Similar to "send" but does not shutdown the channel if an error occurs.
12661    pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12662        let _result = self.send_raw(protocol);
12663        self.drop_without_shutdown();
12664        _result
12665    }
12666
12667    fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12668        self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
12669            (protocol,),
12670            self.tx_id,
12671            0x2658edee9decfc06,
12672            fidl::encoding::DynamicFlags::empty(),
12673        )
12674    }
12675}
12676
12677#[must_use = "FIDL methods require a response to be sent"]
12678#[derive(Debug)]
12679pub struct NodeDeprecatedGetAttrResponder {
12680    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12681    tx_id: u32,
12682}
12683
12684/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
12685/// if the responder is dropped without sending a response, so that the client
12686/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
12687impl std::ops::Drop for NodeDeprecatedGetAttrResponder {
12688    fn drop(&mut self) {
12689        self.control_handle.shutdown();
12690        // Safety: drops once, never accessed again
12691        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12692    }
12693}
12694
12695impl fdomain_client::fidl::Responder for NodeDeprecatedGetAttrResponder {
12696    type ControlHandle = NodeControlHandle;
12697
12698    fn control_handle(&self) -> &NodeControlHandle {
12699        &self.control_handle
12700    }
12701
12702    fn drop_without_shutdown(mut self) {
12703        // Safety: drops once, never accessed again due to mem::forget
12704        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12705        // Prevent Drop from running (which would shut down the channel)
12706        std::mem::forget(self);
12707    }
12708}
12709
12710impl NodeDeprecatedGetAttrResponder {
12711    /// Sends a response to the FIDL transaction.
12712    ///
12713    /// Sets the channel to shutdown if an error occurs.
12714    pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
12715        let _result = self.send_raw(s, attributes);
12716        if _result.is_err() {
12717            self.control_handle.shutdown();
12718        }
12719        self.drop_without_shutdown();
12720        _result
12721    }
12722
12723    /// Similar to "send" but does not shutdown the channel if an error occurs.
12724    pub fn send_no_shutdown_on_err(
12725        self,
12726        mut s: i32,
12727        mut attributes: &NodeAttributes,
12728    ) -> Result<(), fidl::Error> {
12729        let _result = self.send_raw(s, attributes);
12730        self.drop_without_shutdown();
12731        _result
12732    }
12733
12734    fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
12735        self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
12736            (s, attributes),
12737            self.tx_id,
12738            0x78985e216314dafd,
12739            fidl::encoding::DynamicFlags::empty(),
12740        )
12741    }
12742}
12743
12744#[must_use = "FIDL methods require a response to be sent"]
12745#[derive(Debug)]
12746pub struct NodeDeprecatedSetAttrResponder {
12747    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12748    tx_id: u32,
12749}
12750
12751/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
12752/// if the responder is dropped without sending a response, so that the client
12753/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
12754impl std::ops::Drop for NodeDeprecatedSetAttrResponder {
12755    fn drop(&mut self) {
12756        self.control_handle.shutdown();
12757        // Safety: drops once, never accessed again
12758        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12759    }
12760}
12761
12762impl fdomain_client::fidl::Responder for NodeDeprecatedSetAttrResponder {
12763    type ControlHandle = NodeControlHandle;
12764
12765    fn control_handle(&self) -> &NodeControlHandle {
12766        &self.control_handle
12767    }
12768
12769    fn drop_without_shutdown(mut self) {
12770        // Safety: drops once, never accessed again due to mem::forget
12771        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12772        // Prevent Drop from running (which would shut down the channel)
12773        std::mem::forget(self);
12774    }
12775}
12776
12777impl NodeDeprecatedSetAttrResponder {
12778    /// Sends a response to the FIDL transaction.
12779    ///
12780    /// Sets the channel to shutdown if an error occurs.
12781    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
12782        let _result = self.send_raw(s);
12783        if _result.is_err() {
12784            self.control_handle.shutdown();
12785        }
12786        self.drop_without_shutdown();
12787        _result
12788    }
12789
12790    /// Similar to "send" but does not shutdown the channel if an error occurs.
12791    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
12792        let _result = self.send_raw(s);
12793        self.drop_without_shutdown();
12794        _result
12795    }
12796
12797    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
12798        self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
12799            (s,),
12800            self.tx_id,
12801            0x4186c0f40d938f46,
12802            fidl::encoding::DynamicFlags::empty(),
12803        )
12804    }
12805}
12806
12807#[must_use = "FIDL methods require a response to be sent"]
12808#[derive(Debug)]
12809pub struct NodeDeprecatedGetFlagsResponder {
12810    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12811    tx_id: u32,
12812}
12813
12814/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
12815/// if the responder is dropped without sending a response, so that the client
12816/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
12817impl std::ops::Drop for NodeDeprecatedGetFlagsResponder {
12818    fn drop(&mut self) {
12819        self.control_handle.shutdown();
12820        // Safety: drops once, never accessed again
12821        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12822    }
12823}
12824
12825impl fdomain_client::fidl::Responder for NodeDeprecatedGetFlagsResponder {
12826    type ControlHandle = NodeControlHandle;
12827
12828    fn control_handle(&self) -> &NodeControlHandle {
12829        &self.control_handle
12830    }
12831
12832    fn drop_without_shutdown(mut self) {
12833        // Safety: drops once, never accessed again due to mem::forget
12834        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12835        // Prevent Drop from running (which would shut down the channel)
12836        std::mem::forget(self);
12837    }
12838}
12839
12840impl NodeDeprecatedGetFlagsResponder {
12841    /// Sends a response to the FIDL transaction.
12842    ///
12843    /// Sets the channel to shutdown if an error occurs.
12844    pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
12845        let _result = self.send_raw(s, flags);
12846        if _result.is_err() {
12847            self.control_handle.shutdown();
12848        }
12849        self.drop_without_shutdown();
12850        _result
12851    }
12852
12853    /// Similar to "send" but does not shutdown the channel if an error occurs.
12854    pub fn send_no_shutdown_on_err(
12855        self,
12856        mut s: i32,
12857        mut flags: OpenFlags,
12858    ) -> Result<(), fidl::Error> {
12859        let _result = self.send_raw(s, flags);
12860        self.drop_without_shutdown();
12861        _result
12862    }
12863
12864    fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
12865        self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
12866            (s, flags),
12867            self.tx_id,
12868            0x5b88fffb8eda3aa1,
12869            fidl::encoding::DynamicFlags::empty(),
12870        )
12871    }
12872}
12873
12874#[must_use = "FIDL methods require a response to be sent"]
12875#[derive(Debug)]
12876pub struct NodeDeprecatedSetFlagsResponder {
12877    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12878    tx_id: u32,
12879}
12880
12881/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
12882/// if the responder is dropped without sending a response, so that the client
12883/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
12884impl std::ops::Drop for NodeDeprecatedSetFlagsResponder {
12885    fn drop(&mut self) {
12886        self.control_handle.shutdown();
12887        // Safety: drops once, never accessed again
12888        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12889    }
12890}
12891
12892impl fdomain_client::fidl::Responder for NodeDeprecatedSetFlagsResponder {
12893    type ControlHandle = NodeControlHandle;
12894
12895    fn control_handle(&self) -> &NodeControlHandle {
12896        &self.control_handle
12897    }
12898
12899    fn drop_without_shutdown(mut self) {
12900        // Safety: drops once, never accessed again due to mem::forget
12901        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12902        // Prevent Drop from running (which would shut down the channel)
12903        std::mem::forget(self);
12904    }
12905}
12906
12907impl NodeDeprecatedSetFlagsResponder {
12908    /// Sends a response to the FIDL transaction.
12909    ///
12910    /// Sets the channel to shutdown if an error occurs.
12911    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
12912        let _result = self.send_raw(s);
12913        if _result.is_err() {
12914            self.control_handle.shutdown();
12915        }
12916        self.drop_without_shutdown();
12917        _result
12918    }
12919
12920    /// Similar to "send" but does not shutdown the channel if an error occurs.
12921    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
12922        let _result = self.send_raw(s);
12923        self.drop_without_shutdown();
12924        _result
12925    }
12926
12927    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
12928        self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
12929            (s,),
12930            self.tx_id,
12931            0x5295b76c71fde733,
12932            fidl::encoding::DynamicFlags::empty(),
12933        )
12934    }
12935}
12936
12937#[must_use = "FIDL methods require a response to be sent"]
12938#[derive(Debug)]
12939pub struct NodeGetFlagsResponder {
12940    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12941    tx_id: u32,
12942}
12943
12944/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
12945/// if the responder is dropped without sending a response, so that the client
12946/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
12947impl std::ops::Drop for NodeGetFlagsResponder {
12948    fn drop(&mut self) {
12949        self.control_handle.shutdown();
12950        // Safety: drops once, never accessed again
12951        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12952    }
12953}
12954
12955impl fdomain_client::fidl::Responder for NodeGetFlagsResponder {
12956    type ControlHandle = NodeControlHandle;
12957
12958    fn control_handle(&self) -> &NodeControlHandle {
12959        &self.control_handle
12960    }
12961
12962    fn drop_without_shutdown(mut self) {
12963        // Safety: drops once, never accessed again due to mem::forget
12964        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12965        // Prevent Drop from running (which would shut down the channel)
12966        std::mem::forget(self);
12967    }
12968}
12969
12970impl NodeGetFlagsResponder {
12971    /// Sends a response to the FIDL transaction.
12972    ///
12973    /// Sets the channel to shutdown if an error occurs.
12974    pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
12975        let _result = self.send_raw(result);
12976        if _result.is_err() {
12977            self.control_handle.shutdown();
12978        }
12979        self.drop_without_shutdown();
12980        _result
12981    }
12982
12983    /// Similar to "send" but does not shutdown the channel if an error occurs.
12984    pub fn send_no_shutdown_on_err(
12985        self,
12986        mut result: Result<Flags, i32>,
12987    ) -> Result<(), fidl::Error> {
12988        let _result = self.send_raw(result);
12989        self.drop_without_shutdown();
12990        _result
12991    }
12992
12993    fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
12994        self.control_handle
12995            .inner
12996            .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
12997                fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
12998                self.tx_id,
12999                0x176eb318f64ec23,
13000                fidl::encoding::DynamicFlags::FLEXIBLE,
13001            )
13002    }
13003}
13004
13005#[must_use = "FIDL methods require a response to be sent"]
13006#[derive(Debug)]
13007pub struct NodeSetFlagsResponder {
13008    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13009    tx_id: u32,
13010}
13011
13012/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
13013/// if the responder is dropped without sending a response, so that the client
13014/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13015impl std::ops::Drop for NodeSetFlagsResponder {
13016    fn drop(&mut self) {
13017        self.control_handle.shutdown();
13018        // Safety: drops once, never accessed again
13019        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13020    }
13021}
13022
13023impl fdomain_client::fidl::Responder for NodeSetFlagsResponder {
13024    type ControlHandle = NodeControlHandle;
13025
13026    fn control_handle(&self) -> &NodeControlHandle {
13027        &self.control_handle
13028    }
13029
13030    fn drop_without_shutdown(mut self) {
13031        // Safety: drops once, never accessed again due to mem::forget
13032        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13033        // Prevent Drop from running (which would shut down the channel)
13034        std::mem::forget(self);
13035    }
13036}
13037
13038impl NodeSetFlagsResponder {
13039    /// Sends a response to the FIDL transaction.
13040    ///
13041    /// Sets the channel to shutdown if an error occurs.
13042    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13043        let _result = self.send_raw(result);
13044        if _result.is_err() {
13045            self.control_handle.shutdown();
13046        }
13047        self.drop_without_shutdown();
13048        _result
13049    }
13050
13051    /// Similar to "send" but does not shutdown the channel if an error occurs.
13052    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13053        let _result = self.send_raw(result);
13054        self.drop_without_shutdown();
13055        _result
13056    }
13057
13058    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13059        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
13060            fidl::encoding::EmptyStruct,
13061            i32,
13062        >>(
13063            fidl::encoding::FlexibleResult::new(result),
13064            self.tx_id,
13065            0x55a8028685791ea8,
13066            fidl::encoding::DynamicFlags::FLEXIBLE,
13067        )
13068    }
13069}
13070
13071#[must_use = "FIDL methods require a response to be sent"]
13072#[derive(Debug)]
13073pub struct NodeQueryFilesystemResponder {
13074    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13075    tx_id: u32,
13076}
13077
13078/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
13079/// if the responder is dropped without sending a response, so that the client
13080/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13081impl std::ops::Drop for NodeQueryFilesystemResponder {
13082    fn drop(&mut self) {
13083        self.control_handle.shutdown();
13084        // Safety: drops once, never accessed again
13085        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13086    }
13087}
13088
13089impl fdomain_client::fidl::Responder for NodeQueryFilesystemResponder {
13090    type ControlHandle = NodeControlHandle;
13091
13092    fn control_handle(&self) -> &NodeControlHandle {
13093        &self.control_handle
13094    }
13095
13096    fn drop_without_shutdown(mut self) {
13097        // Safety: drops once, never accessed again due to mem::forget
13098        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13099        // Prevent Drop from running (which would shut down the channel)
13100        std::mem::forget(self);
13101    }
13102}
13103
13104impl NodeQueryFilesystemResponder {
13105    /// Sends a response to the FIDL transaction.
13106    ///
13107    /// Sets the channel to shutdown if an error occurs.
13108    pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
13109        let _result = self.send_raw(s, info);
13110        if _result.is_err() {
13111            self.control_handle.shutdown();
13112        }
13113        self.drop_without_shutdown();
13114        _result
13115    }
13116
13117    /// Similar to "send" but does not shutdown the channel if an error occurs.
13118    pub fn send_no_shutdown_on_err(
13119        self,
13120        mut s: i32,
13121        mut info: Option<&FilesystemInfo>,
13122    ) -> Result<(), fidl::Error> {
13123        let _result = self.send_raw(s, info);
13124        self.drop_without_shutdown();
13125        _result
13126    }
13127
13128    fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
13129        self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
13130            (s, info),
13131            self.tx_id,
13132            0x6f344a1c6b0a0610,
13133            fidl::encoding::DynamicFlags::empty(),
13134        )
13135    }
13136}
13137
13138#[must_use = "FIDL methods require a response to be sent"]
13139#[derive(Debug)]
13140pub struct NodeGetAttributesResponder {
13141    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13142    tx_id: u32,
13143}
13144
13145/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
13146/// if the responder is dropped without sending a response, so that the client
13147/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13148impl std::ops::Drop for NodeGetAttributesResponder {
13149    fn drop(&mut self) {
13150        self.control_handle.shutdown();
13151        // Safety: drops once, never accessed again
13152        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13153    }
13154}
13155
13156impl fdomain_client::fidl::Responder for NodeGetAttributesResponder {
13157    type ControlHandle = NodeControlHandle;
13158
13159    fn control_handle(&self) -> &NodeControlHandle {
13160        &self.control_handle
13161    }
13162
13163    fn drop_without_shutdown(mut self) {
13164        // Safety: drops once, never accessed again due to mem::forget
13165        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13166        // Prevent Drop from running (which would shut down the channel)
13167        std::mem::forget(self);
13168    }
13169}
13170
13171impl NodeGetAttributesResponder {
13172    /// Sends a response to the FIDL transaction.
13173    ///
13174    /// Sets the channel to shutdown if an error occurs.
13175    pub fn send(
13176        self,
13177        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13178    ) -> Result<(), fidl::Error> {
13179        let _result = self.send_raw(result);
13180        if _result.is_err() {
13181            self.control_handle.shutdown();
13182        }
13183        self.drop_without_shutdown();
13184        _result
13185    }
13186
13187    /// Similar to "send" but does not shutdown the channel if an error occurs.
13188    pub fn send_no_shutdown_on_err(
13189        self,
13190        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13191    ) -> Result<(), fidl::Error> {
13192        let _result = self.send_raw(result);
13193        self.drop_without_shutdown();
13194        _result
13195    }
13196
13197    fn send_raw(
13198        &self,
13199        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13200    ) -> Result<(), fidl::Error> {
13201        self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
13202            result,
13203            self.tx_id,
13204            0x3d4396a638ea053b,
13205            fidl::encoding::DynamicFlags::empty(),
13206        )
13207    }
13208}
13209
13210#[must_use = "FIDL methods require a response to be sent"]
13211#[derive(Debug)]
13212pub struct NodeUpdateAttributesResponder {
13213    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13214    tx_id: u32,
13215}
13216
13217/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
13218/// if the responder is dropped without sending a response, so that the client
13219/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13220impl std::ops::Drop for NodeUpdateAttributesResponder {
13221    fn drop(&mut self) {
13222        self.control_handle.shutdown();
13223        // Safety: drops once, never accessed again
13224        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13225    }
13226}
13227
13228impl fdomain_client::fidl::Responder for NodeUpdateAttributesResponder {
13229    type ControlHandle = NodeControlHandle;
13230
13231    fn control_handle(&self) -> &NodeControlHandle {
13232        &self.control_handle
13233    }
13234
13235    fn drop_without_shutdown(mut self) {
13236        // Safety: drops once, never accessed again due to mem::forget
13237        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13238        // Prevent Drop from running (which would shut down the channel)
13239        std::mem::forget(self);
13240    }
13241}
13242
13243impl NodeUpdateAttributesResponder {
13244    /// Sends a response to the FIDL transaction.
13245    ///
13246    /// Sets the channel to shutdown if an error occurs.
13247    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13248        let _result = self.send_raw(result);
13249        if _result.is_err() {
13250            self.control_handle.shutdown();
13251        }
13252        self.drop_without_shutdown();
13253        _result
13254    }
13255
13256    /// Similar to "send" but does not shutdown the channel if an error occurs.
13257    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13258        let _result = self.send_raw(result);
13259        self.drop_without_shutdown();
13260        _result
13261    }
13262
13263    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13264        self.control_handle
13265            .inner
13266            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13267                result,
13268                self.tx_id,
13269                0x3308c1da5a89bf08,
13270                fidl::encoding::DynamicFlags::empty(),
13271            )
13272    }
13273}
13274
13275#[must_use = "FIDL methods require a response to be sent"]
13276#[derive(Debug)]
13277pub struct NodeSyncResponder {
13278    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13279    tx_id: u32,
13280}
13281
13282/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
13283/// if the responder is dropped without sending a response, so that the client
13284/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13285impl std::ops::Drop for NodeSyncResponder {
13286    fn drop(&mut self) {
13287        self.control_handle.shutdown();
13288        // Safety: drops once, never accessed again
13289        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13290    }
13291}
13292
13293impl fdomain_client::fidl::Responder for NodeSyncResponder {
13294    type ControlHandle = NodeControlHandle;
13295
13296    fn control_handle(&self) -> &NodeControlHandle {
13297        &self.control_handle
13298    }
13299
13300    fn drop_without_shutdown(mut self) {
13301        // Safety: drops once, never accessed again due to mem::forget
13302        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13303        // Prevent Drop from running (which would shut down the channel)
13304        std::mem::forget(self);
13305    }
13306}
13307
13308impl NodeSyncResponder {
13309    /// Sends a response to the FIDL transaction.
13310    ///
13311    /// Sets the channel to shutdown if an error occurs.
13312    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13313        let _result = self.send_raw(result);
13314        if _result.is_err() {
13315            self.control_handle.shutdown();
13316        }
13317        self.drop_without_shutdown();
13318        _result
13319    }
13320
13321    /// Similar to "send" but does not shutdown the channel if an error occurs.
13322    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13323        let _result = self.send_raw(result);
13324        self.drop_without_shutdown();
13325        _result
13326    }
13327
13328    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13329        self.control_handle
13330            .inner
13331            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13332                result,
13333                self.tx_id,
13334                0x2c5c27ca0ab5dc49,
13335                fidl::encoding::DynamicFlags::empty(),
13336            )
13337    }
13338}
13339
13340#[must_use = "FIDL methods require a response to be sent"]
13341#[derive(Debug)]
13342pub struct NodeGetExtendedAttributeResponder {
13343    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13344    tx_id: u32,
13345}
13346
13347/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
13348/// if the responder is dropped without sending a response, so that the client
13349/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13350impl std::ops::Drop for NodeGetExtendedAttributeResponder {
13351    fn drop(&mut self) {
13352        self.control_handle.shutdown();
13353        // Safety: drops once, never accessed again
13354        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13355    }
13356}
13357
13358impl fdomain_client::fidl::Responder for NodeGetExtendedAttributeResponder {
13359    type ControlHandle = NodeControlHandle;
13360
13361    fn control_handle(&self) -> &NodeControlHandle {
13362        &self.control_handle
13363    }
13364
13365    fn drop_without_shutdown(mut self) {
13366        // Safety: drops once, never accessed again due to mem::forget
13367        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13368        // Prevent Drop from running (which would shut down the channel)
13369        std::mem::forget(self);
13370    }
13371}
13372
13373impl NodeGetExtendedAttributeResponder {
13374    /// Sends a response to the FIDL transaction.
13375    ///
13376    /// Sets the channel to shutdown if an error occurs.
13377    pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
13378        let _result = self.send_raw(result);
13379        if _result.is_err() {
13380            self.control_handle.shutdown();
13381        }
13382        self.drop_without_shutdown();
13383        _result
13384    }
13385
13386    /// Similar to "send" but does not shutdown the channel if an error occurs.
13387    pub fn send_no_shutdown_on_err(
13388        self,
13389        mut result: Result<ExtendedAttributeValue, i32>,
13390    ) -> Result<(), fidl::Error> {
13391        let _result = self.send_raw(result);
13392        self.drop_without_shutdown();
13393        _result
13394    }
13395
13396    fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
13397        self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
13398            result.as_mut().map_err(|e| *e),
13399            self.tx_id,
13400            0x45ffa3ccfdeb76db,
13401            fidl::encoding::DynamicFlags::empty(),
13402        )
13403    }
13404}
13405
13406#[must_use = "FIDL methods require a response to be sent"]
13407#[derive(Debug)]
13408pub struct NodeSetExtendedAttributeResponder {
13409    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13410    tx_id: u32,
13411}
13412
13413/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
13414/// if the responder is dropped without sending a response, so that the client
13415/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13416impl std::ops::Drop for NodeSetExtendedAttributeResponder {
13417    fn drop(&mut self) {
13418        self.control_handle.shutdown();
13419        // Safety: drops once, never accessed again
13420        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13421    }
13422}
13423
13424impl fdomain_client::fidl::Responder for NodeSetExtendedAttributeResponder {
13425    type ControlHandle = NodeControlHandle;
13426
13427    fn control_handle(&self) -> &NodeControlHandle {
13428        &self.control_handle
13429    }
13430
13431    fn drop_without_shutdown(mut self) {
13432        // Safety: drops once, never accessed again due to mem::forget
13433        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13434        // Prevent Drop from running (which would shut down the channel)
13435        std::mem::forget(self);
13436    }
13437}
13438
13439impl NodeSetExtendedAttributeResponder {
13440    /// Sends a response to the FIDL transaction.
13441    ///
13442    /// Sets the channel to shutdown if an error occurs.
13443    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13444        let _result = self.send_raw(result);
13445        if _result.is_err() {
13446            self.control_handle.shutdown();
13447        }
13448        self.drop_without_shutdown();
13449        _result
13450    }
13451
13452    /// Similar to "send" but does not shutdown the channel if an error occurs.
13453    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13454        let _result = self.send_raw(result);
13455        self.drop_without_shutdown();
13456        _result
13457    }
13458
13459    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13460        self.control_handle
13461            .inner
13462            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13463                result,
13464                self.tx_id,
13465                0x4a951362f681f23c,
13466                fidl::encoding::DynamicFlags::empty(),
13467            )
13468    }
13469}
13470
13471#[must_use = "FIDL methods require a response to be sent"]
13472#[derive(Debug)]
13473pub struct NodeRemoveExtendedAttributeResponder {
13474    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13475    tx_id: u32,
13476}
13477
13478/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
13479/// if the responder is dropped without sending a response, so that the client
13480/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13481impl std::ops::Drop for NodeRemoveExtendedAttributeResponder {
13482    fn drop(&mut self) {
13483        self.control_handle.shutdown();
13484        // Safety: drops once, never accessed again
13485        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13486    }
13487}
13488
13489impl fdomain_client::fidl::Responder for NodeRemoveExtendedAttributeResponder {
13490    type ControlHandle = NodeControlHandle;
13491
13492    fn control_handle(&self) -> &NodeControlHandle {
13493        &self.control_handle
13494    }
13495
13496    fn drop_without_shutdown(mut self) {
13497        // Safety: drops once, never accessed again due to mem::forget
13498        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13499        // Prevent Drop from running (which would shut down the channel)
13500        std::mem::forget(self);
13501    }
13502}
13503
13504impl NodeRemoveExtendedAttributeResponder {
13505    /// Sends a response to the FIDL transaction.
13506    ///
13507    /// Sets the channel to shutdown if an error occurs.
13508    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13509        let _result = self.send_raw(result);
13510        if _result.is_err() {
13511            self.control_handle.shutdown();
13512        }
13513        self.drop_without_shutdown();
13514        _result
13515    }
13516
13517    /// Similar to "send" but does not shutdown the channel if an error occurs.
13518    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13519        let _result = self.send_raw(result);
13520        self.drop_without_shutdown();
13521        _result
13522    }
13523
13524    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13525        self.control_handle
13526            .inner
13527            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13528                result,
13529                self.tx_id,
13530                0x7a0b9f3a9bf9032d,
13531                fidl::encoding::DynamicFlags::empty(),
13532            )
13533    }
13534}
13535
13536#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13537pub struct ReadableMarker;
13538
13539impl fdomain_client::fidl::ProtocolMarker for ReadableMarker {
13540    type Proxy = ReadableProxy;
13541    type RequestStream = ReadableRequestStream;
13542
13543    const DEBUG_NAME: &'static str = "(anonymous) Readable";
13544}
13545pub type ReadableReadResult = Result<Vec<u8>, i32>;
13546
13547pub trait ReadableProxyInterface: Send + Sync {
13548    type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
13549        + Send;
13550    fn r#read(&self, count: u64) -> Self::ReadResponseFut;
13551}
13552
13553#[derive(Debug, Clone)]
13554pub struct ReadableProxy {
13555    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
13556}
13557
13558impl fdomain_client::fidl::Proxy for ReadableProxy {
13559    type Protocol = ReadableMarker;
13560
13561    fn from_channel(inner: fdomain_client::Channel) -> Self {
13562        Self::new(inner)
13563    }
13564
13565    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
13566        self.client.into_channel().map_err(|client| Self { client })
13567    }
13568
13569    fn as_channel(&self) -> &fdomain_client::Channel {
13570        self.client.as_channel()
13571    }
13572}
13573
13574impl ReadableProxy {
13575    /// Create a new Proxy for fuchsia.io/Readable.
13576    pub fn new(channel: fdomain_client::Channel) -> Self {
13577        let protocol_name = <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
13578        Self { client: fidl::client::Client::new(channel, protocol_name) }
13579    }
13580
13581    /// Get a Stream of events from the remote end of the protocol.
13582    ///
13583    /// # Panics
13584    ///
13585    /// Panics if the event stream was already taken.
13586    pub fn take_event_stream(&self) -> ReadableEventStream {
13587        ReadableEventStream { event_receiver: self.client.take_event_receiver() }
13588    }
13589
13590    /// Reads up to 'count' bytes at the seek offset.
13591    /// The seek offset is moved forward by the number of bytes read.
13592    ///
13593    /// ## Invariants
13594    ///
13595    /// * The returned `data.length` will never be greater than `count`.
13596    /// * If `data.length` is less than `count`, it means that the seek offset
13597    ///   has reached the end of file as part of this operation.
13598    /// * If `data.length` is zero while `count` is not, it means that the
13599    ///   seek offset is already at or beyond the end of file, and no data could
13600    ///   be read.
13601    /// * If `count` is zero, the server should perform all the checks ensuring
13602    ///   read access without actually read anything, and return an empty
13603    ///   `data` vector.
13604    ///
13605    /// This method requires the [`Rights.READ_BYTES`] right.
13606    ///
13607    /// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.
13608    pub fn r#read(
13609        &self,
13610        mut count: u64,
13611    ) -> fidl::client::QueryResponseFut<
13612        ReadableReadResult,
13613        fdomain_client::fidl::FDomainResourceDialect,
13614    > {
13615        ReadableProxyInterface::r#read(self, count)
13616    }
13617}
13618
13619impl ReadableProxyInterface for ReadableProxy {
13620    type ReadResponseFut = fidl::client::QueryResponseFut<
13621        ReadableReadResult,
13622        fdomain_client::fidl::FDomainResourceDialect,
13623    >;
13624    fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
13625        fn _decode(
13626            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13627        ) -> Result<ReadableReadResult, fidl::Error> {
13628            let _response = fidl::client::decode_transaction_body::<
13629                fidl::encoding::ResultType<ReadableReadResponse, i32>,
13630                fdomain_client::fidl::FDomainResourceDialect,
13631                0x57e419a298c8ede,
13632            >(_buf?)?;
13633            Ok(_response.map(|x| x.data))
13634        }
13635        self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
13636            (count,),
13637            0x57e419a298c8ede,
13638            fidl::encoding::DynamicFlags::empty(),
13639            _decode,
13640        )
13641    }
13642}
13643
13644pub struct ReadableEventStream {
13645    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
13646}
13647
13648impl std::marker::Unpin for ReadableEventStream {}
13649
13650impl futures::stream::FusedStream for ReadableEventStream {
13651    fn is_terminated(&self) -> bool {
13652        self.event_receiver.is_terminated()
13653    }
13654}
13655
13656impl futures::Stream for ReadableEventStream {
13657    type Item = Result<ReadableEvent, fidl::Error>;
13658
13659    fn poll_next(
13660        mut self: std::pin::Pin<&mut Self>,
13661        cx: &mut std::task::Context<'_>,
13662    ) -> std::task::Poll<Option<Self::Item>> {
13663        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
13664            &mut self.event_receiver,
13665            cx
13666        )?) {
13667            Some(buf) => std::task::Poll::Ready(Some(ReadableEvent::decode(buf))),
13668            None => std::task::Poll::Ready(None),
13669        }
13670    }
13671}
13672
13673#[derive(Debug)]
13674pub enum ReadableEvent {}
13675
13676impl ReadableEvent {
13677    /// Decodes a message buffer as a [`ReadableEvent`].
13678    fn decode(
13679        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
13680    ) -> Result<ReadableEvent, fidl::Error> {
13681        let (bytes, _handles) = buf.split_mut();
13682        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
13683        debug_assert_eq!(tx_header.tx_id, 0);
13684        match tx_header.ordinal {
13685            _ => Err(fidl::Error::UnknownOrdinal {
13686                ordinal: tx_header.ordinal,
13687                protocol_name: <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
13688            }),
13689        }
13690    }
13691}
13692
13693/// A Stream of incoming requests for fuchsia.io/Readable.
13694pub struct ReadableRequestStream {
13695    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13696    is_terminated: bool,
13697}
13698
13699impl std::marker::Unpin for ReadableRequestStream {}
13700
13701impl futures::stream::FusedStream for ReadableRequestStream {
13702    fn is_terminated(&self) -> bool {
13703        self.is_terminated
13704    }
13705}
13706
13707impl fdomain_client::fidl::RequestStream for ReadableRequestStream {
13708    type Protocol = ReadableMarker;
13709    type ControlHandle = ReadableControlHandle;
13710
13711    fn from_channel(channel: fdomain_client::Channel) -> Self {
13712        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
13713    }
13714
13715    fn control_handle(&self) -> Self::ControlHandle {
13716        ReadableControlHandle { inner: self.inner.clone() }
13717    }
13718
13719    fn into_inner(
13720        self,
13721    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
13722    {
13723        (self.inner, self.is_terminated)
13724    }
13725
13726    fn from_inner(
13727        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13728        is_terminated: bool,
13729    ) -> Self {
13730        Self { inner, is_terminated }
13731    }
13732}
13733
13734impl futures::Stream for ReadableRequestStream {
13735    type Item = Result<ReadableRequest, fidl::Error>;
13736
13737    fn poll_next(
13738        mut self: std::pin::Pin<&mut Self>,
13739        cx: &mut std::task::Context<'_>,
13740    ) -> std::task::Poll<Option<Self::Item>> {
13741        let this = &mut *self;
13742        if this.inner.check_shutdown(cx) {
13743            this.is_terminated = true;
13744            return std::task::Poll::Ready(None);
13745        }
13746        if this.is_terminated {
13747            panic!("polled ReadableRequestStream after completion");
13748        }
13749        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
13750            |bytes, handles| {
13751                match this.inner.channel().read_etc(cx, bytes, handles) {
13752                    std::task::Poll::Ready(Ok(())) => {}
13753                    std::task::Poll::Pending => return std::task::Poll::Pending,
13754                    std::task::Poll::Ready(Err(None)) => {
13755                        this.is_terminated = true;
13756                        return std::task::Poll::Ready(None);
13757                    }
13758                    std::task::Poll::Ready(Err(Some(e))) => {
13759                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
13760                            e.into(),
13761                        ))))
13762                    }
13763                }
13764
13765                // A message has been received from the channel
13766                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
13767
13768                std::task::Poll::Ready(Some(match header.ordinal {
13769                    0x57e419a298c8ede => {
13770                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
13771                        let mut req = fidl::new_empty!(
13772                            ReadableReadRequest,
13773                            fdomain_client::fidl::FDomainResourceDialect
13774                        );
13775                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
13776                        let control_handle = ReadableControlHandle { inner: this.inner.clone() };
13777                        Ok(ReadableRequest::Read {
13778                            count: req.count,
13779
13780                            responder: ReadableReadResponder {
13781                                control_handle: std::mem::ManuallyDrop::new(control_handle),
13782                                tx_id: header.tx_id,
13783                            },
13784                        })
13785                    }
13786                    _ => Err(fidl::Error::UnknownOrdinal {
13787                        ordinal: header.ordinal,
13788                        protocol_name:
13789                            <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
13790                    }),
13791                }))
13792            },
13793        )
13794    }
13795}
13796
13797#[derive(Debug)]
13798pub enum ReadableRequest {
13799    /// Reads up to 'count' bytes at the seek offset.
13800    /// The seek offset is moved forward by the number of bytes read.
13801    ///
13802    /// ## Invariants
13803    ///
13804    /// * The returned `data.length` will never be greater than `count`.
13805    /// * If `data.length` is less than `count`, it means that the seek offset
13806    ///   has reached the end of file as part of this operation.
13807    /// * If `data.length` is zero while `count` is not, it means that the
13808    ///   seek offset is already at or beyond the end of file, and no data could
13809    ///   be read.
13810    /// * If `count` is zero, the server should perform all the checks ensuring
13811    ///   read access without actually read anything, and return an empty
13812    ///   `data` vector.
13813    ///
13814    /// This method requires the [`Rights.READ_BYTES`] right.
13815    ///
13816    /// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.
13817    Read { count: u64, responder: ReadableReadResponder },
13818}
13819
13820impl ReadableRequest {
13821    #[allow(irrefutable_let_patterns)]
13822    pub fn into_read(self) -> Option<(u64, ReadableReadResponder)> {
13823        if let ReadableRequest::Read { count, responder } = self {
13824            Some((count, responder))
13825        } else {
13826            None
13827        }
13828    }
13829
13830    /// Name of the method defined in FIDL
13831    pub fn method_name(&self) -> &'static str {
13832        match *self {
13833            ReadableRequest::Read { .. } => "read",
13834        }
13835    }
13836}
13837
13838#[derive(Debug, Clone)]
13839pub struct ReadableControlHandle {
13840    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13841}
13842
13843impl fdomain_client::fidl::ControlHandle for ReadableControlHandle {
13844    fn shutdown(&self) {
13845        self.inner.shutdown()
13846    }
13847
13848    fn is_closed(&self) -> bool {
13849        self.inner.channel().is_closed()
13850    }
13851    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
13852        self.inner.channel().on_closed()
13853    }
13854}
13855
13856impl ReadableControlHandle {}
13857
13858#[must_use = "FIDL methods require a response to be sent"]
13859#[derive(Debug)]
13860pub struct ReadableReadResponder {
13861    control_handle: std::mem::ManuallyDrop<ReadableControlHandle>,
13862    tx_id: u32,
13863}
13864
13865/// Set the the channel to be shutdown (see [`ReadableControlHandle::shutdown`])
13866/// if the responder is dropped without sending a response, so that the client
13867/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13868impl std::ops::Drop for ReadableReadResponder {
13869    fn drop(&mut self) {
13870        self.control_handle.shutdown();
13871        // Safety: drops once, never accessed again
13872        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13873    }
13874}
13875
13876impl fdomain_client::fidl::Responder for ReadableReadResponder {
13877    type ControlHandle = ReadableControlHandle;
13878
13879    fn control_handle(&self) -> &ReadableControlHandle {
13880        &self.control_handle
13881    }
13882
13883    fn drop_without_shutdown(mut self) {
13884        // Safety: drops once, never accessed again due to mem::forget
13885        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13886        // Prevent Drop from running (which would shut down the channel)
13887        std::mem::forget(self);
13888    }
13889}
13890
13891impl ReadableReadResponder {
13892    /// Sends a response to the FIDL transaction.
13893    ///
13894    /// Sets the channel to shutdown if an error occurs.
13895    pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
13896        let _result = self.send_raw(result);
13897        if _result.is_err() {
13898            self.control_handle.shutdown();
13899        }
13900        self.drop_without_shutdown();
13901        _result
13902    }
13903
13904    /// Similar to "send" but does not shutdown the channel if an error occurs.
13905    pub fn send_no_shutdown_on_err(
13906        self,
13907        mut result: Result<&[u8], i32>,
13908    ) -> Result<(), fidl::Error> {
13909        let _result = self.send_raw(result);
13910        self.drop_without_shutdown();
13911        _result
13912    }
13913
13914    fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
13915        self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
13916            result.map(|data| (data,)),
13917            self.tx_id,
13918            0x57e419a298c8ede,
13919            fidl::encoding::DynamicFlags::empty(),
13920        )
13921    }
13922}
13923
13924#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13925pub struct SymlinkMarker;
13926
13927impl fdomain_client::fidl::ProtocolMarker for SymlinkMarker {
13928    type Proxy = SymlinkProxy;
13929    type RequestStream = SymlinkRequestStream;
13930
13931    const DEBUG_NAME: &'static str = "fuchsia.io.Symlink";
13932}
13933impl fdomain_client::fidl::DiscoverableProtocolMarker for SymlinkMarker {}
13934
13935pub trait SymlinkProxyInterface: Send + Sync {
13936    type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
13937        + Send;
13938    fn r#link_into(
13939        &self,
13940        dst_parent_token: fdomain_client::Event,
13941        dst: &str,
13942    ) -> Self::LinkIntoResponseFut;
13943    fn r#clone(
13944        &self,
13945        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
13946    ) -> Result<(), fidl::Error>;
13947    type CloseResponseFut: std::future::Future<
13948            Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
13949        > + Send;
13950    fn r#close(&self) -> Self::CloseResponseFut;
13951    type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
13952    fn r#query(&self) -> Self::QueryResponseFut;
13953    fn r#deprecated_clone(
13954        &self,
13955        flags: OpenFlags,
13956        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
13957    ) -> Result<(), fidl::Error>;
13958    type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
13959        + Send;
13960    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
13961    type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
13962    fn r#deprecated_set_attr(
13963        &self,
13964        flags: NodeAttributeFlags,
13965        attributes: &NodeAttributes,
13966    ) -> Self::DeprecatedSetAttrResponseFut;
13967    type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
13968        + Send;
13969    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
13970    type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
13971        + Send;
13972    fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
13973    type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
13974        + Send;
13975    fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
13976    type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
13977        + Send;
13978    fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
13979    type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
13980        + Send;
13981    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
13982    type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
13983        + Send;
13984    fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
13985    type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
13986        + Send;
13987    fn r#update_attributes(
13988        &self,
13989        payload: &MutableNodeAttributes,
13990    ) -> Self::UpdateAttributesResponseFut;
13991    type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
13992    fn r#sync(&self) -> Self::SyncResponseFut;
13993    fn r#list_extended_attributes(
13994        &self,
13995        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
13996    ) -> Result<(), fidl::Error>;
13997    type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
13998        + Send;
13999    fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
14000    type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
14001        + Send;
14002    fn r#set_extended_attribute(
14003        &self,
14004        name: &[u8],
14005        value: ExtendedAttributeValue,
14006        mode: SetExtendedAttributeMode,
14007    ) -> Self::SetExtendedAttributeResponseFut;
14008    type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
14009        + Send;
14010    fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
14011    type DescribeResponseFut: std::future::Future<Output = Result<SymlinkInfo, fidl::Error>> + Send;
14012    fn r#describe(&self) -> Self::DescribeResponseFut;
14013}
14014
14015#[derive(Debug, Clone)]
14016pub struct SymlinkProxy {
14017    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
14018}
14019
14020impl fdomain_client::fidl::Proxy for SymlinkProxy {
14021    type Protocol = SymlinkMarker;
14022
14023    fn from_channel(inner: fdomain_client::Channel) -> Self {
14024        Self::new(inner)
14025    }
14026
14027    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
14028        self.client.into_channel().map_err(|client| Self { client })
14029    }
14030
14031    fn as_channel(&self) -> &fdomain_client::Channel {
14032        self.client.as_channel()
14033    }
14034}
14035
14036impl SymlinkProxy {
14037    /// Create a new Proxy for fuchsia.io/Symlink.
14038    pub fn new(channel: fdomain_client::Channel) -> Self {
14039        let protocol_name = <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
14040        Self { client: fidl::client::Client::new(channel, protocol_name) }
14041    }
14042
14043    /// Get a Stream of events from the remote end of the protocol.
14044    ///
14045    /// # Panics
14046    ///
14047    /// Panics if the event stream was already taken.
14048    pub fn take_event_stream(&self) -> SymlinkEventStream {
14049        SymlinkEventStream { event_receiver: self.client.take_event_receiver() }
14050    }
14051
14052    /// Creates a link to this this object with name `dst` in the directory represented by
14053    /// `dst_parent_token`.
14054    ///
14055    /// `dst` must be a resolved object name. Including "/" in the string will return
14056    /// `ZX_ERR_INVALID_ARGS`.
14057    ///
14058    /// This method requires the maximal set of rights supported by the filesystem for this object.
14059    /// For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],
14060    /// [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also
14061    /// support the [`Rights.EXECUTE`] right. Insufficient rights will result in
14062    /// `ZX_ERR_ACCESS_DENIED`.
14063    ///
14064    /// If this object has no links and is *NOT* an unnamed temporary object (objects opened with
14065    /// `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.
14066    ///
14067    /// For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,
14068    /// the object will be permanently linked to the filesystem. Requires that the unnamed temporary
14069    /// object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.
14070    ///
14071    /// This method does not have the same atomicity properties has the `Directory::Link` method,
14072    /// which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`
14073    /// because `LinkInto` will not prevent the source from being renamed or unlinked.
14074    pub fn r#link_into(
14075        &self,
14076        mut dst_parent_token: fdomain_client::Event,
14077        mut dst: &str,
14078    ) -> fidl::client::QueryResponseFut<
14079        LinkableLinkIntoResult,
14080        fdomain_client::fidl::FDomainResourceDialect,
14081    > {
14082        SymlinkProxyInterface::r#link_into(self, dst_parent_token, dst)
14083    }
14084
14085    pub fn r#clone(
14086        &self,
14087        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
14088    ) -> Result<(), fidl::Error> {
14089        SymlinkProxyInterface::r#clone(self, request)
14090    }
14091
14092    /// Terminates the connection.
14093    ///
14094    /// After calling `Close`, the client must not send any other requests.
14095    ///
14096    /// Servers, after sending the status response, should close the connection
14097    /// regardless of status and without sending an epitaph.
14098    ///
14099    /// Closing the client end of the channel should be semantically equivalent
14100    /// to calling `Close` without knowing when the close has completed or its
14101    /// status.
14102    pub fn r#close(
14103        &self,
14104    ) -> fidl::client::QueryResponseFut<
14105        fdomain_fuchsia_unknown::CloseableCloseResult,
14106        fdomain_client::fidl::FDomainResourceDialect,
14107    > {
14108        SymlinkProxyInterface::r#close(self)
14109    }
14110
14111    pub fn r#query(
14112        &self,
14113    ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
14114        SymlinkProxyInterface::r#query(self)
14115    }
14116
14117    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
14118    pub fn r#deprecated_clone(
14119        &self,
14120        mut flags: OpenFlags,
14121        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
14122    ) -> Result<(), fidl::Error> {
14123        SymlinkProxyInterface::r#deprecated_clone(self, flags, object)
14124    }
14125
14126    /// DEPRECATED - Use `Node.GetAttributes` instead.
14127    pub fn r#deprecated_get_attr(
14128        &self,
14129    ) -> fidl::client::QueryResponseFut<
14130        (i32, NodeAttributes),
14131        fdomain_client::fidl::FDomainResourceDialect,
14132    > {
14133        SymlinkProxyInterface::r#deprecated_get_attr(self)
14134    }
14135
14136    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
14137    pub fn r#deprecated_set_attr(
14138        &self,
14139        mut flags: NodeAttributeFlags,
14140        mut attributes: &NodeAttributes,
14141    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
14142        SymlinkProxyInterface::r#deprecated_set_attr(self, flags, attributes)
14143    }
14144
14145    /// [DEPRECATED - Use new GetFlags method instead.]
14146    pub fn r#deprecated_get_flags(
14147        &self,
14148    ) -> fidl::client::QueryResponseFut<
14149        (i32, OpenFlags),
14150        fdomain_client::fidl::FDomainResourceDialect,
14151    > {
14152        SymlinkProxyInterface::r#deprecated_get_flags(self)
14153    }
14154
14155    /// [DEPRECATED - Use new SetFlags method instead.]
14156    pub fn r#deprecated_set_flags(
14157        &self,
14158        mut flags: OpenFlags,
14159    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
14160        SymlinkProxyInterface::r#deprecated_set_flags(self, flags)
14161    }
14162
14163    /// Queries the flags that apply to this node after it has been opened/created. This method does
14164    /// not require any rights.
14165    ///
14166    /// Note that the final set of flags that apply to the connection may differ from those
14167    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
14168    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
14169    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
14170    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
14171    pub fn r#get_flags(
14172        &self,
14173    ) -> fidl::client::QueryResponseFut<
14174        NodeGetFlagsResult,
14175        fdomain_client::fidl::FDomainResourceDialect,
14176    > {
14177        SymlinkProxyInterface::r#get_flags(self)
14178    }
14179
14180    /// Sets the flags that apply to this node after it has been opened. This method does not
14181    /// require any rights.
14182    ///
14183    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
14184    /// clear append mode.
14185    ///
14186    /// Errors:
14187    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
14188    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
14189    pub fn r#set_flags(
14190        &self,
14191        mut flags: Flags,
14192    ) -> fidl::client::QueryResponseFut<
14193        NodeSetFlagsResult,
14194        fdomain_client::fidl::FDomainResourceDialect,
14195    > {
14196        SymlinkProxyInterface::r#set_flags(self, flags)
14197    }
14198
14199    /// Query the filesystem for filesystem-specific information.
14200    pub fn r#query_filesystem(
14201        &self,
14202    ) -> fidl::client::QueryResponseFut<
14203        (i32, Option<Box<FilesystemInfo>>),
14204        fdomain_client::fidl::FDomainResourceDialect,
14205    > {
14206        SymlinkProxyInterface::r#query_filesystem(self)
14207    }
14208
14209    /// Acquires information about the node.
14210    ///
14211    /// The attributes of a node should be stable, independent of the
14212    /// specific protocol used to access it.
14213    ///
14214    /// If a particular attribute is not applicable or not supported,
14215    /// filesystems should leave the corresponding field absent.
14216    ///
14217    /// + `query` a bit-mask specifying which attributes to fetch. The server
14218    ///   should not return more than necessary.
14219    /// - `attributes` the returned attributes.
14220    ///
14221    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
14222    pub fn r#get_attributes(
14223        &self,
14224        mut query: NodeAttributesQuery,
14225    ) -> fidl::client::QueryResponseFut<
14226        NodeGetAttributesResult,
14227        fdomain_client::fidl::FDomainResourceDialect,
14228    > {
14229        SymlinkProxyInterface::r#get_attributes(self, query)
14230    }
14231
14232    /// Updates information about the node.
14233    ///
14234    /// + `attributes` the presence of a table field in `attributes` indicates
14235    /// the intent to update the corresponding attribute.
14236    ///
14237    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
14238    ///
14239    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
14240    pub fn r#update_attributes(
14241        &self,
14242        mut payload: &MutableNodeAttributes,
14243    ) -> fidl::client::QueryResponseFut<
14244        NodeUpdateAttributesResult,
14245        fdomain_client::fidl::FDomainResourceDialect,
14246    > {
14247        SymlinkProxyInterface::r#update_attributes(self, payload)
14248    }
14249
14250    /// Synchronizes updates to the node to the underlying media, if it exists.
14251    ///
14252    /// This method will return when the filesystem server has flushed the
14253    /// relevant updates to the underlying media, but does not guarantee the
14254    /// underlying media has persisted the information, nor that any information
14255    /// is committed to hardware. Clients may use `Sync` to ensure ordering
14256    /// between operations.
14257    ///
14258    /// This method does not require any rights.
14259    pub fn r#sync(
14260        &self,
14261    ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
14262    {
14263        SymlinkProxyInterface::r#sync(self)
14264    }
14265
14266    /// Creates an iterator over all the extended attribute names associated
14267    /// with this node. If an error occurs it is returned as an epitaph on the
14268    /// iterator request channel, and then the channel is closed.
14269    ///
14270    /// GetExtendedAttributes can be used with any of these names to retrieve
14271    /// the associated value.
14272    ///
14273    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
14274    pub fn r#list_extended_attributes(
14275        &self,
14276        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
14277    ) -> Result<(), fidl::Error> {
14278        SymlinkProxyInterface::r#list_extended_attributes(self, iterator)
14279    }
14280
14281    /// Get the value associated with the given attribute `name` for this node.
14282    ///
14283    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
14284    /// particular structure is imposed on them.
14285    ///
14286    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
14287    pub fn r#get_extended_attribute(
14288        &self,
14289        mut name: &[u8],
14290    ) -> fidl::client::QueryResponseFut<
14291        NodeGetExtendedAttributeResult,
14292        fdomain_client::fidl::FDomainResourceDialect,
14293    > {
14294        SymlinkProxyInterface::r#get_extended_attribute(self, name)
14295    }
14296
14297    /// Set the value for the given attribute `name` to `value` for this node.
14298    ///
14299    /// The attribute name may exist, in which case the attribute is updated.
14300    /// If the attribute doesn't exist, it is created. The name should have no
14301    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
14302    ///
14303    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
14304    pub fn r#set_extended_attribute(
14305        &self,
14306        mut name: &[u8],
14307        mut value: ExtendedAttributeValue,
14308        mut mode: SetExtendedAttributeMode,
14309    ) -> fidl::client::QueryResponseFut<
14310        NodeSetExtendedAttributeResult,
14311        fdomain_client::fidl::FDomainResourceDialect,
14312    > {
14313        SymlinkProxyInterface::r#set_extended_attribute(self, name, value, mode)
14314    }
14315
14316    /// Remove the specified extended attribute.
14317    ///
14318    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
14319    ///
14320    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
14321    pub fn r#remove_extended_attribute(
14322        &self,
14323        mut name: &[u8],
14324    ) -> fidl::client::QueryResponseFut<
14325        NodeRemoveExtendedAttributeResult,
14326        fdomain_client::fidl::FDomainResourceDialect,
14327    > {
14328        SymlinkProxyInterface::r#remove_extended_attribute(self, name)
14329    }
14330
14331    pub fn r#describe(
14332        &self,
14333    ) -> fidl::client::QueryResponseFut<SymlinkInfo, fdomain_client::fidl::FDomainResourceDialect>
14334    {
14335        SymlinkProxyInterface::r#describe(self)
14336    }
14337}
14338
14339impl SymlinkProxyInterface for SymlinkProxy {
14340    type LinkIntoResponseFut = fidl::client::QueryResponseFut<
14341        LinkableLinkIntoResult,
14342        fdomain_client::fidl::FDomainResourceDialect,
14343    >;
14344    fn r#link_into(
14345        &self,
14346        mut dst_parent_token: fdomain_client::Event,
14347        mut dst: &str,
14348    ) -> Self::LinkIntoResponseFut {
14349        fn _decode(
14350            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14351        ) -> Result<LinkableLinkIntoResult, fidl::Error> {
14352            let _response = fidl::client::decode_transaction_body::<
14353                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14354                fdomain_client::fidl::FDomainResourceDialect,
14355                0x54f3949246a03e74,
14356            >(_buf?)?;
14357            Ok(_response.map(|x| x))
14358        }
14359        self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
14360            (dst_parent_token, dst),
14361            0x54f3949246a03e74,
14362            fidl::encoding::DynamicFlags::empty(),
14363            _decode,
14364        )
14365    }
14366
14367    fn r#clone(
14368        &self,
14369        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
14370    ) -> Result<(), fidl::Error> {
14371        self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
14372            (request,),
14373            0x20d8a7aba2168a79,
14374            fidl::encoding::DynamicFlags::empty(),
14375        )
14376    }
14377
14378    type CloseResponseFut = fidl::client::QueryResponseFut<
14379        fdomain_fuchsia_unknown::CloseableCloseResult,
14380        fdomain_client::fidl::FDomainResourceDialect,
14381    >;
14382    fn r#close(&self) -> Self::CloseResponseFut {
14383        fn _decode(
14384            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14385        ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
14386            let _response = fidl::client::decode_transaction_body::<
14387                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14388                fdomain_client::fidl::FDomainResourceDialect,
14389                0x5ac5d459ad7f657e,
14390            >(_buf?)?;
14391            Ok(_response.map(|x| x))
14392        }
14393        self.client.send_query_and_decode::<
14394            fidl::encoding::EmptyPayload,
14395            fdomain_fuchsia_unknown::CloseableCloseResult,
14396        >(
14397            (),
14398            0x5ac5d459ad7f657e,
14399            fidl::encoding::DynamicFlags::empty(),
14400            _decode,
14401        )
14402    }
14403
14404    type QueryResponseFut =
14405        fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
14406    fn r#query(&self) -> Self::QueryResponseFut {
14407        fn _decode(
14408            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14409        ) -> Result<Vec<u8>, fidl::Error> {
14410            let _response = fidl::client::decode_transaction_body::<
14411                fdomain_fuchsia_unknown::QueryableQueryResponse,
14412                fdomain_client::fidl::FDomainResourceDialect,
14413                0x2658edee9decfc06,
14414            >(_buf?)?;
14415            Ok(_response.protocol)
14416        }
14417        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
14418            (),
14419            0x2658edee9decfc06,
14420            fidl::encoding::DynamicFlags::empty(),
14421            _decode,
14422        )
14423    }
14424
14425    fn r#deprecated_clone(
14426        &self,
14427        mut flags: OpenFlags,
14428        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
14429    ) -> Result<(), fidl::Error> {
14430        self.client.send::<NodeDeprecatedCloneRequest>(
14431            (flags, object),
14432            0x5a61678f293ce16f,
14433            fidl::encoding::DynamicFlags::FLEXIBLE,
14434        )
14435    }
14436
14437    type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
14438        (i32, NodeAttributes),
14439        fdomain_client::fidl::FDomainResourceDialect,
14440    >;
14441    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
14442        fn _decode(
14443            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14444        ) -> Result<(i32, NodeAttributes), fidl::Error> {
14445            let _response = fidl::client::decode_transaction_body::<
14446                NodeDeprecatedGetAttrResponse,
14447                fdomain_client::fidl::FDomainResourceDialect,
14448                0x78985e216314dafd,
14449            >(_buf?)?;
14450            Ok((_response.s, _response.attributes))
14451        }
14452        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
14453            (),
14454            0x78985e216314dafd,
14455            fidl::encoding::DynamicFlags::empty(),
14456            _decode,
14457        )
14458    }
14459
14460    type DeprecatedSetAttrResponseFut =
14461        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
14462    fn r#deprecated_set_attr(
14463        &self,
14464        mut flags: NodeAttributeFlags,
14465        mut attributes: &NodeAttributes,
14466    ) -> Self::DeprecatedSetAttrResponseFut {
14467        fn _decode(
14468            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14469        ) -> Result<i32, fidl::Error> {
14470            let _response = fidl::client::decode_transaction_body::<
14471                NodeDeprecatedSetAttrResponse,
14472                fdomain_client::fidl::FDomainResourceDialect,
14473                0x4186c0f40d938f46,
14474            >(_buf?)?;
14475            Ok(_response.s)
14476        }
14477        self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
14478            (flags, attributes),
14479            0x4186c0f40d938f46,
14480            fidl::encoding::DynamicFlags::empty(),
14481            _decode,
14482        )
14483    }
14484
14485    type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
14486        (i32, OpenFlags),
14487        fdomain_client::fidl::FDomainResourceDialect,
14488    >;
14489    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
14490        fn _decode(
14491            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14492        ) -> Result<(i32, OpenFlags), fidl::Error> {
14493            let _response = fidl::client::decode_transaction_body::<
14494                NodeDeprecatedGetFlagsResponse,
14495                fdomain_client::fidl::FDomainResourceDialect,
14496                0x5b88fffb8eda3aa1,
14497            >(_buf?)?;
14498            Ok((_response.s, _response.flags))
14499        }
14500        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
14501            (),
14502            0x5b88fffb8eda3aa1,
14503            fidl::encoding::DynamicFlags::empty(),
14504            _decode,
14505        )
14506    }
14507
14508    type DeprecatedSetFlagsResponseFut =
14509        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
14510    fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
14511        fn _decode(
14512            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14513        ) -> Result<i32, fidl::Error> {
14514            let _response = fidl::client::decode_transaction_body::<
14515                NodeDeprecatedSetFlagsResponse,
14516                fdomain_client::fidl::FDomainResourceDialect,
14517                0x5295b76c71fde733,
14518            >(_buf?)?;
14519            Ok(_response.s)
14520        }
14521        self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
14522            (flags,),
14523            0x5295b76c71fde733,
14524            fidl::encoding::DynamicFlags::empty(),
14525            _decode,
14526        )
14527    }
14528
14529    type GetFlagsResponseFut = fidl::client::QueryResponseFut<
14530        NodeGetFlagsResult,
14531        fdomain_client::fidl::FDomainResourceDialect,
14532    >;
14533    fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
14534        fn _decode(
14535            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14536        ) -> Result<NodeGetFlagsResult, fidl::Error> {
14537            let _response = fidl::client::decode_transaction_body::<
14538                fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
14539                fdomain_client::fidl::FDomainResourceDialect,
14540                0x176eb318f64ec23,
14541            >(_buf?)?
14542            .into_result_fdomain::<SymlinkMarker>("get_flags")?;
14543            Ok(_response.map(|x| x.flags))
14544        }
14545        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
14546            (),
14547            0x176eb318f64ec23,
14548            fidl::encoding::DynamicFlags::FLEXIBLE,
14549            _decode,
14550        )
14551    }
14552
14553    type SetFlagsResponseFut = fidl::client::QueryResponseFut<
14554        NodeSetFlagsResult,
14555        fdomain_client::fidl::FDomainResourceDialect,
14556    >;
14557    fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
14558        fn _decode(
14559            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14560        ) -> Result<NodeSetFlagsResult, fidl::Error> {
14561            let _response = fidl::client::decode_transaction_body::<
14562                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
14563                fdomain_client::fidl::FDomainResourceDialect,
14564                0x55a8028685791ea8,
14565            >(_buf?)?
14566            .into_result_fdomain::<SymlinkMarker>("set_flags")?;
14567            Ok(_response.map(|x| x))
14568        }
14569        self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
14570            (flags,),
14571            0x55a8028685791ea8,
14572            fidl::encoding::DynamicFlags::FLEXIBLE,
14573            _decode,
14574        )
14575    }
14576
14577    type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
14578        (i32, Option<Box<FilesystemInfo>>),
14579        fdomain_client::fidl::FDomainResourceDialect,
14580    >;
14581    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
14582        fn _decode(
14583            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14584        ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
14585            let _response = fidl::client::decode_transaction_body::<
14586                NodeQueryFilesystemResponse,
14587                fdomain_client::fidl::FDomainResourceDialect,
14588                0x6f344a1c6b0a0610,
14589            >(_buf?)?;
14590            Ok((_response.s, _response.info))
14591        }
14592        self.client.send_query_and_decode::<
14593            fidl::encoding::EmptyPayload,
14594            (i32, Option<Box<FilesystemInfo>>),
14595        >(
14596            (),
14597            0x6f344a1c6b0a0610,
14598            fidl::encoding::DynamicFlags::empty(),
14599            _decode,
14600        )
14601    }
14602
14603    type GetAttributesResponseFut = fidl::client::QueryResponseFut<
14604        NodeGetAttributesResult,
14605        fdomain_client::fidl::FDomainResourceDialect,
14606    >;
14607    fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
14608        fn _decode(
14609            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14610        ) -> Result<NodeGetAttributesResult, fidl::Error> {
14611            let _response = fidl::client::decode_transaction_body::<
14612                fidl::encoding::ResultType<NodeAttributes2, i32>,
14613                fdomain_client::fidl::FDomainResourceDialect,
14614                0x3d4396a638ea053b,
14615            >(_buf?)?;
14616            Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
14617        }
14618        self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
14619            (query,),
14620            0x3d4396a638ea053b,
14621            fidl::encoding::DynamicFlags::empty(),
14622            _decode,
14623        )
14624    }
14625
14626    type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
14627        NodeUpdateAttributesResult,
14628        fdomain_client::fidl::FDomainResourceDialect,
14629    >;
14630    fn r#update_attributes(
14631        &self,
14632        mut payload: &MutableNodeAttributes,
14633    ) -> Self::UpdateAttributesResponseFut {
14634        fn _decode(
14635            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14636        ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
14637            let _response = fidl::client::decode_transaction_body::<
14638                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14639                fdomain_client::fidl::FDomainResourceDialect,
14640                0x3308c1da5a89bf08,
14641            >(_buf?)?;
14642            Ok(_response.map(|x| x))
14643        }
14644        self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
14645            payload,
14646            0x3308c1da5a89bf08,
14647            fidl::encoding::DynamicFlags::empty(),
14648            _decode,
14649        )
14650    }
14651
14652    type SyncResponseFut = fidl::client::QueryResponseFut<
14653        NodeSyncResult,
14654        fdomain_client::fidl::FDomainResourceDialect,
14655    >;
14656    fn r#sync(&self) -> Self::SyncResponseFut {
14657        fn _decode(
14658            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14659        ) -> Result<NodeSyncResult, fidl::Error> {
14660            let _response = fidl::client::decode_transaction_body::<
14661                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14662                fdomain_client::fidl::FDomainResourceDialect,
14663                0x2c5c27ca0ab5dc49,
14664            >(_buf?)?;
14665            Ok(_response.map(|x| x))
14666        }
14667        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
14668            (),
14669            0x2c5c27ca0ab5dc49,
14670            fidl::encoding::DynamicFlags::empty(),
14671            _decode,
14672        )
14673    }
14674
14675    fn r#list_extended_attributes(
14676        &self,
14677        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
14678    ) -> Result<(), fidl::Error> {
14679        self.client.send::<NodeListExtendedAttributesRequest>(
14680            (iterator,),
14681            0x4b61033de007fcd0,
14682            fidl::encoding::DynamicFlags::empty(),
14683        )
14684    }
14685
14686    type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14687        NodeGetExtendedAttributeResult,
14688        fdomain_client::fidl::FDomainResourceDialect,
14689    >;
14690    fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
14691        fn _decode(
14692            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14693        ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
14694            let _response = fidl::client::decode_transaction_body::<
14695                fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
14696                fdomain_client::fidl::FDomainResourceDialect,
14697                0x45ffa3ccfdeb76db,
14698            >(_buf?)?;
14699            Ok(_response.map(|x| x))
14700        }
14701        self.client.send_query_and_decode::<
14702            NodeGetExtendedAttributeRequest,
14703            NodeGetExtendedAttributeResult,
14704        >(
14705            (name,),
14706            0x45ffa3ccfdeb76db,
14707            fidl::encoding::DynamicFlags::empty(),
14708            _decode,
14709        )
14710    }
14711
14712    type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14713        NodeSetExtendedAttributeResult,
14714        fdomain_client::fidl::FDomainResourceDialect,
14715    >;
14716    fn r#set_extended_attribute(
14717        &self,
14718        mut name: &[u8],
14719        mut value: ExtendedAttributeValue,
14720        mut mode: SetExtendedAttributeMode,
14721    ) -> Self::SetExtendedAttributeResponseFut {
14722        fn _decode(
14723            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14724        ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
14725            let _response = fidl::client::decode_transaction_body::<
14726                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14727                fdomain_client::fidl::FDomainResourceDialect,
14728                0x4a951362f681f23c,
14729            >(_buf?)?;
14730            Ok(_response.map(|x| x))
14731        }
14732        self.client.send_query_and_decode::<
14733            NodeSetExtendedAttributeRequest,
14734            NodeSetExtendedAttributeResult,
14735        >(
14736            (name, &mut value, mode,),
14737            0x4a951362f681f23c,
14738            fidl::encoding::DynamicFlags::empty(),
14739            _decode,
14740        )
14741    }
14742
14743    type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14744        NodeRemoveExtendedAttributeResult,
14745        fdomain_client::fidl::FDomainResourceDialect,
14746    >;
14747    fn r#remove_extended_attribute(
14748        &self,
14749        mut name: &[u8],
14750    ) -> Self::RemoveExtendedAttributeResponseFut {
14751        fn _decode(
14752            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14753        ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
14754            let _response = fidl::client::decode_transaction_body::<
14755                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14756                fdomain_client::fidl::FDomainResourceDialect,
14757                0x7a0b9f3a9bf9032d,
14758            >(_buf?)?;
14759            Ok(_response.map(|x| x))
14760        }
14761        self.client.send_query_and_decode::<
14762            NodeRemoveExtendedAttributeRequest,
14763            NodeRemoveExtendedAttributeResult,
14764        >(
14765            (name,),
14766            0x7a0b9f3a9bf9032d,
14767            fidl::encoding::DynamicFlags::empty(),
14768            _decode,
14769        )
14770    }
14771
14772    type DescribeResponseFut =
14773        fidl::client::QueryResponseFut<SymlinkInfo, fdomain_client::fidl::FDomainResourceDialect>;
14774    fn r#describe(&self) -> Self::DescribeResponseFut {
14775        fn _decode(
14776            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14777        ) -> Result<SymlinkInfo, fidl::Error> {
14778            let _response = fidl::client::decode_transaction_body::<
14779                fidl::encoding::FlexibleType<SymlinkInfo>,
14780                fdomain_client::fidl::FDomainResourceDialect,
14781                0x742c2ea5e89831f3,
14782            >(_buf?)?
14783            .into_result_fdomain::<SymlinkMarker>("describe")?;
14784            Ok(_response)
14785        }
14786        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SymlinkInfo>(
14787            (),
14788            0x742c2ea5e89831f3,
14789            fidl::encoding::DynamicFlags::FLEXIBLE,
14790            _decode,
14791        )
14792    }
14793}
14794
14795pub struct SymlinkEventStream {
14796    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
14797}
14798
14799impl std::marker::Unpin for SymlinkEventStream {}
14800
14801impl futures::stream::FusedStream for SymlinkEventStream {
14802    fn is_terminated(&self) -> bool {
14803        self.event_receiver.is_terminated()
14804    }
14805}
14806
14807impl futures::Stream for SymlinkEventStream {
14808    type Item = Result<SymlinkEvent, fidl::Error>;
14809
14810    fn poll_next(
14811        mut self: std::pin::Pin<&mut Self>,
14812        cx: &mut std::task::Context<'_>,
14813    ) -> std::task::Poll<Option<Self::Item>> {
14814        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
14815            &mut self.event_receiver,
14816            cx
14817        )?) {
14818            Some(buf) => std::task::Poll::Ready(Some(SymlinkEvent::decode(buf))),
14819            None => std::task::Poll::Ready(None),
14820        }
14821    }
14822}
14823
14824#[derive(Debug)]
14825pub enum SymlinkEvent {
14826    OnOpen_ {
14827        s: i32,
14828        info: Option<Box<NodeInfoDeprecated>>,
14829    },
14830    OnRepresentation {
14831        payload: Representation,
14832    },
14833    #[non_exhaustive]
14834    _UnknownEvent {
14835        /// Ordinal of the event that was sent.
14836        ordinal: u64,
14837    },
14838}
14839
14840impl SymlinkEvent {
14841    #[allow(irrefutable_let_patterns)]
14842    pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
14843        if let SymlinkEvent::OnOpen_ { s, info } = self {
14844            Some((s, info))
14845        } else {
14846            None
14847        }
14848    }
14849    #[allow(irrefutable_let_patterns)]
14850    pub fn into_on_representation(self) -> Option<Representation> {
14851        if let SymlinkEvent::OnRepresentation { payload } = self {
14852            Some((payload))
14853        } else {
14854            None
14855        }
14856    }
14857
14858    /// Decodes a message buffer as a [`SymlinkEvent`].
14859    fn decode(
14860        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
14861    ) -> Result<SymlinkEvent, fidl::Error> {
14862        let (bytes, _handles) = buf.split_mut();
14863        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14864        debug_assert_eq!(tx_header.tx_id, 0);
14865        match tx_header.ordinal {
14866            0x7fc7bbb1dbfd1972 => {
14867                let mut out = fidl::new_empty!(
14868                    NodeOnOpenRequest,
14869                    fdomain_client::fidl::FDomainResourceDialect
14870                );
14871                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
14872                Ok((SymlinkEvent::OnOpen_ { s: out.s, info: out.info }))
14873            }
14874            0x5cb40567d80a510c => {
14875                let mut out =
14876                    fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
14877                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
14878                Ok((SymlinkEvent::OnRepresentation { payload: out }))
14879            }
14880            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
14881                Ok(SymlinkEvent::_UnknownEvent { ordinal: tx_header.ordinal })
14882            }
14883            _ => Err(fidl::Error::UnknownOrdinal {
14884                ordinal: tx_header.ordinal,
14885                protocol_name: <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
14886            }),
14887        }
14888    }
14889}
14890
14891/// A Stream of incoming requests for fuchsia.io/Symlink.
14892pub struct SymlinkRequestStream {
14893    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
14894    is_terminated: bool,
14895}
14896
14897impl std::marker::Unpin for SymlinkRequestStream {}
14898
14899impl futures::stream::FusedStream for SymlinkRequestStream {
14900    fn is_terminated(&self) -> bool {
14901        self.is_terminated
14902    }
14903}
14904
14905impl fdomain_client::fidl::RequestStream for SymlinkRequestStream {
14906    type Protocol = SymlinkMarker;
14907    type ControlHandle = SymlinkControlHandle;
14908
14909    fn from_channel(channel: fdomain_client::Channel) -> Self {
14910        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
14911    }
14912
14913    fn control_handle(&self) -> Self::ControlHandle {
14914        SymlinkControlHandle { inner: self.inner.clone() }
14915    }
14916
14917    fn into_inner(
14918        self,
14919    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
14920    {
14921        (self.inner, self.is_terminated)
14922    }
14923
14924    fn from_inner(
14925        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
14926        is_terminated: bool,
14927    ) -> Self {
14928        Self { inner, is_terminated }
14929    }
14930}
14931
14932impl futures::Stream for SymlinkRequestStream {
14933    type Item = Result<SymlinkRequest, fidl::Error>;
14934
14935    fn poll_next(
14936        mut self: std::pin::Pin<&mut Self>,
14937        cx: &mut std::task::Context<'_>,
14938    ) -> std::task::Poll<Option<Self::Item>> {
14939        let this = &mut *self;
14940        if this.inner.check_shutdown(cx) {
14941            this.is_terminated = true;
14942            return std::task::Poll::Ready(None);
14943        }
14944        if this.is_terminated {
14945            panic!("polled SymlinkRequestStream after completion");
14946        }
14947        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
14948            |bytes, handles| {
14949                match this.inner.channel().read_etc(cx, bytes, handles) {
14950                    std::task::Poll::Ready(Ok(())) => {}
14951                    std::task::Poll::Pending => return std::task::Poll::Pending,
14952                    std::task::Poll::Ready(Err(None)) => {
14953                        this.is_terminated = true;
14954                        return std::task::Poll::Ready(None);
14955                    }
14956                    std::task::Poll::Ready(Err(Some(e))) => {
14957                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
14958                            e.into(),
14959                        ))))
14960                    }
14961                }
14962
14963                // A message has been received from the channel
14964                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14965
14966                std::task::Poll::Ready(Some(match header.ordinal {
14967                    0x54f3949246a03e74 => {
14968                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14969                        let mut req = fidl::new_empty!(
14970                            LinkableLinkIntoRequest,
14971                            fdomain_client::fidl::FDomainResourceDialect
14972                        );
14973                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
14974                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14975                        Ok(SymlinkRequest::LinkInto {
14976                            dst_parent_token: req.dst_parent_token,
14977                            dst: req.dst,
14978
14979                            responder: SymlinkLinkIntoResponder {
14980                                control_handle: std::mem::ManuallyDrop::new(control_handle),
14981                                tx_id: header.tx_id,
14982                            },
14983                        })
14984                    }
14985                    0x20d8a7aba2168a79 => {
14986                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14987                        let mut req = fidl::new_empty!(
14988                            fdomain_fuchsia_unknown::CloneableCloneRequest,
14989                            fdomain_client::fidl::FDomainResourceDialect
14990                        );
14991                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14992                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14993                        Ok(SymlinkRequest::Clone { request: req.request, control_handle })
14994                    }
14995                    0x5ac5d459ad7f657e => {
14996                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14997                        let mut req = fidl::new_empty!(
14998                            fidl::encoding::EmptyPayload,
14999                            fdomain_client::fidl::FDomainResourceDialect
15000                        );
15001                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15002                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15003                        Ok(SymlinkRequest::Close {
15004                            responder: SymlinkCloseResponder {
15005                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15006                                tx_id: header.tx_id,
15007                            },
15008                        })
15009                    }
15010                    0x2658edee9decfc06 => {
15011                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15012                        let mut req = fidl::new_empty!(
15013                            fidl::encoding::EmptyPayload,
15014                            fdomain_client::fidl::FDomainResourceDialect
15015                        );
15016                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15017                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15018                        Ok(SymlinkRequest::Query {
15019                            responder: SymlinkQueryResponder {
15020                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15021                                tx_id: header.tx_id,
15022                            },
15023                        })
15024                    }
15025                    0x5a61678f293ce16f => {
15026                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
15027                        let mut req = fidl::new_empty!(
15028                            NodeDeprecatedCloneRequest,
15029                            fdomain_client::fidl::FDomainResourceDialect
15030                        );
15031                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
15032                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15033                        Ok(SymlinkRequest::DeprecatedClone {
15034                            flags: req.flags,
15035                            object: req.object,
15036
15037                            control_handle,
15038                        })
15039                    }
15040                    0x78985e216314dafd => {
15041                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15042                        let mut req = fidl::new_empty!(
15043                            fidl::encoding::EmptyPayload,
15044                            fdomain_client::fidl::FDomainResourceDialect
15045                        );
15046                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15047                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15048                        Ok(SymlinkRequest::DeprecatedGetAttr {
15049                            responder: SymlinkDeprecatedGetAttrResponder {
15050                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15051                                tx_id: header.tx_id,
15052                            },
15053                        })
15054                    }
15055                    0x4186c0f40d938f46 => {
15056                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15057                        let mut req = fidl::new_empty!(
15058                            NodeDeprecatedSetAttrRequest,
15059                            fdomain_client::fidl::FDomainResourceDialect
15060                        );
15061                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
15062                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15063                        Ok(SymlinkRequest::DeprecatedSetAttr {
15064                            flags: req.flags,
15065                            attributes: req.attributes,
15066
15067                            responder: SymlinkDeprecatedSetAttrResponder {
15068                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15069                                tx_id: header.tx_id,
15070                            },
15071                        })
15072                    }
15073                    0x5b88fffb8eda3aa1 => {
15074                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15075                        let mut req = fidl::new_empty!(
15076                            fidl::encoding::EmptyPayload,
15077                            fdomain_client::fidl::FDomainResourceDialect
15078                        );
15079                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15080                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15081                        Ok(SymlinkRequest::DeprecatedGetFlags {
15082                            responder: SymlinkDeprecatedGetFlagsResponder {
15083                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15084                                tx_id: header.tx_id,
15085                            },
15086                        })
15087                    }
15088                    0x5295b76c71fde733 => {
15089                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15090                        let mut req = fidl::new_empty!(
15091                            NodeDeprecatedSetFlagsRequest,
15092                            fdomain_client::fidl::FDomainResourceDialect
15093                        );
15094                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
15095                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15096                        Ok(SymlinkRequest::DeprecatedSetFlags {
15097                            flags: req.flags,
15098
15099                            responder: SymlinkDeprecatedSetFlagsResponder {
15100                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15101                                tx_id: header.tx_id,
15102                            },
15103                        })
15104                    }
15105                    0x176eb318f64ec23 => {
15106                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15107                        let mut req = fidl::new_empty!(
15108                            fidl::encoding::EmptyPayload,
15109                            fdomain_client::fidl::FDomainResourceDialect
15110                        );
15111                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15112                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15113                        Ok(SymlinkRequest::GetFlags {
15114                            responder: SymlinkGetFlagsResponder {
15115                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15116                                tx_id: header.tx_id,
15117                            },
15118                        })
15119                    }
15120                    0x55a8028685791ea8 => {
15121                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15122                        let mut req = fidl::new_empty!(
15123                            NodeSetFlagsRequest,
15124                            fdomain_client::fidl::FDomainResourceDialect
15125                        );
15126                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
15127                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15128                        Ok(SymlinkRequest::SetFlags {
15129                            flags: req.flags,
15130
15131                            responder: SymlinkSetFlagsResponder {
15132                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15133                                tx_id: header.tx_id,
15134                            },
15135                        })
15136                    }
15137                    0x6f344a1c6b0a0610 => {
15138                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15139                        let mut req = fidl::new_empty!(
15140                            fidl::encoding::EmptyPayload,
15141                            fdomain_client::fidl::FDomainResourceDialect
15142                        );
15143                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15144                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15145                        Ok(SymlinkRequest::QueryFilesystem {
15146                            responder: SymlinkQueryFilesystemResponder {
15147                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15148                                tx_id: header.tx_id,
15149                            },
15150                        })
15151                    }
15152                    0x3d4396a638ea053b => {
15153                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15154                        let mut req = fidl::new_empty!(
15155                            NodeGetAttributesRequest,
15156                            fdomain_client::fidl::FDomainResourceDialect
15157                        );
15158                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
15159                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15160                        Ok(SymlinkRequest::GetAttributes {
15161                            query: req.query,
15162
15163                            responder: SymlinkGetAttributesResponder {
15164                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15165                                tx_id: header.tx_id,
15166                            },
15167                        })
15168                    }
15169                    0x3308c1da5a89bf08 => {
15170                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15171                        let mut req = fidl::new_empty!(
15172                            MutableNodeAttributes,
15173                            fdomain_client::fidl::FDomainResourceDialect
15174                        );
15175                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
15176                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15177                        Ok(SymlinkRequest::UpdateAttributes {
15178                            payload: req,
15179                            responder: SymlinkUpdateAttributesResponder {
15180                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15181                                tx_id: header.tx_id,
15182                            },
15183                        })
15184                    }
15185                    0x2c5c27ca0ab5dc49 => {
15186                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15187                        let mut req = fidl::new_empty!(
15188                            fidl::encoding::EmptyPayload,
15189                            fdomain_client::fidl::FDomainResourceDialect
15190                        );
15191                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15192                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15193                        Ok(SymlinkRequest::Sync {
15194                            responder: SymlinkSyncResponder {
15195                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15196                                tx_id: header.tx_id,
15197                            },
15198                        })
15199                    }
15200                    0x4b61033de007fcd0 => {
15201                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
15202                        let mut req = fidl::new_empty!(
15203                            NodeListExtendedAttributesRequest,
15204                            fdomain_client::fidl::FDomainResourceDialect
15205                        );
15206                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
15207                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15208                        Ok(SymlinkRequest::ListExtendedAttributes {
15209                            iterator: req.iterator,
15210
15211                            control_handle,
15212                        })
15213                    }
15214                    0x45ffa3ccfdeb76db => {
15215                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15216                        let mut req = fidl::new_empty!(
15217                            NodeGetExtendedAttributeRequest,
15218                            fdomain_client::fidl::FDomainResourceDialect
15219                        );
15220                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15221                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15222                        Ok(SymlinkRequest::GetExtendedAttribute {
15223                            name: req.name,
15224
15225                            responder: SymlinkGetExtendedAttributeResponder {
15226                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15227                                tx_id: header.tx_id,
15228                            },
15229                        })
15230                    }
15231                    0x4a951362f681f23c => {
15232                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15233                        let mut req = fidl::new_empty!(
15234                            NodeSetExtendedAttributeRequest,
15235                            fdomain_client::fidl::FDomainResourceDialect
15236                        );
15237                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15238                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15239                        Ok(SymlinkRequest::SetExtendedAttribute {
15240                            name: req.name,
15241                            value: req.value,
15242                            mode: req.mode,
15243
15244                            responder: SymlinkSetExtendedAttributeResponder {
15245                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15246                                tx_id: header.tx_id,
15247                            },
15248                        })
15249                    }
15250                    0x7a0b9f3a9bf9032d => {
15251                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15252                        let mut req = fidl::new_empty!(
15253                            NodeRemoveExtendedAttributeRequest,
15254                            fdomain_client::fidl::FDomainResourceDialect
15255                        );
15256                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15257                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15258                        Ok(SymlinkRequest::RemoveExtendedAttribute {
15259                            name: req.name,
15260
15261                            responder: SymlinkRemoveExtendedAttributeResponder {
15262                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15263                                tx_id: header.tx_id,
15264                            },
15265                        })
15266                    }
15267                    0x742c2ea5e89831f3 => {
15268                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15269                        let mut req = fidl::new_empty!(
15270                            fidl::encoding::EmptyPayload,
15271                            fdomain_client::fidl::FDomainResourceDialect
15272                        );
15273                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15274                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15275                        Ok(SymlinkRequest::Describe {
15276                            responder: SymlinkDescribeResponder {
15277                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15278                                tx_id: header.tx_id,
15279                            },
15280                        })
15281                    }
15282                    _ if header.tx_id == 0
15283                        && header
15284                            .dynamic_flags()
15285                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
15286                    {
15287                        Ok(SymlinkRequest::_UnknownMethod {
15288                            ordinal: header.ordinal,
15289                            control_handle: SymlinkControlHandle { inner: this.inner.clone() },
15290                            method_type: fidl::MethodType::OneWay,
15291                        })
15292                    }
15293                    _ if header
15294                        .dynamic_flags()
15295                        .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
15296                    {
15297                        this.inner.send_framework_err(
15298                            fidl::encoding::FrameworkErr::UnknownMethod,
15299                            header.tx_id,
15300                            header.ordinal,
15301                            header.dynamic_flags(),
15302                            (bytes, handles),
15303                        )?;
15304                        Ok(SymlinkRequest::_UnknownMethod {
15305                            ordinal: header.ordinal,
15306                            control_handle: SymlinkControlHandle { inner: this.inner.clone() },
15307                            method_type: fidl::MethodType::TwoWay,
15308                        })
15309                    }
15310                    _ => Err(fidl::Error::UnknownOrdinal {
15311                        ordinal: header.ordinal,
15312                        protocol_name:
15313                            <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
15314                    }),
15315                }))
15316            },
15317        )
15318    }
15319}
15320
15321/// A ['Node'] which contains a symbolic link.
15322#[derive(Debug)]
15323pub enum SymlinkRequest {
15324    /// Creates a link to this this object with name `dst` in the directory represented by
15325    /// `dst_parent_token`.
15326    ///
15327    /// `dst` must be a resolved object name. Including "/" in the string will return
15328    /// `ZX_ERR_INVALID_ARGS`.
15329    ///
15330    /// This method requires the maximal set of rights supported by the filesystem for this object.
15331    /// For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],
15332    /// [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also
15333    /// support the [`Rights.EXECUTE`] right. Insufficient rights will result in
15334    /// `ZX_ERR_ACCESS_DENIED`.
15335    ///
15336    /// If this object has no links and is *NOT* an unnamed temporary object (objects opened with
15337    /// `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.
15338    ///
15339    /// For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,
15340    /// the object will be permanently linked to the filesystem. Requires that the unnamed temporary
15341    /// object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.
15342    ///
15343    /// This method does not have the same atomicity properties has the `Directory::Link` method,
15344    /// which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`
15345    /// because `LinkInto` will not prevent the source from being renamed or unlinked.
15346    LinkInto {
15347        dst_parent_token: fdomain_client::Event,
15348        dst: String,
15349        responder: SymlinkLinkIntoResponder,
15350    },
15351    Clone {
15352        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
15353        control_handle: SymlinkControlHandle,
15354    },
15355    /// Terminates the connection.
15356    ///
15357    /// After calling `Close`, the client must not send any other requests.
15358    ///
15359    /// Servers, after sending the status response, should close the connection
15360    /// regardless of status and without sending an epitaph.
15361    ///
15362    /// Closing the client end of the channel should be semantically equivalent
15363    /// to calling `Close` without knowing when the close has completed or its
15364    /// status.
15365    Close {
15366        responder: SymlinkCloseResponder,
15367    },
15368    Query {
15369        responder: SymlinkQueryResponder,
15370    },
15371    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
15372    DeprecatedClone {
15373        flags: OpenFlags,
15374        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
15375        control_handle: SymlinkControlHandle,
15376    },
15377    /// DEPRECATED - Use `Node.GetAttributes` instead.
15378    DeprecatedGetAttr {
15379        responder: SymlinkDeprecatedGetAttrResponder,
15380    },
15381    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
15382    DeprecatedSetAttr {
15383        flags: NodeAttributeFlags,
15384        attributes: NodeAttributes,
15385        responder: SymlinkDeprecatedSetAttrResponder,
15386    },
15387    /// [DEPRECATED - Use new GetFlags method instead.]
15388    DeprecatedGetFlags {
15389        responder: SymlinkDeprecatedGetFlagsResponder,
15390    },
15391    /// [DEPRECATED - Use new SetFlags method instead.]
15392    DeprecatedSetFlags {
15393        flags: OpenFlags,
15394        responder: SymlinkDeprecatedSetFlagsResponder,
15395    },
15396    /// Queries the flags that apply to this node after it has been opened/created. This method does
15397    /// not require any rights.
15398    ///
15399    /// Note that the final set of flags that apply to the connection may differ from those
15400    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
15401    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
15402    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
15403    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
15404    GetFlags {
15405        responder: SymlinkGetFlagsResponder,
15406    },
15407    /// Sets the flags that apply to this node after it has been opened. This method does not
15408    /// require any rights.
15409    ///
15410    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
15411    /// clear append mode.
15412    ///
15413    /// Errors:
15414    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
15415    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
15416    SetFlags {
15417        flags: Flags,
15418        responder: SymlinkSetFlagsResponder,
15419    },
15420    /// Query the filesystem for filesystem-specific information.
15421    QueryFilesystem {
15422        responder: SymlinkQueryFilesystemResponder,
15423    },
15424    /// Acquires information about the node.
15425    ///
15426    /// The attributes of a node should be stable, independent of the
15427    /// specific protocol used to access it.
15428    ///
15429    /// If a particular attribute is not applicable or not supported,
15430    /// filesystems should leave the corresponding field absent.
15431    ///
15432    /// + `query` a bit-mask specifying which attributes to fetch. The server
15433    ///   should not return more than necessary.
15434    /// - `attributes` the returned attributes.
15435    ///
15436    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
15437    GetAttributes {
15438        query: NodeAttributesQuery,
15439        responder: SymlinkGetAttributesResponder,
15440    },
15441    /// Updates information about the node.
15442    ///
15443    /// + `attributes` the presence of a table field in `attributes` indicates
15444    /// the intent to update the corresponding attribute.
15445    ///
15446    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
15447    ///
15448    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
15449    UpdateAttributes {
15450        payload: MutableNodeAttributes,
15451        responder: SymlinkUpdateAttributesResponder,
15452    },
15453    /// Synchronizes updates to the node to the underlying media, if it exists.
15454    ///
15455    /// This method will return when the filesystem server has flushed the
15456    /// relevant updates to the underlying media, but does not guarantee the
15457    /// underlying media has persisted the information, nor that any information
15458    /// is committed to hardware. Clients may use `Sync` to ensure ordering
15459    /// between operations.
15460    ///
15461    /// This method does not require any rights.
15462    Sync {
15463        responder: SymlinkSyncResponder,
15464    },
15465    /// Creates an iterator over all the extended attribute names associated
15466    /// with this node. If an error occurs it is returned as an epitaph on the
15467    /// iterator request channel, and then the channel is closed.
15468    ///
15469    /// GetExtendedAttributes can be used with any of these names to retrieve
15470    /// the associated value.
15471    ///
15472    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
15473    ListExtendedAttributes {
15474        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
15475        control_handle: SymlinkControlHandle,
15476    },
15477    /// Get the value associated with the given attribute `name` for this node.
15478    ///
15479    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
15480    /// particular structure is imposed on them.
15481    ///
15482    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
15483    GetExtendedAttribute {
15484        name: Vec<u8>,
15485        responder: SymlinkGetExtendedAttributeResponder,
15486    },
15487    /// Set the value for the given attribute `name` to `value` for this node.
15488    ///
15489    /// The attribute name may exist, in which case the attribute is updated.
15490    /// If the attribute doesn't exist, it is created. The name should have no
15491    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
15492    ///
15493    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
15494    SetExtendedAttribute {
15495        name: Vec<u8>,
15496        value: ExtendedAttributeValue,
15497        mode: SetExtendedAttributeMode,
15498        responder: SymlinkSetExtendedAttributeResponder,
15499    },
15500    /// Remove the specified extended attribute.
15501    ///
15502    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
15503    ///
15504    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
15505    RemoveExtendedAttribute {
15506        name: Vec<u8>,
15507        responder: SymlinkRemoveExtendedAttributeResponder,
15508    },
15509    Describe {
15510        responder: SymlinkDescribeResponder,
15511    },
15512    /// An interaction was received which does not match any known method.
15513    #[non_exhaustive]
15514    _UnknownMethod {
15515        /// Ordinal of the method that was called.
15516        ordinal: u64,
15517        control_handle: SymlinkControlHandle,
15518        method_type: fidl::MethodType,
15519    },
15520}
15521
15522impl SymlinkRequest {
15523    #[allow(irrefutable_let_patterns)]
15524    pub fn into_link_into(
15525        self,
15526    ) -> Option<(fdomain_client::Event, String, SymlinkLinkIntoResponder)> {
15527        if let SymlinkRequest::LinkInto { dst_parent_token, dst, responder } = self {
15528            Some((dst_parent_token, dst, responder))
15529        } else {
15530            None
15531        }
15532    }
15533
15534    #[allow(irrefutable_let_patterns)]
15535    pub fn into_clone(
15536        self,
15537    ) -> Option<(
15538        fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
15539        SymlinkControlHandle,
15540    )> {
15541        if let SymlinkRequest::Clone { request, control_handle } = self {
15542            Some((request, control_handle))
15543        } else {
15544            None
15545        }
15546    }
15547
15548    #[allow(irrefutable_let_patterns)]
15549    pub fn into_close(self) -> Option<(SymlinkCloseResponder)> {
15550        if let SymlinkRequest::Close { responder } = self {
15551            Some((responder))
15552        } else {
15553            None
15554        }
15555    }
15556
15557    #[allow(irrefutable_let_patterns)]
15558    pub fn into_query(self) -> Option<(SymlinkQueryResponder)> {
15559        if let SymlinkRequest::Query { responder } = self {
15560            Some((responder))
15561        } else {
15562            None
15563        }
15564    }
15565
15566    #[allow(irrefutable_let_patterns)]
15567    pub fn into_deprecated_clone(
15568        self,
15569    ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, SymlinkControlHandle)>
15570    {
15571        if let SymlinkRequest::DeprecatedClone { flags, object, control_handle } = self {
15572            Some((flags, object, control_handle))
15573        } else {
15574            None
15575        }
15576    }
15577
15578    #[allow(irrefutable_let_patterns)]
15579    pub fn into_deprecated_get_attr(self) -> Option<(SymlinkDeprecatedGetAttrResponder)> {
15580        if let SymlinkRequest::DeprecatedGetAttr { responder } = self {
15581            Some((responder))
15582        } else {
15583            None
15584        }
15585    }
15586
15587    #[allow(irrefutable_let_patterns)]
15588    pub fn into_deprecated_set_attr(
15589        self,
15590    ) -> Option<(NodeAttributeFlags, NodeAttributes, SymlinkDeprecatedSetAttrResponder)> {
15591        if let SymlinkRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
15592            Some((flags, attributes, responder))
15593        } else {
15594            None
15595        }
15596    }
15597
15598    #[allow(irrefutable_let_patterns)]
15599    pub fn into_deprecated_get_flags(self) -> Option<(SymlinkDeprecatedGetFlagsResponder)> {
15600        if let SymlinkRequest::DeprecatedGetFlags { responder } = self {
15601            Some((responder))
15602        } else {
15603            None
15604        }
15605    }
15606
15607    #[allow(irrefutable_let_patterns)]
15608    pub fn into_deprecated_set_flags(
15609        self,
15610    ) -> Option<(OpenFlags, SymlinkDeprecatedSetFlagsResponder)> {
15611        if let SymlinkRequest::DeprecatedSetFlags { flags, responder } = self {
15612            Some((flags, responder))
15613        } else {
15614            None
15615        }
15616    }
15617
15618    #[allow(irrefutable_let_patterns)]
15619    pub fn into_get_flags(self) -> Option<(SymlinkGetFlagsResponder)> {
15620        if let SymlinkRequest::GetFlags { responder } = self {
15621            Some((responder))
15622        } else {
15623            None
15624        }
15625    }
15626
15627    #[allow(irrefutable_let_patterns)]
15628    pub fn into_set_flags(self) -> Option<(Flags, SymlinkSetFlagsResponder)> {
15629        if let SymlinkRequest::SetFlags { flags, responder } = self {
15630            Some((flags, responder))
15631        } else {
15632            None
15633        }
15634    }
15635
15636    #[allow(irrefutable_let_patterns)]
15637    pub fn into_query_filesystem(self) -> Option<(SymlinkQueryFilesystemResponder)> {
15638        if let SymlinkRequest::QueryFilesystem { responder } = self {
15639            Some((responder))
15640        } else {
15641            None
15642        }
15643    }
15644
15645    #[allow(irrefutable_let_patterns)]
15646    pub fn into_get_attributes(
15647        self,
15648    ) -> Option<(NodeAttributesQuery, SymlinkGetAttributesResponder)> {
15649        if let SymlinkRequest::GetAttributes { query, responder } = self {
15650            Some((query, responder))
15651        } else {
15652            None
15653        }
15654    }
15655
15656    #[allow(irrefutable_let_patterns)]
15657    pub fn into_update_attributes(
15658        self,
15659    ) -> Option<(MutableNodeAttributes, SymlinkUpdateAttributesResponder)> {
15660        if let SymlinkRequest::UpdateAttributes { payload, responder } = self {
15661            Some((payload, responder))
15662        } else {
15663            None
15664        }
15665    }
15666
15667    #[allow(irrefutable_let_patterns)]
15668    pub fn into_sync(self) -> Option<(SymlinkSyncResponder)> {
15669        if let SymlinkRequest::Sync { responder } = self {
15670            Some((responder))
15671        } else {
15672            None
15673        }
15674    }
15675
15676    #[allow(irrefutable_let_patterns)]
15677    pub fn into_list_extended_attributes(
15678        self,
15679    ) -> Option<(
15680        fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
15681        SymlinkControlHandle,
15682    )> {
15683        if let SymlinkRequest::ListExtendedAttributes { iterator, control_handle } = self {
15684            Some((iterator, control_handle))
15685        } else {
15686            None
15687        }
15688    }
15689
15690    #[allow(irrefutable_let_patterns)]
15691    pub fn into_get_extended_attribute(
15692        self,
15693    ) -> Option<(Vec<u8>, SymlinkGetExtendedAttributeResponder)> {
15694        if let SymlinkRequest::GetExtendedAttribute { name, responder } = self {
15695            Some((name, responder))
15696        } else {
15697            None
15698        }
15699    }
15700
15701    #[allow(irrefutable_let_patterns)]
15702    pub fn into_set_extended_attribute(
15703        self,
15704    ) -> Option<(
15705        Vec<u8>,
15706        ExtendedAttributeValue,
15707        SetExtendedAttributeMode,
15708        SymlinkSetExtendedAttributeResponder,
15709    )> {
15710        if let SymlinkRequest::SetExtendedAttribute { name, value, mode, responder } = self {
15711            Some((name, value, mode, responder))
15712        } else {
15713            None
15714        }
15715    }
15716
15717    #[allow(irrefutable_let_patterns)]
15718    pub fn into_remove_extended_attribute(
15719        self,
15720    ) -> Option<(Vec<u8>, SymlinkRemoveExtendedAttributeResponder)> {
15721        if let SymlinkRequest::RemoveExtendedAttribute { name, responder } = self {
15722            Some((name, responder))
15723        } else {
15724            None
15725        }
15726    }
15727
15728    #[allow(irrefutable_let_patterns)]
15729    pub fn into_describe(self) -> Option<(SymlinkDescribeResponder)> {
15730        if let SymlinkRequest::Describe { responder } = self {
15731            Some((responder))
15732        } else {
15733            None
15734        }
15735    }
15736
15737    /// Name of the method defined in FIDL
15738    pub fn method_name(&self) -> &'static str {
15739        match *self {
15740            SymlinkRequest::LinkInto { .. } => "link_into",
15741            SymlinkRequest::Clone { .. } => "clone",
15742            SymlinkRequest::Close { .. } => "close",
15743            SymlinkRequest::Query { .. } => "query",
15744            SymlinkRequest::DeprecatedClone { .. } => "deprecated_clone",
15745            SymlinkRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
15746            SymlinkRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
15747            SymlinkRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
15748            SymlinkRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
15749            SymlinkRequest::GetFlags { .. } => "get_flags",
15750            SymlinkRequest::SetFlags { .. } => "set_flags",
15751            SymlinkRequest::QueryFilesystem { .. } => "query_filesystem",
15752            SymlinkRequest::GetAttributes { .. } => "get_attributes",
15753            SymlinkRequest::UpdateAttributes { .. } => "update_attributes",
15754            SymlinkRequest::Sync { .. } => "sync",
15755            SymlinkRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
15756            SymlinkRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
15757            SymlinkRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
15758            SymlinkRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
15759            SymlinkRequest::Describe { .. } => "describe",
15760            SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
15761                "unknown one-way method"
15762            }
15763            SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
15764                "unknown two-way method"
15765            }
15766        }
15767    }
15768}
15769
15770#[derive(Debug, Clone)]
15771pub struct SymlinkControlHandle {
15772    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
15773}
15774
15775impl fdomain_client::fidl::ControlHandle for SymlinkControlHandle {
15776    fn shutdown(&self) {
15777        self.inner.shutdown()
15778    }
15779
15780    fn is_closed(&self) -> bool {
15781        self.inner.channel().is_closed()
15782    }
15783    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
15784        self.inner.channel().on_closed()
15785    }
15786}
15787
15788impl SymlinkControlHandle {
15789    pub fn send_on_open_(
15790        &self,
15791        mut s: i32,
15792        mut info: Option<NodeInfoDeprecated>,
15793    ) -> Result<(), fidl::Error> {
15794        self.inner.send::<NodeOnOpenRequest>(
15795            (s, info.as_mut()),
15796            0,
15797            0x7fc7bbb1dbfd1972,
15798            fidl::encoding::DynamicFlags::empty(),
15799        )
15800    }
15801
15802    pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
15803        self.inner.send::<Representation>(
15804            &mut payload,
15805            0,
15806            0x5cb40567d80a510c,
15807            fidl::encoding::DynamicFlags::empty(),
15808        )
15809    }
15810}
15811
15812#[must_use = "FIDL methods require a response to be sent"]
15813#[derive(Debug)]
15814pub struct SymlinkLinkIntoResponder {
15815    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15816    tx_id: u32,
15817}
15818
15819/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
15820/// if the responder is dropped without sending a response, so that the client
15821/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
15822impl std::ops::Drop for SymlinkLinkIntoResponder {
15823    fn drop(&mut self) {
15824        self.control_handle.shutdown();
15825        // Safety: drops once, never accessed again
15826        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15827    }
15828}
15829
15830impl fdomain_client::fidl::Responder for SymlinkLinkIntoResponder {
15831    type ControlHandle = SymlinkControlHandle;
15832
15833    fn control_handle(&self) -> &SymlinkControlHandle {
15834        &self.control_handle
15835    }
15836
15837    fn drop_without_shutdown(mut self) {
15838        // Safety: drops once, never accessed again due to mem::forget
15839        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15840        // Prevent Drop from running (which would shut down the channel)
15841        std::mem::forget(self);
15842    }
15843}
15844
15845impl SymlinkLinkIntoResponder {
15846    /// Sends a response to the FIDL transaction.
15847    ///
15848    /// Sets the channel to shutdown if an error occurs.
15849    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15850        let _result = self.send_raw(result);
15851        if _result.is_err() {
15852            self.control_handle.shutdown();
15853        }
15854        self.drop_without_shutdown();
15855        _result
15856    }
15857
15858    /// Similar to "send" but does not shutdown the channel if an error occurs.
15859    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15860        let _result = self.send_raw(result);
15861        self.drop_without_shutdown();
15862        _result
15863    }
15864
15865    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15866        self.control_handle
15867            .inner
15868            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15869                result,
15870                self.tx_id,
15871                0x54f3949246a03e74,
15872                fidl::encoding::DynamicFlags::empty(),
15873            )
15874    }
15875}
15876
15877#[must_use = "FIDL methods require a response to be sent"]
15878#[derive(Debug)]
15879pub struct SymlinkCloseResponder {
15880    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15881    tx_id: u32,
15882}
15883
15884/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
15885/// if the responder is dropped without sending a response, so that the client
15886/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
15887impl std::ops::Drop for SymlinkCloseResponder {
15888    fn drop(&mut self) {
15889        self.control_handle.shutdown();
15890        // Safety: drops once, never accessed again
15891        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15892    }
15893}
15894
15895impl fdomain_client::fidl::Responder for SymlinkCloseResponder {
15896    type ControlHandle = SymlinkControlHandle;
15897
15898    fn control_handle(&self) -> &SymlinkControlHandle {
15899        &self.control_handle
15900    }
15901
15902    fn drop_without_shutdown(mut self) {
15903        // Safety: drops once, never accessed again due to mem::forget
15904        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15905        // Prevent Drop from running (which would shut down the channel)
15906        std::mem::forget(self);
15907    }
15908}
15909
15910impl SymlinkCloseResponder {
15911    /// Sends a response to the FIDL transaction.
15912    ///
15913    /// Sets the channel to shutdown if an error occurs.
15914    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15915        let _result = self.send_raw(result);
15916        if _result.is_err() {
15917            self.control_handle.shutdown();
15918        }
15919        self.drop_without_shutdown();
15920        _result
15921    }
15922
15923    /// Similar to "send" but does not shutdown the channel if an error occurs.
15924    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15925        let _result = self.send_raw(result);
15926        self.drop_without_shutdown();
15927        _result
15928    }
15929
15930    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15931        self.control_handle
15932            .inner
15933            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15934                result,
15935                self.tx_id,
15936                0x5ac5d459ad7f657e,
15937                fidl::encoding::DynamicFlags::empty(),
15938            )
15939    }
15940}
15941
15942#[must_use = "FIDL methods require a response to be sent"]
15943#[derive(Debug)]
15944pub struct SymlinkQueryResponder {
15945    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15946    tx_id: u32,
15947}
15948
15949/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
15950/// if the responder is dropped without sending a response, so that the client
15951/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
15952impl std::ops::Drop for SymlinkQueryResponder {
15953    fn drop(&mut self) {
15954        self.control_handle.shutdown();
15955        // Safety: drops once, never accessed again
15956        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15957    }
15958}
15959
15960impl fdomain_client::fidl::Responder for SymlinkQueryResponder {
15961    type ControlHandle = SymlinkControlHandle;
15962
15963    fn control_handle(&self) -> &SymlinkControlHandle {
15964        &self.control_handle
15965    }
15966
15967    fn drop_without_shutdown(mut self) {
15968        // Safety: drops once, never accessed again due to mem::forget
15969        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15970        // Prevent Drop from running (which would shut down the channel)
15971        std::mem::forget(self);
15972    }
15973}
15974
15975impl SymlinkQueryResponder {
15976    /// Sends a response to the FIDL transaction.
15977    ///
15978    /// Sets the channel to shutdown if an error occurs.
15979    pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15980        let _result = self.send_raw(protocol);
15981        if _result.is_err() {
15982            self.control_handle.shutdown();
15983        }
15984        self.drop_without_shutdown();
15985        _result
15986    }
15987
15988    /// Similar to "send" but does not shutdown the channel if an error occurs.
15989    pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15990        let _result = self.send_raw(protocol);
15991        self.drop_without_shutdown();
15992        _result
15993    }
15994
15995    fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15996        self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
15997            (protocol,),
15998            self.tx_id,
15999            0x2658edee9decfc06,
16000            fidl::encoding::DynamicFlags::empty(),
16001        )
16002    }
16003}
16004
16005#[must_use = "FIDL methods require a response to be sent"]
16006#[derive(Debug)]
16007pub struct SymlinkDeprecatedGetAttrResponder {
16008    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16009    tx_id: u32,
16010}
16011
16012/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16013/// if the responder is dropped without sending a response, so that the client
16014/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16015impl std::ops::Drop for SymlinkDeprecatedGetAttrResponder {
16016    fn drop(&mut self) {
16017        self.control_handle.shutdown();
16018        // Safety: drops once, never accessed again
16019        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16020    }
16021}
16022
16023impl fdomain_client::fidl::Responder for SymlinkDeprecatedGetAttrResponder {
16024    type ControlHandle = SymlinkControlHandle;
16025
16026    fn control_handle(&self) -> &SymlinkControlHandle {
16027        &self.control_handle
16028    }
16029
16030    fn drop_without_shutdown(mut self) {
16031        // Safety: drops once, never accessed again due to mem::forget
16032        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16033        // Prevent Drop from running (which would shut down the channel)
16034        std::mem::forget(self);
16035    }
16036}
16037
16038impl SymlinkDeprecatedGetAttrResponder {
16039    /// Sends a response to the FIDL transaction.
16040    ///
16041    /// Sets the channel to shutdown if an error occurs.
16042    pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
16043        let _result = self.send_raw(s, attributes);
16044        if _result.is_err() {
16045            self.control_handle.shutdown();
16046        }
16047        self.drop_without_shutdown();
16048        _result
16049    }
16050
16051    /// Similar to "send" but does not shutdown the channel if an error occurs.
16052    pub fn send_no_shutdown_on_err(
16053        self,
16054        mut s: i32,
16055        mut attributes: &NodeAttributes,
16056    ) -> Result<(), fidl::Error> {
16057        let _result = self.send_raw(s, attributes);
16058        self.drop_without_shutdown();
16059        _result
16060    }
16061
16062    fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
16063        self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
16064            (s, attributes),
16065            self.tx_id,
16066            0x78985e216314dafd,
16067            fidl::encoding::DynamicFlags::empty(),
16068        )
16069    }
16070}
16071
16072#[must_use = "FIDL methods require a response to be sent"]
16073#[derive(Debug)]
16074pub struct SymlinkDeprecatedSetAttrResponder {
16075    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16076    tx_id: u32,
16077}
16078
16079/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16080/// if the responder is dropped without sending a response, so that the client
16081/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16082impl std::ops::Drop for SymlinkDeprecatedSetAttrResponder {
16083    fn drop(&mut self) {
16084        self.control_handle.shutdown();
16085        // Safety: drops once, never accessed again
16086        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16087    }
16088}
16089
16090impl fdomain_client::fidl::Responder for SymlinkDeprecatedSetAttrResponder {
16091    type ControlHandle = SymlinkControlHandle;
16092
16093    fn control_handle(&self) -> &SymlinkControlHandle {
16094        &self.control_handle
16095    }
16096
16097    fn drop_without_shutdown(mut self) {
16098        // Safety: drops once, never accessed again due to mem::forget
16099        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16100        // Prevent Drop from running (which would shut down the channel)
16101        std::mem::forget(self);
16102    }
16103}
16104
16105impl SymlinkDeprecatedSetAttrResponder {
16106    /// Sends a response to the FIDL transaction.
16107    ///
16108    /// Sets the channel to shutdown if an error occurs.
16109    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
16110        let _result = self.send_raw(s);
16111        if _result.is_err() {
16112            self.control_handle.shutdown();
16113        }
16114        self.drop_without_shutdown();
16115        _result
16116    }
16117
16118    /// Similar to "send" but does not shutdown the channel if an error occurs.
16119    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
16120        let _result = self.send_raw(s);
16121        self.drop_without_shutdown();
16122        _result
16123    }
16124
16125    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
16126        self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
16127            (s,),
16128            self.tx_id,
16129            0x4186c0f40d938f46,
16130            fidl::encoding::DynamicFlags::empty(),
16131        )
16132    }
16133}
16134
16135#[must_use = "FIDL methods require a response to be sent"]
16136#[derive(Debug)]
16137pub struct SymlinkDeprecatedGetFlagsResponder {
16138    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16139    tx_id: u32,
16140}
16141
16142/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16143/// if the responder is dropped without sending a response, so that the client
16144/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16145impl std::ops::Drop for SymlinkDeprecatedGetFlagsResponder {
16146    fn drop(&mut self) {
16147        self.control_handle.shutdown();
16148        // Safety: drops once, never accessed again
16149        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16150    }
16151}
16152
16153impl fdomain_client::fidl::Responder for SymlinkDeprecatedGetFlagsResponder {
16154    type ControlHandle = SymlinkControlHandle;
16155
16156    fn control_handle(&self) -> &SymlinkControlHandle {
16157        &self.control_handle
16158    }
16159
16160    fn drop_without_shutdown(mut self) {
16161        // Safety: drops once, never accessed again due to mem::forget
16162        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16163        // Prevent Drop from running (which would shut down the channel)
16164        std::mem::forget(self);
16165    }
16166}
16167
16168impl SymlinkDeprecatedGetFlagsResponder {
16169    /// Sends a response to the FIDL transaction.
16170    ///
16171    /// Sets the channel to shutdown if an error occurs.
16172    pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
16173        let _result = self.send_raw(s, flags);
16174        if _result.is_err() {
16175            self.control_handle.shutdown();
16176        }
16177        self.drop_without_shutdown();
16178        _result
16179    }
16180
16181    /// Similar to "send" but does not shutdown the channel if an error occurs.
16182    pub fn send_no_shutdown_on_err(
16183        self,
16184        mut s: i32,
16185        mut flags: OpenFlags,
16186    ) -> Result<(), fidl::Error> {
16187        let _result = self.send_raw(s, flags);
16188        self.drop_without_shutdown();
16189        _result
16190    }
16191
16192    fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
16193        self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
16194            (s, flags),
16195            self.tx_id,
16196            0x5b88fffb8eda3aa1,
16197            fidl::encoding::DynamicFlags::empty(),
16198        )
16199    }
16200}
16201
16202#[must_use = "FIDL methods require a response to be sent"]
16203#[derive(Debug)]
16204pub struct SymlinkDeprecatedSetFlagsResponder {
16205    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16206    tx_id: u32,
16207}
16208
16209/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16210/// if the responder is dropped without sending a response, so that the client
16211/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16212impl std::ops::Drop for SymlinkDeprecatedSetFlagsResponder {
16213    fn drop(&mut self) {
16214        self.control_handle.shutdown();
16215        // Safety: drops once, never accessed again
16216        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16217    }
16218}
16219
16220impl fdomain_client::fidl::Responder for SymlinkDeprecatedSetFlagsResponder {
16221    type ControlHandle = SymlinkControlHandle;
16222
16223    fn control_handle(&self) -> &SymlinkControlHandle {
16224        &self.control_handle
16225    }
16226
16227    fn drop_without_shutdown(mut self) {
16228        // Safety: drops once, never accessed again due to mem::forget
16229        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16230        // Prevent Drop from running (which would shut down the channel)
16231        std::mem::forget(self);
16232    }
16233}
16234
16235impl SymlinkDeprecatedSetFlagsResponder {
16236    /// Sends a response to the FIDL transaction.
16237    ///
16238    /// Sets the channel to shutdown if an error occurs.
16239    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
16240        let _result = self.send_raw(s);
16241        if _result.is_err() {
16242            self.control_handle.shutdown();
16243        }
16244        self.drop_without_shutdown();
16245        _result
16246    }
16247
16248    /// Similar to "send" but does not shutdown the channel if an error occurs.
16249    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
16250        let _result = self.send_raw(s);
16251        self.drop_without_shutdown();
16252        _result
16253    }
16254
16255    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
16256        self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
16257            (s,),
16258            self.tx_id,
16259            0x5295b76c71fde733,
16260            fidl::encoding::DynamicFlags::empty(),
16261        )
16262    }
16263}
16264
16265#[must_use = "FIDL methods require a response to be sent"]
16266#[derive(Debug)]
16267pub struct SymlinkGetFlagsResponder {
16268    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16269    tx_id: u32,
16270}
16271
16272/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16273/// if the responder is dropped without sending a response, so that the client
16274/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16275impl std::ops::Drop for SymlinkGetFlagsResponder {
16276    fn drop(&mut self) {
16277        self.control_handle.shutdown();
16278        // Safety: drops once, never accessed again
16279        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16280    }
16281}
16282
16283impl fdomain_client::fidl::Responder for SymlinkGetFlagsResponder {
16284    type ControlHandle = SymlinkControlHandle;
16285
16286    fn control_handle(&self) -> &SymlinkControlHandle {
16287        &self.control_handle
16288    }
16289
16290    fn drop_without_shutdown(mut self) {
16291        // Safety: drops once, never accessed again due to mem::forget
16292        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16293        // Prevent Drop from running (which would shut down the channel)
16294        std::mem::forget(self);
16295    }
16296}
16297
16298impl SymlinkGetFlagsResponder {
16299    /// Sends a response to the FIDL transaction.
16300    ///
16301    /// Sets the channel to shutdown if an error occurs.
16302    pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
16303        let _result = self.send_raw(result);
16304        if _result.is_err() {
16305            self.control_handle.shutdown();
16306        }
16307        self.drop_without_shutdown();
16308        _result
16309    }
16310
16311    /// Similar to "send" but does not shutdown the channel if an error occurs.
16312    pub fn send_no_shutdown_on_err(
16313        self,
16314        mut result: Result<Flags, i32>,
16315    ) -> Result<(), fidl::Error> {
16316        let _result = self.send_raw(result);
16317        self.drop_without_shutdown();
16318        _result
16319    }
16320
16321    fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
16322        self.control_handle
16323            .inner
16324            .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
16325                fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
16326                self.tx_id,
16327                0x176eb318f64ec23,
16328                fidl::encoding::DynamicFlags::FLEXIBLE,
16329            )
16330    }
16331}
16332
16333#[must_use = "FIDL methods require a response to be sent"]
16334#[derive(Debug)]
16335pub struct SymlinkSetFlagsResponder {
16336    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16337    tx_id: u32,
16338}
16339
16340/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16341/// if the responder is dropped without sending a response, so that the client
16342/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16343impl std::ops::Drop for SymlinkSetFlagsResponder {
16344    fn drop(&mut self) {
16345        self.control_handle.shutdown();
16346        // Safety: drops once, never accessed again
16347        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16348    }
16349}
16350
16351impl fdomain_client::fidl::Responder for SymlinkSetFlagsResponder {
16352    type ControlHandle = SymlinkControlHandle;
16353
16354    fn control_handle(&self) -> &SymlinkControlHandle {
16355        &self.control_handle
16356    }
16357
16358    fn drop_without_shutdown(mut self) {
16359        // Safety: drops once, never accessed again due to mem::forget
16360        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16361        // Prevent Drop from running (which would shut down the channel)
16362        std::mem::forget(self);
16363    }
16364}
16365
16366impl SymlinkSetFlagsResponder {
16367    /// Sends a response to the FIDL transaction.
16368    ///
16369    /// Sets the channel to shutdown if an error occurs.
16370    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16371        let _result = self.send_raw(result);
16372        if _result.is_err() {
16373            self.control_handle.shutdown();
16374        }
16375        self.drop_without_shutdown();
16376        _result
16377    }
16378
16379    /// Similar to "send" but does not shutdown the channel if an error occurs.
16380    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16381        let _result = self.send_raw(result);
16382        self.drop_without_shutdown();
16383        _result
16384    }
16385
16386    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16387        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
16388            fidl::encoding::EmptyStruct,
16389            i32,
16390        >>(
16391            fidl::encoding::FlexibleResult::new(result),
16392            self.tx_id,
16393            0x55a8028685791ea8,
16394            fidl::encoding::DynamicFlags::FLEXIBLE,
16395        )
16396    }
16397}
16398
16399#[must_use = "FIDL methods require a response to be sent"]
16400#[derive(Debug)]
16401pub struct SymlinkQueryFilesystemResponder {
16402    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16403    tx_id: u32,
16404}
16405
16406/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16407/// if the responder is dropped without sending a response, so that the client
16408/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16409impl std::ops::Drop for SymlinkQueryFilesystemResponder {
16410    fn drop(&mut self) {
16411        self.control_handle.shutdown();
16412        // Safety: drops once, never accessed again
16413        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16414    }
16415}
16416
16417impl fdomain_client::fidl::Responder for SymlinkQueryFilesystemResponder {
16418    type ControlHandle = SymlinkControlHandle;
16419
16420    fn control_handle(&self) -> &SymlinkControlHandle {
16421        &self.control_handle
16422    }
16423
16424    fn drop_without_shutdown(mut self) {
16425        // Safety: drops once, never accessed again due to mem::forget
16426        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16427        // Prevent Drop from running (which would shut down the channel)
16428        std::mem::forget(self);
16429    }
16430}
16431
16432impl SymlinkQueryFilesystemResponder {
16433    /// Sends a response to the FIDL transaction.
16434    ///
16435    /// Sets the channel to shutdown if an error occurs.
16436    pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
16437        let _result = self.send_raw(s, info);
16438        if _result.is_err() {
16439            self.control_handle.shutdown();
16440        }
16441        self.drop_without_shutdown();
16442        _result
16443    }
16444
16445    /// Similar to "send" but does not shutdown the channel if an error occurs.
16446    pub fn send_no_shutdown_on_err(
16447        self,
16448        mut s: i32,
16449        mut info: Option<&FilesystemInfo>,
16450    ) -> Result<(), fidl::Error> {
16451        let _result = self.send_raw(s, info);
16452        self.drop_without_shutdown();
16453        _result
16454    }
16455
16456    fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
16457        self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
16458            (s, info),
16459            self.tx_id,
16460            0x6f344a1c6b0a0610,
16461            fidl::encoding::DynamicFlags::empty(),
16462        )
16463    }
16464}
16465
16466#[must_use = "FIDL methods require a response to be sent"]
16467#[derive(Debug)]
16468pub struct SymlinkGetAttributesResponder {
16469    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16470    tx_id: u32,
16471}
16472
16473/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16474/// if the responder is dropped without sending a response, so that the client
16475/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16476impl std::ops::Drop for SymlinkGetAttributesResponder {
16477    fn drop(&mut self) {
16478        self.control_handle.shutdown();
16479        // Safety: drops once, never accessed again
16480        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16481    }
16482}
16483
16484impl fdomain_client::fidl::Responder for SymlinkGetAttributesResponder {
16485    type ControlHandle = SymlinkControlHandle;
16486
16487    fn control_handle(&self) -> &SymlinkControlHandle {
16488        &self.control_handle
16489    }
16490
16491    fn drop_without_shutdown(mut self) {
16492        // Safety: drops once, never accessed again due to mem::forget
16493        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16494        // Prevent Drop from running (which would shut down the channel)
16495        std::mem::forget(self);
16496    }
16497}
16498
16499impl SymlinkGetAttributesResponder {
16500    /// Sends a response to the FIDL transaction.
16501    ///
16502    /// Sets the channel to shutdown if an error occurs.
16503    pub fn send(
16504        self,
16505        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16506    ) -> Result<(), fidl::Error> {
16507        let _result = self.send_raw(result);
16508        if _result.is_err() {
16509            self.control_handle.shutdown();
16510        }
16511        self.drop_without_shutdown();
16512        _result
16513    }
16514
16515    /// Similar to "send" but does not shutdown the channel if an error occurs.
16516    pub fn send_no_shutdown_on_err(
16517        self,
16518        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16519    ) -> Result<(), fidl::Error> {
16520        let _result = self.send_raw(result);
16521        self.drop_without_shutdown();
16522        _result
16523    }
16524
16525    fn send_raw(
16526        &self,
16527        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16528    ) -> Result<(), fidl::Error> {
16529        self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
16530            result,
16531            self.tx_id,
16532            0x3d4396a638ea053b,
16533            fidl::encoding::DynamicFlags::empty(),
16534        )
16535    }
16536}
16537
16538#[must_use = "FIDL methods require a response to be sent"]
16539#[derive(Debug)]
16540pub struct SymlinkUpdateAttributesResponder {
16541    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16542    tx_id: u32,
16543}
16544
16545/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16546/// if the responder is dropped without sending a response, so that the client
16547/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16548impl std::ops::Drop for SymlinkUpdateAttributesResponder {
16549    fn drop(&mut self) {
16550        self.control_handle.shutdown();
16551        // Safety: drops once, never accessed again
16552        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16553    }
16554}
16555
16556impl fdomain_client::fidl::Responder for SymlinkUpdateAttributesResponder {
16557    type ControlHandle = SymlinkControlHandle;
16558
16559    fn control_handle(&self) -> &SymlinkControlHandle {
16560        &self.control_handle
16561    }
16562
16563    fn drop_without_shutdown(mut self) {
16564        // Safety: drops once, never accessed again due to mem::forget
16565        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16566        // Prevent Drop from running (which would shut down the channel)
16567        std::mem::forget(self);
16568    }
16569}
16570
16571impl SymlinkUpdateAttributesResponder {
16572    /// Sends a response to the FIDL transaction.
16573    ///
16574    /// Sets the channel to shutdown if an error occurs.
16575    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16576        let _result = self.send_raw(result);
16577        if _result.is_err() {
16578            self.control_handle.shutdown();
16579        }
16580        self.drop_without_shutdown();
16581        _result
16582    }
16583
16584    /// Similar to "send" but does not shutdown the channel if an error occurs.
16585    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16586        let _result = self.send_raw(result);
16587        self.drop_without_shutdown();
16588        _result
16589    }
16590
16591    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16592        self.control_handle
16593            .inner
16594            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16595                result,
16596                self.tx_id,
16597                0x3308c1da5a89bf08,
16598                fidl::encoding::DynamicFlags::empty(),
16599            )
16600    }
16601}
16602
16603#[must_use = "FIDL methods require a response to be sent"]
16604#[derive(Debug)]
16605pub struct SymlinkSyncResponder {
16606    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16607    tx_id: u32,
16608}
16609
16610/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16611/// if the responder is dropped without sending a response, so that the client
16612/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16613impl std::ops::Drop for SymlinkSyncResponder {
16614    fn drop(&mut self) {
16615        self.control_handle.shutdown();
16616        // Safety: drops once, never accessed again
16617        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16618    }
16619}
16620
16621impl fdomain_client::fidl::Responder for SymlinkSyncResponder {
16622    type ControlHandle = SymlinkControlHandle;
16623
16624    fn control_handle(&self) -> &SymlinkControlHandle {
16625        &self.control_handle
16626    }
16627
16628    fn drop_without_shutdown(mut self) {
16629        // Safety: drops once, never accessed again due to mem::forget
16630        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16631        // Prevent Drop from running (which would shut down the channel)
16632        std::mem::forget(self);
16633    }
16634}
16635
16636impl SymlinkSyncResponder {
16637    /// Sends a response to the FIDL transaction.
16638    ///
16639    /// Sets the channel to shutdown if an error occurs.
16640    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16641        let _result = self.send_raw(result);
16642        if _result.is_err() {
16643            self.control_handle.shutdown();
16644        }
16645        self.drop_without_shutdown();
16646        _result
16647    }
16648
16649    /// Similar to "send" but does not shutdown the channel if an error occurs.
16650    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16651        let _result = self.send_raw(result);
16652        self.drop_without_shutdown();
16653        _result
16654    }
16655
16656    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16657        self.control_handle
16658            .inner
16659            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16660                result,
16661                self.tx_id,
16662                0x2c5c27ca0ab5dc49,
16663                fidl::encoding::DynamicFlags::empty(),
16664            )
16665    }
16666}
16667
16668#[must_use = "FIDL methods require a response to be sent"]
16669#[derive(Debug)]
16670pub struct SymlinkGetExtendedAttributeResponder {
16671    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16672    tx_id: u32,
16673}
16674
16675/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16676/// if the responder is dropped without sending a response, so that the client
16677/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16678impl std::ops::Drop for SymlinkGetExtendedAttributeResponder {
16679    fn drop(&mut self) {
16680        self.control_handle.shutdown();
16681        // Safety: drops once, never accessed again
16682        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16683    }
16684}
16685
16686impl fdomain_client::fidl::Responder for SymlinkGetExtendedAttributeResponder {
16687    type ControlHandle = SymlinkControlHandle;
16688
16689    fn control_handle(&self) -> &SymlinkControlHandle {
16690        &self.control_handle
16691    }
16692
16693    fn drop_without_shutdown(mut self) {
16694        // Safety: drops once, never accessed again due to mem::forget
16695        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16696        // Prevent Drop from running (which would shut down the channel)
16697        std::mem::forget(self);
16698    }
16699}
16700
16701impl SymlinkGetExtendedAttributeResponder {
16702    /// Sends a response to the FIDL transaction.
16703    ///
16704    /// Sets the channel to shutdown if an error occurs.
16705    pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
16706        let _result = self.send_raw(result);
16707        if _result.is_err() {
16708            self.control_handle.shutdown();
16709        }
16710        self.drop_without_shutdown();
16711        _result
16712    }
16713
16714    /// Similar to "send" but does not shutdown the channel if an error occurs.
16715    pub fn send_no_shutdown_on_err(
16716        self,
16717        mut result: Result<ExtendedAttributeValue, i32>,
16718    ) -> Result<(), fidl::Error> {
16719        let _result = self.send_raw(result);
16720        self.drop_without_shutdown();
16721        _result
16722    }
16723
16724    fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
16725        self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
16726            result.as_mut().map_err(|e| *e),
16727            self.tx_id,
16728            0x45ffa3ccfdeb76db,
16729            fidl::encoding::DynamicFlags::empty(),
16730        )
16731    }
16732}
16733
16734#[must_use = "FIDL methods require a response to be sent"]
16735#[derive(Debug)]
16736pub struct SymlinkSetExtendedAttributeResponder {
16737    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16738    tx_id: u32,
16739}
16740
16741/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16742/// if the responder is dropped without sending a response, so that the client
16743/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16744impl std::ops::Drop for SymlinkSetExtendedAttributeResponder {
16745    fn drop(&mut self) {
16746        self.control_handle.shutdown();
16747        // Safety: drops once, never accessed again
16748        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16749    }
16750}
16751
16752impl fdomain_client::fidl::Responder for SymlinkSetExtendedAttributeResponder {
16753    type ControlHandle = SymlinkControlHandle;
16754
16755    fn control_handle(&self) -> &SymlinkControlHandle {
16756        &self.control_handle
16757    }
16758
16759    fn drop_without_shutdown(mut self) {
16760        // Safety: drops once, never accessed again due to mem::forget
16761        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16762        // Prevent Drop from running (which would shut down the channel)
16763        std::mem::forget(self);
16764    }
16765}
16766
16767impl SymlinkSetExtendedAttributeResponder {
16768    /// Sends a response to the FIDL transaction.
16769    ///
16770    /// Sets the channel to shutdown if an error occurs.
16771    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16772        let _result = self.send_raw(result);
16773        if _result.is_err() {
16774            self.control_handle.shutdown();
16775        }
16776        self.drop_without_shutdown();
16777        _result
16778    }
16779
16780    /// Similar to "send" but does not shutdown the channel if an error occurs.
16781    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16782        let _result = self.send_raw(result);
16783        self.drop_without_shutdown();
16784        _result
16785    }
16786
16787    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16788        self.control_handle
16789            .inner
16790            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16791                result,
16792                self.tx_id,
16793                0x4a951362f681f23c,
16794                fidl::encoding::DynamicFlags::empty(),
16795            )
16796    }
16797}
16798
16799#[must_use = "FIDL methods require a response to be sent"]
16800#[derive(Debug)]
16801pub struct SymlinkRemoveExtendedAttributeResponder {
16802    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16803    tx_id: u32,
16804}
16805
16806/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16807/// if the responder is dropped without sending a response, so that the client
16808/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16809impl std::ops::Drop for SymlinkRemoveExtendedAttributeResponder {
16810    fn drop(&mut self) {
16811        self.control_handle.shutdown();
16812        // Safety: drops once, never accessed again
16813        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16814    }
16815}
16816
16817impl fdomain_client::fidl::Responder for SymlinkRemoveExtendedAttributeResponder {
16818    type ControlHandle = SymlinkControlHandle;
16819
16820    fn control_handle(&self) -> &SymlinkControlHandle {
16821        &self.control_handle
16822    }
16823
16824    fn drop_without_shutdown(mut self) {
16825        // Safety: drops once, never accessed again due to mem::forget
16826        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16827        // Prevent Drop from running (which would shut down the channel)
16828        std::mem::forget(self);
16829    }
16830}
16831
16832impl SymlinkRemoveExtendedAttributeResponder {
16833    /// Sends a response to the FIDL transaction.
16834    ///
16835    /// Sets the channel to shutdown if an error occurs.
16836    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16837        let _result = self.send_raw(result);
16838        if _result.is_err() {
16839            self.control_handle.shutdown();
16840        }
16841        self.drop_without_shutdown();
16842        _result
16843    }
16844
16845    /// Similar to "send" but does not shutdown the channel if an error occurs.
16846    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16847        let _result = self.send_raw(result);
16848        self.drop_without_shutdown();
16849        _result
16850    }
16851
16852    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16853        self.control_handle
16854            .inner
16855            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16856                result,
16857                self.tx_id,
16858                0x7a0b9f3a9bf9032d,
16859                fidl::encoding::DynamicFlags::empty(),
16860            )
16861    }
16862}
16863
16864#[must_use = "FIDL methods require a response to be sent"]
16865#[derive(Debug)]
16866pub struct SymlinkDescribeResponder {
16867    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16868    tx_id: u32,
16869}
16870
16871/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16872/// if the responder is dropped without sending a response, so that the client
16873/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16874impl std::ops::Drop for SymlinkDescribeResponder {
16875    fn drop(&mut self) {
16876        self.control_handle.shutdown();
16877        // Safety: drops once, never accessed again
16878        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16879    }
16880}
16881
16882impl fdomain_client::fidl::Responder for SymlinkDescribeResponder {
16883    type ControlHandle = SymlinkControlHandle;
16884
16885    fn control_handle(&self) -> &SymlinkControlHandle {
16886        &self.control_handle
16887    }
16888
16889    fn drop_without_shutdown(mut self) {
16890        // Safety: drops once, never accessed again due to mem::forget
16891        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16892        // Prevent Drop from running (which would shut down the channel)
16893        std::mem::forget(self);
16894    }
16895}
16896
16897impl SymlinkDescribeResponder {
16898    /// Sends a response to the FIDL transaction.
16899    ///
16900    /// Sets the channel to shutdown if an error occurs.
16901    pub fn send(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
16902        let _result = self.send_raw(payload);
16903        if _result.is_err() {
16904            self.control_handle.shutdown();
16905        }
16906        self.drop_without_shutdown();
16907        _result
16908    }
16909
16910    /// Similar to "send" but does not shutdown the channel if an error occurs.
16911    pub fn send_no_shutdown_on_err(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
16912        let _result = self.send_raw(payload);
16913        self.drop_without_shutdown();
16914        _result
16915    }
16916
16917    fn send_raw(&self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
16918        self.control_handle.inner.send::<fidl::encoding::FlexibleType<SymlinkInfo>>(
16919            fidl::encoding::Flexible::new(payload),
16920            self.tx_id,
16921            0x742c2ea5e89831f3,
16922            fidl::encoding::DynamicFlags::FLEXIBLE,
16923        )
16924    }
16925}
16926
16927#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16928pub struct WritableMarker;
16929
16930impl fdomain_client::fidl::ProtocolMarker for WritableMarker {
16931    type Proxy = WritableProxy;
16932    type RequestStream = WritableRequestStream;
16933
16934    const DEBUG_NAME: &'static str = "(anonymous) Writable";
16935}
16936pub type WritableWriteResult = Result<u64, i32>;
16937
16938pub trait WritableProxyInterface: Send + Sync {
16939    type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
16940        + Send;
16941    fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
16942}
16943
16944#[derive(Debug, Clone)]
16945pub struct WritableProxy {
16946    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
16947}
16948
16949impl fdomain_client::fidl::Proxy for WritableProxy {
16950    type Protocol = WritableMarker;
16951
16952    fn from_channel(inner: fdomain_client::Channel) -> Self {
16953        Self::new(inner)
16954    }
16955
16956    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
16957        self.client.into_channel().map_err(|client| Self { client })
16958    }
16959
16960    fn as_channel(&self) -> &fdomain_client::Channel {
16961        self.client.as_channel()
16962    }
16963}
16964
16965impl WritableProxy {
16966    /// Create a new Proxy for fuchsia.io/Writable.
16967    pub fn new(channel: fdomain_client::Channel) -> Self {
16968        let protocol_name = <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
16969        Self { client: fidl::client::Client::new(channel, protocol_name) }
16970    }
16971
16972    /// Get a Stream of events from the remote end of the protocol.
16973    ///
16974    /// # Panics
16975    ///
16976    /// Panics if the event stream was already taken.
16977    pub fn take_event_stream(&self) -> WritableEventStream {
16978        WritableEventStream { event_receiver: self.client.take_event_receiver() }
16979    }
16980
16981    /// Writes data at the seek offset.
16982    /// The seek offset is moved forward by the number of bytes written.
16983    /// If the file is in append mode, the seek offset is first set to the end
16984    /// of the file, followed by the write, in one atomic step.
16985    ///
16986    /// The file size may grow if the seek offset plus `data.length` is beyond
16987    /// the current end of file.
16988    ///
16989    /// + request `data` the byte buffer to write to the file.
16990    /// - response `actual_count` the number of bytes written.
16991    ///
16992    /// ## Invariants
16993    ///
16994    /// * The returned `actual_count` will never be greater than `data.length`.
16995    /// * If the server is unable to write all the data due to e.g. not enough
16996    ///   space, `actual_count` may be less than `data.length`.  If no bytes
16997    ///   could be written, an error is returned.
16998    /// * If `data.length` is zero, the server should perform all the checks
16999    ///   ensuring write access without mutating the file and return a
17000    ///   successful write of zero bytes.  The seek offset is still updated if
17001    ///   in append mode.
17002    ///
17003    /// This method requires the [`Rights.WRITE_BYTES`] right.
17004    pub fn r#write(
17005        &self,
17006        mut data: &[u8],
17007    ) -> fidl::client::QueryResponseFut<
17008        WritableWriteResult,
17009        fdomain_client::fidl::FDomainResourceDialect,
17010    > {
17011        WritableProxyInterface::r#write(self, data)
17012    }
17013}
17014
17015impl WritableProxyInterface for WritableProxy {
17016    type WriteResponseFut = fidl::client::QueryResponseFut<
17017        WritableWriteResult,
17018        fdomain_client::fidl::FDomainResourceDialect,
17019    >;
17020    fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
17021        fn _decode(
17022            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17023        ) -> Result<WritableWriteResult, fidl::Error> {
17024            let _response = fidl::client::decode_transaction_body::<
17025                fidl::encoding::ResultType<WritableWriteResponse, i32>,
17026                fdomain_client::fidl::FDomainResourceDialect,
17027                0x6a31437832469f82,
17028            >(_buf?)?;
17029            Ok(_response.map(|x| x.actual_count))
17030        }
17031        self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
17032            (data,),
17033            0x6a31437832469f82,
17034            fidl::encoding::DynamicFlags::empty(),
17035            _decode,
17036        )
17037    }
17038}
17039
17040pub struct WritableEventStream {
17041    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
17042}
17043
17044impl std::marker::Unpin for WritableEventStream {}
17045
17046impl futures::stream::FusedStream for WritableEventStream {
17047    fn is_terminated(&self) -> bool {
17048        self.event_receiver.is_terminated()
17049    }
17050}
17051
17052impl futures::Stream for WritableEventStream {
17053    type Item = Result<WritableEvent, fidl::Error>;
17054
17055    fn poll_next(
17056        mut self: std::pin::Pin<&mut Self>,
17057        cx: &mut std::task::Context<'_>,
17058    ) -> std::task::Poll<Option<Self::Item>> {
17059        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
17060            &mut self.event_receiver,
17061            cx
17062        )?) {
17063            Some(buf) => std::task::Poll::Ready(Some(WritableEvent::decode(buf))),
17064            None => std::task::Poll::Ready(None),
17065        }
17066    }
17067}
17068
17069#[derive(Debug)]
17070pub enum WritableEvent {}
17071
17072impl WritableEvent {
17073    /// Decodes a message buffer as a [`WritableEvent`].
17074    fn decode(
17075        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
17076    ) -> Result<WritableEvent, fidl::Error> {
17077        let (bytes, _handles) = buf.split_mut();
17078        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17079        debug_assert_eq!(tx_header.tx_id, 0);
17080        match tx_header.ordinal {
17081            _ => Err(fidl::Error::UnknownOrdinal {
17082                ordinal: tx_header.ordinal,
17083                protocol_name: <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
17084            }),
17085        }
17086    }
17087}
17088
17089/// A Stream of incoming requests for fuchsia.io/Writable.
17090pub struct WritableRequestStream {
17091    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17092    is_terminated: bool,
17093}
17094
17095impl std::marker::Unpin for WritableRequestStream {}
17096
17097impl futures::stream::FusedStream for WritableRequestStream {
17098    fn is_terminated(&self) -> bool {
17099        self.is_terminated
17100    }
17101}
17102
17103impl fdomain_client::fidl::RequestStream for WritableRequestStream {
17104    type Protocol = WritableMarker;
17105    type ControlHandle = WritableControlHandle;
17106
17107    fn from_channel(channel: fdomain_client::Channel) -> Self {
17108        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
17109    }
17110
17111    fn control_handle(&self) -> Self::ControlHandle {
17112        WritableControlHandle { inner: self.inner.clone() }
17113    }
17114
17115    fn into_inner(
17116        self,
17117    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
17118    {
17119        (self.inner, self.is_terminated)
17120    }
17121
17122    fn from_inner(
17123        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17124        is_terminated: bool,
17125    ) -> Self {
17126        Self { inner, is_terminated }
17127    }
17128}
17129
17130impl futures::Stream for WritableRequestStream {
17131    type Item = Result<WritableRequest, fidl::Error>;
17132
17133    fn poll_next(
17134        mut self: std::pin::Pin<&mut Self>,
17135        cx: &mut std::task::Context<'_>,
17136    ) -> std::task::Poll<Option<Self::Item>> {
17137        let this = &mut *self;
17138        if this.inner.check_shutdown(cx) {
17139            this.is_terminated = true;
17140            return std::task::Poll::Ready(None);
17141        }
17142        if this.is_terminated {
17143            panic!("polled WritableRequestStream after completion");
17144        }
17145        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
17146            |bytes, handles| {
17147                match this.inner.channel().read_etc(cx, bytes, handles) {
17148                    std::task::Poll::Ready(Ok(())) => {}
17149                    std::task::Poll::Pending => return std::task::Poll::Pending,
17150                    std::task::Poll::Ready(Err(None)) => {
17151                        this.is_terminated = true;
17152                        return std::task::Poll::Ready(None);
17153                    }
17154                    std::task::Poll::Ready(Err(Some(e))) => {
17155                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
17156                            e.into(),
17157                        ))))
17158                    }
17159                }
17160
17161                // A message has been received from the channel
17162                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17163
17164                std::task::Poll::Ready(Some(match header.ordinal {
17165                    0x6a31437832469f82 => {
17166                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17167                        let mut req = fidl::new_empty!(
17168                            WritableWriteRequest,
17169                            fdomain_client::fidl::FDomainResourceDialect
17170                        );
17171                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
17172                        let control_handle = WritableControlHandle { inner: this.inner.clone() };
17173                        Ok(WritableRequest::Write {
17174                            data: req.data,
17175
17176                            responder: WritableWriteResponder {
17177                                control_handle: std::mem::ManuallyDrop::new(control_handle),
17178                                tx_id: header.tx_id,
17179                            },
17180                        })
17181                    }
17182                    _ => Err(fidl::Error::UnknownOrdinal {
17183                        ordinal: header.ordinal,
17184                        protocol_name:
17185                            <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
17186                    }),
17187                }))
17188            },
17189        )
17190    }
17191}
17192
17193#[derive(Debug)]
17194pub enum WritableRequest {
17195    /// Writes data at the seek offset.
17196    /// The seek offset is moved forward by the number of bytes written.
17197    /// If the file is in append mode, the seek offset is first set to the end
17198    /// of the file, followed by the write, in one atomic step.
17199    ///
17200    /// The file size may grow if the seek offset plus `data.length` is beyond
17201    /// the current end of file.
17202    ///
17203    /// + request `data` the byte buffer to write to the file.
17204    /// - response `actual_count` the number of bytes written.
17205    ///
17206    /// ## Invariants
17207    ///
17208    /// * The returned `actual_count` will never be greater than `data.length`.
17209    /// * If the server is unable to write all the data due to e.g. not enough
17210    ///   space, `actual_count` may be less than `data.length`.  If no bytes
17211    ///   could be written, an error is returned.
17212    /// * If `data.length` is zero, the server should perform all the checks
17213    ///   ensuring write access without mutating the file and return a
17214    ///   successful write of zero bytes.  The seek offset is still updated if
17215    ///   in append mode.
17216    ///
17217    /// This method requires the [`Rights.WRITE_BYTES`] right.
17218    Write { data: Vec<u8>, responder: WritableWriteResponder },
17219}
17220
17221impl WritableRequest {
17222    #[allow(irrefutable_let_patterns)]
17223    pub fn into_write(self) -> Option<(Vec<u8>, WritableWriteResponder)> {
17224        if let WritableRequest::Write { data, responder } = self {
17225            Some((data, responder))
17226        } else {
17227            None
17228        }
17229    }
17230
17231    /// Name of the method defined in FIDL
17232    pub fn method_name(&self) -> &'static str {
17233        match *self {
17234            WritableRequest::Write { .. } => "write",
17235        }
17236    }
17237}
17238
17239#[derive(Debug, Clone)]
17240pub struct WritableControlHandle {
17241    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17242}
17243
17244impl fdomain_client::fidl::ControlHandle for WritableControlHandle {
17245    fn shutdown(&self) {
17246        self.inner.shutdown()
17247    }
17248
17249    fn is_closed(&self) -> bool {
17250        self.inner.channel().is_closed()
17251    }
17252    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
17253        self.inner.channel().on_closed()
17254    }
17255}
17256
17257impl WritableControlHandle {}
17258
17259#[must_use = "FIDL methods require a response to be sent"]
17260#[derive(Debug)]
17261pub struct WritableWriteResponder {
17262    control_handle: std::mem::ManuallyDrop<WritableControlHandle>,
17263    tx_id: u32,
17264}
17265
17266/// Set the the channel to be shutdown (see [`WritableControlHandle::shutdown`])
17267/// if the responder is dropped without sending a response, so that the client
17268/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
17269impl std::ops::Drop for WritableWriteResponder {
17270    fn drop(&mut self) {
17271        self.control_handle.shutdown();
17272        // Safety: drops once, never accessed again
17273        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17274    }
17275}
17276
17277impl fdomain_client::fidl::Responder for WritableWriteResponder {
17278    type ControlHandle = WritableControlHandle;
17279
17280    fn control_handle(&self) -> &WritableControlHandle {
17281        &self.control_handle
17282    }
17283
17284    fn drop_without_shutdown(mut self) {
17285        // Safety: drops once, never accessed again due to mem::forget
17286        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17287        // Prevent Drop from running (which would shut down the channel)
17288        std::mem::forget(self);
17289    }
17290}
17291
17292impl WritableWriteResponder {
17293    /// Sends a response to the FIDL transaction.
17294    ///
17295    /// Sets the channel to shutdown if an error occurs.
17296    pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17297        let _result = self.send_raw(result);
17298        if _result.is_err() {
17299            self.control_handle.shutdown();
17300        }
17301        self.drop_without_shutdown();
17302        _result
17303    }
17304
17305    /// Similar to "send" but does not shutdown the channel if an error occurs.
17306    pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17307        let _result = self.send_raw(result);
17308        self.drop_without_shutdown();
17309        _result
17310    }
17311
17312    fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17313        self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
17314            result.map(|actual_count| (actual_count,)),
17315            self.tx_id,
17316            0x6a31437832469f82,
17317            fidl::encoding::DynamicFlags::empty(),
17318        )
17319    }
17320}
17321
17322mod internal {
17323    use super::*;
17324
17325    impl fidl::encoding::ResourceTypeMarker for DirectoryCreateSymlinkRequest {
17326        type Borrowed<'a> = &'a mut Self;
17327        fn take_or_borrow<'a>(
17328            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17329        ) -> Self::Borrowed<'a> {
17330            value
17331        }
17332    }
17333
17334    unsafe impl fidl::encoding::TypeMarker for DirectoryCreateSymlinkRequest {
17335        type Owned = Self;
17336
17337        #[inline(always)]
17338        fn inline_align(_context: fidl::encoding::Context) -> usize {
17339            8
17340        }
17341
17342        #[inline(always)]
17343        fn inline_size(_context: fidl::encoding::Context) -> usize {
17344            40
17345        }
17346    }
17347
17348    unsafe impl
17349        fidl::encoding::Encode<
17350            DirectoryCreateSymlinkRequest,
17351            fdomain_client::fidl::FDomainResourceDialect,
17352        > for &mut DirectoryCreateSymlinkRequest
17353    {
17354        #[inline]
17355        unsafe fn encode(
17356            self,
17357            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17358            offset: usize,
17359            _depth: fidl::encoding::Depth,
17360        ) -> fidl::Result<()> {
17361            encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
17362            // Delegate to tuple encoding.
17363            fidl::encoding::Encode::<
17364                DirectoryCreateSymlinkRequest,
17365                fdomain_client::fidl::FDomainResourceDialect,
17366            >::encode(
17367                (
17368                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17369                        &self.name,
17370                    ),
17371                    <fidl::encoding::Vector<u8, 4095> as fidl::encoding::ValueTypeMarker>::borrow(
17372                        &self.target,
17373                    ),
17374                    <fidl::encoding::Optional<
17375                        fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17376                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17377                        &mut self.connection
17378                    ),
17379                ),
17380                encoder,
17381                offset,
17382                _depth,
17383            )
17384        }
17385    }
17386    unsafe impl<
17387            T0: fidl::encoding::Encode<
17388                fidl::encoding::BoundedString<255>,
17389                fdomain_client::fidl::FDomainResourceDialect,
17390            >,
17391            T1: fidl::encoding::Encode<
17392                fidl::encoding::Vector<u8, 4095>,
17393                fdomain_client::fidl::FDomainResourceDialect,
17394            >,
17395            T2: fidl::encoding::Encode<
17396                fidl::encoding::Optional<
17397                    fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17398                >,
17399                fdomain_client::fidl::FDomainResourceDialect,
17400            >,
17401        >
17402        fidl::encoding::Encode<
17403            DirectoryCreateSymlinkRequest,
17404            fdomain_client::fidl::FDomainResourceDialect,
17405        > for (T0, T1, T2)
17406    {
17407        #[inline]
17408        unsafe fn encode(
17409            self,
17410            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17411            offset: usize,
17412            depth: fidl::encoding::Depth,
17413        ) -> fidl::Result<()> {
17414            encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
17415            // Zero out padding regions. There's no need to apply masks
17416            // because the unmasked parts will be overwritten by fields.
17417            unsafe {
17418                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
17419                (ptr as *mut u64).write_unaligned(0);
17420            }
17421            // Write the fields.
17422            self.0.encode(encoder, offset + 0, depth)?;
17423            self.1.encode(encoder, offset + 16, depth)?;
17424            self.2.encode(encoder, offset + 32, depth)?;
17425            Ok(())
17426        }
17427    }
17428
17429    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17430        for DirectoryCreateSymlinkRequest
17431    {
17432        #[inline(always)]
17433        fn new_empty() -> Self {
17434            Self {
17435                name: fidl::new_empty!(
17436                    fidl::encoding::BoundedString<255>,
17437                    fdomain_client::fidl::FDomainResourceDialect
17438                ),
17439                target: fidl::new_empty!(fidl::encoding::Vector<u8, 4095>, fdomain_client::fidl::FDomainResourceDialect),
17440                connection: fidl::new_empty!(
17441                    fidl::encoding::Optional<
17442                        fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17443                    >,
17444                    fdomain_client::fidl::FDomainResourceDialect
17445                ),
17446            }
17447        }
17448
17449        #[inline]
17450        unsafe fn decode(
17451            &mut self,
17452            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17453            offset: usize,
17454            _depth: fidl::encoding::Depth,
17455        ) -> fidl::Result<()> {
17456            decoder.debug_check_bounds::<Self>(offset);
17457            // Verify that padding bytes are zero.
17458            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
17459            let padval = unsafe { (ptr as *const u64).read_unaligned() };
17460            let mask = 0xffffffff00000000u64;
17461            let maskedval = padval & mask;
17462            if maskedval != 0 {
17463                return Err(fidl::Error::NonZeroPadding {
17464                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
17465                });
17466            }
17467            fidl::decode!(
17468                fidl::encoding::BoundedString<255>,
17469                fdomain_client::fidl::FDomainResourceDialect,
17470                &mut self.name,
17471                decoder,
17472                offset + 0,
17473                _depth
17474            )?;
17475            fidl::decode!(fidl::encoding::Vector<u8, 4095>, fdomain_client::fidl::FDomainResourceDialect, &mut self.target, decoder, offset + 16, _depth)?;
17476            fidl::decode!(
17477                fidl::encoding::Optional<
17478                    fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17479                >,
17480                fdomain_client::fidl::FDomainResourceDialect,
17481                &mut self.connection,
17482                decoder,
17483                offset + 32,
17484                _depth
17485            )?;
17486            Ok(())
17487        }
17488    }
17489
17490    impl fidl::encoding::ResourceTypeMarker for DirectoryDeprecatedOpenRequest {
17491        type Borrowed<'a> = &'a mut Self;
17492        fn take_or_borrow<'a>(
17493            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17494        ) -> Self::Borrowed<'a> {
17495            value
17496        }
17497    }
17498
17499    unsafe impl fidl::encoding::TypeMarker for DirectoryDeprecatedOpenRequest {
17500        type Owned = Self;
17501
17502        #[inline(always)]
17503        fn inline_align(_context: fidl::encoding::Context) -> usize {
17504            8
17505        }
17506
17507        #[inline(always)]
17508        fn inline_size(_context: fidl::encoding::Context) -> usize {
17509            32
17510        }
17511    }
17512
17513    unsafe impl
17514        fidl::encoding::Encode<
17515            DirectoryDeprecatedOpenRequest,
17516            fdomain_client::fidl::FDomainResourceDialect,
17517        > for &mut DirectoryDeprecatedOpenRequest
17518    {
17519        #[inline]
17520        unsafe fn encode(
17521            self,
17522            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17523            offset: usize,
17524            _depth: fidl::encoding::Depth,
17525        ) -> fidl::Result<()> {
17526            encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
17527            // Delegate to tuple encoding.
17528            fidl::encoding::Encode::<DirectoryDeprecatedOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
17529                (
17530                    <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
17531                    <ModeType as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
17532                    <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
17533                    <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
17534                ),
17535                encoder, offset, _depth
17536            )
17537        }
17538    }
17539    unsafe impl<
17540            T0: fidl::encoding::Encode<OpenFlags, fdomain_client::fidl::FDomainResourceDialect>,
17541            T1: fidl::encoding::Encode<ModeType, fdomain_client::fidl::FDomainResourceDialect>,
17542            T2: fidl::encoding::Encode<
17543                fidl::encoding::BoundedString<4095>,
17544                fdomain_client::fidl::FDomainResourceDialect,
17545            >,
17546            T3: fidl::encoding::Encode<
17547                fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17548                fdomain_client::fidl::FDomainResourceDialect,
17549            >,
17550        >
17551        fidl::encoding::Encode<
17552            DirectoryDeprecatedOpenRequest,
17553            fdomain_client::fidl::FDomainResourceDialect,
17554        > for (T0, T1, T2, T3)
17555    {
17556        #[inline]
17557        unsafe fn encode(
17558            self,
17559            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17560            offset: usize,
17561            depth: fidl::encoding::Depth,
17562        ) -> fidl::Result<()> {
17563            encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
17564            // Zero out padding regions. There's no need to apply masks
17565            // because the unmasked parts will be overwritten by fields.
17566            unsafe {
17567                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
17568                (ptr as *mut u64).write_unaligned(0);
17569            }
17570            // Write the fields.
17571            self.0.encode(encoder, offset + 0, depth)?;
17572            self.1.encode(encoder, offset + 4, depth)?;
17573            self.2.encode(encoder, offset + 8, depth)?;
17574            self.3.encode(encoder, offset + 24, depth)?;
17575            Ok(())
17576        }
17577    }
17578
17579    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17580        for DirectoryDeprecatedOpenRequest
17581    {
17582        #[inline(always)]
17583        fn new_empty() -> Self {
17584            Self {
17585                flags: fidl::new_empty!(OpenFlags, fdomain_client::fidl::FDomainResourceDialect),
17586                mode: fidl::new_empty!(ModeType, fdomain_client::fidl::FDomainResourceDialect),
17587                path: fidl::new_empty!(
17588                    fidl::encoding::BoundedString<4095>,
17589                    fdomain_client::fidl::FDomainResourceDialect
17590                ),
17591                object: fidl::new_empty!(
17592                    fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17593                    fdomain_client::fidl::FDomainResourceDialect
17594                ),
17595            }
17596        }
17597
17598        #[inline]
17599        unsafe fn decode(
17600            &mut self,
17601            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17602            offset: usize,
17603            _depth: fidl::encoding::Depth,
17604        ) -> fidl::Result<()> {
17605            decoder.debug_check_bounds::<Self>(offset);
17606            // Verify that padding bytes are zero.
17607            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
17608            let padval = unsafe { (ptr as *const u64).read_unaligned() };
17609            let mask = 0xffffffff00000000u64;
17610            let maskedval = padval & mask;
17611            if maskedval != 0 {
17612                return Err(fidl::Error::NonZeroPadding {
17613                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
17614                });
17615            }
17616            fidl::decode!(
17617                OpenFlags,
17618                fdomain_client::fidl::FDomainResourceDialect,
17619                &mut self.flags,
17620                decoder,
17621                offset + 0,
17622                _depth
17623            )?;
17624            fidl::decode!(
17625                ModeType,
17626                fdomain_client::fidl::FDomainResourceDialect,
17627                &mut self.mode,
17628                decoder,
17629                offset + 4,
17630                _depth
17631            )?;
17632            fidl::decode!(
17633                fidl::encoding::BoundedString<4095>,
17634                fdomain_client::fidl::FDomainResourceDialect,
17635                &mut self.path,
17636                decoder,
17637                offset + 8,
17638                _depth
17639            )?;
17640            fidl::decode!(
17641                fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17642                fdomain_client::fidl::FDomainResourceDialect,
17643                &mut self.object,
17644                decoder,
17645                offset + 24,
17646                _depth
17647            )?;
17648            Ok(())
17649        }
17650    }
17651
17652    impl fidl::encoding::ResourceTypeMarker for DirectoryGetTokenResponse {
17653        type Borrowed<'a> = &'a mut Self;
17654        fn take_or_borrow<'a>(
17655            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17656        ) -> Self::Borrowed<'a> {
17657            value
17658        }
17659    }
17660
17661    unsafe impl fidl::encoding::TypeMarker for DirectoryGetTokenResponse {
17662        type Owned = Self;
17663
17664        #[inline(always)]
17665        fn inline_align(_context: fidl::encoding::Context) -> usize {
17666            4
17667        }
17668
17669        #[inline(always)]
17670        fn inline_size(_context: fidl::encoding::Context) -> usize {
17671            8
17672        }
17673    }
17674
17675    unsafe impl
17676        fidl::encoding::Encode<
17677            DirectoryGetTokenResponse,
17678            fdomain_client::fidl::FDomainResourceDialect,
17679        > for &mut DirectoryGetTokenResponse
17680    {
17681        #[inline]
17682        unsafe fn encode(
17683            self,
17684            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17685            offset: usize,
17686            _depth: fidl::encoding::Depth,
17687        ) -> fidl::Result<()> {
17688            encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
17689            // Delegate to tuple encoding.
17690            fidl::encoding::Encode::<
17691                DirectoryGetTokenResponse,
17692                fdomain_client::fidl::FDomainResourceDialect,
17693            >::encode(
17694                (
17695                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
17696                    <fidl::encoding::Optional<
17697                        fidl::encoding::HandleType<
17698                            fdomain_client::Handle,
17699                            { fidl::ObjectType::NONE.into_raw() },
17700                            2147483648,
17701                        >,
17702                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17703                        &mut self.token
17704                    ),
17705                ),
17706                encoder,
17707                offset,
17708                _depth,
17709            )
17710        }
17711    }
17712    unsafe impl<
17713            T0: fidl::encoding::Encode<i32, fdomain_client::fidl::FDomainResourceDialect>,
17714            T1: fidl::encoding::Encode<
17715                fidl::encoding::Optional<
17716                    fidl::encoding::HandleType<
17717                        fdomain_client::Handle,
17718                        { fidl::ObjectType::NONE.into_raw() },
17719                        2147483648,
17720                    >,
17721                >,
17722                fdomain_client::fidl::FDomainResourceDialect,
17723            >,
17724        >
17725        fidl::encoding::Encode<
17726            DirectoryGetTokenResponse,
17727            fdomain_client::fidl::FDomainResourceDialect,
17728        > for (T0, T1)
17729    {
17730        #[inline]
17731        unsafe fn encode(
17732            self,
17733            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17734            offset: usize,
17735            depth: fidl::encoding::Depth,
17736        ) -> fidl::Result<()> {
17737            encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
17738            // Zero out padding regions. There's no need to apply masks
17739            // because the unmasked parts will be overwritten by fields.
17740            // Write the fields.
17741            self.0.encode(encoder, offset + 0, depth)?;
17742            self.1.encode(encoder, offset + 4, depth)?;
17743            Ok(())
17744        }
17745    }
17746
17747    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17748        for DirectoryGetTokenResponse
17749    {
17750        #[inline(always)]
17751        fn new_empty() -> Self {
17752            Self {
17753                s: fidl::new_empty!(i32, fdomain_client::fidl::FDomainResourceDialect),
17754                token: fidl::new_empty!(
17755                    fidl::encoding::Optional<
17756                        fidl::encoding::HandleType<
17757                            fdomain_client::Handle,
17758                            { fidl::ObjectType::NONE.into_raw() },
17759                            2147483648,
17760                        >,
17761                    >,
17762                    fdomain_client::fidl::FDomainResourceDialect
17763                ),
17764            }
17765        }
17766
17767        #[inline]
17768        unsafe fn decode(
17769            &mut self,
17770            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17771            offset: usize,
17772            _depth: fidl::encoding::Depth,
17773        ) -> fidl::Result<()> {
17774            decoder.debug_check_bounds::<Self>(offset);
17775            // Verify that padding bytes are zero.
17776            fidl::decode!(
17777                i32,
17778                fdomain_client::fidl::FDomainResourceDialect,
17779                &mut self.s,
17780                decoder,
17781                offset + 0,
17782                _depth
17783            )?;
17784            fidl::decode!(
17785                fidl::encoding::Optional<
17786                    fidl::encoding::HandleType<
17787                        fdomain_client::Handle,
17788                        { fidl::ObjectType::NONE.into_raw() },
17789                        2147483648,
17790                    >,
17791                >,
17792                fdomain_client::fidl::FDomainResourceDialect,
17793                &mut self.token,
17794                decoder,
17795                offset + 4,
17796                _depth
17797            )?;
17798            Ok(())
17799        }
17800    }
17801
17802    impl fidl::encoding::ResourceTypeMarker for DirectoryLinkRequest {
17803        type Borrowed<'a> = &'a mut Self;
17804        fn take_or_borrow<'a>(
17805            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17806        ) -> Self::Borrowed<'a> {
17807            value
17808        }
17809    }
17810
17811    unsafe impl fidl::encoding::TypeMarker for DirectoryLinkRequest {
17812        type Owned = Self;
17813
17814        #[inline(always)]
17815        fn inline_align(_context: fidl::encoding::Context) -> usize {
17816            8
17817        }
17818
17819        #[inline(always)]
17820        fn inline_size(_context: fidl::encoding::Context) -> usize {
17821            40
17822        }
17823    }
17824
17825    unsafe impl
17826        fidl::encoding::Encode<DirectoryLinkRequest, fdomain_client::fidl::FDomainResourceDialect>
17827        for &mut DirectoryLinkRequest
17828    {
17829        #[inline]
17830        unsafe fn encode(
17831            self,
17832            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17833            offset: usize,
17834            _depth: fidl::encoding::Depth,
17835        ) -> fidl::Result<()> {
17836            encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
17837            // Delegate to tuple encoding.
17838            fidl::encoding::Encode::<
17839                DirectoryLinkRequest,
17840                fdomain_client::fidl::FDomainResourceDialect,
17841            >::encode(
17842                (
17843                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17844                        &self.src,
17845                    ),
17846                    <fidl::encoding::HandleType<
17847                        fdomain_client::Handle,
17848                        { fidl::ObjectType::NONE.into_raw() },
17849                        2147483648,
17850                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17851                        &mut self.dst_parent_token,
17852                    ),
17853                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17854                        &self.dst,
17855                    ),
17856                ),
17857                encoder,
17858                offset,
17859                _depth,
17860            )
17861        }
17862    }
17863    unsafe impl<
17864            T0: fidl::encoding::Encode<
17865                fidl::encoding::BoundedString<255>,
17866                fdomain_client::fidl::FDomainResourceDialect,
17867            >,
17868            T1: fidl::encoding::Encode<
17869                fidl::encoding::HandleType<
17870                    fdomain_client::Handle,
17871                    { fidl::ObjectType::NONE.into_raw() },
17872                    2147483648,
17873                >,
17874                fdomain_client::fidl::FDomainResourceDialect,
17875            >,
17876            T2: fidl::encoding::Encode<
17877                fidl::encoding::BoundedString<255>,
17878                fdomain_client::fidl::FDomainResourceDialect,
17879            >,
17880        >
17881        fidl::encoding::Encode<DirectoryLinkRequest, fdomain_client::fidl::FDomainResourceDialect>
17882        for (T0, T1, T2)
17883    {
17884        #[inline]
17885        unsafe fn encode(
17886            self,
17887            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17888            offset: usize,
17889            depth: fidl::encoding::Depth,
17890        ) -> fidl::Result<()> {
17891            encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
17892            // Zero out padding regions. There's no need to apply masks
17893            // because the unmasked parts will be overwritten by fields.
17894            unsafe {
17895                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
17896                (ptr as *mut u64).write_unaligned(0);
17897            }
17898            // Write the fields.
17899            self.0.encode(encoder, offset + 0, depth)?;
17900            self.1.encode(encoder, offset + 16, depth)?;
17901            self.2.encode(encoder, offset + 24, depth)?;
17902            Ok(())
17903        }
17904    }
17905
17906    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17907        for DirectoryLinkRequest
17908    {
17909        #[inline(always)]
17910        fn new_empty() -> Self {
17911            Self {
17912                src: fidl::new_empty!(
17913                    fidl::encoding::BoundedString<255>,
17914                    fdomain_client::fidl::FDomainResourceDialect
17915                ),
17916                dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
17917                dst: fidl::new_empty!(
17918                    fidl::encoding::BoundedString<255>,
17919                    fdomain_client::fidl::FDomainResourceDialect
17920                ),
17921            }
17922        }
17923
17924        #[inline]
17925        unsafe fn decode(
17926            &mut self,
17927            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17928            offset: usize,
17929            _depth: fidl::encoding::Depth,
17930        ) -> fidl::Result<()> {
17931            decoder.debug_check_bounds::<Self>(offset);
17932            // Verify that padding bytes are zero.
17933            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
17934            let padval = unsafe { (ptr as *const u64).read_unaligned() };
17935            let mask = 0xffffffff00000000u64;
17936            let maskedval = padval & mask;
17937            if maskedval != 0 {
17938                return Err(fidl::Error::NonZeroPadding {
17939                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
17940                });
17941            }
17942            fidl::decode!(
17943                fidl::encoding::BoundedString<255>,
17944                fdomain_client::fidl::FDomainResourceDialect,
17945                &mut self.src,
17946                decoder,
17947                offset + 0,
17948                _depth
17949            )?;
17950            fidl::decode!(fidl::encoding::HandleType<fdomain_client::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.dst_parent_token, decoder, offset + 16, _depth)?;
17951            fidl::decode!(
17952                fidl::encoding::BoundedString<255>,
17953                fdomain_client::fidl::FDomainResourceDialect,
17954                &mut self.dst,
17955                decoder,
17956                offset + 24,
17957                _depth
17958            )?;
17959            Ok(())
17960        }
17961    }
17962
17963    impl fidl::encoding::ResourceTypeMarker for DirectoryOpenRequest {
17964        type Borrowed<'a> = &'a mut Self;
17965        fn take_or_borrow<'a>(
17966            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17967        ) -> Self::Borrowed<'a> {
17968            value
17969        }
17970    }
17971
17972    unsafe impl fidl::encoding::TypeMarker for DirectoryOpenRequest {
17973        type Owned = Self;
17974
17975        #[inline(always)]
17976        fn inline_align(_context: fidl::encoding::Context) -> usize {
17977            8
17978        }
17979
17980        #[inline(always)]
17981        fn inline_size(_context: fidl::encoding::Context) -> usize {
17982            48
17983        }
17984    }
17985
17986    unsafe impl
17987        fidl::encoding::Encode<DirectoryOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
17988        for &mut DirectoryOpenRequest
17989    {
17990        #[inline]
17991        unsafe fn encode(
17992            self,
17993            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17994            offset: usize,
17995            _depth: fidl::encoding::Depth,
17996        ) -> fidl::Result<()> {
17997            encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
17998            // Delegate to tuple encoding.
17999            fidl::encoding::Encode::<DirectoryOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
18000                (
18001                    <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
18002                    <Flags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
18003                    <Options as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
18004                    <fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
18005                ),
18006                encoder, offset, _depth
18007            )
18008        }
18009    }
18010    unsafe impl<
18011            T0: fidl::encoding::Encode<
18012                fidl::encoding::BoundedString<4095>,
18013                fdomain_client::fidl::FDomainResourceDialect,
18014            >,
18015            T1: fidl::encoding::Encode<Flags, fdomain_client::fidl::FDomainResourceDialect>,
18016            T2: fidl::encoding::Encode<Options, fdomain_client::fidl::FDomainResourceDialect>,
18017            T3: fidl::encoding::Encode<
18018                fidl::encoding::HandleType<
18019                    fdomain_client::Channel,
18020                    { fidl::ObjectType::CHANNEL.into_raw() },
18021                    2147483648,
18022                >,
18023                fdomain_client::fidl::FDomainResourceDialect,
18024            >,
18025        >
18026        fidl::encoding::Encode<DirectoryOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
18027        for (T0, T1, T2, T3)
18028    {
18029        #[inline]
18030        unsafe fn encode(
18031            self,
18032            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18033            offset: usize,
18034            depth: fidl::encoding::Depth,
18035        ) -> fidl::Result<()> {
18036            encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
18037            // Zero out padding regions. There's no need to apply masks
18038            // because the unmasked parts will be overwritten by fields.
18039            unsafe {
18040                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
18041                (ptr as *mut u64).write_unaligned(0);
18042            }
18043            // Write the fields.
18044            self.0.encode(encoder, offset + 0, depth)?;
18045            self.1.encode(encoder, offset + 16, depth)?;
18046            self.2.encode(encoder, offset + 24, depth)?;
18047            self.3.encode(encoder, offset + 40, depth)?;
18048            Ok(())
18049        }
18050    }
18051
18052    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18053        for DirectoryOpenRequest
18054    {
18055        #[inline(always)]
18056        fn new_empty() -> Self {
18057            Self {
18058                path: fidl::new_empty!(
18059                    fidl::encoding::BoundedString<4095>,
18060                    fdomain_client::fidl::FDomainResourceDialect
18061                ),
18062                flags: fidl::new_empty!(Flags, fdomain_client::fidl::FDomainResourceDialect),
18063                options: fidl::new_empty!(Options, fdomain_client::fidl::FDomainResourceDialect),
18064                object: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18065            }
18066        }
18067
18068        #[inline]
18069        unsafe fn decode(
18070            &mut self,
18071            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18072            offset: usize,
18073            _depth: fidl::encoding::Depth,
18074        ) -> fidl::Result<()> {
18075            decoder.debug_check_bounds::<Self>(offset);
18076            // Verify that padding bytes are zero.
18077            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
18078            let padval = unsafe { (ptr as *const u64).read_unaligned() };
18079            let mask = 0xffffffff00000000u64;
18080            let maskedval = padval & mask;
18081            if maskedval != 0 {
18082                return Err(fidl::Error::NonZeroPadding {
18083                    padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
18084                });
18085            }
18086            fidl::decode!(
18087                fidl::encoding::BoundedString<4095>,
18088                fdomain_client::fidl::FDomainResourceDialect,
18089                &mut self.path,
18090                decoder,
18091                offset + 0,
18092                _depth
18093            )?;
18094            fidl::decode!(
18095                Flags,
18096                fdomain_client::fidl::FDomainResourceDialect,
18097                &mut self.flags,
18098                decoder,
18099                offset + 16,
18100                _depth
18101            )?;
18102            fidl::decode!(
18103                Options,
18104                fdomain_client::fidl::FDomainResourceDialect,
18105                &mut self.options,
18106                decoder,
18107                offset + 24,
18108                _depth
18109            )?;
18110            fidl::decode!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.object, decoder, offset + 40, _depth)?;
18111            Ok(())
18112        }
18113    }
18114
18115    impl fidl::encoding::ResourceTypeMarker for DirectoryRenameRequest {
18116        type Borrowed<'a> = &'a mut Self;
18117        fn take_or_borrow<'a>(
18118            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18119        ) -> Self::Borrowed<'a> {
18120            value
18121        }
18122    }
18123
18124    unsafe impl fidl::encoding::TypeMarker for DirectoryRenameRequest {
18125        type Owned = Self;
18126
18127        #[inline(always)]
18128        fn inline_align(_context: fidl::encoding::Context) -> usize {
18129            8
18130        }
18131
18132        #[inline(always)]
18133        fn inline_size(_context: fidl::encoding::Context) -> usize {
18134            40
18135        }
18136    }
18137
18138    unsafe impl
18139        fidl::encoding::Encode<DirectoryRenameRequest, fdomain_client::fidl::FDomainResourceDialect>
18140        for &mut DirectoryRenameRequest
18141    {
18142        #[inline]
18143        unsafe fn encode(
18144            self,
18145            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18146            offset: usize,
18147            _depth: fidl::encoding::Depth,
18148        ) -> fidl::Result<()> {
18149            encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
18150            // Delegate to tuple encoding.
18151            fidl::encoding::Encode::<
18152                DirectoryRenameRequest,
18153                fdomain_client::fidl::FDomainResourceDialect,
18154            >::encode(
18155                (
18156                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18157                        &self.src,
18158                    ),
18159                    <fidl::encoding::HandleType<
18160                        fdomain_client::Event,
18161                        { fidl::ObjectType::EVENT.into_raw() },
18162                        2147483648,
18163                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18164                        &mut self.dst_parent_token,
18165                    ),
18166                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18167                        &self.dst,
18168                    ),
18169                ),
18170                encoder,
18171                offset,
18172                _depth,
18173            )
18174        }
18175    }
18176    unsafe impl<
18177            T0: fidl::encoding::Encode<
18178                fidl::encoding::BoundedString<255>,
18179                fdomain_client::fidl::FDomainResourceDialect,
18180            >,
18181            T1: fidl::encoding::Encode<
18182                fidl::encoding::HandleType<
18183                    fdomain_client::Event,
18184                    { fidl::ObjectType::EVENT.into_raw() },
18185                    2147483648,
18186                >,
18187                fdomain_client::fidl::FDomainResourceDialect,
18188            >,
18189            T2: fidl::encoding::Encode<
18190                fidl::encoding::BoundedString<255>,
18191                fdomain_client::fidl::FDomainResourceDialect,
18192            >,
18193        >
18194        fidl::encoding::Encode<DirectoryRenameRequest, fdomain_client::fidl::FDomainResourceDialect>
18195        for (T0, T1, T2)
18196    {
18197        #[inline]
18198        unsafe fn encode(
18199            self,
18200            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18201            offset: usize,
18202            depth: fidl::encoding::Depth,
18203        ) -> fidl::Result<()> {
18204            encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
18205            // Zero out padding regions. There's no need to apply masks
18206            // because the unmasked parts will be overwritten by fields.
18207            unsafe {
18208                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
18209                (ptr as *mut u64).write_unaligned(0);
18210            }
18211            // Write the fields.
18212            self.0.encode(encoder, offset + 0, depth)?;
18213            self.1.encode(encoder, offset + 16, depth)?;
18214            self.2.encode(encoder, offset + 24, depth)?;
18215            Ok(())
18216        }
18217    }
18218
18219    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18220        for DirectoryRenameRequest
18221    {
18222        #[inline(always)]
18223        fn new_empty() -> Self {
18224            Self {
18225                src: fidl::new_empty!(
18226                    fidl::encoding::BoundedString<255>,
18227                    fdomain_client::fidl::FDomainResourceDialect
18228                ),
18229                dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18230                dst: fidl::new_empty!(
18231                    fidl::encoding::BoundedString<255>,
18232                    fdomain_client::fidl::FDomainResourceDialect
18233                ),
18234            }
18235        }
18236
18237        #[inline]
18238        unsafe fn decode(
18239            &mut self,
18240            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18241            offset: usize,
18242            _depth: fidl::encoding::Depth,
18243        ) -> fidl::Result<()> {
18244            decoder.debug_check_bounds::<Self>(offset);
18245            // Verify that padding bytes are zero.
18246            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
18247            let padval = unsafe { (ptr as *const u64).read_unaligned() };
18248            let mask = 0xffffffff00000000u64;
18249            let maskedval = padval & mask;
18250            if maskedval != 0 {
18251                return Err(fidl::Error::NonZeroPadding {
18252                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
18253                });
18254            }
18255            fidl::decode!(
18256                fidl::encoding::BoundedString<255>,
18257                fdomain_client::fidl::FDomainResourceDialect,
18258                &mut self.src,
18259                decoder,
18260                offset + 0,
18261                _depth
18262            )?;
18263            fidl::decode!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.dst_parent_token, decoder, offset + 16, _depth)?;
18264            fidl::decode!(
18265                fidl::encoding::BoundedString<255>,
18266                fdomain_client::fidl::FDomainResourceDialect,
18267                &mut self.dst,
18268                decoder,
18269                offset + 24,
18270                _depth
18271            )?;
18272            Ok(())
18273        }
18274    }
18275
18276    impl fidl::encoding::ResourceTypeMarker for DirectoryWatchRequest {
18277        type Borrowed<'a> = &'a mut Self;
18278        fn take_or_borrow<'a>(
18279            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18280        ) -> Self::Borrowed<'a> {
18281            value
18282        }
18283    }
18284
18285    unsafe impl fidl::encoding::TypeMarker for DirectoryWatchRequest {
18286        type Owned = Self;
18287
18288        #[inline(always)]
18289        fn inline_align(_context: fidl::encoding::Context) -> usize {
18290            4
18291        }
18292
18293        #[inline(always)]
18294        fn inline_size(_context: fidl::encoding::Context) -> usize {
18295            12
18296        }
18297    }
18298
18299    unsafe impl
18300        fidl::encoding::Encode<DirectoryWatchRequest, fdomain_client::fidl::FDomainResourceDialect>
18301        for &mut DirectoryWatchRequest
18302    {
18303        #[inline]
18304        unsafe fn encode(
18305            self,
18306            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18307            offset: usize,
18308            _depth: fidl::encoding::Depth,
18309        ) -> fidl::Result<()> {
18310            encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
18311            // Delegate to tuple encoding.
18312            fidl::encoding::Encode::<
18313                DirectoryWatchRequest,
18314                fdomain_client::fidl::FDomainResourceDialect,
18315            >::encode(
18316                (
18317                    <WatchMask as fidl::encoding::ValueTypeMarker>::borrow(&self.mask),
18318                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
18319                    <fidl::encoding::Endpoint<
18320                        fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
18321                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18322                        &mut self.watcher
18323                    ),
18324                ),
18325                encoder,
18326                offset,
18327                _depth,
18328            )
18329        }
18330    }
18331    unsafe impl<
18332            T0: fidl::encoding::Encode<WatchMask, fdomain_client::fidl::FDomainResourceDialect>,
18333            T1: fidl::encoding::Encode<u32, fdomain_client::fidl::FDomainResourceDialect>,
18334            T2: fidl::encoding::Encode<
18335                fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>>,
18336                fdomain_client::fidl::FDomainResourceDialect,
18337            >,
18338        >
18339        fidl::encoding::Encode<DirectoryWatchRequest, fdomain_client::fidl::FDomainResourceDialect>
18340        for (T0, T1, T2)
18341    {
18342        #[inline]
18343        unsafe fn encode(
18344            self,
18345            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18346            offset: usize,
18347            depth: fidl::encoding::Depth,
18348        ) -> fidl::Result<()> {
18349            encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
18350            // Zero out padding regions. There's no need to apply masks
18351            // because the unmasked parts will be overwritten by fields.
18352            // Write the fields.
18353            self.0.encode(encoder, offset + 0, depth)?;
18354            self.1.encode(encoder, offset + 4, depth)?;
18355            self.2.encode(encoder, offset + 8, depth)?;
18356            Ok(())
18357        }
18358    }
18359
18360    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18361        for DirectoryWatchRequest
18362    {
18363        #[inline(always)]
18364        fn new_empty() -> Self {
18365            Self {
18366                mask: fidl::new_empty!(WatchMask, fdomain_client::fidl::FDomainResourceDialect),
18367                options: fidl::new_empty!(u32, fdomain_client::fidl::FDomainResourceDialect),
18368                watcher: fidl::new_empty!(
18369                    fidl::encoding::Endpoint<
18370                        fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
18371                    >,
18372                    fdomain_client::fidl::FDomainResourceDialect
18373                ),
18374            }
18375        }
18376
18377        #[inline]
18378        unsafe fn decode(
18379            &mut self,
18380            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18381            offset: usize,
18382            _depth: fidl::encoding::Depth,
18383        ) -> fidl::Result<()> {
18384            decoder.debug_check_bounds::<Self>(offset);
18385            // Verify that padding bytes are zero.
18386            fidl::decode!(
18387                WatchMask,
18388                fdomain_client::fidl::FDomainResourceDialect,
18389                &mut self.mask,
18390                decoder,
18391                offset + 0,
18392                _depth
18393            )?;
18394            fidl::decode!(
18395                u32,
18396                fdomain_client::fidl::FDomainResourceDialect,
18397                &mut self.options,
18398                decoder,
18399                offset + 4,
18400                _depth
18401            )?;
18402            fidl::decode!(
18403                fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>>,
18404                fdomain_client::fidl::FDomainResourceDialect,
18405                &mut self.watcher,
18406                decoder,
18407                offset + 8,
18408                _depth
18409            )?;
18410            Ok(())
18411        }
18412    }
18413
18414    impl fidl::encoding::ResourceTypeMarker for FileAllocateRequest {
18415        type Borrowed<'a> = &'a mut Self;
18416        fn take_or_borrow<'a>(
18417            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18418        ) -> Self::Borrowed<'a> {
18419            value
18420        }
18421    }
18422
18423    unsafe impl fidl::encoding::TypeMarker for FileAllocateRequest {
18424        type Owned = Self;
18425
18426        #[inline(always)]
18427        fn inline_align(_context: fidl::encoding::Context) -> usize {
18428            8
18429        }
18430
18431        #[inline(always)]
18432        fn inline_size(_context: fidl::encoding::Context) -> usize {
18433            24
18434        }
18435    }
18436
18437    unsafe impl
18438        fidl::encoding::Encode<FileAllocateRequest, fdomain_client::fidl::FDomainResourceDialect>
18439        for &mut FileAllocateRequest
18440    {
18441        #[inline]
18442        unsafe fn encode(
18443            self,
18444            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18445            offset: usize,
18446            _depth: fidl::encoding::Depth,
18447        ) -> fidl::Result<()> {
18448            encoder.debug_check_bounds::<FileAllocateRequest>(offset);
18449            // Delegate to tuple encoding.
18450            fidl::encoding::Encode::<
18451                FileAllocateRequest,
18452                fdomain_client::fidl::FDomainResourceDialect,
18453            >::encode(
18454                (
18455                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.offset),
18456                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
18457                    <AllocateMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
18458                ),
18459                encoder,
18460                offset,
18461                _depth,
18462            )
18463        }
18464    }
18465    unsafe impl<
18466            T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
18467            T1: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
18468            T2: fidl::encoding::Encode<AllocateMode, fdomain_client::fidl::FDomainResourceDialect>,
18469        >
18470        fidl::encoding::Encode<FileAllocateRequest, fdomain_client::fidl::FDomainResourceDialect>
18471        for (T0, T1, T2)
18472    {
18473        #[inline]
18474        unsafe fn encode(
18475            self,
18476            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18477            offset: usize,
18478            depth: fidl::encoding::Depth,
18479        ) -> fidl::Result<()> {
18480            encoder.debug_check_bounds::<FileAllocateRequest>(offset);
18481            // Zero out padding regions. There's no need to apply masks
18482            // because the unmasked parts will be overwritten by fields.
18483            unsafe {
18484                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
18485                (ptr as *mut u64).write_unaligned(0);
18486            }
18487            // Write the fields.
18488            self.0.encode(encoder, offset + 0, depth)?;
18489            self.1.encode(encoder, offset + 8, depth)?;
18490            self.2.encode(encoder, offset + 16, depth)?;
18491            Ok(())
18492        }
18493    }
18494
18495    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18496        for FileAllocateRequest
18497    {
18498        #[inline(always)]
18499        fn new_empty() -> Self {
18500            Self {
18501                offset: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
18502                length: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
18503                mode: fidl::new_empty!(AllocateMode, fdomain_client::fidl::FDomainResourceDialect),
18504            }
18505        }
18506
18507        #[inline]
18508        unsafe fn decode(
18509            &mut self,
18510            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18511            offset: usize,
18512            _depth: fidl::encoding::Depth,
18513        ) -> fidl::Result<()> {
18514            decoder.debug_check_bounds::<Self>(offset);
18515            // Verify that padding bytes are zero.
18516            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
18517            let padval = unsafe { (ptr as *const u64).read_unaligned() };
18518            let mask = 0xffffffff00000000u64;
18519            let maskedval = padval & mask;
18520            if maskedval != 0 {
18521                return Err(fidl::Error::NonZeroPadding {
18522                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
18523                });
18524            }
18525            fidl::decode!(
18526                u64,
18527                fdomain_client::fidl::FDomainResourceDialect,
18528                &mut self.offset,
18529                decoder,
18530                offset + 0,
18531                _depth
18532            )?;
18533            fidl::decode!(
18534                u64,
18535                fdomain_client::fidl::FDomainResourceDialect,
18536                &mut self.length,
18537                decoder,
18538                offset + 8,
18539                _depth
18540            )?;
18541            fidl::decode!(
18542                AllocateMode,
18543                fdomain_client::fidl::FDomainResourceDialect,
18544                &mut self.mode,
18545                decoder,
18546                offset + 16,
18547                _depth
18548            )?;
18549            Ok(())
18550        }
18551    }
18552
18553    impl fidl::encoding::ResourceTypeMarker for FileEnableVerityRequest {
18554        type Borrowed<'a> = &'a mut Self;
18555        fn take_or_borrow<'a>(
18556            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18557        ) -> Self::Borrowed<'a> {
18558            value
18559        }
18560    }
18561
18562    unsafe impl fidl::encoding::TypeMarker for FileEnableVerityRequest {
18563        type Owned = Self;
18564
18565        #[inline(always)]
18566        fn inline_align(_context: fidl::encoding::Context) -> usize {
18567            8
18568        }
18569
18570        #[inline(always)]
18571        fn inline_size(_context: fidl::encoding::Context) -> usize {
18572            16
18573        }
18574    }
18575
18576    unsafe impl
18577        fidl::encoding::Encode<
18578            FileEnableVerityRequest,
18579            fdomain_client::fidl::FDomainResourceDialect,
18580        > for &mut FileEnableVerityRequest
18581    {
18582        #[inline]
18583        unsafe fn encode(
18584            self,
18585            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18586            offset: usize,
18587            _depth: fidl::encoding::Depth,
18588        ) -> fidl::Result<()> {
18589            encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
18590            // Delegate to tuple encoding.
18591            fidl::encoding::Encode::<
18592                FileEnableVerityRequest,
18593                fdomain_client::fidl::FDomainResourceDialect,
18594            >::encode(
18595                (<VerificationOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
18596                encoder,
18597                offset,
18598                _depth,
18599            )
18600        }
18601    }
18602    unsafe impl<
18603            T0: fidl::encoding::Encode<
18604                VerificationOptions,
18605                fdomain_client::fidl::FDomainResourceDialect,
18606            >,
18607        >
18608        fidl::encoding::Encode<
18609            FileEnableVerityRequest,
18610            fdomain_client::fidl::FDomainResourceDialect,
18611        > for (T0,)
18612    {
18613        #[inline]
18614        unsafe fn encode(
18615            self,
18616            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18617            offset: usize,
18618            depth: fidl::encoding::Depth,
18619        ) -> fidl::Result<()> {
18620            encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
18621            // Zero out padding regions. There's no need to apply masks
18622            // because the unmasked parts will be overwritten by fields.
18623            // Write the fields.
18624            self.0.encode(encoder, offset + 0, depth)?;
18625            Ok(())
18626        }
18627    }
18628
18629    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18630        for FileEnableVerityRequest
18631    {
18632        #[inline(always)]
18633        fn new_empty() -> Self {
18634            Self {
18635                options: fidl::new_empty!(
18636                    VerificationOptions,
18637                    fdomain_client::fidl::FDomainResourceDialect
18638                ),
18639            }
18640        }
18641
18642        #[inline]
18643        unsafe fn decode(
18644            &mut self,
18645            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18646            offset: usize,
18647            _depth: fidl::encoding::Depth,
18648        ) -> fidl::Result<()> {
18649            decoder.debug_check_bounds::<Self>(offset);
18650            // Verify that padding bytes are zero.
18651            fidl::decode!(
18652                VerificationOptions,
18653                fdomain_client::fidl::FDomainResourceDialect,
18654                &mut self.options,
18655                decoder,
18656                offset + 0,
18657                _depth
18658            )?;
18659            Ok(())
18660        }
18661    }
18662
18663    impl fidl::encoding::ResourceTypeMarker for FileObject {
18664        type Borrowed<'a> = &'a mut Self;
18665        fn take_or_borrow<'a>(
18666            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18667        ) -> Self::Borrowed<'a> {
18668            value
18669        }
18670    }
18671
18672    unsafe impl fidl::encoding::TypeMarker for FileObject {
18673        type Owned = Self;
18674
18675        #[inline(always)]
18676        fn inline_align(_context: fidl::encoding::Context) -> usize {
18677            4
18678        }
18679
18680        #[inline(always)]
18681        fn inline_size(_context: fidl::encoding::Context) -> usize {
18682            8
18683        }
18684    }
18685
18686    unsafe impl fidl::encoding::Encode<FileObject, fdomain_client::fidl::FDomainResourceDialect>
18687        for &mut FileObject
18688    {
18689        #[inline]
18690        unsafe fn encode(
18691            self,
18692            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18693            offset: usize,
18694            _depth: fidl::encoding::Depth,
18695        ) -> fidl::Result<()> {
18696            encoder.debug_check_bounds::<FileObject>(offset);
18697            // Delegate to tuple encoding.
18698            fidl::encoding::Encode::<FileObject, fdomain_client::fidl::FDomainResourceDialect>::encode(
18699                (
18700                    <fidl::encoding::Optional<fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.event),
18701                    <fidl::encoding::Optional<fidl::encoding::HandleType<fdomain_client::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.stream),
18702                ),
18703                encoder, offset, _depth
18704            )
18705        }
18706    }
18707    unsafe impl<
18708            T0: fidl::encoding::Encode<
18709                fidl::encoding::Optional<
18710                    fidl::encoding::HandleType<
18711                        fdomain_client::Event,
18712                        { fidl::ObjectType::EVENT.into_raw() },
18713                        2147483648,
18714                    >,
18715                >,
18716                fdomain_client::fidl::FDomainResourceDialect,
18717            >,
18718            T1: fidl::encoding::Encode<
18719                fidl::encoding::Optional<
18720                    fidl::encoding::HandleType<
18721                        fdomain_client::Stream,
18722                        { fidl::ObjectType::STREAM.into_raw() },
18723                        2147483648,
18724                    >,
18725                >,
18726                fdomain_client::fidl::FDomainResourceDialect,
18727            >,
18728        > fidl::encoding::Encode<FileObject, fdomain_client::fidl::FDomainResourceDialect>
18729        for (T0, T1)
18730    {
18731        #[inline]
18732        unsafe fn encode(
18733            self,
18734            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18735            offset: usize,
18736            depth: fidl::encoding::Depth,
18737        ) -> fidl::Result<()> {
18738            encoder.debug_check_bounds::<FileObject>(offset);
18739            // Zero out padding regions. There's no need to apply masks
18740            // because the unmasked parts will be overwritten by fields.
18741            // Write the fields.
18742            self.0.encode(encoder, offset + 0, depth)?;
18743            self.1.encode(encoder, offset + 4, depth)?;
18744            Ok(())
18745        }
18746    }
18747
18748    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for FileObject {
18749        #[inline(always)]
18750        fn new_empty() -> Self {
18751            Self {
18752                event: fidl::new_empty!(
18753                    fidl::encoding::Optional<
18754                        fidl::encoding::HandleType<
18755                            fdomain_client::Event,
18756                            { fidl::ObjectType::EVENT.into_raw() },
18757                            2147483648,
18758                        >,
18759                    >,
18760                    fdomain_client::fidl::FDomainResourceDialect
18761                ),
18762                stream: fidl::new_empty!(
18763                    fidl::encoding::Optional<
18764                        fidl::encoding::HandleType<
18765                            fdomain_client::Stream,
18766                            { fidl::ObjectType::STREAM.into_raw() },
18767                            2147483648,
18768                        >,
18769                    >,
18770                    fdomain_client::fidl::FDomainResourceDialect
18771                ),
18772            }
18773        }
18774
18775        #[inline]
18776        unsafe fn decode(
18777            &mut self,
18778            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18779            offset: usize,
18780            _depth: fidl::encoding::Depth,
18781        ) -> fidl::Result<()> {
18782            decoder.debug_check_bounds::<Self>(offset);
18783            // Verify that padding bytes are zero.
18784            fidl::decode!(
18785                fidl::encoding::Optional<
18786                    fidl::encoding::HandleType<
18787                        fdomain_client::Event,
18788                        { fidl::ObjectType::EVENT.into_raw() },
18789                        2147483648,
18790                    >,
18791                >,
18792                fdomain_client::fidl::FDomainResourceDialect,
18793                &mut self.event,
18794                decoder,
18795                offset + 0,
18796                _depth
18797            )?;
18798            fidl::decode!(
18799                fidl::encoding::Optional<
18800                    fidl::encoding::HandleType<
18801                        fdomain_client::Stream,
18802                        { fidl::ObjectType::STREAM.into_raw() },
18803                        2147483648,
18804                    >,
18805                >,
18806                fdomain_client::fidl::FDomainResourceDialect,
18807                &mut self.stream,
18808                decoder,
18809                offset + 4,
18810                _depth
18811            )?;
18812            Ok(())
18813        }
18814    }
18815
18816    impl fidl::encoding::ResourceTypeMarker for FileGetBackingMemoryResponse {
18817        type Borrowed<'a> = &'a mut Self;
18818        fn take_or_borrow<'a>(
18819            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18820        ) -> Self::Borrowed<'a> {
18821            value
18822        }
18823    }
18824
18825    unsafe impl fidl::encoding::TypeMarker for FileGetBackingMemoryResponse {
18826        type Owned = Self;
18827
18828        #[inline(always)]
18829        fn inline_align(_context: fidl::encoding::Context) -> usize {
18830            4
18831        }
18832
18833        #[inline(always)]
18834        fn inline_size(_context: fidl::encoding::Context) -> usize {
18835            4
18836        }
18837    }
18838
18839    unsafe impl
18840        fidl::encoding::Encode<
18841            FileGetBackingMemoryResponse,
18842            fdomain_client::fidl::FDomainResourceDialect,
18843        > for &mut FileGetBackingMemoryResponse
18844    {
18845        #[inline]
18846        unsafe fn encode(
18847            self,
18848            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18849            offset: usize,
18850            _depth: fidl::encoding::Depth,
18851        ) -> fidl::Result<()> {
18852            encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
18853            // Delegate to tuple encoding.
18854            fidl::encoding::Encode::<
18855                FileGetBackingMemoryResponse,
18856                fdomain_client::fidl::FDomainResourceDialect,
18857            >::encode(
18858                (<fidl::encoding::HandleType<
18859                    fdomain_client::Vmo,
18860                    { fidl::ObjectType::VMO.into_raw() },
18861                    2147483648,
18862                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18863                    &mut self.vmo
18864                ),),
18865                encoder,
18866                offset,
18867                _depth,
18868            )
18869        }
18870    }
18871    unsafe impl<
18872            T0: fidl::encoding::Encode<
18873                fidl::encoding::HandleType<
18874                    fdomain_client::Vmo,
18875                    { fidl::ObjectType::VMO.into_raw() },
18876                    2147483648,
18877                >,
18878                fdomain_client::fidl::FDomainResourceDialect,
18879            >,
18880        >
18881        fidl::encoding::Encode<
18882            FileGetBackingMemoryResponse,
18883            fdomain_client::fidl::FDomainResourceDialect,
18884        > for (T0,)
18885    {
18886        #[inline]
18887        unsafe fn encode(
18888            self,
18889            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18890            offset: usize,
18891            depth: fidl::encoding::Depth,
18892        ) -> fidl::Result<()> {
18893            encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
18894            // Zero out padding regions. There's no need to apply masks
18895            // because the unmasked parts will be overwritten by fields.
18896            // Write the fields.
18897            self.0.encode(encoder, offset + 0, depth)?;
18898            Ok(())
18899        }
18900    }
18901
18902    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18903        for FileGetBackingMemoryResponse
18904    {
18905        #[inline(always)]
18906        fn new_empty() -> Self {
18907            Self {
18908                vmo: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18909            }
18910        }
18911
18912        #[inline]
18913        unsafe fn decode(
18914            &mut self,
18915            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18916            offset: usize,
18917            _depth: fidl::encoding::Depth,
18918        ) -> fidl::Result<()> {
18919            decoder.debug_check_bounds::<Self>(offset);
18920            // Verify that padding bytes are zero.
18921            fidl::decode!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.vmo, decoder, offset + 0, _depth)?;
18922            Ok(())
18923        }
18924    }
18925
18926    impl fidl::encoding::ResourceTypeMarker for LinkableLinkIntoRequest {
18927        type Borrowed<'a> = &'a mut Self;
18928        fn take_or_borrow<'a>(
18929            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18930        ) -> Self::Borrowed<'a> {
18931            value
18932        }
18933    }
18934
18935    unsafe impl fidl::encoding::TypeMarker for LinkableLinkIntoRequest {
18936        type Owned = Self;
18937
18938        #[inline(always)]
18939        fn inline_align(_context: fidl::encoding::Context) -> usize {
18940            8
18941        }
18942
18943        #[inline(always)]
18944        fn inline_size(_context: fidl::encoding::Context) -> usize {
18945            24
18946        }
18947    }
18948
18949    unsafe impl
18950        fidl::encoding::Encode<
18951            LinkableLinkIntoRequest,
18952            fdomain_client::fidl::FDomainResourceDialect,
18953        > for &mut LinkableLinkIntoRequest
18954    {
18955        #[inline]
18956        unsafe fn encode(
18957            self,
18958            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18959            offset: usize,
18960            _depth: fidl::encoding::Depth,
18961        ) -> fidl::Result<()> {
18962            encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
18963            // Delegate to tuple encoding.
18964            fidl::encoding::Encode::<
18965                LinkableLinkIntoRequest,
18966                fdomain_client::fidl::FDomainResourceDialect,
18967            >::encode(
18968                (
18969                    <fidl::encoding::HandleType<
18970                        fdomain_client::Event,
18971                        { fidl::ObjectType::EVENT.into_raw() },
18972                        2147483648,
18973                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18974                        &mut self.dst_parent_token,
18975                    ),
18976                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18977                        &self.dst,
18978                    ),
18979                ),
18980                encoder,
18981                offset,
18982                _depth,
18983            )
18984        }
18985    }
18986    unsafe impl<
18987            T0: fidl::encoding::Encode<
18988                fidl::encoding::HandleType<
18989                    fdomain_client::Event,
18990                    { fidl::ObjectType::EVENT.into_raw() },
18991                    2147483648,
18992                >,
18993                fdomain_client::fidl::FDomainResourceDialect,
18994            >,
18995            T1: fidl::encoding::Encode<
18996                fidl::encoding::BoundedString<255>,
18997                fdomain_client::fidl::FDomainResourceDialect,
18998            >,
18999        >
19000        fidl::encoding::Encode<
19001            LinkableLinkIntoRequest,
19002            fdomain_client::fidl::FDomainResourceDialect,
19003        > for (T0, T1)
19004    {
19005        #[inline]
19006        unsafe fn encode(
19007            self,
19008            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19009            offset: usize,
19010            depth: fidl::encoding::Depth,
19011        ) -> fidl::Result<()> {
19012            encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
19013            // Zero out padding regions. There's no need to apply masks
19014            // because the unmasked parts will be overwritten by fields.
19015            unsafe {
19016                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
19017                (ptr as *mut u64).write_unaligned(0);
19018            }
19019            // Write the fields.
19020            self.0.encode(encoder, offset + 0, depth)?;
19021            self.1.encode(encoder, offset + 8, depth)?;
19022            Ok(())
19023        }
19024    }
19025
19026    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19027        for LinkableLinkIntoRequest
19028    {
19029        #[inline(always)]
19030        fn new_empty() -> Self {
19031            Self {
19032                dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
19033                dst: fidl::new_empty!(
19034                    fidl::encoding::BoundedString<255>,
19035                    fdomain_client::fidl::FDomainResourceDialect
19036                ),
19037            }
19038        }
19039
19040        #[inline]
19041        unsafe fn decode(
19042            &mut self,
19043            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19044            offset: usize,
19045            _depth: fidl::encoding::Depth,
19046        ) -> fidl::Result<()> {
19047            decoder.debug_check_bounds::<Self>(offset);
19048            // Verify that padding bytes are zero.
19049            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
19050            let padval = unsafe { (ptr as *const u64).read_unaligned() };
19051            let mask = 0xffffffff00000000u64;
19052            let maskedval = padval & mask;
19053            if maskedval != 0 {
19054                return Err(fidl::Error::NonZeroPadding {
19055                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
19056                });
19057            }
19058            fidl::decode!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.dst_parent_token, decoder, offset + 0, _depth)?;
19059            fidl::decode!(
19060                fidl::encoding::BoundedString<255>,
19061                fdomain_client::fidl::FDomainResourceDialect,
19062                &mut self.dst,
19063                decoder,
19064                offset + 8,
19065                _depth
19066            )?;
19067            Ok(())
19068        }
19069    }
19070
19071    impl fidl::encoding::ResourceTypeMarker for NodeDeprecatedCloneRequest {
19072        type Borrowed<'a> = &'a mut Self;
19073        fn take_or_borrow<'a>(
19074            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19075        ) -> Self::Borrowed<'a> {
19076            value
19077        }
19078    }
19079
19080    unsafe impl fidl::encoding::TypeMarker for NodeDeprecatedCloneRequest {
19081        type Owned = Self;
19082
19083        #[inline(always)]
19084        fn inline_align(_context: fidl::encoding::Context) -> usize {
19085            4
19086        }
19087
19088        #[inline(always)]
19089        fn inline_size(_context: fidl::encoding::Context) -> usize {
19090            8
19091        }
19092    }
19093
19094    unsafe impl
19095        fidl::encoding::Encode<
19096            NodeDeprecatedCloneRequest,
19097            fdomain_client::fidl::FDomainResourceDialect,
19098        > for &mut NodeDeprecatedCloneRequest
19099    {
19100        #[inline]
19101        unsafe fn encode(
19102            self,
19103            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19104            offset: usize,
19105            _depth: fidl::encoding::Depth,
19106        ) -> fidl::Result<()> {
19107            encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
19108            // Delegate to tuple encoding.
19109            fidl::encoding::Encode::<NodeDeprecatedCloneRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
19110                (
19111                    <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
19112                    <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
19113                ),
19114                encoder, offset, _depth
19115            )
19116        }
19117    }
19118    unsafe impl<
19119            T0: fidl::encoding::Encode<OpenFlags, fdomain_client::fidl::FDomainResourceDialect>,
19120            T1: fidl::encoding::Encode<
19121                fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19122                fdomain_client::fidl::FDomainResourceDialect,
19123            >,
19124        >
19125        fidl::encoding::Encode<
19126            NodeDeprecatedCloneRequest,
19127            fdomain_client::fidl::FDomainResourceDialect,
19128        > for (T0, T1)
19129    {
19130        #[inline]
19131        unsafe fn encode(
19132            self,
19133            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19134            offset: usize,
19135            depth: fidl::encoding::Depth,
19136        ) -> fidl::Result<()> {
19137            encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
19138            // Zero out padding regions. There's no need to apply masks
19139            // because the unmasked parts will be overwritten by fields.
19140            // Write the fields.
19141            self.0.encode(encoder, offset + 0, depth)?;
19142            self.1.encode(encoder, offset + 4, depth)?;
19143            Ok(())
19144        }
19145    }
19146
19147    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19148        for NodeDeprecatedCloneRequest
19149    {
19150        #[inline(always)]
19151        fn new_empty() -> Self {
19152            Self {
19153                flags: fidl::new_empty!(OpenFlags, fdomain_client::fidl::FDomainResourceDialect),
19154                object: fidl::new_empty!(
19155                    fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19156                    fdomain_client::fidl::FDomainResourceDialect
19157                ),
19158            }
19159        }
19160
19161        #[inline]
19162        unsafe fn decode(
19163            &mut self,
19164            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19165            offset: usize,
19166            _depth: fidl::encoding::Depth,
19167        ) -> fidl::Result<()> {
19168            decoder.debug_check_bounds::<Self>(offset);
19169            // Verify that padding bytes are zero.
19170            fidl::decode!(
19171                OpenFlags,
19172                fdomain_client::fidl::FDomainResourceDialect,
19173                &mut self.flags,
19174                decoder,
19175                offset + 0,
19176                _depth
19177            )?;
19178            fidl::decode!(
19179                fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19180                fdomain_client::fidl::FDomainResourceDialect,
19181                &mut self.object,
19182                decoder,
19183                offset + 4,
19184                _depth
19185            )?;
19186            Ok(())
19187        }
19188    }
19189
19190    impl fidl::encoding::ResourceTypeMarker for NodeListExtendedAttributesRequest {
19191        type Borrowed<'a> = &'a mut Self;
19192        fn take_or_borrow<'a>(
19193            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19194        ) -> Self::Borrowed<'a> {
19195            value
19196        }
19197    }
19198
19199    unsafe impl fidl::encoding::TypeMarker for NodeListExtendedAttributesRequest {
19200        type Owned = Self;
19201
19202        #[inline(always)]
19203        fn inline_align(_context: fidl::encoding::Context) -> usize {
19204            4
19205        }
19206
19207        #[inline(always)]
19208        fn inline_size(_context: fidl::encoding::Context) -> usize {
19209            4
19210        }
19211    }
19212
19213    unsafe impl
19214        fidl::encoding::Encode<
19215            NodeListExtendedAttributesRequest,
19216            fdomain_client::fidl::FDomainResourceDialect,
19217        > for &mut NodeListExtendedAttributesRequest
19218    {
19219        #[inline]
19220        unsafe fn encode(
19221            self,
19222            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19223            offset: usize,
19224            _depth: fidl::encoding::Depth,
19225        ) -> fidl::Result<()> {
19226            encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
19227            // Delegate to tuple encoding.
19228            fidl::encoding::Encode::<
19229                NodeListExtendedAttributesRequest,
19230                fdomain_client::fidl::FDomainResourceDialect,
19231            >::encode(
19232                (<fidl::encoding::Endpoint<
19233                    fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19234                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
19235                    &mut self.iterator
19236                ),),
19237                encoder,
19238                offset,
19239                _depth,
19240            )
19241        }
19242    }
19243    unsafe impl<
19244            T0: fidl::encoding::Encode<
19245                fidl::encoding::Endpoint<
19246                    fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19247                >,
19248                fdomain_client::fidl::FDomainResourceDialect,
19249            >,
19250        >
19251        fidl::encoding::Encode<
19252            NodeListExtendedAttributesRequest,
19253            fdomain_client::fidl::FDomainResourceDialect,
19254        > for (T0,)
19255    {
19256        #[inline]
19257        unsafe fn encode(
19258            self,
19259            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19260            offset: usize,
19261            depth: fidl::encoding::Depth,
19262        ) -> fidl::Result<()> {
19263            encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
19264            // Zero out padding regions. There's no need to apply masks
19265            // because the unmasked parts will be overwritten by fields.
19266            // Write the fields.
19267            self.0.encode(encoder, offset + 0, depth)?;
19268            Ok(())
19269        }
19270    }
19271
19272    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19273        for NodeListExtendedAttributesRequest
19274    {
19275        #[inline(always)]
19276        fn new_empty() -> Self {
19277            Self {
19278                iterator: fidl::new_empty!(
19279                    fidl::encoding::Endpoint<
19280                        fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19281                    >,
19282                    fdomain_client::fidl::FDomainResourceDialect
19283                ),
19284            }
19285        }
19286
19287        #[inline]
19288        unsafe fn decode(
19289            &mut self,
19290            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19291            offset: usize,
19292            _depth: fidl::encoding::Depth,
19293        ) -> fidl::Result<()> {
19294            decoder.debug_check_bounds::<Self>(offset);
19295            // Verify that padding bytes are zero.
19296            fidl::decode!(
19297                fidl::encoding::Endpoint<
19298                    fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19299                >,
19300                fdomain_client::fidl::FDomainResourceDialect,
19301                &mut self.iterator,
19302                decoder,
19303                offset + 0,
19304                _depth
19305            )?;
19306            Ok(())
19307        }
19308    }
19309
19310    impl fidl::encoding::ResourceTypeMarker for NodeOnOpenRequest {
19311        type Borrowed<'a> = &'a mut Self;
19312        fn take_or_borrow<'a>(
19313            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19314        ) -> Self::Borrowed<'a> {
19315            value
19316        }
19317    }
19318
19319    unsafe impl fidl::encoding::TypeMarker for NodeOnOpenRequest {
19320        type Owned = Self;
19321
19322        #[inline(always)]
19323        fn inline_align(_context: fidl::encoding::Context) -> usize {
19324            8
19325        }
19326
19327        #[inline(always)]
19328        fn inline_size(_context: fidl::encoding::Context) -> usize {
19329            24
19330        }
19331    }
19332
19333    unsafe impl
19334        fidl::encoding::Encode<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
19335        for &mut NodeOnOpenRequest
19336    {
19337        #[inline]
19338        unsafe fn encode(
19339            self,
19340            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19341            offset: usize,
19342            _depth: fidl::encoding::Depth,
19343        ) -> fidl::Result<()> {
19344            encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
19345            // Delegate to tuple encoding.
19346            fidl::encoding::Encode::<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
19347                (
19348                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
19349                    <fidl::encoding::OptionalUnion<NodeInfoDeprecated> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.info),
19350                ),
19351                encoder, offset, _depth
19352            )
19353        }
19354    }
19355    unsafe impl<
19356            T0: fidl::encoding::Encode<i32, fdomain_client::fidl::FDomainResourceDialect>,
19357            T1: fidl::encoding::Encode<
19358                fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19359                fdomain_client::fidl::FDomainResourceDialect,
19360            >,
19361        >
19362        fidl::encoding::Encode<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
19363        for (T0, T1)
19364    {
19365        #[inline]
19366        unsafe fn encode(
19367            self,
19368            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19369            offset: usize,
19370            depth: fidl::encoding::Depth,
19371        ) -> fidl::Result<()> {
19372            encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
19373            // Zero out padding regions. There's no need to apply masks
19374            // because the unmasked parts will be overwritten by fields.
19375            unsafe {
19376                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
19377                (ptr as *mut u64).write_unaligned(0);
19378            }
19379            // Write the fields.
19380            self.0.encode(encoder, offset + 0, depth)?;
19381            self.1.encode(encoder, offset + 8, depth)?;
19382            Ok(())
19383        }
19384    }
19385
19386    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19387        for NodeOnOpenRequest
19388    {
19389        #[inline(always)]
19390        fn new_empty() -> Self {
19391            Self {
19392                s: fidl::new_empty!(i32, fdomain_client::fidl::FDomainResourceDialect),
19393                info: fidl::new_empty!(
19394                    fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19395                    fdomain_client::fidl::FDomainResourceDialect
19396                ),
19397            }
19398        }
19399
19400        #[inline]
19401        unsafe fn decode(
19402            &mut self,
19403            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19404            offset: usize,
19405            _depth: fidl::encoding::Depth,
19406        ) -> fidl::Result<()> {
19407            decoder.debug_check_bounds::<Self>(offset);
19408            // Verify that padding bytes are zero.
19409            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
19410            let padval = unsafe { (ptr as *const u64).read_unaligned() };
19411            let mask = 0xffffffff00000000u64;
19412            let maskedval = padval & mask;
19413            if maskedval != 0 {
19414                return Err(fidl::Error::NonZeroPadding {
19415                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
19416                });
19417            }
19418            fidl::decode!(
19419                i32,
19420                fdomain_client::fidl::FDomainResourceDialect,
19421                &mut self.s,
19422                decoder,
19423                offset + 0,
19424                _depth
19425            )?;
19426            fidl::decode!(
19427                fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19428                fdomain_client::fidl::FDomainResourceDialect,
19429                &mut self.info,
19430                decoder,
19431                offset + 8,
19432                _depth
19433            )?;
19434            Ok(())
19435        }
19436    }
19437
19438    impl fidl::encoding::ResourceTypeMarker for NodeSetExtendedAttributeRequest {
19439        type Borrowed<'a> = &'a mut Self;
19440        fn take_or_borrow<'a>(
19441            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19442        ) -> Self::Borrowed<'a> {
19443            value
19444        }
19445    }
19446
19447    unsafe impl fidl::encoding::TypeMarker for NodeSetExtendedAttributeRequest {
19448        type Owned = Self;
19449
19450        #[inline(always)]
19451        fn inline_align(_context: fidl::encoding::Context) -> usize {
19452            8
19453        }
19454
19455        #[inline(always)]
19456        fn inline_size(_context: fidl::encoding::Context) -> usize {
19457            40
19458        }
19459    }
19460
19461    unsafe impl
19462        fidl::encoding::Encode<
19463            NodeSetExtendedAttributeRequest,
19464            fdomain_client::fidl::FDomainResourceDialect,
19465        > for &mut NodeSetExtendedAttributeRequest
19466    {
19467        #[inline]
19468        unsafe fn encode(
19469            self,
19470            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19471            offset: usize,
19472            _depth: fidl::encoding::Depth,
19473        ) -> fidl::Result<()> {
19474            encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
19475            // Delegate to tuple encoding.
19476            fidl::encoding::Encode::<
19477                NodeSetExtendedAttributeRequest,
19478                fdomain_client::fidl::FDomainResourceDialect,
19479            >::encode(
19480                (
19481                    <fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(
19482                        &self.name,
19483                    ),
19484                    <ExtendedAttributeValue as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
19485                        &mut self.value,
19486                    ),
19487                    <SetExtendedAttributeMode as fidl::encoding::ValueTypeMarker>::borrow(
19488                        &self.mode,
19489                    ),
19490                ),
19491                encoder,
19492                offset,
19493                _depth,
19494            )
19495        }
19496    }
19497    unsafe impl<
19498            T0: fidl::encoding::Encode<
19499                fidl::encoding::Vector<u8, 255>,
19500                fdomain_client::fidl::FDomainResourceDialect,
19501            >,
19502            T1: fidl::encoding::Encode<
19503                ExtendedAttributeValue,
19504                fdomain_client::fidl::FDomainResourceDialect,
19505            >,
19506            T2: fidl::encoding::Encode<
19507                SetExtendedAttributeMode,
19508                fdomain_client::fidl::FDomainResourceDialect,
19509            >,
19510        >
19511        fidl::encoding::Encode<
19512            NodeSetExtendedAttributeRequest,
19513            fdomain_client::fidl::FDomainResourceDialect,
19514        > for (T0, T1, T2)
19515    {
19516        #[inline]
19517        unsafe fn encode(
19518            self,
19519            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19520            offset: usize,
19521            depth: fidl::encoding::Depth,
19522        ) -> fidl::Result<()> {
19523            encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
19524            // Zero out padding regions. There's no need to apply masks
19525            // because the unmasked parts will be overwritten by fields.
19526            unsafe {
19527                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
19528                (ptr as *mut u64).write_unaligned(0);
19529            }
19530            // Write the fields.
19531            self.0.encode(encoder, offset + 0, depth)?;
19532            self.1.encode(encoder, offset + 16, depth)?;
19533            self.2.encode(encoder, offset + 32, depth)?;
19534            Ok(())
19535        }
19536    }
19537
19538    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19539        for NodeSetExtendedAttributeRequest
19540    {
19541        #[inline(always)]
19542        fn new_empty() -> Self {
19543            Self {
19544                name: fidl::new_empty!(fidl::encoding::Vector<u8, 255>, fdomain_client::fidl::FDomainResourceDialect),
19545                value: fidl::new_empty!(
19546                    ExtendedAttributeValue,
19547                    fdomain_client::fidl::FDomainResourceDialect
19548                ),
19549                mode: fidl::new_empty!(
19550                    SetExtendedAttributeMode,
19551                    fdomain_client::fidl::FDomainResourceDialect
19552                ),
19553            }
19554        }
19555
19556        #[inline]
19557        unsafe fn decode(
19558            &mut self,
19559            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19560            offset: usize,
19561            _depth: fidl::encoding::Depth,
19562        ) -> fidl::Result<()> {
19563            decoder.debug_check_bounds::<Self>(offset);
19564            // Verify that padding bytes are zero.
19565            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
19566            let padval = unsafe { (ptr as *const u64).read_unaligned() };
19567            let mask = 0xffffffff00000000u64;
19568            let maskedval = padval & mask;
19569            if maskedval != 0 {
19570                return Err(fidl::Error::NonZeroPadding {
19571                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
19572                });
19573            }
19574            fidl::decode!(fidl::encoding::Vector<u8, 255>, fdomain_client::fidl::FDomainResourceDialect, &mut self.name, decoder, offset + 0, _depth)?;
19575            fidl::decode!(
19576                ExtendedAttributeValue,
19577                fdomain_client::fidl::FDomainResourceDialect,
19578                &mut self.value,
19579                decoder,
19580                offset + 16,
19581                _depth
19582            )?;
19583            fidl::decode!(
19584                SetExtendedAttributeMode,
19585                fdomain_client::fidl::FDomainResourceDialect,
19586                &mut self.mode,
19587                decoder,
19588                offset + 32,
19589                _depth
19590            )?;
19591            Ok(())
19592        }
19593    }
19594
19595    impl ConnectionInfo {
19596        #[inline(always)]
19597        fn max_ordinal_present(&self) -> u64 {
19598            if let Some(_) = self.rights {
19599                return 1;
19600            }
19601            0
19602        }
19603    }
19604
19605    impl fidl::encoding::ResourceTypeMarker for ConnectionInfo {
19606        type Borrowed<'a> = &'a mut Self;
19607        fn take_or_borrow<'a>(
19608            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19609        ) -> Self::Borrowed<'a> {
19610            value
19611        }
19612    }
19613
19614    unsafe impl fidl::encoding::TypeMarker for ConnectionInfo {
19615        type Owned = Self;
19616
19617        #[inline(always)]
19618        fn inline_align(_context: fidl::encoding::Context) -> usize {
19619            8
19620        }
19621
19622        #[inline(always)]
19623        fn inline_size(_context: fidl::encoding::Context) -> usize {
19624            16
19625        }
19626    }
19627
19628    unsafe impl fidl::encoding::Encode<ConnectionInfo, fdomain_client::fidl::FDomainResourceDialect>
19629        for &mut ConnectionInfo
19630    {
19631        unsafe fn encode(
19632            self,
19633            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19634            offset: usize,
19635            mut depth: fidl::encoding::Depth,
19636        ) -> fidl::Result<()> {
19637            encoder.debug_check_bounds::<ConnectionInfo>(offset);
19638            // Vector header
19639            let max_ordinal: u64 = self.max_ordinal_present();
19640            encoder.write_num(max_ordinal, offset);
19641            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
19642            // Calling encoder.out_of_line_offset(0) is not allowed.
19643            if max_ordinal == 0 {
19644                return Ok(());
19645            }
19646            depth.increment()?;
19647            let envelope_size = 8;
19648            let bytes_len = max_ordinal as usize * envelope_size;
19649            #[allow(unused_variables)]
19650            let offset = encoder.out_of_line_offset(bytes_len);
19651            let mut _prev_end_offset: usize = 0;
19652            if 1 > max_ordinal {
19653                return Ok(());
19654            }
19655
19656            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
19657            // are envelope_size bytes.
19658            let cur_offset: usize = (1 - 1) * envelope_size;
19659
19660            // Zero reserved fields.
19661            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19662
19663            // Safety:
19664            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
19665            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
19666            //   envelope_size bytes, there is always sufficient room.
19667            fidl::encoding::encode_in_envelope_optional::<
19668                Operations,
19669                fdomain_client::fidl::FDomainResourceDialect,
19670            >(
19671                self.rights.as_ref().map(<Operations as fidl::encoding::ValueTypeMarker>::borrow),
19672                encoder,
19673                offset + cur_offset,
19674                depth,
19675            )?;
19676
19677            _prev_end_offset = cur_offset + envelope_size;
19678
19679            Ok(())
19680        }
19681    }
19682
19683    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for ConnectionInfo {
19684        #[inline(always)]
19685        fn new_empty() -> Self {
19686            Self::default()
19687        }
19688
19689        unsafe fn decode(
19690            &mut self,
19691            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19692            offset: usize,
19693            mut depth: fidl::encoding::Depth,
19694        ) -> fidl::Result<()> {
19695            decoder.debug_check_bounds::<Self>(offset);
19696            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
19697                None => return Err(fidl::Error::NotNullable),
19698                Some(len) => len,
19699            };
19700            // Calling decoder.out_of_line_offset(0) is not allowed.
19701            if len == 0 {
19702                return Ok(());
19703            };
19704            depth.increment()?;
19705            let envelope_size = 8;
19706            let bytes_len = len * envelope_size;
19707            let offset = decoder.out_of_line_offset(bytes_len)?;
19708            // Decode the envelope for each type.
19709            let mut _next_ordinal_to_read = 0;
19710            let mut next_offset = offset;
19711            let end_offset = offset + bytes_len;
19712            _next_ordinal_to_read += 1;
19713            if next_offset >= end_offset {
19714                return Ok(());
19715            }
19716
19717            // Decode unknown envelopes for gaps in ordinals.
19718            while _next_ordinal_to_read < 1 {
19719                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19720                _next_ordinal_to_read += 1;
19721                next_offset += envelope_size;
19722            }
19723
19724            let next_out_of_line = decoder.next_out_of_line();
19725            let handles_before = decoder.remaining_handles();
19726            if let Some((inlined, num_bytes, num_handles)) =
19727                fidl::encoding::decode_envelope_header(decoder, next_offset)?
19728            {
19729                let member_inline_size =
19730                    <Operations as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19731                if inlined != (member_inline_size <= 4) {
19732                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
19733                }
19734                let inner_offset;
19735                let mut inner_depth = depth.clone();
19736                if inlined {
19737                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19738                    inner_offset = next_offset;
19739                } else {
19740                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19741                    inner_depth.increment()?;
19742                }
19743                let val_ref = self.rights.get_or_insert_with(|| {
19744                    fidl::new_empty!(Operations, fdomain_client::fidl::FDomainResourceDialect)
19745                });
19746                fidl::decode!(
19747                    Operations,
19748                    fdomain_client::fidl::FDomainResourceDialect,
19749                    val_ref,
19750                    decoder,
19751                    inner_offset,
19752                    inner_depth
19753                )?;
19754                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19755                {
19756                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
19757                }
19758                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19759                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19760                }
19761            }
19762
19763            next_offset += envelope_size;
19764
19765            // Decode the remaining unknown envelopes.
19766            while next_offset < end_offset {
19767                _next_ordinal_to_read += 1;
19768                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19769                next_offset += envelope_size;
19770            }
19771
19772            Ok(())
19773        }
19774    }
19775
19776    impl FileInfo {
19777        #[inline(always)]
19778        fn max_ordinal_present(&self) -> u64 {
19779            if let Some(_) = self.attributes {
19780                return 4;
19781            }
19782            if let Some(_) = self.stream {
19783                return 3;
19784            }
19785            if let Some(_) = self.observer {
19786                return 2;
19787            }
19788            if let Some(_) = self.is_append {
19789                return 1;
19790            }
19791            0
19792        }
19793    }
19794
19795    impl fidl::encoding::ResourceTypeMarker for FileInfo {
19796        type Borrowed<'a> = &'a mut Self;
19797        fn take_or_borrow<'a>(
19798            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19799        ) -> Self::Borrowed<'a> {
19800            value
19801        }
19802    }
19803
19804    unsafe impl fidl::encoding::TypeMarker for FileInfo {
19805        type Owned = Self;
19806
19807        #[inline(always)]
19808        fn inline_align(_context: fidl::encoding::Context) -> usize {
19809            8
19810        }
19811
19812        #[inline(always)]
19813        fn inline_size(_context: fidl::encoding::Context) -> usize {
19814            16
19815        }
19816    }
19817
19818    unsafe impl fidl::encoding::Encode<FileInfo, fdomain_client::fidl::FDomainResourceDialect>
19819        for &mut FileInfo
19820    {
19821        unsafe fn encode(
19822            self,
19823            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19824            offset: usize,
19825            mut depth: fidl::encoding::Depth,
19826        ) -> fidl::Result<()> {
19827            encoder.debug_check_bounds::<FileInfo>(offset);
19828            // Vector header
19829            let max_ordinal: u64 = self.max_ordinal_present();
19830            encoder.write_num(max_ordinal, offset);
19831            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
19832            // Calling encoder.out_of_line_offset(0) is not allowed.
19833            if max_ordinal == 0 {
19834                return Ok(());
19835            }
19836            depth.increment()?;
19837            let envelope_size = 8;
19838            let bytes_len = max_ordinal as usize * envelope_size;
19839            #[allow(unused_variables)]
19840            let offset = encoder.out_of_line_offset(bytes_len);
19841            let mut _prev_end_offset: usize = 0;
19842            if 1 > max_ordinal {
19843                return Ok(());
19844            }
19845
19846            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
19847            // are envelope_size bytes.
19848            let cur_offset: usize = (1 - 1) * envelope_size;
19849
19850            // Zero reserved fields.
19851            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19852
19853            // Safety:
19854            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
19855            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
19856            //   envelope_size bytes, there is always sufficient room.
19857            fidl::encoding::encode_in_envelope_optional::<
19858                bool,
19859                fdomain_client::fidl::FDomainResourceDialect,
19860            >(
19861                self.is_append.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
19862                encoder,
19863                offset + cur_offset,
19864                depth,
19865            )?;
19866
19867            _prev_end_offset = cur_offset + envelope_size;
19868            if 2 > max_ordinal {
19869                return Ok(());
19870            }
19871
19872            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
19873            // are envelope_size bytes.
19874            let cur_offset: usize = (2 - 1) * envelope_size;
19875
19876            // Zero reserved fields.
19877            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19878
19879            // Safety:
19880            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
19881            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
19882            //   envelope_size bytes, there is always sufficient room.
19883            fidl::encoding::encode_in_envelope_optional::<
19884                fidl::encoding::HandleType<
19885                    fdomain_client::Event,
19886                    { fidl::ObjectType::EVENT.into_raw() },
19887                    2147483648,
19888                >,
19889                fdomain_client::fidl::FDomainResourceDialect,
19890            >(
19891                self.observer.as_mut().map(
19892                    <fidl::encoding::HandleType<
19893                        fdomain_client::Event,
19894                        { fidl::ObjectType::EVENT.into_raw() },
19895                        2147483648,
19896                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
19897                ),
19898                encoder,
19899                offset + cur_offset,
19900                depth,
19901            )?;
19902
19903            _prev_end_offset = cur_offset + envelope_size;
19904            if 3 > max_ordinal {
19905                return Ok(());
19906            }
19907
19908            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
19909            // are envelope_size bytes.
19910            let cur_offset: usize = (3 - 1) * envelope_size;
19911
19912            // Zero reserved fields.
19913            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19914
19915            // Safety:
19916            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
19917            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
19918            //   envelope_size bytes, there is always sufficient room.
19919            fidl::encoding::encode_in_envelope_optional::<
19920                fidl::encoding::HandleType<
19921                    fdomain_client::Stream,
19922                    { fidl::ObjectType::STREAM.into_raw() },
19923                    2147483648,
19924                >,
19925                fdomain_client::fidl::FDomainResourceDialect,
19926            >(
19927                self.stream.as_mut().map(
19928                    <fidl::encoding::HandleType<
19929                        fdomain_client::Stream,
19930                        { fidl::ObjectType::STREAM.into_raw() },
19931                        2147483648,
19932                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
19933                ),
19934                encoder,
19935                offset + cur_offset,
19936                depth,
19937            )?;
19938
19939            _prev_end_offset = cur_offset + envelope_size;
19940            if 4 > max_ordinal {
19941                return Ok(());
19942            }
19943
19944            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
19945            // are envelope_size bytes.
19946            let cur_offset: usize = (4 - 1) * envelope_size;
19947
19948            // Zero reserved fields.
19949            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19950
19951            // Safety:
19952            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
19953            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
19954            //   envelope_size bytes, there is always sufficient room.
19955            fidl::encoding::encode_in_envelope_optional::<
19956                NodeAttributes2,
19957                fdomain_client::fidl::FDomainResourceDialect,
19958            >(
19959                self.attributes
19960                    .as_ref()
19961                    .map(<NodeAttributes2 as fidl::encoding::ValueTypeMarker>::borrow),
19962                encoder,
19963                offset + cur_offset,
19964                depth,
19965            )?;
19966
19967            _prev_end_offset = cur_offset + envelope_size;
19968
19969            Ok(())
19970        }
19971    }
19972
19973    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for FileInfo {
19974        #[inline(always)]
19975        fn new_empty() -> Self {
19976            Self::default()
19977        }
19978
19979        unsafe fn decode(
19980            &mut self,
19981            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19982            offset: usize,
19983            mut depth: fidl::encoding::Depth,
19984        ) -> fidl::Result<()> {
19985            decoder.debug_check_bounds::<Self>(offset);
19986            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
19987                None => return Err(fidl::Error::NotNullable),
19988                Some(len) => len,
19989            };
19990            // Calling decoder.out_of_line_offset(0) is not allowed.
19991            if len == 0 {
19992                return Ok(());
19993            };
19994            depth.increment()?;
19995            let envelope_size = 8;
19996            let bytes_len = len * envelope_size;
19997            let offset = decoder.out_of_line_offset(bytes_len)?;
19998            // Decode the envelope for each type.
19999            let mut _next_ordinal_to_read = 0;
20000            let mut next_offset = offset;
20001            let end_offset = offset + bytes_len;
20002            _next_ordinal_to_read += 1;
20003            if next_offset >= end_offset {
20004                return Ok(());
20005            }
20006
20007            // Decode unknown envelopes for gaps in ordinals.
20008            while _next_ordinal_to_read < 1 {
20009                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20010                _next_ordinal_to_read += 1;
20011                next_offset += envelope_size;
20012            }
20013
20014            let next_out_of_line = decoder.next_out_of_line();
20015            let handles_before = decoder.remaining_handles();
20016            if let Some((inlined, num_bytes, num_handles)) =
20017                fidl::encoding::decode_envelope_header(decoder, next_offset)?
20018            {
20019                let member_inline_size =
20020                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
20021                if inlined != (member_inline_size <= 4) {
20022                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
20023                }
20024                let inner_offset;
20025                let mut inner_depth = depth.clone();
20026                if inlined {
20027                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20028                    inner_offset = next_offset;
20029                } else {
20030                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20031                    inner_depth.increment()?;
20032                }
20033                let val_ref = self.is_append.get_or_insert_with(|| {
20034                    fidl::new_empty!(bool, fdomain_client::fidl::FDomainResourceDialect)
20035                });
20036                fidl::decode!(
20037                    bool,
20038                    fdomain_client::fidl::FDomainResourceDialect,
20039                    val_ref,
20040                    decoder,
20041                    inner_offset,
20042                    inner_depth
20043                )?;
20044                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20045                {
20046                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
20047                }
20048                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20049                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20050                }
20051            }
20052
20053            next_offset += envelope_size;
20054            _next_ordinal_to_read += 1;
20055            if next_offset >= end_offset {
20056                return Ok(());
20057            }
20058
20059            // Decode unknown envelopes for gaps in ordinals.
20060            while _next_ordinal_to_read < 2 {
20061                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20062                _next_ordinal_to_read += 1;
20063                next_offset += envelope_size;
20064            }
20065
20066            let next_out_of_line = decoder.next_out_of_line();
20067            let handles_before = decoder.remaining_handles();
20068            if let Some((inlined, num_bytes, num_handles)) =
20069                fidl::encoding::decode_envelope_header(decoder, next_offset)?
20070            {
20071                let member_inline_size = <fidl::encoding::HandleType<
20072                    fdomain_client::Event,
20073                    { fidl::ObjectType::EVENT.into_raw() },
20074                    2147483648,
20075                > as fidl::encoding::TypeMarker>::inline_size(
20076                    decoder.context
20077                );
20078                if inlined != (member_inline_size <= 4) {
20079                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
20080                }
20081                let inner_offset;
20082                let mut inner_depth = depth.clone();
20083                if inlined {
20084                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20085                    inner_offset = next_offset;
20086                } else {
20087                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20088                    inner_depth.increment()?;
20089                }
20090                let val_ref =
20091                self.observer.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect));
20092                fidl::decode!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
20093                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20094                {
20095                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
20096                }
20097                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20098                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20099                }
20100            }
20101
20102            next_offset += envelope_size;
20103            _next_ordinal_to_read += 1;
20104            if next_offset >= end_offset {
20105                return Ok(());
20106            }
20107
20108            // Decode unknown envelopes for gaps in ordinals.
20109            while _next_ordinal_to_read < 3 {
20110                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20111                _next_ordinal_to_read += 1;
20112                next_offset += envelope_size;
20113            }
20114
20115            let next_out_of_line = decoder.next_out_of_line();
20116            let handles_before = decoder.remaining_handles();
20117            if let Some((inlined, num_bytes, num_handles)) =
20118                fidl::encoding::decode_envelope_header(decoder, next_offset)?
20119            {
20120                let member_inline_size = <fidl::encoding::HandleType<
20121                    fdomain_client::Stream,
20122                    { fidl::ObjectType::STREAM.into_raw() },
20123                    2147483648,
20124                > as fidl::encoding::TypeMarker>::inline_size(
20125                    decoder.context
20126                );
20127                if inlined != (member_inline_size <= 4) {
20128                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
20129                }
20130                let inner_offset;
20131                let mut inner_depth = depth.clone();
20132                if inlined {
20133                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20134                    inner_offset = next_offset;
20135                } else {
20136                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20137                    inner_depth.increment()?;
20138                }
20139                let val_ref =
20140                self.stream.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect));
20141                fidl::decode!(fidl::encoding::HandleType<fdomain_client::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
20142                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20143                {
20144                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
20145                }
20146                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20147                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20148                }
20149            }
20150
20151            next_offset += envelope_size;
20152            _next_ordinal_to_read += 1;
20153            if next_offset >= end_offset {
20154                return Ok(());
20155            }
20156
20157            // Decode unknown envelopes for gaps in ordinals.
20158            while _next_ordinal_to_read < 4 {
20159                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20160                _next_ordinal_to_read += 1;
20161                next_offset += envelope_size;
20162            }
20163
20164            let next_out_of_line = decoder.next_out_of_line();
20165            let handles_before = decoder.remaining_handles();
20166            if let Some((inlined, num_bytes, num_handles)) =
20167                fidl::encoding::decode_envelope_header(decoder, next_offset)?
20168            {
20169                let member_inline_size =
20170                    <NodeAttributes2 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
20171                if inlined != (member_inline_size <= 4) {
20172                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
20173                }
20174                let inner_offset;
20175                let mut inner_depth = depth.clone();
20176                if inlined {
20177                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20178                    inner_offset = next_offset;
20179                } else {
20180                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20181                    inner_depth.increment()?;
20182                }
20183                let val_ref = self.attributes.get_or_insert_with(|| {
20184                    fidl::new_empty!(NodeAttributes2, fdomain_client::fidl::FDomainResourceDialect)
20185                });
20186                fidl::decode!(
20187                    NodeAttributes2,
20188                    fdomain_client::fidl::FDomainResourceDialect,
20189                    val_ref,
20190                    decoder,
20191                    inner_offset,
20192                    inner_depth
20193                )?;
20194                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20195                {
20196                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
20197                }
20198                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20199                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20200                }
20201            }
20202
20203            next_offset += envelope_size;
20204
20205            // Decode the remaining unknown envelopes.
20206            while next_offset < end_offset {
20207                _next_ordinal_to_read += 1;
20208                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20209                next_offset += envelope_size;
20210            }
20211
20212            Ok(())
20213        }
20214    }
20215
20216    impl fidl::encoding::ResourceTypeMarker for ExtendedAttributeValue {
20217        type Borrowed<'a> = &'a mut Self;
20218        fn take_or_borrow<'a>(
20219            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20220        ) -> Self::Borrowed<'a> {
20221            value
20222        }
20223    }
20224
20225    unsafe impl fidl::encoding::TypeMarker for ExtendedAttributeValue {
20226        type Owned = Self;
20227
20228        #[inline(always)]
20229        fn inline_align(_context: fidl::encoding::Context) -> usize {
20230            8
20231        }
20232
20233        #[inline(always)]
20234        fn inline_size(_context: fidl::encoding::Context) -> usize {
20235            16
20236        }
20237    }
20238
20239    unsafe impl
20240        fidl::encoding::Encode<ExtendedAttributeValue, fdomain_client::fidl::FDomainResourceDialect>
20241        for &mut ExtendedAttributeValue
20242    {
20243        #[inline]
20244        unsafe fn encode(
20245            self,
20246            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20247            offset: usize,
20248            _depth: fidl::encoding::Depth,
20249        ) -> fidl::Result<()> {
20250            encoder.debug_check_bounds::<ExtendedAttributeValue>(offset);
20251            encoder.write_num::<u64>(self.ordinal(), offset);
20252            match self {
20253                ExtendedAttributeValue::Bytes(ref val) => fidl::encoding::encode_in_envelope::<
20254                    fidl::encoding::Vector<u8, 32768>,
20255                    fdomain_client::fidl::FDomainResourceDialect,
20256                >(
20257                    <fidl::encoding::Vector<u8, 32768> as fidl::encoding::ValueTypeMarker>::borrow(
20258                        val,
20259                    ),
20260                    encoder,
20261                    offset + 8,
20262                    _depth,
20263                ),
20264                ExtendedAttributeValue::Buffer(ref mut val) => {
20265                    fidl::encoding::encode_in_envelope::<
20266                        fidl::encoding::HandleType<
20267                            fdomain_client::Vmo,
20268                            { fidl::ObjectType::VMO.into_raw() },
20269                            2147483648,
20270                        >,
20271                        fdomain_client::fidl::FDomainResourceDialect,
20272                    >(
20273                        <fidl::encoding::HandleType<
20274                            fdomain_client::Vmo,
20275                            { fidl::ObjectType::VMO.into_raw() },
20276                            2147483648,
20277                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20278                            val
20279                        ),
20280                        encoder,
20281                        offset + 8,
20282                        _depth,
20283                    )
20284                }
20285                ExtendedAttributeValue::__SourceBreaking { .. } => {
20286                    Err(fidl::Error::UnknownUnionTag)
20287                }
20288            }
20289        }
20290    }
20291
20292    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
20293        for ExtendedAttributeValue
20294    {
20295        #[inline(always)]
20296        fn new_empty() -> Self {
20297            Self::__SourceBreaking { unknown_ordinal: 0 }
20298        }
20299
20300        #[inline]
20301        unsafe fn decode(
20302            &mut self,
20303            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20304            offset: usize,
20305            mut depth: fidl::encoding::Depth,
20306        ) -> fidl::Result<()> {
20307            decoder.debug_check_bounds::<Self>(offset);
20308            #[allow(unused_variables)]
20309            let next_out_of_line = decoder.next_out_of_line();
20310            let handles_before = decoder.remaining_handles();
20311            let (ordinal, inlined, num_bytes, num_handles) =
20312                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20313
20314            let member_inline_size = match ordinal {
20315                1 => {
20316                    <fidl::encoding::Vector<u8, 32768> as fidl::encoding::TypeMarker>::inline_size(
20317                        decoder.context,
20318                    )
20319                }
20320                2 => <fidl::encoding::HandleType<
20321                    fdomain_client::Vmo,
20322                    { fidl::ObjectType::VMO.into_raw() },
20323                    2147483648,
20324                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20325                0 => return Err(fidl::Error::UnknownUnionTag),
20326                _ => num_bytes as usize,
20327            };
20328
20329            if inlined != (member_inline_size <= 4) {
20330                return Err(fidl::Error::InvalidInlineBitInEnvelope);
20331            }
20332            let _inner_offset;
20333            if inlined {
20334                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20335                _inner_offset = offset + 8;
20336            } else {
20337                depth.increment()?;
20338                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20339            }
20340            match ordinal {
20341                1 => {
20342                    #[allow(irrefutable_let_patterns)]
20343                    if let ExtendedAttributeValue::Bytes(_) = self {
20344                        // Do nothing, read the value into the object
20345                    } else {
20346                        // Initialize `self` to the right variant
20347                        *self = ExtendedAttributeValue::Bytes(
20348                            fidl::new_empty!(fidl::encoding::Vector<u8, 32768>, fdomain_client::fidl::FDomainResourceDialect),
20349                        );
20350                    }
20351                    #[allow(irrefutable_let_patterns)]
20352                    if let ExtendedAttributeValue::Bytes(ref mut val) = self {
20353                        fidl::decode!(fidl::encoding::Vector<u8, 32768>, fdomain_client::fidl::FDomainResourceDialect, val, decoder, _inner_offset, depth)?;
20354                    } else {
20355                        unreachable!()
20356                    }
20357                }
20358                2 => {
20359                    #[allow(irrefutable_let_patterns)]
20360                    if let ExtendedAttributeValue::Buffer(_) = self {
20361                        // Do nothing, read the value into the object
20362                    } else {
20363                        // Initialize `self` to the right variant
20364                        *self = ExtendedAttributeValue::Buffer(
20365                            fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
20366                        );
20367                    }
20368                    #[allow(irrefutable_let_patterns)]
20369                    if let ExtendedAttributeValue::Buffer(ref mut val) = self {
20370                        fidl::decode!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val, decoder, _inner_offset, depth)?;
20371                    } else {
20372                        unreachable!()
20373                    }
20374                }
20375                #[allow(deprecated)]
20376                ordinal => {
20377                    for _ in 0..num_handles {
20378                        decoder.drop_next_handle()?;
20379                    }
20380                    *self = ExtendedAttributeValue::__SourceBreaking { unknown_ordinal: ordinal };
20381                }
20382            }
20383            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20384                return Err(fidl::Error::InvalidNumBytesInEnvelope);
20385            }
20386            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20387                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20388            }
20389            Ok(())
20390        }
20391    }
20392
20393    impl fidl::encoding::ResourceTypeMarker for NodeInfoDeprecated {
20394        type Borrowed<'a> = &'a mut Self;
20395        fn take_or_borrow<'a>(
20396            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20397        ) -> Self::Borrowed<'a> {
20398            value
20399        }
20400    }
20401
20402    unsafe impl fidl::encoding::TypeMarker for NodeInfoDeprecated {
20403        type Owned = Self;
20404
20405        #[inline(always)]
20406        fn inline_align(_context: fidl::encoding::Context) -> usize {
20407            8
20408        }
20409
20410        #[inline(always)]
20411        fn inline_size(_context: fidl::encoding::Context) -> usize {
20412            16
20413        }
20414    }
20415
20416    unsafe impl
20417        fidl::encoding::Encode<NodeInfoDeprecated, fdomain_client::fidl::FDomainResourceDialect>
20418        for &mut NodeInfoDeprecated
20419    {
20420        #[inline]
20421        unsafe fn encode(
20422            self,
20423            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20424            offset: usize,
20425            _depth: fidl::encoding::Depth,
20426        ) -> fidl::Result<()> {
20427            encoder.debug_check_bounds::<NodeInfoDeprecated>(offset);
20428            encoder.write_num::<u64>(self.ordinal(), offset);
20429            match self {
20430                NodeInfoDeprecated::Service(ref val) => fidl::encoding::encode_in_envelope::<
20431                    Service,
20432                    fdomain_client::fidl::FDomainResourceDialect,
20433                >(
20434                    <Service as fidl::encoding::ValueTypeMarker>::borrow(val),
20435                    encoder,
20436                    offset + 8,
20437                    _depth,
20438                ),
20439                NodeInfoDeprecated::File(ref mut val) => fidl::encoding::encode_in_envelope::<
20440                    FileObject,
20441                    fdomain_client::fidl::FDomainResourceDialect,
20442                >(
20443                    <FileObject as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
20444                    encoder,
20445                    offset + 8,
20446                    _depth,
20447                ),
20448                NodeInfoDeprecated::Directory(ref val) => fidl::encoding::encode_in_envelope::<
20449                    DirectoryObject,
20450                    fdomain_client::fidl::FDomainResourceDialect,
20451                >(
20452                    <DirectoryObject as fidl::encoding::ValueTypeMarker>::borrow(val),
20453                    encoder,
20454                    offset + 8,
20455                    _depth,
20456                ),
20457                NodeInfoDeprecated::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
20458                    SymlinkObject,
20459                    fdomain_client::fidl::FDomainResourceDialect,
20460                >(
20461                    <SymlinkObject as fidl::encoding::ValueTypeMarker>::borrow(val),
20462                    encoder,
20463                    offset + 8,
20464                    _depth,
20465                ),
20466            }
20467        }
20468    }
20469
20470    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
20471        for NodeInfoDeprecated
20472    {
20473        #[inline(always)]
20474        fn new_empty() -> Self {
20475            Self::Service(fidl::new_empty!(Service, fdomain_client::fidl::FDomainResourceDialect))
20476        }
20477
20478        #[inline]
20479        unsafe fn decode(
20480            &mut self,
20481            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20482            offset: usize,
20483            mut depth: fidl::encoding::Depth,
20484        ) -> fidl::Result<()> {
20485            decoder.debug_check_bounds::<Self>(offset);
20486            #[allow(unused_variables)]
20487            let next_out_of_line = decoder.next_out_of_line();
20488            let handles_before = decoder.remaining_handles();
20489            let (ordinal, inlined, num_bytes, num_handles) =
20490                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20491
20492            let member_inline_size = match ordinal {
20493                1 => <Service as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20494                2 => <FileObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20495                3 => <DirectoryObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20496                4 => <SymlinkObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20497                _ => return Err(fidl::Error::UnknownUnionTag),
20498            };
20499
20500            if inlined != (member_inline_size <= 4) {
20501                return Err(fidl::Error::InvalidInlineBitInEnvelope);
20502            }
20503            let _inner_offset;
20504            if inlined {
20505                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20506                _inner_offset = offset + 8;
20507            } else {
20508                depth.increment()?;
20509                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20510            }
20511            match ordinal {
20512                1 => {
20513                    #[allow(irrefutable_let_patterns)]
20514                    if let NodeInfoDeprecated::Service(_) = self {
20515                        // Do nothing, read the value into the object
20516                    } else {
20517                        // Initialize `self` to the right variant
20518                        *self = NodeInfoDeprecated::Service(fidl::new_empty!(
20519                            Service,
20520                            fdomain_client::fidl::FDomainResourceDialect
20521                        ));
20522                    }
20523                    #[allow(irrefutable_let_patterns)]
20524                    if let NodeInfoDeprecated::Service(ref mut val) = self {
20525                        fidl::decode!(
20526                            Service,
20527                            fdomain_client::fidl::FDomainResourceDialect,
20528                            val,
20529                            decoder,
20530                            _inner_offset,
20531                            depth
20532                        )?;
20533                    } else {
20534                        unreachable!()
20535                    }
20536                }
20537                2 => {
20538                    #[allow(irrefutable_let_patterns)]
20539                    if let NodeInfoDeprecated::File(_) = self {
20540                        // Do nothing, read the value into the object
20541                    } else {
20542                        // Initialize `self` to the right variant
20543                        *self = NodeInfoDeprecated::File(fidl::new_empty!(
20544                            FileObject,
20545                            fdomain_client::fidl::FDomainResourceDialect
20546                        ));
20547                    }
20548                    #[allow(irrefutable_let_patterns)]
20549                    if let NodeInfoDeprecated::File(ref mut val) = self {
20550                        fidl::decode!(
20551                            FileObject,
20552                            fdomain_client::fidl::FDomainResourceDialect,
20553                            val,
20554                            decoder,
20555                            _inner_offset,
20556                            depth
20557                        )?;
20558                    } else {
20559                        unreachable!()
20560                    }
20561                }
20562                3 => {
20563                    #[allow(irrefutable_let_patterns)]
20564                    if let NodeInfoDeprecated::Directory(_) = self {
20565                        // Do nothing, read the value into the object
20566                    } else {
20567                        // Initialize `self` to the right variant
20568                        *self = NodeInfoDeprecated::Directory(fidl::new_empty!(
20569                            DirectoryObject,
20570                            fdomain_client::fidl::FDomainResourceDialect
20571                        ));
20572                    }
20573                    #[allow(irrefutable_let_patterns)]
20574                    if let NodeInfoDeprecated::Directory(ref mut val) = self {
20575                        fidl::decode!(
20576                            DirectoryObject,
20577                            fdomain_client::fidl::FDomainResourceDialect,
20578                            val,
20579                            decoder,
20580                            _inner_offset,
20581                            depth
20582                        )?;
20583                    } else {
20584                        unreachable!()
20585                    }
20586                }
20587                4 => {
20588                    #[allow(irrefutable_let_patterns)]
20589                    if let NodeInfoDeprecated::Symlink(_) = self {
20590                        // Do nothing, read the value into the object
20591                    } else {
20592                        // Initialize `self` to the right variant
20593                        *self = NodeInfoDeprecated::Symlink(fidl::new_empty!(
20594                            SymlinkObject,
20595                            fdomain_client::fidl::FDomainResourceDialect
20596                        ));
20597                    }
20598                    #[allow(irrefutable_let_patterns)]
20599                    if let NodeInfoDeprecated::Symlink(ref mut val) = self {
20600                        fidl::decode!(
20601                            SymlinkObject,
20602                            fdomain_client::fidl::FDomainResourceDialect,
20603                            val,
20604                            decoder,
20605                            _inner_offset,
20606                            depth
20607                        )?;
20608                    } else {
20609                        unreachable!()
20610                    }
20611                }
20612                ordinal => panic!("unexpected ordinal {:?}", ordinal),
20613            }
20614            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20615                return Err(fidl::Error::InvalidNumBytesInEnvelope);
20616            }
20617            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20618                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20619            }
20620            Ok(())
20621        }
20622    }
20623
20624    impl fidl::encoding::ResourceTypeMarker for Representation {
20625        type Borrowed<'a> = &'a mut Self;
20626        fn take_or_borrow<'a>(
20627            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20628        ) -> Self::Borrowed<'a> {
20629            value
20630        }
20631    }
20632
20633    unsafe impl fidl::encoding::TypeMarker for Representation {
20634        type Owned = Self;
20635
20636        #[inline(always)]
20637        fn inline_align(_context: fidl::encoding::Context) -> usize {
20638            8
20639        }
20640
20641        #[inline(always)]
20642        fn inline_size(_context: fidl::encoding::Context) -> usize {
20643            16
20644        }
20645    }
20646
20647    unsafe impl fidl::encoding::Encode<Representation, fdomain_client::fidl::FDomainResourceDialect>
20648        for &mut Representation
20649    {
20650        #[inline]
20651        unsafe fn encode(
20652            self,
20653            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20654            offset: usize,
20655            _depth: fidl::encoding::Depth,
20656        ) -> fidl::Result<()> {
20657            encoder.debug_check_bounds::<Representation>(offset);
20658            encoder.write_num::<u64>(self.ordinal(), offset);
20659            match self {
20660                Representation::Node(ref val) => fidl::encoding::encode_in_envelope::<
20661                    NodeInfo,
20662                    fdomain_client::fidl::FDomainResourceDialect,
20663                >(
20664                    <NodeInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
20665                    encoder,
20666                    offset + 8,
20667                    _depth,
20668                ),
20669                Representation::Directory(ref val) => fidl::encoding::encode_in_envelope::<
20670                    DirectoryInfo,
20671                    fdomain_client::fidl::FDomainResourceDialect,
20672                >(
20673                    <DirectoryInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
20674                    encoder,
20675                    offset + 8,
20676                    _depth,
20677                ),
20678                Representation::File(ref mut val) => fidl::encoding::encode_in_envelope::<
20679                    FileInfo,
20680                    fdomain_client::fidl::FDomainResourceDialect,
20681                >(
20682                    <FileInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
20683                    encoder,
20684                    offset + 8,
20685                    _depth,
20686                ),
20687                Representation::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
20688                    SymlinkInfo,
20689                    fdomain_client::fidl::FDomainResourceDialect,
20690                >(
20691                    <SymlinkInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
20692                    encoder,
20693                    offset + 8,
20694                    _depth,
20695                ),
20696                Representation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
20697            }
20698        }
20699    }
20700
20701    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for Representation {
20702        #[inline(always)]
20703        fn new_empty() -> Self {
20704            Self::__SourceBreaking { unknown_ordinal: 0 }
20705        }
20706
20707        #[inline]
20708        unsafe fn decode(
20709            &mut self,
20710            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20711            offset: usize,
20712            mut depth: fidl::encoding::Depth,
20713        ) -> fidl::Result<()> {
20714            decoder.debug_check_bounds::<Self>(offset);
20715            #[allow(unused_variables)]
20716            let next_out_of_line = decoder.next_out_of_line();
20717            let handles_before = decoder.remaining_handles();
20718            let (ordinal, inlined, num_bytes, num_handles) =
20719                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20720
20721            let member_inline_size = match ordinal {
20722                1 => <NodeInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20723                2 => <DirectoryInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20724                3 => <FileInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20725                4 => <SymlinkInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20726                0 => return Err(fidl::Error::UnknownUnionTag),
20727                _ => num_bytes as usize,
20728            };
20729
20730            if inlined != (member_inline_size <= 4) {
20731                return Err(fidl::Error::InvalidInlineBitInEnvelope);
20732            }
20733            let _inner_offset;
20734            if inlined {
20735                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20736                _inner_offset = offset + 8;
20737            } else {
20738                depth.increment()?;
20739                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20740            }
20741            match ordinal {
20742                1 => {
20743                    #[allow(irrefutable_let_patterns)]
20744                    if let Representation::Node(_) = self {
20745                        // Do nothing, read the value into the object
20746                    } else {
20747                        // Initialize `self` to the right variant
20748                        *self = Representation::Node(fidl::new_empty!(
20749                            NodeInfo,
20750                            fdomain_client::fidl::FDomainResourceDialect
20751                        ));
20752                    }
20753                    #[allow(irrefutable_let_patterns)]
20754                    if let Representation::Node(ref mut val) = self {
20755                        fidl::decode!(
20756                            NodeInfo,
20757                            fdomain_client::fidl::FDomainResourceDialect,
20758                            val,
20759                            decoder,
20760                            _inner_offset,
20761                            depth
20762                        )?;
20763                    } else {
20764                        unreachable!()
20765                    }
20766                }
20767                2 => {
20768                    #[allow(irrefutable_let_patterns)]
20769                    if let Representation::Directory(_) = self {
20770                        // Do nothing, read the value into the object
20771                    } else {
20772                        // Initialize `self` to the right variant
20773                        *self = Representation::Directory(fidl::new_empty!(
20774                            DirectoryInfo,
20775                            fdomain_client::fidl::FDomainResourceDialect
20776                        ));
20777                    }
20778                    #[allow(irrefutable_let_patterns)]
20779                    if let Representation::Directory(ref mut val) = self {
20780                        fidl::decode!(
20781                            DirectoryInfo,
20782                            fdomain_client::fidl::FDomainResourceDialect,
20783                            val,
20784                            decoder,
20785                            _inner_offset,
20786                            depth
20787                        )?;
20788                    } else {
20789                        unreachable!()
20790                    }
20791                }
20792                3 => {
20793                    #[allow(irrefutable_let_patterns)]
20794                    if let Representation::File(_) = self {
20795                        // Do nothing, read the value into the object
20796                    } else {
20797                        // Initialize `self` to the right variant
20798                        *self = Representation::File(fidl::new_empty!(
20799                            FileInfo,
20800                            fdomain_client::fidl::FDomainResourceDialect
20801                        ));
20802                    }
20803                    #[allow(irrefutable_let_patterns)]
20804                    if let Representation::File(ref mut val) = self {
20805                        fidl::decode!(
20806                            FileInfo,
20807                            fdomain_client::fidl::FDomainResourceDialect,
20808                            val,
20809                            decoder,
20810                            _inner_offset,
20811                            depth
20812                        )?;
20813                    } else {
20814                        unreachable!()
20815                    }
20816                }
20817                4 => {
20818                    #[allow(irrefutable_let_patterns)]
20819                    if let Representation::Symlink(_) = self {
20820                        // Do nothing, read the value into the object
20821                    } else {
20822                        // Initialize `self` to the right variant
20823                        *self = Representation::Symlink(fidl::new_empty!(
20824                            SymlinkInfo,
20825                            fdomain_client::fidl::FDomainResourceDialect
20826                        ));
20827                    }
20828                    #[allow(irrefutable_let_patterns)]
20829                    if let Representation::Symlink(ref mut val) = self {
20830                        fidl::decode!(
20831                            SymlinkInfo,
20832                            fdomain_client::fidl::FDomainResourceDialect,
20833                            val,
20834                            decoder,
20835                            _inner_offset,
20836                            depth
20837                        )?;
20838                    } else {
20839                        unreachable!()
20840                    }
20841                }
20842                #[allow(deprecated)]
20843                ordinal => {
20844                    for _ in 0..num_handles {
20845                        decoder.drop_next_handle()?;
20846                    }
20847                    *self = Representation::__SourceBreaking { unknown_ordinal: ordinal };
20848                }
20849            }
20850            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20851                return Err(fidl::Error::InvalidNumBytesInEnvelope);
20852            }
20853            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20854                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20855            }
20856            Ok(())
20857        }
20858    }
20859}